> ## Documentation Index
> Fetch the complete documentation index at: https://docs.murmur.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Write a catalog resource

> SetResource creates or updates a catalog resource.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/catalog/{ref.kind}/{ref.name}
openapi: 3.0.0
info:
  title: Murmur REST API
  description: >-
    PRE-ALPHA: INTERFACE SUBJECT TO CHANGE WITHOUT NOTICE.


    The murmur REST API lets you spawn agents, track their progress, manage
    their task lists, and read and write catalog resources from any HTTP client.
  version: v1
servers:
  - url: https://api.murmur.dev
security:
  - ApiKey: []
tags:
  - name: MurmurService
paths:
  /v1/catalog/{ref.kind}/{ref.name}:
    post:
      tags:
        - MurmurService
      summary: Write a catalog resource
      description: SetResource creates or updates a catalog resource.
      operationId: MurmurService_SetResource
      parameters:
        - name: ref.kind
          description: e.g. "vm-profile", "environment", "pool-config"
          in: path
          required: true
          schema:
            type: string
        - name: ref.name
          description: resource name within the kind (required)
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MurmurServiceSetResourceBody'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1SetResourceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
components:
  schemas:
    MurmurServiceSetResourceBody:
      type: object
      properties:
        ref:
          type: object
          properties:
            tenant:
              $ref: '#/components/schemas/v1Tenant'
          description: ResourceRef identifies a catalog resource by kind and name.
        payload:
          type: string
          format: byte
          description: The resource document as base64-encoded JSON.
        updateMask:
          type: string
          description: >-
            When empty, the write is a full replace: the payload is the complete
            resource and overwrites whatever exists. When non-empty, the write
            is a patch: only the named fields are applied onto the existing
            resource — fields not in the mask are preserved, fields in the mask
            are taken from the payload even when zero-valued.
        justification:
          type: string
          description: >-
            Reason for the write, recorded in the audit log. Required for
            platform-operator writes; optional otherwise.
        ifGenerationMatch:
          type: string
          format: int64
          description: >-
            Optional write precondition. When unset, the write is unconditional
            (last writer wins). When set, the write commits only if the
            resource's current generation equals this value; 0 means the
            resource must not exist (atomic create). On mismatch the request
            fails with FAILED_PRECONDITION and nothing is written. Must be >= 0.
            Obtain the generation from GetResourceResponse.generation.
    v1SetResourceResponse:
      type: object
      properties:
        payload:
          type: string
          format: byte
          description: >-
            The stored resource document as base64-encoded JSON, as persisted
            after the write — including server-populated fields. For kinds that
            generate a one-time secret (the key of a newly created token or
            share link, or an integration's webhook signing key), the document
            additionally carries the raw secret, which is never stored — this
            response is the only place it is readable; record it now.
        generation:
          type: string
          format: int64
          description: >-
            Version generation produced by the write, so the caller can chain
            conditional writes without an interleaved read. 0 only where no
            versioned object was written.
    googleRpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: >-
            Numeric status code for the failure, matching the HTTP status of the
            response via the standard mapping (e.g. 3 INVALID_ARGUMENT → 400, 5
            NOT_FOUND → 404, 7 PERMISSION_DENIED → 403, 16 UNAUTHENTICATED →
            401).
        message:
          type: string
          description: Human-readable description of what caused the failure.
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
          description: >-
            Machine-readable error details, when the failure carries them.
            Usually empty.
      description: The error envelope returned on every non-2xx response.
    v1Tenant:
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/v1Provider'
        org:
          type: string
          title: username or org name
      description: |-
        Tenant identifies an organization within a provider. It is the unit of
        multi-tenant scoping — all resources (agents, pools, VMs) belong to
        exactly one tenant.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: >-
            Identifies the payload type of this detail value; the remaining
            properties are that type's fields.
      additionalProperties: {}
      description: >-
        A structured detail value. `@type` identifies the payload type; the
        remaining properties are that type's fields.
    v1Provider:
      type: string
      enum:
        - PROVIDER_UNSPECIFIED
        - PROVIDER_GITHUB_OAUTH
        - PROVIDER_GITHUB_APP
        - PROVIDER_GOOGLE_OIDC
        - PROVIDER_SERVICE_PROFILE
      default: PROVIDER_UNSPECIFIED
      description: |-
        Provider identifies the identity provider type for a tenant namespace.
        Each provider is a distinct namespace — no cross-provider mixing.

         - PROVIDER_GITHUB_OAUTH: the namespace of an individual GitHub user — a single login (human or bot, e.g. "alice"), addressed as github_oauth/{login}
         - PROVIDER_GITHUB_APP: the org/tenant namespace — its account is the org name (github_app/{org}), never a person
         - PROVIDER_GOOGLE_OIDC: Google Workspace domain
         - PROVIDER_SERVICE_PROFILE: owner is a CatalogServiceProfile; account is the profile name
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: 'murmur API key: mur_<key_id>.<secret>'

````