Obtaining the Credential for Calling a Prometheus Instance
Function
This API is used to obtain the credential for calling a Prometheus instance.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/access-code
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID obtained from IAM. Generally, a project ID contains 32 characters. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
Content-Type |
No |
String |
Content type, which is application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
access_codes |
Array of AccessCodeModel objects |
Access codes. |
Example Requests
Obtain the credential for calling a Prometheus instance.
https://{Endpoint}/v1/{project_id}/access-code
Example Responses
Status code: 200
OK: The request is successful.
{ "access_codes" : [ { "access_code" : "b***OOJpV***B4ciU*******NfR2f9xZ******tgpba******yQS66Ih****a", "access_code_id" : "c6*04****ee6e******092*****45**3", "create_at" : 1700796457506243016, "status" : "enable" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK: The request is successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.