Querying Backend APIs
Function
This API is used to obtain all backend APIs of an instance.
URI
GET /v2/{project_id}/apic/instances/{instance_id}/livedata-apis
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference. |
instance_id |
Yes |
String |
Instance ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Long |
Offset from which the query starts. If the offset is less than 0, the value is automatically converted to 0. Default: 0 |
limit |
No |
Integer |
Number of items displayed on each page. Minimum: 1 Maximum: 500 Default: 20 |
app_id |
No |
String |
ID of the integration application to which the backend API belongs. |
app_name |
No |
String |
Name of the integration application to which the backend API belongs. |
name |
No |
String |
Backend API name. |
status |
No |
String |
Backend API status. The value can be 1, 3, or 4, indicating to be developed, developing, and deployed, respectively. |
path |
No |
String |
Backend API request path. |
precise_search |
No |
String |
Parameter name for exact matching. If multiple parameters need to support exact match, separate them with commas (,). Currently, name, path, and status are supported. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
size |
Integer |
Length of the returned resource list. |
total |
Long |
Number of resources that match the query conditions. |
apis |
Array of LdApiInfo objects |
API list. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Backend API name. Must start with a letter or digit and can include letters, digits, and special characters -_./(): Minimum: 3 Maximum: 100 |
path |
String |
Backend API request path. Must start with a slash (/) and can include letters, digits, hyphens (-), underscores (_), and periods (.). Minimum: 2 Maximum: 256 |
method |
String |
Backend API request method, which can be GET, PUT, POST, or DELETE. |
description |
String |
Backend API description, which cannot contain < and >. Minimum: 0 Maximum: 1000 |
version |
String |
Backend API version, which contains 2 to 16 characters excluding < and >. Minimum: 2 Maximum: 64 |
content_type |
String |
Type of the returned backend API. Default: json |
api_signature_id |
String |
ID of the signature key bound to the API for signature authentication Minimum: 1 Maximum: 64 |
roma_app_id |
String |
ID of the integration application to which the backend API belongs. Minimum: 1 Maximum: 65 |
return_format |
Boolean |
Indicates whether to format the API response information. true: The response information is formatted. false: The response information is not formatted. Default: false |
parameters |
Array of LdApiParameter objects |
Backend API request parameters. |
id |
String |
Backend API ID. |
instance |
String |
ID of the instance to which the backend API belongs. |
type |
String |
Backend API type:
|
status |
Integer |
Backend API status:
|
created_time |
String |
Time when the backend API is created. |
modified_time |
String |
Time when the backend API is modified. |
scripts |
Array of LdApiScript objects |
Backend API script. |
roma_app_name |
String |
Name of the integration application to which the backend API belongs. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Parameter name.
Minimum: 1 Maximum: 32 |
in |
String |
Position of the parameter during API calling:
|
default |
String |
Default value. Maximum: 4000 |
description |
String |
Parameter description, which cannot contain < and >. Minimum: 0 Maximum: 255 |
required |
Boolean |
Whether the parameter is mandatory. true: The parameter is mandatory. false: The parameter is optional. Default: false |
Parameter |
Type |
Description |
---|---|---|
ds_id |
String |
Data source ID. This parameter is mandatory only if api_type is set to data. |
ds_name |
String |
Data source name. |
ds_type |
String |
Data source type.
|
type |
String |
Script type.
|
object_name |
String |
Returned object. Minimum: 1 Maximum: 32 |
content |
String |
API script content. Perform Base64 encoding on the script. Minimum: 1 Maximum: 100000 |
enable_result_paging |
Boolean |
Indicates whether to display the data script result on multiple pages. This parameter is mandatory only if api_type is set to data. Default: false |
enable_preparestatement |
Boolean |
Indicates whether to pre-compile the data script. This parameter is mandatory only if api_type is set to data. Default: false |
created_time |
String |
Time when the backend API script is created. |
modified_time |
String |
Time when the backend API script is modified. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
OK
{ "total" : 1, "size" : 1, "apis" : [ { "content_type" : "json", "created_time" : "2020-09-18T09:25:59Z", "description" : "", "id" : "bd42841c20184da6bbf457c6d8a06e37", "instance" : "f0fa1789-3b76-433b-a787-9892951c620e", "method" : "GET", "modified_time" : "2020-09-18T09:37:28Z", "name" : "livedata_api_demo", "parameters" : [ ], "path" : "/test/function", "return_format" : false, "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "roma_app_name" : "app-demo", "scripts" : [ ], "status" : 1, "type" : "", "version" : "1.0.1" } ] }
Status code: 400
Bad Request
{ "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" }
Status code: 401
Unauthorized
{ "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 403
Forbidden
{ "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" }
Status code: 404
Not Found
{ "error_code" : "APIG.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" }
Status code: 500
Internal Server Error
{ "error_code" : "APIG.9999", "error_msg" : "System error" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
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