Add Credentials

URL:
https://<root>/cloud/services/<serviceID>/credential/add
Methods:
POST
Required Capability:
Access allowed only with the default administrator role
Version Introduced:
11.2

Description

The credential/add operation updates the credentials for a cloud service. Its a security best practice to rotate credentials at regular intervals if the cloud service utilizes key-based authentication models. To update credentials, the request needs to include the credential information for the service, which is returned by the Services resource.

Once submitted, the request will return a job ID. The HTML view returns a link that can be used to access the job page for the request. Otherwise, to access the job resource you can make a request of the following form:

1
https://organization.domain.com/context/admin/jobs/<jobID>

Request parameters

ParameterDetails

credential

The updated connection information. The current connection information can be retrieved from the Services resource and modified with the updated credentials.

Examples
1
2
3
4
5
6
7
8
//Amazon S3
credential={"type":"ACCESS-KEY","secret":{"secret_key":"<secret_key>","access_key":"<access_key>"}}

//Azure Blob Storage
credential={"type":"STORAGE-ACCOUNT-KEY","secret":{"storageAccountName":"<account_name>","storageAccountKey":"<account_key>"}}

//Google Cloud Storage
credential={"type":"HMAC-KEYS","secret":{"secretKey":"<secret_key>","accessKey":"<access_key>"}}

f

The response format. The default format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the credential/add operation:

1
2
3
4
5
6
POST /context/admin/clouds/services/eg7hrelq6b/credential/add HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

credential={"type":"STORAGE-ACCOUNT-KEY","secret": {"storageAccountName": "{crypt}R68p/cvTUo1LmRcgXJ5U07WKv936mnCe","storageAccountKey": "{crypt}xxxxxxxxxxxxxxxxVC5M"}}&f=pjson&token=m7zGSezM7znt6ZuIwr827imJxOTSDsjYujVdd7SiAQLYG1HmesG8EbSnTwCbiekEh0QwRdmeyp1hP63M60TPrdZQ2NzIg5G7qFaQh40MdiOCfh60-6oPKC2MNoqwdVDZ3srzreVZb66QofWXws8GMrKWkgP45A-2an5crKvReUo-pwvkzm68W87Q0yPJFA2Kww39UnMYNw-5qd2-Bt04VmkrqKI-lCbA-jFZY_UGzeGzNqnBGrjKuVB_q17HogMw

JSON Response example

1
2
3
4
{
  "cloudCredentialRotationJobId": j876ae6e7-27d9-4b2d-b8ab-d07e2433e2c1",
  "message": "A cloud credentials rotation job is in-progress"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close