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

Function metadata

aleph/views/base_api.py:94–116  ·  view source on GitHub ↗

Get operational metadata for the frontend. --- get: summary: Retrieve system metadata from the application. responses: '200': description: OK content: application/json: schema: type: object tags: -

()

Source from the content-addressed store, hash-verified

92
93@blueprint.route("/api/2/metadata")
94def metadata():
95 """Get operational metadata for the frontend.
96 ---
97 get:
98 summary: Retrieve system metadata from the application.
99 responses:
100 '200':
101 description: OK
102 content:
103 application/json:
104 schema:
105 type: object
106 tags:
107 - System
108 """
109 request.rate_limit = None
110 locale = get_locale()
111 data = _metadata_locale(locale)
112 if SETTINGS.SINGLE_USER:
113 role = Role.load_cli_user()
114 authz = Authz.from_role(role)
115 data["token"] = authz.to_token()
116 return jsonify(data)
117
118
119@blueprint.route("/api/openapi.json")

Callers

nothing calls this directly

Calls 5

jsonifyFunction · 0.90
_metadata_localeFunction · 0.85
load_cli_userMethod · 0.80
from_roleMethod · 0.80
to_tokenMethod · 0.80

Tested by

no test coverage detected