Resources
5 methods on the Resources resource.
5 methods · 0 available to app tokens36 pages in SDK Reference
import { Compozy } from "@compozy/client";5 of 5
deleteResource
Delete one desired-state resource on the local operator control plane
compozy.resources.deleteResource({ path, body }) → Promise<void>
Options
- kindstringpathrequired
- Resource kind
- idstringpathrequired
- Resource id
Request bodyDeleteResourceRequest
DELETE /api/resources/{kind}/{id}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.resources.deleteResource({ path: { "kind": "kind", "id": "id" }, body: { /* request fields */ } });getResource
Read one desired-state resource on the local operator control plane
compozy.resources.getResource({ path }) → Promise<ResourceResponse>
Options
- kindstringpathrequired
- Resource kind
- idstringpathrequired
- Resource id
GET /api/resources/{kind}/{id}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.resources.getResource({ path: { "kind": "kind", "id": "id" } });listResources
List desired-state resources on the local operator control plane
compozy.resources.listResources({ query }) → Promise<ResourcesResponse>
Options
- kindstringquery
- Filter by resource kind
- scope_kind"user" | "workspace"query
- Filter by resource scope kind
- scope_idstringquery
- Filter by workspace scope id
- owner_kindstringquery
- Filter by stamped owner kind
- owner_idstringquery
- Filter by stamped owner id
- source_kindstringquery
- Filter by stamped source kind
- source_idstringquery
- Filter by stamped source id
- limitintegerquery
- Maximum number of records to return
GET /api/resourcesapp tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.resources.listResources();listResourcesByKind
List one desired-state resource kind on the local operator control plane
compozy.resources.listResourcesByKind({ path, query }) → Promise<ResourcesResponse>
Options
- kindstringpathrequired
- Resource kind
- scope_kind"user" | "workspace"query
- Filter by resource scope kind
- scope_idstringquery
- Filter by workspace scope id
- owner_kindstringquery
- Filter by stamped owner kind
- owner_idstringquery
- Filter by stamped owner id
- source_kindstringquery
- Filter by stamped source kind
- source_idstringquery
- Filter by stamped source id
- limitintegerquery
- Maximum number of records to return
GET /api/resources/{kind}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.resources.listResourcesByKind({ path: { "kind": "kind" } });putResource
Create or replace one desired-state resource on the local operator control plane
compozy.resources.putResource({ path, body }) → Promise<PutResourceResponse>
Options
- kindstringpathrequired
- Resource kind
- idstringpathrequired
- Resource id
Request bodyPutResourceRequest
PUT /api/resources/{kind}/{id}app tokens denied
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.resources.putResource({ path: { "kind": "kind", "id": "id" }, body: { /* request fields */ } });