Skip to main content

GetCredentials

List remote-storage credential names, services, and resources.

Requires objects.read permission. No input or output blobs are used.

Parameters​

Parameter

Type / required

Default and behavior

name

string or array of strings / optional

Omitted: all credentials. A string selects one name; an array must contain at least one name. Unknown names are omitted.

Details​

Credential keys and secret values are never returned. Use the reported service and resources to verify the credential routing configured with CreateCredential or UpdateCredential.

Response and recovery​

Success returns status: 0 and returned, the number of found credentials. When present, credentials is an object keyed by name; each entry contains service and resources. A single unknown name returns returned: 0 without credentials. An empty all-credentials result may represent credentials as null; multiple-name lookup uses an object.

Failure or empty result

Cause and recovery

returned: 0

No requested credentials exist. This is successful, not a lookup error.

Empty name array

Pass a nonempty array or omit name to list all credentials.

See Responses for validation, authentication, and permission error envelopes. Command errors use a negative status and an info message.

Examples​

Find resources for credential “training_bucket_credential”:

[{
"GetCredentials": {
"name": "training_bucket_credential"
}
}]

Response for a existing credential:

[{
"GetCredentials": {
"credentials": {
"training_bucket_credential": {
"service": "aws",
"resources": ["s3://bucket1", "s3://bucket2"]
}
},
"returned": 1,
"status": 0
}
}]