SDK reference

Portal: resources, groups, tags and dashboards

Each route's function in the SDK, its call beside the same request in cURL.
orgPortalResources

GET/v1/orgs/:orgId/portal/resources

Every resource of the org you may read, of every kind (Serverless App Services, databases, buckets, domains, repositories, agents), with its resource group and tags. q keeps those with every word in their name, details, id or tags; kind, group (a resource group id, or none) and tag (key or key=value) filter; limit caps the list (default 500). total and counts (by kind) are of every resource you may read, before filters.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/resources' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgPortalResourcesByRef

GET/v1/orgs/:orgId/portal/resources/:kind/:ref

One resource with its resource group and tags.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/resources/{kind}/{ref}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgPortalResourcesByRef

PUT/v1/orgs/:orgId/portal/resources/:kind/:ref

Sets a resource's resource group (groupId, or null for none) and its tags (tags: up to 20 { key, value }, keys unique; replaces them all). Needs the right to change that resource.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/resources/{kind}/{ref}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "groupId": "<groupId>",
    "tags": [
      {
        "key": "example",
        "value": "example"
      }
    ]
  }'
orgPortalResourcesActivity

GET/v1/orgs/:orgId/portal/resources/:kind/:ref/activity

What happened to a resource, newest first: its entries in the org's audit log, filtered like the log (action, actor) and paged (cursor, limit). Readable by those who may read the resource.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/resources/{kind}/{ref}/activity' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgPortalResourcesAccess

GET/v1/orgs/:orgId/portal/resources/:kind/:ref/access

Who can reach a resource: each member, their role and what that role lets them do with it (manage, change or read), and the groups whose grants widen access to a Serverless App Service or a repository. Roles are changed in Tenant.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/resources/{kind}/{ref}/access' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgPortalGroups

GET/v1/orgs/:orgId/portal/groups

The org's resource groups.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/groups' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgPortalGroups

POST/v1/orgs/:orgId/portal/groups

Creates a resource group (name, optional description). Needs resources:write.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/groups' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
patchOrgPortalGroupsByResourceGroupId

PATCH/v1/orgs/:orgId/portal/groups/:resourceGroupId

Renames a resource group or changes its description. Needs resources:write.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/groups/{resourceGroupId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "description": "example"
  }'
deleteOrgPortalGroupsByResourceGroupId

DELETE/v1/orgs/:orgId/portal/groups/:resourceGroupId

Deletes a resource group; its resources stay, outside any group. Needs resources:write.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/groups/{resourceGroupId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgPortalMe

GET/v1/orgs/:orgId/portal/me

Your portal in this org: favourite services in order (null: the defaults), recent resources and the dashboard Dashboard opens. People only.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/me' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgPortalMe

PUT/v1/orgs/:orgId/portal/me

Saves your favourite services (favourites: service keys in order, null for the defaults) or the dashboard Dashboard opens (dashboardId).

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/me' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "favourites": [
      "example"
    ],
    "dashboardId": "<dashboardId>"
  }'
postOrgPortalMeRecent

POST/v1/orgs/:orgId/portal/me/recent

Records that you opened a resource (kind, ref), for Recent.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/me/recent' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "project",
    "ref": "example"
  }'
orgPortalDashboards

GET/v1/orgs/:orgId/portal/dashboards

Dashboards you can open: yours and those shared with the organization (without their tiles).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/dashboards' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgPortalDashboards

POST/v1/orgs/:orgId/portal/dashboards

Creates a dashboard (name, optional shared and tiles); yours alone unless shared.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/dashboards' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
orgPortalDashboardsByDashboardId

GET/v1/orgs/:orgId/portal/dashboards/:dashboardId

A dashboard with its tiles.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/dashboards/{dashboardId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgPortalDashboardsByDashboardId

PUT/v1/orgs/:orgId/portal/dashboards/:dashboardId

Changes a dashboard: name, shared (owners only) and tiles (replaced; positions are compacted).

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/dashboards/{dashboardId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "shared": true,
    "tiles": [
      {}
    ]
  }'
deleteOrgPortalDashboardsByDashboardId

DELETE/v1/orgs/:orgId/portal/dashboards/:dashboardId

Deletes a dashboard (its owner, or for a shared one those who manage the organization).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/portal/dashboards/{dashboardId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"