latestSwagger 2.02026-08-191,9198883.9 MB

b296c3a60aa5

ApiKeys

Generate a new API key for the specified user. The API key returned in the result must be saved by the caller, as it cannot be retrieved subsequently from the Octopus server.

post/users/{userId}/apikeys

Path parameters

userIdstring required

ID of the user

Request body

ActorType'User' | 'AiAgent'

The kind of actor that will hold this API key. Defaults to User when omitted.

Expiresstring date-time

The date after which the API key ceases to be usable. Provide a null value to create an API key with the maximum allowable expiry. If unspecified, will use the system default which is 180 days unless otherwise configured.

Purposestring

Informational text specifying the intended usage of the api key.

UserIdstring required

ID of the user

Response

The created Api Key, containing the unencrypted value of the key which must be saved by the caller, as it cannot be retrieved subsequently from the Octopus server.

ActorType'User' | 'AiAgent'
ApiKeystring
Createdstring date-time
Expiresstring date-time
Idstring

Gets or sets a unique identifier for this resource.

IsLastUsedTimestampKnownboolean
LastModifiedBystring

Gets or sets the username of the user who last modified this resource.

LastModifiedOnstring date-time

Gets or sets the date/time that this resource was last modified.

LastUsedTimeStampstring date-time
Linksobject

Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.

Purposestring
UserIdstring