openapi: 3.1.0 info: title: Ankr Advanced EVM Tasks API description: 'The Ankr Advanced API (AAPI) provides a specifically-tailored collection of JSON-RPC methods that optimize, index, cache, and store blockchain data across multiple EVM-compatible blockchains. The Advanced API exposes three logical groups: NFT, Token, and Query. ' version: 1.0.0 contact: name: Ankr url: https://www.ankr.com email: support@ankr.com license: name: Ankr Terms of Service url: https://www.ankr.com/terms/ servers: - url: https://rpc.ankr.com/multichain description: Public multichain endpoint - url: https://rpc.ankr.com/multichain/{API_KEY} description: Premium multichain endpoint variables: API_KEY: default: API_KEY description: Premium Plan project API key security: - {} - ApiKeyAuth: [] tags: - name: Tasks description: Time-based and event-triggered automation tasks. paths: /v1/tasks: get: summary: Ankr List Automation Tasks description: List automation tasks for the authenticated account. operationId: listTasks tags: - Tasks responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Task' post: summary: Ankr Create Automation Task description: Create a new time-based or event-triggered automation task targeting a deployed contract. operationId: createTask tags: - Tasks requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateTaskRequest' responses: '201': description: Task created. content: application/json: schema: $ref: '#/components/schemas/Task' /v1/tasks/{taskId}: get: summary: Ankr Get Automation Task description: Retrieve a single automation task. operationId: getTask tags: - Tasks parameters: - $ref: '#/components/parameters/TaskId' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Task' delete: summary: Ankr Delete Automation Task description: Cancel and delete an automation task. operationId: deleteTask tags: - Tasks parameters: - $ref: '#/components/parameters/TaskId' responses: '204': description: Task deleted. components: schemas: CreateTaskRequest: type: object required: - chain - contractAddress - functionSignature - trigger properties: chain: type: string enum: - bsc contractAddress: type: string functionSignature: type: string abi: type: array items: {} trigger: oneOf: - $ref: '#/components/schemas/TimeTrigger' - $ref: '#/components/schemas/EventTrigger' Task: type: object properties: id: type: string chain: type: string contractAddress: type: string functionSignature: type: string trigger: type: object status: type: string enum: - pending - active - paused - completed - failed balance: type: string created: type: string format: date-time EventTrigger: type: object required: - type - condition properties: type: type: string enum: - event condition: type: string description: Solidity condition exposed via IAutomateCompatible. TimeTrigger: type: object required: - type - schedule properties: type: type: string enum: - time schedule: type: string description: CRON expression. parameters: TaskId: name: taskId in: path required: true schema: type: string securitySchemes: ApiKeyAuth: type: apiKey in: query name: API_KEY description: Premium Plan API key passed as the trailing path segment.