Identity and Access Management API, REST: Key.list
Retrieves the list of Key resources for the specified service account.
HTTP request
GET https://iam.api.cloud.yandex.net/iam/v1/keys
Query parameters
Parameter | Description |
---|---|
format | Output format of the key.
|
serviceAccountId | ID of the service account to list key pairs for. To get the service account ID, use a list request. If not specified, it defaults to the subject that made the request. The maximum string length in characters is 50. |
pageSize | The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
pageToken | Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 2000. |
Response
HTTP Code: 200 - OK
{
"keys": [
{
"id": "string",
"createdAt": "string",
"description": "string",
"keyAlgorithm": "string",
"publicKey": "string",
"lastUsedAt": "string",
// `keys[]` includes only one of the fields `userAccountId`, `serviceAccountId`
"userAccountId": "string",
"serviceAccountId": "string",
// end of the list of possible fields`keys[]`
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
keys[] | object List of Key resources. |
keys[]. id |
string ID of the Key resource. |
keys[]. createdAt |
string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
keys[]. description |
string Description of the Key resource. 0-256 characters long. |
keys[]. keyAlgorithm |
string An algorithm used to generate a key pair of the Key resource.
|
keys[]. publicKey |
string A public key of the Key resource. |
keys[]. lastUsedAt |
string (date-time) Timestamp for the last use of this key. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
keys[]. userAccountId |
string keys[] includes only one of the fields userAccountId , serviceAccountId ID of the user account that the Key resource belongs to. |
keys[]. serviceAccountId |
string keys[] includes only one of the fields userAccountId , serviceAccountId ID of the service account that the Key resource belongs to. |
nextPageToken | string This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results. |