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: -
()
| 92 | |
| 93 | @blueprint.route("/api/2/metadata") |
| 94 | def 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") |
nothing calls this directly
no test coverage detected