Skip to main content
Connect mode routes calls with seven resource types. You define them in one of two ways, depending on which API server implementation you run. Because simpledata can’t list or write, rctl and the SDK need the PostgreSQL-backed API server.

Manifest shape (YAML files)

Each file holds a list of resources. Every resource has the same top-level fields.
When simpledata loads the files, it checks each resource against its schema and exits on the first invalid one. It also exits when two resources share a ref, when a ref contains a space, or when a *Ref field points to a resource that doesn’t exist.
YAML groups fields under metadata and spec, sometimes with extra nesting (for example spec.context.domainUri on a Domain). The API and SDK use flat objects (domainUri). Each resource page lists both names.

API shape (rctl, SDK, gRPC)

Through the API, a resource is a flat object. You send the resource fields; the server sets the rest. Responses also embed the objects that *Ref fields point to. For example, an Agent with domainRef comes back with a domain object. When you delete a referenced resource, pgdata clears the reference (sets it to null) on the resources that used it. Deleting a Domain or Trunk also deletes its egress policies or outbound URIs.

Resource types

How resources relate

Diagram of Connect resources: Agents belong to a Domain and use Credentials; a Domain has an ACL and egress policies that point to Numbers; Numbers belong to Trunks; Trunks and Peers use Credentials and ACLs. Diagram of Connect resources: Agents belong to a Domain and use Credentials; a Domain has an ACL and egress policies that point to Numbers; Numbers belong to Trunks; Trunks and Peers use Credentials and ACLs. For how these resources drive routing, see Connect mode and Routing.