updateProjectCredentials
Updates a service account’s credentials.
To obtain this endpoint’s required URL, systemKey, and token, do the following:
Click the Select project drop-down at the top of the IoT Core UI.
Click the Edit icon (pencil) next to the desired project.
Go to the SERVICE ACCOUNTS tab.
If a service account already exists, select it and choose DOWNLOAD CREDENTIALS. If a service account does not exist, create it and select DOWNLOAD CREDENTIALS.
A JSON file will be downloaded to your local machine. Open the file with an editor. Use the systemKey, token, and URL from the file as needed below.
HTTP request
POST {URL}/api/v/1/code/{SystemKey}/updateProjectCredentials
Header parameters
Parameters | |
---|---|
| See the note at the start of this document on where to find the token. |
Request body
JSON representation |
---|
{
"credentials": {
"type": "<type>",
"project_id": "<project_id>",
"private_key_id": "<private_key_id>",
"private_key": "<private_key>",
"client_email": "<client_email>",
"client_id": "<client_id>",
"auth_uri": "<auth_uri>",
"token_uri": "<token_uri>",
"auth_provider_x509_cert_url": "<auth_provider_x509_cert_url>",
"client_x509_cert_url": "<client_x509_cert_url>"
}
} |
Response status codes
Code | Meaning |
---|---|
200 | Success |
Response body
JSON representation |
---|
{
"totalSystems": <number of systems>,
} |
Example curl
curl -X POST 'https://iot.clearblade.com/api/v/1/code/aae9b9b30c8aa4e49081c7eeb9bb07/updateProjectCredentials' -H 'ClearBlade-UserToken: {token}' -d '{"credentials": {"type": "abc", "project_id": "abc", "private_key_id": "abc", "private_key": "abc", "client_email": "abc", "client_id": "abc", "auth_uri": "abc", "token_uri": "abc", "token_uri": "abc", "auth_provider_x509_cert_url": "https://", "client_x509_cert_url": "https://"}}'
Â
Using the instructions at the start of this document, replace the following: https://iot.clearblade.com
with your URL. aae9b9b30c8aa4e49081c7eeb9bb07
with your systemKey. {token} with your token.