{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-http-request-definition-response-schema.json",
  "title": "HttpRequestDefinitionResponse",
  "description": "HTTP request definition",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-http-request-definition-api-openapi.yml#/components/schemas/HttpRequestDefinitionResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "HTTP request definition ID"
    },
    "scope": {
      "type": "string",
      "enum": [
        "AGENT_OUTBOUND_DIAL"
      ],
      "description": "Scope of the HTTP request definition"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Description of the HTTP request definition"
    },
    "url": {
      "type": "string",
      "description": "URL for the HTTP request"
    },
    "method": {
      "type": "string",
      "enum": [
        "POST",
        "PUT",
        "PATCH",
        "GET"
      ],
      "description": "HTTP method: POST, PUT, PATCH, or GET"
    },
    "body": {
      "type": [
        "string",
        "null"
      ],
      "description": "Request body as a string"
    },
    "parsedBody": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {}
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Parsed body as a JSON object if valid JSON, otherwise the raw string"
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Request headers as key-value pairs"
    },
    "isConfigManaged": {
      "type": "boolean",
      "description": "Whether this definition is managed by config-as-code. A managed definition is reconciled from your config: PUT returns 409, and changes belong in the config file (or detach it first)."
    },
    "createdAt": {
      "type": "string",
      "description": "Creation timestamp"
    },
    "updatedAt": {
      "type": "string",
      "description": "Last update timestamp"
    }
  },
  "required": [
    "id",
    "scope",
    "description",
    "url",
    "method",
    "body",
    "parsedBody",
    "headers",
    "isConfigManaged",
    "createdAt",
    "updatedAt"
  ]
}