Querying the Service Catalog API List
Function
This API is used to query the service catalog API list.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/service/market
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service. |
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
Dlm-Type |
No |
String |
Specifies the version type of the data service. The value can be SHARED or EXCLUSIVE. |
|
Content-Type |
Yes |
String |
Type (format) of the message body. This parameter is mandatory if the message body exists. If the message body does not exist, leave this parameter blank. If the request body contains Chinese characters, use charset=utf8 to specify the Chinese character set, for example, application/json;charset=utf8. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
auth_type |
No |
String |
Authentication mode Enumerated values:
|
|
visibility |
No |
String |
API visibility Enumerated values:
|
|
market_sort_type |
No |
String |
Sorting type Enumerated values:
|
|
asc_or_desc |
No |
String |
Sorting order Enumerated values:
|
|
offset |
No |
Integer |
Start coordinate of the query. |
|
limit |
No |
Integer |
Indicates the number of queried records. |
|
is_owner |
No |
Boolean |
Indicates whether to display the owner. |
|
is_authorized |
No |
Boolean |
Indicates whether to display authorized users. |
|
is_update_recently |
No |
Boolean |
Indicates whether to display the latest updates. |
|
is_release_recently |
No |
Boolean |
Indicates whether to display the latest release. |
|
is_hot_recently |
No |
Boolean |
Indicates whether to display the hot-selling status. |
|
success_and_failure_rate |
No |
Boolean |
Indicates whether to display the success rate and failure rate in the last seven days. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Total number of APIs. |
|
apis |
Array of AdvancedMallApiDTO objects |
API list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
API ID. |
|
name |
String |
API name |
|
auth_type |
String |
Authentication mode Enumerated values:
|
|
application_num |
Integer |
Number of authorized applications. |
|
call_num |
Integer |
Number of invoked requests. |
|
user_name |
String |
Creator. |
|
create_time |
Long |
Time when the bandwidth was specified. |
|
update_time |
Long |
Update time. |
|
is_owner |
Boolean |
Indicates whether the API is in the current space. |
|
is_authorized |
Boolean |
Indicates whether the user is authorized. |
|
is_update_recently |
Boolean |
Indicates whether the API has been updated in the last three days. |
|
is_release_recently |
Boolean |
Indicates whether a new product is launched (APIs released within three days). |
|
is_hot_recently |
Boolean |
Indicates whether the product is a hot-selling product. (Users in other space have applied for the API within three days.) |
|
success_rate |
String |
Success rate of API calls within seven days. |
|
failure_rate |
String |
Invoking failure rate within seven days. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
Query the service catalog API list.
/v1/0833a5737480d53b2f250010d01a7b88/service/market
{
"is_authorized" : true,
"is_hot_recently" : true,
"is_owner" : true,
"is_release_recently" : true,
"is_update_recently" : true,
"limit" : 12,
"offset" : 0,
"success_and_failure_rate" : true,
"visibility" : "SPECIFIC_PROJECT"
}
Example Responses
Status code: 200
Success
{
"apis" : [ {
"application_num" : 0,
"auth_type" : "NONE",
"call_num" : 1,
"create_time" : 1704420144000,
"failure_rate" : null,
"id" : "bb110fcffb5f319eb08939e877566d6a",
"is_authorized" : null,
"is_hot_recently" : null,
"is_owner" : null,
"is_release_recently" : null,
"is_update_recently" : null,
"name" : "bug_dws",
"success_rate" : null,
"update_time" : 1704532548000,
"user_name" : "user"
} ],
"total" : 1
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Success |
|
400 |
Bad request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.