Skip to main content

List service accounts.

GET 

/api/admin/service-account

Returns the list of all service accounts.

Responses

#/components/schemas/serviceAccountsSchema

Schema

    serviceAccounts

    object[]

    required

    A list of service accounts

  • Array [

  • 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
  • ]

  • ]

  • rootRoles

    object[]

    A list of root roles that are referenced from service account objects in the serviceAccounts list

  • Array [

  • id integerrequired

    The role id

    Example: 9
    type stringrequired

    A role can either be a global root role (applies to all projects) or a project role

    Example: root
    name stringrequired

    The name of the role

    Example: Editor
    description string

    A more detailed description of the role and what use it's intended for

    Example: Users with the editor role have access to most features in Unleash but can not manage users and roles in the global scope. Editors will be added as project owners when creating projects and get superuser rights within the context of these projects. Users with the editor role will also get access to most permissions on the default project by default.
    project stringnullable

    What project the role belongs to

    Example: default
  • ]

Loading...