Organization
Recursos de la organización, con una clave de API de organización.
Recursos de la organización, con una clave de API de organización.
Clase Organization: 10 métodos (0 en @owbase/web, 10 en @owbase/node). Las descripciones de los métodos están en inglés. Los ejemplos usan la forma de objeto de los parámetros; cambia los valores entre < y > por los tuyos.
listProjects
Sección titulada «listProjects»Listar proyectos de la organización
GET /organization/projects · página del método
SDK: solo @owbase/node
Get a list of all projects. You can use the query params to filter your results.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
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. |
Acceso: clave de API de la organización con el alcance projects.read.
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});createProject
Sección titulada «createProject»Crear proyecto de la organización
POST /organization/projects · página del método
SDK: solo @owbase/node
Create a new project.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | 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 |
sí | Project name. Max length: 128 chars. |
region |
Region |
no | Project Region. Valores: default. |
Acceso: clave de API de la organización con el alcance projects.write.
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});getProject
Sección titulada «getProject»Obtener proyecto de la organización
GET /organization/projects/{projectId} · página del método
SDK: solo @owbase/node
Get a project.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
Acceso: clave de API de la organización con el alcance projects.read.
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>',});updateProject
Sección titulada «updateProject»Actualizar proyecto de la organización
PATCH /organization/projects/{projectId} · página del método
SDK: solo @owbase/node
Update a project by its unique ID.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
name |
string |
sí | Project name. Max length: 128 chars. |
Acceso: clave de API de la organización con el alcance projects.write.
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>',});deleteProject
Sección titulada «deleteProject»Eliminar proyecto de la organización
DELETE /organization/projects/{projectId} · página del método
SDK: solo @owbase/node
Delete a project by its unique ID.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
Acceso: clave de API de la organización con el alcance projects.write.
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>',});listProjectKeys
Sección titulada «listProjectKeys»Listar claves del proyecto
GET /organization/projects/{projectId}/keys · página del método
SDK: solo @owbase/node
Get a list of all API keys of a project in your organization.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | 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. |
Acceso: clave de API de la organización con el alcance organization.projects.keys.read (también acepta keys.read).
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});createEphemeralProjectKey
Sección titulada «createEphemeralProjectKey»Crear clave efímera del proyecto
POST /organization/projects/{projectId}/keys/ephemeral · página del método
SDK: solo @owbase/node
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.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
scopes |
ProjectKeyScopes[] |
sí | Key scopes list. Maximum of 200 scopes are allowed. Valores: 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 |
sí | Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds. |
Acceso: clave de API de la organización con el alcance organization.projects.keys.write (también acepta keys.write).
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,});getProjectKey
Sección titulada «getProjectKey»Obtener clave del proyecto
GET /organization/projects/{projectId}/keys/{keyId} · página del método
SDK: solo @owbase/node
Get a project key by its unique ID.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
keyId |
string |
sí | Key ID. |
Acceso: clave de API de la organización con el alcance organization.projects.keys.read (también acepta keys.read).
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>',});updateProjectKey
Sección titulada «updateProjectKey»Actualizar clave del proyecto
PUT /organization/projects/{projectId}/keys/{keyId} · página del método
SDK: solo @owbase/node
Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
keyId |
string |
sí | Key ID. |
name |
string |
sí | Key name. Max length: 128 chars. |
scopes |
ProjectKeyScopes[] |
sí | Key scopes list. Maximum of 200 scopes are allowed. Valores: 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. |
Acceso: clave de API de la organización con el alcance organization.projects.keys.write (también acepta keys.write).
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});deleteProjectKey
Sección titulada «deleteProjectKey»Eliminar clave del proyecto
DELETE /organization/projects/{projectId}/keys/{keyId} · página del método
SDK: solo @owbase/node
Delete a project key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId |
string |
sí | Project unique ID. |
keyId |
string |
sí | Key ID. |
Acceso: clave de API de la organización con el alcance organization.projects.keys.write (también acepta keys.write).
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>',});Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.