Skip to main content

Get

Get the catalog of the controller.

The catalog is what the UI reads after sign-in: each behavior with its methods, the areas, the permissions, the built-in roles, the permission of each operation, the tones of the statuses and the counts, and the host families. The controller builds it from its registries.

osapi client catalog get

Examples​

osapi client catalog get
osapi client catalog get --json

Result​

The command prints:

$ osapi client catalog get
Catalog:
  Host families:  debian, darwin
  Render tags:
  Outcomes:

Behaviors (1):
  NAME      TITLE     AREA  INTERNAL  PLATFORMS       METHODS
  hostname  Hostname  node  no        debian, darwin  get

Areas (1):
  NAME  LABEL
  node  Node

Roles (1):
  NAME      DESCRIPTION
  observer  A dashboard or a monitor.

Operations (1):
  ID               PERMISSION
  GetNodeHostname  hostname:read

Targets (0):
  None.

Controller (0):
  None.

  trace 26e448c9dbe1c4a8d216a98c675079c9

With --json, the API's response:

{
"behaviors": [
{
"name": "hostname",
"title": "Hostname",
"area": "node",
"doc": "The hostname of a host.",
"internal": false,
"platforms": ["debian", "darwin"],
"uses": [],
"used_by": [],
"chain": "",
"methods": [
{
"name": "get",
"kind": "read",
"doc": "Get the hostname.",
"http_method": "GET",
"path": "/api/node/{hostname}/hostname",
"permission": "hostname:read",
"platforms": ["debian", "darwin"],
"runs_on": ["debian", "darwin"],
"input": "GetInput {}",
"output": "GetOutput { hostname }",
"fields": [],
"columns": [
{
"name": "hostname",
"label": "Hostname",
"doc": "The hostname.",
"kind": "value"
}
],
"calls": [],
"examples": []
}
]
}
],
"areas": [
{
"name": "node",
"label": "Node"
}
],
"permissions": ["hostname:read", "hostname:write"],
"roles": [
{
"name": "observer",
"description": "A dashboard or a monitor.",
"permissions": ["health:read"]
}
],
"operations": [
{
"id": "GetNodeHostname",
"permission": "hostname:read"
}
],
"status_tones": {
"failed": "err",
"ok": "ok"
},
"count_tones": {
"failed": "err"
},
"host_families": ["debian", "darwin"],
"targets": null,
"controller": null,
"render_tags": null,
"outcomes": null
}

Permission​

It needs the catalog:read permission. osapi controller role get --name <role> shows what a role grants.

Notes​

The table leaves out the permissions, the tones and the doc of each behavior, and the permissions of each role. --json prints the whole catalog, with the methods of each behavior. osapi controller role get --name <role> shows the permissions of a role.

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file; without one at the default path, osapi runs on the defaults/etc/osapi/osapi.yaml
--urlBase URL the CLI client connects to (controller.client.url)https://localhost:8080

Output tells how the result is printed, and what --json gives.