Skip to main content

Update a service account.

PUT 

/api/admin/service-account/:id

Updates an existing service account identified by its id.

Request

Path Parameters

    id stringrequired

Body

required

#/components/schemas/updateServiceAccountSchema

    name string

    The name of the service account

    Example: Service Account 1
    rootRole integer

    The id of the root role for the service account

    Example: 1
    property name* any

    Describes the properties required to update a service account

Responses

#/components/schemas/serviceAccountSchema

Schema

    id numberrequired

    The service account id

    Example: 54321
    isAPI booleandeprecated

    Deprecated: for internal use only, should not be exposed through the API

    Example: false
    name string

    The name of the service account

    Example: My Service Account
    email stringdeprecated

    Deprecated: service accounts don't have emails associated with them

    Example: noemail@getunleash.io
    username string

    The service account username

    Example: my-service-account
    imageUrl string

    The service account image url

    Example: https://example.com/my-service-account.png
    inviteLink stringdeprecated

    Deprecated: service accounts cannot be invited via an invitation link

    Example: https://example.com/invite-link
    loginAttempts numberdeprecated

    Deprecated: service accounts cannot log in to Unleash

    Example: 0
    emailSent booleandeprecated

    Deprecated: internal use only

    Example: false
    rootRole integer

    The root role id associated with the service account

    Example: 1
    seenAt date-timenullabledeprecated

    Deprecated. This property is always null. To find out when a service account was last seen, check its tokens list and refer to each token's lastSeen property instead.

    Example: null
    createdAt date-time

    The service account creation date

    Example: 2021-01-01T00:00:00.000Z

    tokens

    object[]

    The list of tokens associated with the service account

  • Array [

  • id integerrequired

    The PAT's ID. PAT IDs are incrementing integers. In other words, a more recently created PAT will always have a higher ID than an older one.

    Possible values: >= 1

    Example: 1
    secret string

    The token used for authentication. It is automatically generated by Unleash when the PAT is created and that is the only time this property is returned.

    Example: user:xyzrandomstring
    createdAt date-timerequired

    The date and time of when the PAT was created.

    Example: 2023-04-19T08:15:14.000Z
    seenAt date-timenullable

    When the PAT was last seen/used to authenticate with. null if it has not been used yet.

    Example: 2023-04-19T08:15:14.000Z
    userId integer

    The ID of the user this PAT belongs to.

    Example: 1337
    description stringrequired

    The PAT's description.

    Example: user:xyzrandomstring
    expiresAt date-timerequired

    The PAT's expiration date.

    Example: 2023-04-19T08:15:14.000Z
  • ]

Loading...