Querying APIs and Apps
Function
This API is used to query information about APIs and apps authorized by a service.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/services/{service_id}/api-auths
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
service_id |
Yes |
String |
Service ID |
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace_id |
No |
String |
Definition: Workspace ID Constraints: If no workspaces are available, the default value is 0. If a workspace is created and used, use the actual value. For details about how to obtain the ID, see Querying the Workspace List. Range: N/A Default Value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API that is used for obtaining a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
enable_app_auth |
Boolean |
Indicates whether the app has been authorized. |
app_auth_api |
AppAuthApiAuthInfo object |
Basic information about the app to which the API has been authorized |
Parameter |
Type |
Description |
---|---|---|
api_id |
String |
API ID |
authed_apps |
Array of ApigAppDetailInfo objects |
Basic information about the app to which the API has been authorized |
Parameter |
Type |
Description |
---|---|---|
app_codes |
Array of strings |
App code list. When app_type is APIC, this parameter is left blank. |
app_id |
String |
App ID |
app_key |
String |
App key |
app_name |
String |
App name |
app_remark |
String |
App description, which is left blank by default. The value contains a maximum of 200 characters. |
app_secret |
String |
App secret key |
app_type |
String |
App type. Enums:
|
bounded_api_count |
Integer |
Number of APIs bound to the app |
created_at |
Long |
Time when an app is created |
project_id |
String |
Project ID |
updated_at |
Long |
App update time |
user_id |
String |
ID of the user who creates the app |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
GET https://{endpoint}/v1/{project_id}/services/{service_id}/api-auths
Example Responses
Status code: 200
OK
{ "enable_app_auth" : true, "app_auth_api" : { "api_id" : "string", "authed_apps" : [ { "app_codes" : [ "1f5f6cb703864cc580d1ba2cdfd77a271a74eee8e5a242e8b5adc009f77a8b2a" ], "app_id" : "54d9104db9e7418f9138980da63a857f", "app_key" : "151f1f4dfb20445b97326bde3db0c515", "app_name" : "app_for_9332aab245ea4d56871e75d6966aa274", "app_remark" : "app for user op_svc_modelarts_container0", "app_secret" : "0080fa74e6214d0c8d1b2cb01d9d7708", "app_type" : "APIG", "bounded_api_count" : 0, "created_at" : 1574946998167, "project_id" : "string", "updated_at" : 1574946998167, "user_id" : "9332aab245ea4d56871e75d6966aa274" } ] } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot