Declarative Operations

Query existing resources

See: query command docs for usage details.

Requires appropriate permissions matching resources involved.

See query options reference for more details on each field in request body YAML object (query specifier).

post/query

Request

  • Base URL
    https://replace-with-account.api.decodable.co/v1alpha2
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://auth.decodable.co/authorize?audience=https://api.decodable.co/
      Token URLhttps://auth.decodable.co/oauth/token
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body application/x-yaml

operation'get' | 'list' | 'activate' | 'deactivate' | 'delete' nullable

Query operation: one of:

operationdescription
get <br>(default)Fetch all matched resources. <br>Include associated values in each resource: schema, properties, etc.
listFetch all matched resources. <br>Include only scalar values. This can be faster in some cases.
activateActivate all matched resources.
deactivateDeactivate all matched resources.
deleteDelete all matched resources.
kindsstring[] nullable

Include in response only resources whose kind is one of these values.

namesstring[] nullable

Include in response only resources whose name matches one of these values.

Values for this option may include the * wildcard, which matches any string in a name. For example: demo_*.

idsstring[] nullable

Include in response only resources whose id is one of these values.

activeboolean nullable

When present, include in response:

  • When true: only active resources.
  • When false: only not-active resources.
  • Only Connection and Pipeline resources.
stableboolean nullable

When present, include in response:

  • When true: only stable resources.
  • When false: only not-stable resources.
  • Only Connection and Pipeline resources.
no_statusboolean nullable

Return resources without status section, suitable for export for source control.

no_specboolean nullable

Return resources without spec section.

keep_idsboolean nullable

Return resources with IDs in metadata and spec sections.

include_immutablesboolean nullable

Include in the response built-in immutable resources, such as _events and _metrics Streams.

Important: These resources can't be apply'd (or otherwise changed). Not appropriate for export to source control or apply.

spec_versionsobject nullable
  • key: kind value
  • value: spec_version value (per-kind)

Select the spec_version for one or more kinds.

Allows your custom tooling to choose the contract (object shape) for spec sections of resource definition YAML docs in the query response. Note that spec shapes won't be compatible across spec_versions, and spec_version is per-kind.

The default spec_version is the latest for each kind.

tag_expressionstring nullable

A SQL-like expression used to query resources by their tags. The expression filters resources based on tag key and value pairs.

The expression format is key=value, where both the key and value are case-sensitive. Use logical operators like AND, OR, and parentheses for more complex queries.

Tag queries require values to be enclosed in single quotes. For multi-part queries, double-quote the entire expression to avoid issues with process substitution.

Response

A declarative query response: zero or more resource definitions, each with this schema.

Note that the response will be application/x-yaml by default (with one YAML doc per resource definition), but application/json may be selected via the Accept: request header.

kind'secret' | 'stream' | 'connection' | 'pipeline' required

The resource kind.

spec_version'v1' required

The spec version for this resource definition.

Example response

{
  "spec": {
    "stream_mappings": [
      {
        "stream_id": "abcd1234"
      }
    ],
    "stream_id": "abcd1234",
    "autoscale_configuration": {
      "pause_conditions": {
        "max_record_read_rate": {
          "record_count": "100",
          "duration_seconds": "300"
        },
        "max_job_runtime": {
          "duration_seconds": "3600"
        }
      },
      "resume_conditions": {
        "schedule": {
          "cron_expression": "0 8 * * *"
        }
      }
    }
  },
  "status": {
    "operator-chaining": "true"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.