Skip to content
v2.7

Organization

Organization resources, with an organization API key.

Organization resources, with an organization API key.

Class Organization: 10 methods (0 in @owbase/web, 10 in @owbase/node). The examples use the object form of the parameters; replace the values between < and > with your own.

List organization projects

GET /organization/projects · method page

SDK: @owbase/node only

Get a list of all projects. You can use the query params to filter your results.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search, accessedAt
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: organization API key with the projects.read scope.

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.listProjects({
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create organization project

POST /organization/projects · method page

SDK: @owbase/node only

Create a new project.

Parameter Type Required Description
projectId string yes Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, and hyphen. Can’t start with a special char. Max length is 36 chars.
name string yes Project name. Max length: 128 chars.
region Region no Project Region. Values: default.

Access: organization API key with the projects.write scope.

@owbase/node
import { Client, Organization, Region } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.createProject({
projectId: '<PROJECT_ID>',
name: '<NAME>',
region: Region.Default, // optional
});

Get organization project

GET /organization/projects/{projectId} · method page

SDK: @owbase/node only

Get a project.

Parameter Type Required Description
projectId string yes Project unique ID.

Access: organization API key with the projects.read scope.

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.getProject({
projectId: '<PROJECT_ID>',
});

Update organization project

PATCH /organization/projects/{projectId} · method page

SDK: @owbase/node only

Update a project by its unique ID.

Parameter Type Required Description
projectId string yes Project unique ID.
name string yes Project name. Max length: 128 chars.

Access: organization API key with the projects.write scope.

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.updateProject({
projectId: '<PROJECT_ID>',
name: '<NAME>',
});

Delete organization project

DELETE /organization/projects/{projectId} · method page

SDK: @owbase/node only

Delete a project by its unique ID.

Parameter Type Required Description
projectId string yes Project unique ID.

Access: organization API key with the projects.write scope.

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.deleteProject({
projectId: '<PROJECT_ID>',
});

List project keys

GET /organization/projects/{projectId}/keys · method page

SDK: @owbase/node only

Get a list of all API keys of a project in your organization.

Parameter Type Required Description
projectId string yes Project unique ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: organization API key with the organization.projects.keys.read scope (also accepts keys.read).

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.listProjectKeys({
projectId: '<PROJECT_ID>',
queries: [], // optional
total: false, // optional
});

Create ephemeral project key

POST /organization/projects/{projectId}/keys/ephemeral · method page

SDK: @owbase/node only

Create a new ephemeral API key for a project in your organization. It’s recommended to have multiple API keys with strict scopes for separate functions within your project.

You can also create a standard API key if you need a longer-lived key instead.

Parameter Type Required Description
projectId string yes Project unique ID.
scopes ProjectKeyScopes[] yes Key scopes list. Maximum of 200 scopes are allowed. Values: project.read, project.write, usage.read, keys.read, keys.write, platforms.read, platforms.write, mocks.read, mocks.write, policies.read, policies.write, project.policies.read, project.policies.write, project.oauth2.read, project.oauth2.write, templates.read, templates.write, stages.read, stages.write, users.read, users.write, sessions.read, sessions.write, teams.read, teams.write, databases.read, databases.write, tables.read, tables.write, columns.read, columns.write, indexes.read, indexes.write, rows.read, rows.write, embeddings.write, collections.read, collections.write, attributes.read, attributes.write, documents.read, documents.write, documentsdb.read, documentsdb.write, documentsdb.collections.read, documentsdb.collections.write, documentsdb.documents.read, documentsdb.documents.write, documentsdb.indexes.read, documentsdb.indexes.write, vectorsdb.read, vectorsdb.write, vectorsdb.collections.read, vectorsdb.collections.write, vectorsdb.documents.read, vectorsdb.documents.write, vectorsdb.indexes.read, vectorsdb.indexes.write, buckets.read, buckets.write, files.read, files.write, tokens.read, tokens.write, functions.read, functions.write, executions.read, executions.write, execution.read, execution.write, sites.read, sites.write, log.read, log.write, providers.read, providers.write, topics.read, topics.write, subscribers.read, subscribers.write, targets.read, targets.write, messages.read, messages.write, rules.read, rules.write, webhooks.read, webhooks.write, monitors.read, monitors.write, alerts.read, locale.read, avatars.read, avatars.write, health.read, assistant.read, migrations.read, migrations.write, schedules.read, schedules.write, vcs.read, vcs.write, insights.read, insights.write, reports.read, reports.write, reviews.read, reviews.write, presences.read, presences.write.
duration number yes Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.

Access: organization API key with the organization.projects.keys.write scope (also accepts keys.write).

@owbase/node
import { Client, Organization, ProjectKeyScopes } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.createEphemeralProjectKey({
projectId: '<PROJECT_ID>',
scopes: [ProjectKeyScopes.UsersRead],
duration: 600,
});

Get project key

GET /organization/projects/{projectId}/keys/{keyId} · method page

SDK: @owbase/node only

Get a project key by its unique ID.

Parameter Type Required Description
projectId string yes Project unique ID.
keyId string yes Key ID.

Access: organization API key with the organization.projects.keys.read scope (also accepts keys.read).

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.getProjectKey({
projectId: '<PROJECT_ID>',
keyId: '<KEY_ID>',
});

Update project key

PUT /organization/projects/{projectId}/keys/{keyId} · method page

SDK: @owbase/node only

Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.

Parameter Type Required Description
projectId string yes Project unique ID.
keyId string yes Key ID.
name string yes Key name. Max length: 128 chars.
scopes ProjectKeyScopes[] yes Key scopes list. Maximum of 200 scopes are allowed. Values: project.read, project.write, usage.read, keys.read, keys.write, platforms.read, platforms.write, mocks.read, mocks.write, policies.read, policies.write, project.policies.read, project.policies.write, project.oauth2.read, project.oauth2.write, templates.read, templates.write, stages.read, stages.write, users.read, users.write, sessions.read, sessions.write, teams.read, teams.write, databases.read, databases.write, tables.read, tables.write, columns.read, columns.write, indexes.read, indexes.write, rows.read, rows.write, embeddings.write, collections.read, collections.write, attributes.read, attributes.write, documents.read, documents.write, documentsdb.read, documentsdb.write, documentsdb.collections.read, documentsdb.collections.write, documentsdb.documents.read, documentsdb.documents.write, documentsdb.indexes.read, documentsdb.indexes.write, vectorsdb.read, vectorsdb.write, vectorsdb.collections.read, vectorsdb.collections.write, vectorsdb.documents.read, vectorsdb.documents.write, vectorsdb.indexes.read, vectorsdb.indexes.write, buckets.read, buckets.write, files.read, files.write, tokens.read, tokens.write, functions.read, functions.write, executions.read, executions.write, execution.read, execution.write, sites.read, sites.write, log.read, log.write, providers.read, providers.write, topics.read, topics.write, subscribers.read, subscribers.write, targets.read, targets.write, messages.read, messages.write, rules.read, rules.write, webhooks.read, webhooks.write, monitors.read, monitors.write, alerts.read, locale.read, avatars.read, avatars.write, health.read, assistant.read, migrations.read, migrations.write, schedules.read, schedules.write, vcs.read, vcs.write, insights.read, insights.write, reports.read, reports.write, reviews.read, reviews.write, presences.read, presences.write.
expire string no Expiration time in ISO 8601 format. Use null for unlimited expiration.
description string no Optional description for the key.

Access: organization API key with the organization.projects.keys.write scope (also accepts keys.write).

@owbase/node
import { Client, Organization, ProjectKeyScopes } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.updateProjectKey({
projectId: '<PROJECT_ID>',
keyId: '<KEY_ID>',
name: '<NAME>',
scopes: [ProjectKeyScopes.UsersRead],
expire: '2020-10-15T06:38:00.000+00:00', // optional
description: '<DESCRIPTION>', // optional
});

Delete project key

DELETE /organization/projects/{projectId}/keys/{keyId} · method page

SDK: @owbase/node only

Delete a project key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.

Parameter Type Required Description
projectId string yes Project unique ID.
keyId string yes Key ID.

Access: organization API key with the organization.projects.keys.write scope (also accepts keys.write).

@owbase/node
import { Client, Organization } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const organization = new Organization(client);
const result = await organization.deleteProjectKey({
projectId: '<PROJECT_ID>',
keyId: '<KEY_ID>',
});

The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.

Was this page helpful?