This topic explains how to use API to publish configurations to ACM.

Description

It publishes configurations to ACM.

Request type

POST

Request URL

/diamond-server/basestone.do

Request parameters

Name 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
content String Yes The content of the configuration

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
boolean If the publishing is successful

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=syncUpdateAll
    http body:
    dataId=dataIdparam&group=groupParam&tenant=tenantParam&content=contentParam
  • Response example

    true