This topic explains how to use API to get configurations from ACM.
Description
It gets the configurations within a namespace from ACM.
Request type
GET
Request URL
/diamond-server/basestone.do? method=getAllConfigByTenant
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
tenant | String | Yes | The tenant, corresponding to the namespace field of ACM |
pageNo | int | Yes | Page number |
pageSize | int | Yes | Page size |
Header parameters
Name | Type | Required | Description |
---|---|---|---|
Spas-AccessKey | String | Yes | The accessKey can be found in the ACM console. |
timeStamp | String | Yes | The request time in milliseconds |
Spas-Signature | String | Yes | SpasSigner.sign(Tenant+ group+ timeStamp, secretKey) . Sign "tenant + group + timestamp" with secret key. The signature algorithm is HmacSHA1. The timestamp signature prevents replay attacks. The signature is valid for 60 seconds. |
Spas-SecurityToken | String | No | SecurityToken is obtained from STS temporary credential. STS temporary credential is obtained from instance metadata URL. For more information, see: |
Response parameters
Parameter type | Description |
---|---|
totalCount | The total number of configurations |
pageNumber | Page number |
pagesAvailable | The number of available pages |
pageItems | Configuration items |
Error code
Error code | Error message | Explanation |
---|---|---|
400 | Bad Request | Syntax error in client request |
403 | Forbidden | No permission |
404 | Not Found | Client error, not found |
500 | Internal Server Error | Internal errors of the server |
200 | OK | Normal |
Examples
-
Request example
http:serverIp:8080/diamond-server/basestone.do? method=getAllConfigByTenant&tenant=tenantParam&pageNumber=pageNumberParam&pageSize=pageSizeParam
-
Response example
contentTest