Apache CloudStack 4.23.0.0 Root Admin API Reference
registerUserKeys
Registers an API key pair (API and secret keys) for a user.
Request parameters
| Parameter Name | Description | Required |
| id | ID of the user. | true |
| description | API key pair description. | false |
| enddate | Expiration date of the API key pair. The recommended format is "yyyy-MM-dd'T'HH:mm:ssZ" (e.g.: "2023-01-01T12:00:00+0100"); however, the following formats are also accepted: "yyyy-MM-dd HH:mm:ss" (e.g.: "2023-01-01 12:00:00") and "yyyy-MM-dd" (e.g.: "2023-01-01" - if the time is not added, it will be interpreted as "23:59:59"). If the recommended format is not used, the date will be considered in the server timezone. | false |
| name | API key pair name. | false |
| rules | The rules of the API key pair. If no rules are informed, defaults to allowing all account permissions. Otherwise, only the explicitly informed permissions for the key pair will be considered. Lower indexed rules take precedence over higher. Thus, in the following example: "rules[0].rule=deleteUserKeys rules[0].permission=deny rules[1].rule=*UserKey* rules[1].permission=allow", all rules matching the expression "*UserKeys*" will be allowed, except for "deleteUserKeys". | false |
| startdate | Start date of the API key pair. The recommended format is "yyyy-MM-dd'T'HH:mm:ssZ" (e.g.: "2023-01-01T12:00:00+0100"); however, the following formats are also accepted: "yyyy-MM-dd HH:mm:ss" (e.g.: "2023-01-01 12:00:00") and "yyyy-MM-dd" (e.g.: "2023-01-01" - if the time is not added, it will be interpreted as "00:00:00"). If the recommended format is not used, the date will be considered in the server timezone. | false |
Response Tags
| Response Name | Description |
| id | ID of the API key pair. |
| accountid | Account ID. |
| accountname | Account name. |
| accounttype | Account type. |
| apikey | The API key of the registered user. |
| created | API key pair creation timestamp. |
| description | API key pair description. |
| domain | Name of the domain which the account belongs to. |
| domainid | ID of the domain which the account belongs to. |
| domainpath | Path of the domain which the account belongs to. |
| enddate | API key pair expiration date. |
| name | Name of the API key pair |
| permissions | Permissions of the API key pair. |
| roleid | ID of the role. |
| rolename | Name of the role. |
| roletype | Type of the role (Admin, ResourceAdmin, DomainAdmin, User). |
| secretkey | The secret key of the registered user. |
| startdate | API key pair start date. |
| state | State of the API key pair. |
| userid | ID of the user that owns the keypair. |
| username | Username of the keypair's owner. |