Entity hook

Find entity hook actions matching a request

Changed on

Returns the entity hook actions that apply to a given NRN, action, dimensions, and an optional request_body.

Use this endpoint to discover, before mutating an entity, which hooks should fire and how to dispatch them (their when/type differ).

For each matching hook, the API runs a dry-run notification against the notifications service with context.request_body set to the supplied payload. Hooks whose dry-run finds no channel willing to deliver (channels with no filters match, or no subscribed channel at all) are excluded from the response. Hooks where at least one channel would deliver are included.

Response shape is the same as GET /entity_hook/action.

post/entity_hook/action/find

Request

  • Base URL
    https://api.nullplatform.com
  • URL
    https://api.nullplatform.com/entity_hook/action/find
  • Auth
    HTTP bearer

Query parameters

offsetinteger

Pagination offset. Defaults to 0.

limitinteger

Pagination limit. Defaults to 30.

Request body

nrnstring required

A resource identifier (NRN) specifying where this action applies.

actionstring required

The specific action being performed on the entity.

user_idinteger

Optional user identifier of the principal performing the action.

dimensionsobject

Key-value pairs defining the scope of the action.

on'create' | 'update' | 'delete'

Filters hooks that fire on this lifecycle event. Typically derived from the action verb.

request_bodyobject

The payload of the originating request. Forwarded inside context.request_body when each matching hook's dry-run notification is sent, so that notification channels with filters can decide whether to deliver. Omit when you want to discover hooks without channel-side filtering.

Example request

{
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "action": "deployment:update",
  "user_id": 123,
  "dimensions": {
    "environment": "production",
    "country": "us"
  },
  "on": "update",
  "request_body": {
    "status": "finalized",
    "traffic_percentage": 100
  }
}

Response

The list of entity hook actions that apply to the given context.

Example response

{
  "paging": {
    "limit": 200
  },
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "nrn": "organization=1:account=2:namespace=3:application=4",
      "entity": "scope",
      "action": "scope:create",
      "dimensions": {
        "environment": "production",
        "country": "us"
      },
      "on_policy_success": "manual",
      "on_policy_fail": "manual",
      "when": "before",
      "type": "hook",
      "on": "create",
      "policies": [
        {
          "id": 5678,
          "nrn": "organization=1:account=2:namespace=3:application=4",
          "name": "Crypto Kong Policies",
          "conditions": {
            "scope.requested_spec.memory_in_gb": {
              "$lte": 4
            }
          }
        }
      ]
    }
  ]
}

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property message deprecated

    • info

      response property message deprecated

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added