Account, keys and webhooks ›
List api keys
GET
/v1/api-keysYour keys: what each may do and where, and when and from where each was last used.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const keys = await agental.apiKeys.list();
Answer200 OK
- {
- "apiKeys": [{
- "id": string,
- "name": string,
- "prefix": string | null,
- "createdAt": string,
- "seesAll": boolean,
- "preset": "read-only" | "full-sandbox" | "ci" | "admin" | "null" | null,
- … 9 more
- }],
- }
The keys of the organization the caller acts in, oldest first: in a team, every key of it for an owner or admin, and a member's own for a member.
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The keys of the organization the caller acts in, oldest first: in a team, every key of it for an owner or admin, and a member's own for a member. The secrets are never returned.
JSON1 field
apiKeysApiKey[]15 fields
idstring
namestring
prefixstringnull
The first characters of the secret, to tell keys apart by.
More
Null for a key from before they were kept.createdAtstring
seesAllboolean
True for a key of whoever runs the service, which sees every account.
presetread-onlyfull-sandboxciadminnullnull
The preset the key was made with.
More
Null for one made with its actions named.actionsstring[]
What the key may do, as it was made: a preset is written out into its actions then, so a preset that grows later does not widen it.
More
* is everything.sandboxIdsstring[]
The sandboxes the key is limited to, with templateIds.
More
Empty, with templateIds empty too, is every sandbox of the account.templateIdsstring[]
The templates the key is limited to: it reaches them and every sandbox on them.
More
Empty is every template, and, with sandboxIds empty too, every sandbox.expiresAtstringnull
When the key stops working.
More
Null is never.allowFromstring[]
The addresses and ranges the key may be used from.
More
Empty is anywhere.lastUsedAtstringnull
When the key was last used, to the minute: it is written once a minute at most.
More
Null if never.lastUsedFromstringnull
The address it was last used from.
organizationIdstringnull
The organization the key acts in: the one it was made in, for good.
More
Null for a key of whoever runs the service.createdBystringnull
The account that made it.