{
  "opencollection": "1.0.0",
  "info": {
    "name": "QaaS Backend admin Tasks API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Tasks",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Tasks",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List tasks for the current user."
        },
        {
          "info": {
            "name": "Create Task",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/tasks",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Create a new generic task (admin only).\n\n`type` must be in `_ALLOWED_GENERIC_TASK_TYPES`. Specialized task types\nhave their own dedicated endpoints with the right pre-flight validation:\n\n  - qiskit_job: created via POST /provider/jobs (validates backend,\n    circuit constraints, QASM format; uploads artifacts; maintains\n    the job_id<->task_id mapping). Submitting it through this generic\n    endpoint would bypass all of that, so it's rejected here."
        },
        {
          "info": {
            "name": "Get Task",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks/:task_id",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get task details by ID."
        },
        {
          "info": {
            "name": "Cancel Task Endpoint",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/tasks/:task_id",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Cancel a task by setting cancel_request and updating processing entries.\n\nAuthorization is performed here (owner or admin); the existence and\nterminal-state checks plus the Redis write are delegated to\nqaas_core.tasks.request_cancel so the same logic is shared with\n/provider/jobs/{job_id}."
        },
        {
          "info": {
            "name": "Download Task Result",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks/:task_id/result",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Download a task's final result (Content-Disposition: result.<ext>)."
        },
        {
          "info": {
            "name": "View Task Result",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks/:task_id/result/view",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Text-mode view of a task's final result (for the in-app viewer)."
        },
        {
          "info": {
            "name": "Download Task Input",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks/:task_id/input",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Download a task's original input circuit."
        },
        {
          "info": {
            "name": "View Task Input",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/tasks/:task_id/input/view",
            "params": [
              {
                "name": "task_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Text-mode view of a task's original input circuit."
        }
      ]
    }
  ],
  "bundled": true
}