{
  "openapi": "3.0.1",
  "info": {
    "title": "Retry Oracle — Deterministic Retry and Spend Decisions",
    "description": "Failed operation plus attempt, deadline, spend and idempotency context → RETRY, MUTATE or ABORT with reason codes, bounded delays and SHA-256 provenance. No LLM and no operation execution.",
    "version": "0.1",
    "x-build-id": "Lqe5uyPpLTtdwcn9f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/skilled_glee~retry-oracle/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-skilled_glee-retry-oracle",
        "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/skilled_glee~retry-oracle/runs": {
      "post": {
        "operationId": "runs-sync-skilled_glee-retry-oracle",
        "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/skilled_glee~retry-oracle/run-sync": {
      "post": {
        "operationId": "run-sync-skilled_glee-retry-oracle",
        "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",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "title": "Retry contexts",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 contexts, without secrets or operation payloads.",
            "items": {
              "type": "object",
              "properties": {
                "operationType": {
                  "title": "operationType",
                  "type": "string",
                  "description": "Short category label only. Never include credentials, URLs, payment details, or payloads."
                },
                "failureCategory": {
                  "title": "failureCategory",
                  "type": "string",
                  "description": "failureCategory",
                  "enum": [
                    "rate_limit",
                    "timeout",
                    "network",
                    "server_error",
                    "authentication",
                    "invalid_input",
                    "not_found",
                    "permission_denied",
                    "conflict",
                    "success",
                    "unknown"
                  ]
                },
                "statusCode": {
                  "title": "statusCode",
                  "type": "integer",
                  "description": "statusCode"
                },
                "attemptNumber": {
                  "title": "attemptNumber",
                  "type": "integer",
                  "description": "One-based number of the attempt that just failed."
                },
                "maxAttempts": {
                  "title": "maxAttempts",
                  "type": "integer",
                  "description": "maxAttempts"
                },
                "elapsedSeconds": {
                  "title": "elapsedSeconds",
                  "type": "number",
                  "description": "elapsedSeconds"
                },
                "deadlineSeconds": {
                  "title": "deadlineSeconds",
                  "type": "number",
                  "description": "Total allowed duration from operation start, not a Unix timestamp."
                },
                "amountSpent": {
                  "title": "amountSpent",
                  "type": "number",
                  "description": "Spend so far in the same currency units as maxSpend."
                },
                "maxSpend": {
                  "title": "maxSpend",
                  "type": "number",
                  "description": "maxSpend"
                },
                "idempotent": {
                  "title": "idempotent",
                  "type": "boolean",
                  "description": "idempotent"
                },
                "nextAttemptCost": {
                  "title": "nextAttemptCost",
                  "type": "number",
                  "description": "Expected upper bound on the next attempt cost."
                },
                "retryAfterSeconds": {
                  "title": "retryAfterSeconds",
                  "type": "number",
                  "description": "retryAfterSeconds"
                },
                "allowedMutations": {
                  "title": "Allowed mutations",
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 4,
                  "description": "Allowed values: refresh-auth, change-endpoint, reduce-payload, refresh-resource. No mutation is executed."
                }
              },
              "required": [
                "operationType",
                "failureCategory",
                "attemptNumber",
                "maxAttempts",
                "elapsedSeconds",
                "deadlineSeconds",
                "amountSpent",
                "maxSpend",
                "idempotent",
                "allowedMutations"
              ],
              "additionalProperties": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}