Documentation

Mistake on this page? Email us

ApiKey API Key

Hierarchy

Index

Constructors

constructor

Properties

accountId

accountId: string

The ID of the account.

example

01619571e2e90242ac12000600000000

createdAt

createdAt: Date

Creation UTC time RFC3339. Creation time.

example

2018-02-13T09:35:20Z

creationTime

creationTime: number

The timestamp of the API key creation in the storage, in milliseconds. The timestamp of the API key creation in the storage, in milliseconds.

example

1518630727683

groups

groups: Array<string>

A list of group IDs this API key belongs to.

id

id: string

The unique identifier of the entity The UUID of the API key.

key

key: string

The API key. The API key.

example

ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000

lastLoginTime

lastLoginTime: number

The timestamp of the latest API key usage, in milliseconds. The timestamp of the latest API key usage, in milliseconds.

example

1518630727688

name

name: string

The display name for the API key.

example

API key gorgon

owner

owner: string

The owner of this API key, who is the creator by default.

example

01619571e2e89242ac12000600000000

ownerId

ownerId: string

The owner of this API key, who is the creator by default.

status

status: ApiKeyStatus

The status of the API key.

example

ACTIVE

updatedAt

updatedAt: Date

Last update UTC time RFC3339.

example

2018-02-14T15:24:14Z

Methods

delete

  • delete(): Promise<void>
  • Delete the API key

    Returns Promise<void>

    Promise containing any error

  • Delete the API key

    Parameters

    • callback: CallbackFn<void>

      A function that is passed any error

    Returns void

getOwner

  • getOwner(): Promise<User>
  • Get details of the key owner

    Returns Promise<User>

    Promise containing the user

  • Get details of the key owner

    Parameters

    • callback: CallbackFn<User>

      A function that is passed the return arguments (error, user)

    Returns void

listGroups

  • listGroups(): Promise<Array<Group>>
  • List the groups this API key belongs to

    Returns Promise<Array<Group>>

    Promise containing groups

  • List the groups this API key belongs to

    Parameters

    • callback: CallbackFn<Array<Group>>

      A function that is passed the return arguments (error, groups)

    Returns void

update

  • update(): Promise<ApiKey>
  • Updates an API key

    Returns Promise<ApiKey>

    Promise containing API key

  • Updates an API key

    Parameters

    • callback: CallbackFn<ApiKey>

      A function that is passed the return arguments (error, API key)

    Returns void