This topic explains how to use API to get configurations from ACM.

Description

It gets configurations from ACM.

Request Type

GET

Request URL

/diamond-server/config.co

Request parameters

Parameter Type Required Description
tenant String Yes The tenant, corresponding to the namespace field of ACM
dataId String Yes Configuration ID
group String Yes Configuration group

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
String Configuration value

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/config.co? dataId=dataIdparam&group=groupParam&tenant=tenantParam
  • Response example

    contentTest