Functions

Update a trigger

Changed on

Applies a partial update. The required type discriminator must identify the existing trigger kind. The supported types are schedule and storage_object_created. Editing an inherited trigger creates a child-local shadow with the same trigger_id; it remains disabled unless this request explicitly enables it. For a schedule trigger, updating the schedule or enabled state increments version and recomputes next_run_at.

Disabling stops future scheduling but does not cancel occurrences already committed for delivery. For storage_object_created, the configuration selects one exact bucket. An omitted object-key prefix matches every key in that bucket; a present prefix is matched byte-for-byte and case-sensitively against the full key, without path normalization or a path-segment boundary.

Note: This endpoint is currently in Beta.

patch/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Request body

OR

Example request

{
  "schedule": {
    "cron": "0 9 * * 1-5"
  }
}

Response

The updated trigger

Example response

{
  "trigger": {
    "schedule": {
      "cron": "0 9 * * 1-5"
    }
  }
}

Changes

    • ▲

      added to the response property oneOf list for the response status

    • ▲

      removed the required property ///// from the response with the status

    • ○

      added storage_object_created mapping keys to the request discriminator

    • ○

      added to the request body oneOf list

    • ○

      added storage_object_created discriminator mapping keys to the response property for the response status

    • ○

      endpoint added