ConductScience Sequences
Contents

User guide · Programs and data

Programs and API tokens

Run searches from a program with an API token, through the routes the page uses.

Programs can run searches through the same routes the page uses.

  • On the hosted service, and on a server whose sign-in takes API tokens, choose API tokens from your account button. Name the token and pick how long it lasts, up to 90 days (your server may set less). Copy it right away: the page shows it only once. An account may have 10 live tokens. The page shows when each token was last used, and Revoke ends one. Use demo data fills the name Demo program and the shortest time.
  • The program sends the token with every request, as Authorization: Bearer <token>, and acts as your account under the same rules.
  • GET /api/openapi.json describes the routes a program uses, in OpenAPI 3.1. It is open without sign-in.
  • POST /api/batches starts 1 to 100 searches in one request. If any of them cannot run, none starts, and the answer lists each problem. GET /api/batches/:id gives the state of each search. An account may have 200 batch searches waiting or running. api-batch.json is a demo body of two exact text searches: add a snapshotId from GET /api/databases to each search before you send it.
  • GET /api/batches/:id/multi-hits counts a batch's finished searches together, as Hit by several queries does for a query group: by=publication or by=sequence, and minQueries, how many queries must hit a row for it to be listed, 2 unless set. identity, coverage, queryMatch, queryIdentity, hitIdentity, publishedFrom, publishedBefore and office apply to each search, and GET /api/batches/:id/multi-hits.csv gives every row. A query group's search is one batch, named by batchId in the group's searches.
  • DELETE /api/cases/:id deletes a demo case you started. A case that is not a demo case answers 409 and stays.
  • On a search's patents, GET /api/jobs/:id/publications takes group=family for one row per patent family, at its earliest publication, with its members and how they were joined, and later=hide to fold the publications from on or after the Published before date and count them. GET /api/jobs/:id/applicants and GET /api/jobs/:id/applicants.csv take later=hide too, and then count only the publications that stay. POST /api/jobs/:id/marks takes ids to keep or exclude up to 500 publications at once, such as a family's. The OpenAPI description gives every field.
  • GET /api/jobs takes text to find your searches by name, or by the set or database they searched, and status to keep those in the states you list, such as queued,running. GET /api/jobs/:id/request gives the request a search was started with, query included.
  • POST /api/groups runs one search across 2 to 8 sets as a combined search, such as a protein query against Patent proteins, Patent DNA and Swiss-Prot. If one set cannot take the query, or the queue lacks room, none starts. GET /api/groups/:id/references gives one list: a patent or database entry that several sets found is one row, with its best measures, its earliest date and the sets that found it. It takes the filters, sorts, group=family and later of a search's patents, plus set and kind. A mark through POST /api/groups/:id/marks reaches every search in the combined search. On the page, Search in starts one when you check two or more sets.
  • GET /api/jobs/:id/hits/:row gives one hit of a search by its row number, whatever the filters, with its mark.
  • On several servers that share one queue, a search of a snapshot has shared: true. GET /api/jobs/:id adds ahead while it waits: how many such searches wait before it. worker names the server that runs it or ran it, and retries counts the times it was cut off. GET /api/status adds servers: the other servers that take searches now, and how many searches of a snapshot run at once.
  • POST /api/cases/:id/imports?name=<file name> brings a result file into a case, as Import a result file does. Send the file itself as the body, as application/octet-stream, or as application/gzip when it is compressed. GET /api/cases/:id/imports/:jobId/unresolved lists the rows that did not join, with their reasons. For a file whose columns you match, add columns= with a JSON column map, URL-encoded, such as {"hit":"Subject","identity":"% identity"}, and if you like header= with the header row's line and delimiter= with comma or tab. GET /api/cases/:id/imports/:jobId/report gives such an import's column map and its import report.
  • POST /api/imports takes many files at once, as the Import page does. Send multipart/form-data: case, the ID of one of your cases, or title, a new case's name, then a part named file for each file. The answer gives a line for each file.
  • GET /api/sequences gives a stored sequence's letters, as Fetch a sequence from the snapshot does. Give the snapshotId and set from GET /api/databases, then accession, or publication with seqIdNo. The answer gives the sequence's type, length, set and snapshot, and every record in the set that matches. deltas adds the snapshot's additions, by their IDs from GET /api/databases, separated by commas. A newer patent needs them, such as SEQ ID NO: 1 of US12788009B2, granted 2026-11-10: publication=US12788009B2&seqIdNo=1&deltas=<IDs>. A sequence longer than 1,000,000 letters comes in stretches: ask for one with from and to.
  • POST /api/listings?name=<file name> reads a sequence listing, as Import on the Listings tab does: WIPO ST.26 XML, ST.25 text, or a publication's full-text XML that holds its listing. Send the file itself as the body, as application/octet-stream, or as application/gzip when it is compressed. Ask GET /api/listings/:id until its status is ready or failed. Then GET /api/listings/:id/sequences?letters=true gives the sequences as JSON, in SEQ ID order: each one's SEQ ID NO, type, length, letters and organism, and its notes, the notes the listing gives its features. A page holds up to 1,000,000 letters, and next says where the next page starts. The listing stays in your account until you delete it. To try it, send us12788009b2-listing.xml.
  • A token cannot make another token: that needs the browser. On the local workbench there are no tokens, and a program on the same computer calls http://127.0.0.1:8765 as the page does.
  • To send an application's documents into cases from another system, use a connector token: see Connectors.
  • An assistant on your computer can call these routes for you through the assistant program: see Assistants.

Guide version 1.91.0 · For Sequences 0.155.0