MCPcopy Create free account
hub / github.com/alephdata/aleph / view

Function view

aleph/views/profiles_api.py:23–48  ·  view source on GitHub ↗

--- get: summary: Retrieve a profile description: >- Get a profile with constituent items and the merged pseudo entity. parameters: - in: path name: profile_id required: true schema: type: string responses: '200

(profile_id)

Source from the content-addressed store, hash-verified

21
22@blueprint.route("/api/2/profiles/<profile_id>", methods=["GET"])
23def view(profile_id):
24 """
25 ---
26 get:
27 summary: Retrieve a profile
28 description: >-
29 Get a profile with constituent items and the merged pseudo entity.
30 parameters:
31 - in: path
32 name: profile_id
33 required: true
34 schema:
35 type: string
36 responses:
37 '200':
38 description: OK
39 content:
40 application/json:
41 schema:
42 $ref: '#/components/schemas/Profile'
43 tags:
44 - Profile
45 """
46 profile = obj_or_404(get_profile(profile_id, authz=request.authz))
47 require(request.authz.can(profile.get("collection_id"), request.authz.READ))
48 return ProfileSerializer.jsonify(profile)
49
50
51@blueprint.route("/api/2/profiles/<profile_id>/tags", methods=["GET"])

Callers

nothing calls this directly

Calls 6

obj_or_404Function · 0.90
get_profileFunction · 0.90
requireFunction · 0.90
canMethod · 0.80
jsonifyMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected