v1

latestOpenAPI 3.0.1Apache 2.02026-07-1783686.1 KB
asyncquery

Initiate a query with a callback to receive the response

post/asyncquery

Request body

callbackstring uri required

Upon completion, this server will send a POST request to the callback URL with Content-Type: application/json header and request body containing a JSON-encoded Response object. The server MAY POST Response objects before work is fully complete to provide interim results with a Response.status value of 'Running'. If a POST operation to the callback URL does not succeed, the server SHOULD retry the POST at least once.

log_level'ERROR' | 'WARNING' | 'INFO' | 'DEBUG'

Logging level

submitterstring nullable

Any string for self-identifying the submitter of a query. The purpose of this optional field is to aid in the tracking of the source of queries for development and issue resolution.

bypass_cacheboolean

Set to true in order to request that the agent obtain fresh information from its sources in all cases where it has a viable choice between requesting fresh information in real time and using cached information. The agent receiving this flag MUST also include it in TRAPI sent to downstream sources (e.g., ARS -> ARAs -> KPs).

Example request

{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "subject": "n00",
          "object": "n01",
          "predicates": [
            "biolink:physically_interacts_with"
          ]
        }
      },
      "nodes": {
        "n00": {
          "ids": [
            "CHEMBL.COMPOUND:CHEMBL112"
          ]
        },
        "n01": {
          "categories": [
            "biolink:Protein"
          ]
        }
      }
    }
  },
  "log_level": "DEBUG"
}

Response

The query is accepted for processing and the Response will be sent to the callback url when complete.

statusstring nullable

One of a standardized set of short codes: e.g. Accepted, QueryNotTraversable, KPsNotAvailable

descriptionstring nullable

A brief human-readable description of the result of the async_query submission.

job_idstring required

An identifier for the submitted job that can be used with /async_query_status to receive an update on the status of the job.

Example response

{
  "job_id": "rXEOAosN3L",
  "description": "Async_query has been queued",
  "status": "Accepted"
}
All 8 operations