Files
autoglue/sdk/ts/docs/OrgsApi.md
2025-11-02 13:19:30 +00:00

20 KiB

OrgsApi

All URIs are relative to http://localhost:8080/api/v1

Method HTTP request Description
addOrUpdateMember POST /orgs/{id}/members Add or update a member (owner/admin)
createOrg POST /orgs Create organization
createOrgKey POST /orgs/{id}/api-keys Create org key/secret pair (owner/admin)
deleteOrg DELETE /orgs/{id} Delete organization (owner)
deleteOrgKey DELETE /orgs/{id}/api-keys/{key_id} Delete org key (owner/admin)
getOrg GET /orgs/{id} Get organization
listMembers GET /orgs/{id}/members List members in org
listMyOrgs GET /orgs List organizations I belong to
listOrgKeys GET /orgs/{id}/api-keys List org-scoped API keys (no secrets)
removeMember DELETE /orgs/{id}/members/{user_id} Remove a member (owner/admin)
updateOrg PATCH /orgs/{id} Update organization (owner/admin)

addOrUpdateMember

HandlersMemberOut addOrUpdateMember(id, body)

Add or update a member (owner/admin)

Example

import {
  Configuration,
  OrgsApi,
} from '@glueops/autoglue-sdk';
import type { AddOrUpdateMemberRequest } from '@glueops/autoglue-sdk';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
    // HandlersMemberUpsertReq | User & role
    body: ...,
  } satisfies AddOrUpdateMemberRequest;

  try {
    const data = await api.addOrUpdateMember(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]
body HandlersMemberUpsertReq User & role

Return type

HandlersMemberOut

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createOrg

ModelsOrganization createOrg(body)

Create organization

Example

import {
  Configuration,
  OrgsApi,
} from '@glueops/autoglue-sdk';
import type { CreateOrgRequest } from '@glueops/autoglue-sdk';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // HandlersOrgCreateReq | Org payload
    body: ...,
  } satisfies CreateOrgRequest;

  try {
    const data = await api.createOrg(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
body HandlersOrgCreateReq Org payload

Return type

ModelsOrganization

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
401 Unauthorized -
409 Conflict -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createOrgKey

HandlersOrgKeyCreateResp createOrgKey(id, body)

Create org key/secret pair (owner/admin)

Example

import {
  Configuration,
  OrgsApi,
} from '@glueops/autoglue-sdk';
import type { CreateOrgKeyRequest } from '@glueops/autoglue-sdk';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
    // HandlersOrgKeyCreateReq | Key name + optional expiry
    body: ...,
  } satisfies CreateOrgKeyRequest;

  try {
    const data = await api.createOrgKey(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]
body HandlersOrgKeyCreateReq Key name + optional expiry

Return type

HandlersOrgKeyCreateResp

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteOrg

deleteOrg(id)

Delete organization (owner)

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { DeleteOrgRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
  } satisfies DeleteOrgRequest;

  try {
    const data = await api.deleteOrg(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]

Return type

void (Empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Deleted -
401 Unauthorized -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteOrgKey

deleteOrgKey(id, keyId)

Delete org key (owner/admin)

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { DeleteOrgKeyRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
    // string | Key ID (UUID)
    keyId: keyId_example,
  } satisfies DeleteOrgKeyRequest;

  try {
    const data = await api.deleteOrgKey(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]
keyId string Key ID (UUID) [Defaults to undefined]

Return type

void (Empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Deleted -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOrg

ModelsOrganization getOrg(id)

Get organization

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { GetOrgRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
  } satisfies GetOrgRequest;

  try {
    const data = await api.getOrg(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]

Return type

ModelsOrganization

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listMembers

Array<HandlersMemberOut> listMembers(id)

List members in org

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListMembersRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
  } satisfies ListMembersRequest;

  try {
    const data = await api.listMembers(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]

Return type

Array<HandlersMemberOut>

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listMyOrgs

Array<ModelsOrganization> listMyOrgs()

List organizations I belong to

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListMyOrgsRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  try {
    const data = await api.listMyOrgs();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

This endpoint does not need any parameter.

Return type

Array<ModelsOrganization>

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listOrgKeys

Array<ModelsAPIKey> listOrgKeys(id)

List org-scoped API keys (no secrets)

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { ListOrgKeysRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
  } satisfies ListOrgKeysRequest;

  try {
    const data = await api.listOrgKeys(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]

Return type

Array<ModelsAPIKey>

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

removeMember

removeMember(id, userId)

Remove a member (owner/admin)

Example

import { Configuration, OrgsApi } from "@glueops/autoglue-sdk";
import type { RemoveMemberRequest } from "@glueops/autoglue-sdk";

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
    // string | User ID (UUID)
    userId: userId_example,
  } satisfies RemoveMemberRequest;

  try {
    const data = await api.removeMember(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]
userId string User ID (UUID) [Defaults to undefined]

Return type

void (Empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Removed -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateOrg

ModelsOrganization updateOrg(id, body)

Update organization (owner/admin)

Example

import {
  Configuration,
  OrgsApi,
} from '@glueops/autoglue-sdk';
import type { UpdateOrgRequest } from '@glueops/autoglue-sdk';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk SDK...");
  const config = new Configuration({
    // To configure API key authorization: BearerAuth
    apiKey: "YOUR API KEY",
  });
  const api = new OrgsApi(config);

  const body = {
    // string | Org ID (UUID)
    id: id_example,
    // HandlersOrgUpdateReq | Update payload
    body: ...,
  } satisfies UpdateOrgRequest;

  try {
    const data = await api.updateOrg(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
id string Org ID (UUID) [Defaults to undefined]
body HandlersOrgUpdateReq Update payload

Return type

ModelsOrganization

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]