Platform API ClientClient group5 methodsApiKeysMethods
API Keys
Create, list, rotate, update, and revoke project API keys used for service authentication.
Scoped key creationKey rotationKey revocation
Api Keys
apiKeys.create()
Generated exampleHTTP endpoint wrapperPOST /api/v1/api-keysPOST /api/v1/api-keys
Signature
create(input: CreateApiKeyInput): Promise<CreateApiKeyResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| input | CreateApiKeyInput | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const input = {} as CreateApiKeyInput;
// Fill the input payload fields before calling this method.
const response = await client.apiKeys.create(input);
console.log(response);Response
// Response type
Promise<CreateApiKeyResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));apiKeys.list()
Generated exampleHTTP endpoint wrapperGET /api/v1/api-keysGET /api/v1/api-keys
Signature
list(): Promise<ListApiKeysResponse>TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const response = await client.apiKeys.list();
console.log(response);Response
// Response type
Promise<ListApiKeysResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));apiKeys.update()
Generated exampleHTTP endpoint wrapperPUT /api/v1/api-keys/{keyId}PUT /api/v1/api-keys/{keyId}
Signature
update(keyId: string, input: UpdateApiKeyInput): Promise<ApiKeyRecord>Parameters
| Name | Type | Flags |
|---|---|---|
| keyId | string | required |
| input | UpdateApiKeyInput | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const keyId = "<keyId>";
const input = {} as UpdateApiKeyInput;
const response = await client.apiKeys.update(keyId, input);
console.log(response);Response
// Response type
Promise<ApiKeyRecord>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));apiKeys.revoke()
Generated exampleHTTP endpoint wrapperDELETE /api/v1/api-keys/{keyId}DELETE /api/v1/api-keys/{keyId}
Signature
revoke(keyId: string): Promise<void>Parameters
| Name | Type | Flags |
|---|---|---|
| keyId | string | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const keyId = "<keyId>";
const response = await client.apiKeys.revoke(keyId);
console.log(response);Response
// Response type
Promise<void>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));apiKeys.rotate()
Generated exampleHTTP endpoint wrapperPOST /api/v1/api-keys/{keyId}/rotatePOST /api/v1/api-keys/{keyId}/rotate
Signature
rotate(keyId: string): Promise<CreateApiKeyResponse>Parameters
| Name | Type | Flags |
|---|---|---|
| keyId | string | required |
TypeScript SDKTypeScript
import { ArelisClient } from "@arelis-ai/governance-api-client";
const client = new ArelisClient({
baseUrl: "https://api.arelis.digital",
apiKey: process.env.ARELIS_API_KEY,
});
const keyId = "<keyId>";
const response = await client.apiKeys.rotate(keyId);
console.log(response);Response
// Response type
Promise<CreateApiKeyResponse>
// Inspect concrete fields from your runtime payload:
// console.log(JSON.stringify(response, null, 2));