{
  "openapi": "3.0.1",
  "info": {
    "title": "OTTL Transformation Generator & Simulator",
    "description": "Plain-English requests → OpenTelemetry OTTL (transform/filter processors), an OTTL linter with 56 rules, and a simulator that shows before/after diffs on sample traces, logs and metrics. Deterministic, no LLM; Standby HTTP for agents.",
    "version": "0.1",
    "x-build-id": "HM1927Rgk7DheypbD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/michiganpublictech~ottl-studio/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-michiganpublictech-ottl-studio",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/michiganpublictech~ottl-studio/runs": {
      "post": {
        "operationId": "runs-sync-michiganpublictech-ottl-studio",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/michiganpublictech~ottl-studio/run-sync": {
      "post": {
        "operationId": "run-sync-michiganpublictech-ottl-studio",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "generate",
              "validate",
              "simulate"
            ],
            "type": "string",
            "description": "generate = plain English → OTTL; validate = lint your OTTL/config; simulate = run statements on sample telemetry; all = everything (default).",
            "default": "all"
          },
          "requirements": {
            "title": "Requirements (plain English)",
            "type": "string",
            "description": "One or more transformation requests, e.g. 'Remove Kubernetes pod UIDs, redact user email addresses, and drop successful health-check spans.' Unrecognised phrases are reported with the closest supported intents — nothing is guessed."
          },
          "statements": {
            "title": "OTTL statements",
            "type": "array",
            "description": "Your OTTL to validate/simulate: a list of strings, or objects {\"context\": \"span\", \"statements\": [...]} / {\"context\": \"log\", \"conditions\": [...]}."
          },
          "statementContext": {
            "title": "Context for plain statement strings",
            "enum": [
              "auto",
              "resource",
              "scope",
              "span",
              "spanevent",
              "metric",
              "datapoint",
              "log"
            ],
            "type": "string",
            "description": "Context for string statements; auto infers it from the paths.",
            "default": "auto"
          },
          "statementType": {
            "title": "Statement type",
            "enum": [
              "transform",
              "filter"
            ],
            "type": "string",
            "description": "transform = editor statements (set, delete_key…); filter = boolean conditions for the filter processor.",
            "default": "transform"
          },
          "collectorConfig": {
            "title": "Collector configuration (YAML)",
            "type": "string",
            "description": "A full Collector config; transform/filter processors and routing connector statements are extracted, linted and simulated in pipeline order."
          },
          "sampleTelemetry": {
            "title": "Sample telemetry (OTLP/JSON)",
            "type": "object",
            "description": "OTLP/JSON traces/logs/metrics (resourceSpans/resourceLogs/resourceMetrics) or the simplified {spans:[], logs:[], metrics:[]} shape. Bundled realistic samples are used when empty."
          },
          "requests": {
            "title": "Batch requests",
            "type": "array",
            "description": "Optional: several requests, each an object with the fields above (requirements/statements/collectorConfig/sampleTelemetry/mode/name). One dataset item and charge per request."
          },
          "collectorVersion": {
            "title": "Collector version",
            "type": "string",
            "description": "Your Collector version, e.g. 0.110.0. 0.120+ gets flat context-prefixed statements (best-effort version table); older gets classic `context:` groups.",
            "default": "0.110.0"
          },
          "syntaxStyle": {
            "title": "Statement syntax",
            "enum": [
              "auto",
              "grouped",
              "flat"
            ],
            "type": "string",
            "description": "auto picks from collectorVersion.",
            "default": "auto"
          },
          "processorName": {
            "title": "Processor name",
            "type": "string",
            "description": "Name suffix for generated processors: transform/<name>, filter/<name>.",
            "default": "generated"
          },
          "signals": {
            "title": "Signals",
            "type": "array",
            "description": "Signals generated statements apply to when a requirement doesn't name one.",
            "items": {
              "type": "string",
              "enum": [
                "traces",
                "logs",
                "metrics"
              ]
            },
            "default": [
              "traces",
              "logs",
              "metrics"
            ]
          },
          "errorMode": {
            "title": "error_mode for generated processors",
            "enum": [
              "ignore",
              "silent",
              "propagate"
            ],
            "type": "string",
            "description": "ignore (recommended), silent, or propagate (one failing item rejects the whole batch).",
            "default": "ignore"
          },
          "useBundledSamples": {
            "title": "Use bundled samples",
            "type": "boolean",
            "description": "Simulate against bundled representative telemetry when no sample telemetry is supplied.",
            "default": true
          },
          "dropWarningPercent": {
            "title": "Drop warning threshold (%)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Warn when filters drop at least this share of sample items.",
            "default": 50
          },
          "maxDiffItems": {
            "title": "Max diff items",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum before/after item diffs in the output.",
            "default": 25
          },
          "failOnSeverity": {
            "title": "Fail run at severity",
            "enum": [
              "none",
              "critical",
              "high",
              "medium",
              "low"
            ],
            "type": "string",
            "description": "Fail the run (non-zero exit, useful in CI) when any finding is at or above this severity.",
            "default": "none"
          },
          "disabledRules": {
            "title": "Disabled rules",
            "type": "array",
            "description": "Rule IDs to skip, e.g. OTTL-SEM-001. Requires a plan with the custom rules feature.",
            "items": {
              "type": "string"
            }
          },
          "licenseKey": {
            "title": "License key",
            "type": "string",
            "description": "Optional enterprise or prepaid license key. Leave empty to pay per event on Apify."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}