UploadApiKey

post

/20160918/users/{user_id}/apiKeys

Upload an API signing key for the specified user. Every user has authorization to use this operation to upload a key for their own user. An administrator does not need to write a policy to give users this ability.

Important: In addition to an API key, you need to be granted authorizations to compartments and resource operations to do the work you need to do.

After you send your UploadApiKey request, the new key's lifecycleState will temporarily be CREATING. Before using the key, make sure its lifecycleState has changed to ACTIVE.

Request

Supported Media Types
Path Parameters
Header Parameters
  • Minimum Length: 1
    Maximum Length: 64
    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 (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
Body ()
Request object for uploading an API key for a user.
Root Schema : CreateApiKeyDetails
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

The key is being uploaded.
Headers
  • For optimistic concurrency control. See if-match.
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : ApiKey
Type: object
A PEM-format RSA credential for securing requests to the Oracle Private Cloud Appliance REST API. Also known as an *API signing key*. Specifically, this is the public key from the key pair. The private key remains with the user calling the API. Important: This is not the SSH key for accessing compute instances. Each user can have a maximum of three API signing keys.
Show Source
  • The key's fingerprint (for example, 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef).
  • The detailed status of INACTIVE lifecycleState.
  • An Oracle-assigned identifier for the key, in this format: TENANCY_OCID/USER_OCID/KEY_FINGERPRINT.
  • The key's value.
  • Minimum Length: 1
    Maximum Length: 64
    Allowed Values: [ "CREATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED" ]
    The API key's current state. After creating an ApiKey object, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
  • Date and time the ApiKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
  • The OCID of the user the key belongs to.
Example Response (application-json)
{   "keyId": "ocid1.tenancy.aaaaaaaaba3pv6exampleuniqueID/ocid1.user.aaaaaaaaqvexampleuniqueID/cd:7c:ee:29:8b:2f:c6:48:13:c9:9f:12:66:77:ef:c2",   "keyValue": "-----BEGIN PUBLIC KEY-----\cmdnMIIBIjANBgkqhkiG9w0BAQEFA...AOCAQ8AMIIBCgKCAQEA7hglbuGudIO3sgoAa1n/\nHgUdIGeQmwf/QIv3Y0nOEP4TB7rbdCH99oJYzF86M2\nmwIDAQAB\n-----END PUBLIC KEY-----",   "fingerprint": "cd:7c:ee:29:8b:2f:c6:48:13:c9:9f:12:66:77:ef:c2",   "userId": "ocid1.user.aaaaaaaaqvrexampleuniqueID",   "lifecycleState": "ACTIVE",   "timeCreated": "2016-12-07T00:59:17.326Z" } 

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

403 Response

Forbidden
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

409 Response

Conflict
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

429 Response

Too Many Requests
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
Back to Top