UploadApiKey
POST {{baseUrl}}/users/:userId/apiKeys/
Uploads an API signing key for the specified user.
Every user has permission to use this operation to upload a key for their own user ID. An administrator in your organization does not need to write a policy to give users this ability. To compare, administrators who have permission to the tenancy can use this operation to upload a key for any user, including themselves.
Important: Even though you have permission to upload an API key, you might not yet
have permission to do much else. If you try calling an operation unrelated to your own credential
management (e.g., ListUsers
, LaunchInstance
) and receive an unauthorized
error,
check with an administrator to confirm which IAM Service group(s) you're in and what access
you have. Also confirm you're working in the correct compartment.
After you send your request, the new object's lifecycleState
will temporarily be CREATING. Before using
the object, first make sure its lifecycleState
has changed to ACTIVE.
Request Body
{"key"=>"irure consectetur et ex"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
opc-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or | |
server error without risk of executing that same action again. Retry tokens expire after 24 | |||
hours, but can be invalidated before then due to conflicting operations (e.g., if a resource | |||
has been deleted and purged from the system, then a retry of the original creation request | |||
may be rejected). | |||
Content-Type | string | ||
Date | string | (Required) Current Date | |
Authorization | string | (Required) Signature Authentication on Authorization header | |
x-content-sha256 | string | (Required) Content sha256 for POST, PUT and PATCH operations |
RESPONSES
status: OK
{"fingerprint":"ea voluptate l","inactiveStatus":55153042,"keyId":"nostrud","keyValue":"occaecat ut exercitation pariatur","lifecycleState":"INACTIVE","timeCreated":"1974-01-14T15:59:15.554Z","userId":"officia"}