API query
Function
This API is used to query details about a specified API.
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}/app-auth/{service_id}/apis/{api_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
service_id |
Yes |
String |
Service ID, which can be obtained by querying services |
api_id |
Yes |
String |
App 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 |
---|---|---|
api |
AuthTypeApiBasicInfo object |
API authentication details. |
Parameter |
Type |
Description |
---|---|---|
api_id |
String |
API ID |
api_method |
String |
Request method, which can be GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, or ANY. ANY is the default value. |
api_name |
String |
API name |
api_remark |
String |
API description. The value contains a maximum of 255 characters. |
auth_type |
String |
API authentication mode. The options are: Enums:
|
predict_url |
String |
Prediction URL |
service_id |
String |
Service ID |
service_name |
String |
Service name |
support_app_code |
Boolean |
Whether to support the App code |
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}/app-auth/{service_id}/apis/{api_id}
Example Responses
Status code: 200
OK
{ "api" : { "api_id" : "7e0d272df0e94297b7d4046bada3f158", "api_name" : "infer_ae20fc9fb37c48c28ebc3f3a638c9f48", "api_method" : "ANY", "predict_url" : "https://b86b2d069324491fbd66940e4533b45c.apig.xxxxxx.com/v1/infers/ae20fc9f-b37c-48c2-8ebc-3f3a638c9f48", "support_app_code" : true, "service_id" : "ae20fc9f-b37c-48c2-8ebc-3f3a638c9f48", "service_name" : "service-3c02", "auth_type" : "APP", "api_remark" : "test" } }
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