{"openapi":"3.1.0","info":{"title":"ConductScience Sequences","version":"0.106.0","description":"The routes a program uses to search sequences and read the results. On a hosted server, sign in with an API token: make one on the API tokens page, then send `Authorization: Bearer <token>`. A token acts as its account, under the same rules. The local workbench answers programs on the same computer and needs no token. Every error answers with JSON: `{ \"message\": \"...\" }`."},"servers":[{"url":"https://sequences.conductscience.org"}],"tags":[{"name":"System","description":"The server, its sets and databases."},{"name":"Searches","description":"Start, follow and cancel searches."},{"name":"Results","description":"Hits, patents, alignments, CSV files and marks."},{"name":"Batches","description":"Many searches in one request."},{"name":"Combined searches","description":"One search across several sets, and one list of what they found."},{"name":"Tokens","description":"API tokens for programs."},{"name":"Listings","description":"WIPO ST.26 sequence listings."},{"name":"Query tools","description":"Variants, windows, DNA patterns, modified residues and searches proposed from a claim phrase, and the query groups they save."},{"name":"Antibodies","description":"Antibody regions."},{"name":"Watches","description":"Searches and applicants followed through each weekly addition."},{"name":"Applicants","description":"One applicant's publications with their sequences."},{"name":"Cases","description":"Cases: claims, the search plan, searches, notes and reports."},{"name":"Connectors","description":"Documents another system sends into cases, with a connector token."},{"name":"Admin","description":"For the admins of a hosted server."},{"name":"Known variants","description":"Where a protein query differs from a reviewed human protein it hits, each change ClinVar records, and the protein changes ClinVar records on that protein, from ClinVar, RefSeq and UniProt."},{"name":"Genes","description":"The human genes behind a protein hit, from NCBI Gene and HGNC through ConductGraph's Gene search: the genes a Swiss-Prot entry names, and those of each Swiss-Prot entry whose sequence a patent protein repeats exactly. Never by similarity."},{"name":"Drug names","description":"The drugs whose chains are the same sequence as a hit: the whole chain, an antibody's heavy or light chain variable domain as ANARCI numbers it under IMGT, or an oligonucleotide's bases. From ChEMBL (CC BY-SA 3.0) and GSRS's public data. Never by a near match or a name."}],"security":[{"bearerAuth":[]}],"paths":{"/api/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Whether the service can search","responses":{"200":{"description":"ok is true when BLAST+ answers and, on a hosted server, a snapshot is installed.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}}}}},"404":{"$ref":"#/components/responses/Error404"}},"security":[]}},"/api/openapi.json":{"get":{"operationId":"getOpenApi","tags":["System"],"summary":"This description","responses":{"200":{"description":"The OpenAPI 3.1 description of this server.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/Error404"}},"security":[]}},"/api/status":{"get":{"operationId":"getStatus","tags":["System"],"summary":"What this server can do, and the signed-in account","responses":{"200":{"description":"The tools, limits and license, and on a hosted server the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/snapshots":{"get":{"operationId":"listSnapshots","tags":["System"],"summary":"Installed snapshots, their sources and the terms of each source","responses":{"200":{"description":"The snapshots.","content":{"application/json":{"schema":{"type":"object","required":["snapshots"],"properties":{"snapshots":{"type":"array","items":{"type":"object","description":"A snapshot and its sources.","properties":{"snapshotId":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"When it was built."},"sources":{"type":"array","items":{"type":"object","description":"One holder of data in the snapshot or its deltas, with its terms.","properties":{"id":{"type":"string"},"name":{"type":"string"},"holder":{"type":["string","null"]},"terms":{"type":["string","null"]},"releases":{"type":"array","items":{"type":"string"},"description":"The releases it gave. More than four, all dates, read as one range, first to last, such as \"2026-10-08 to 2026-11-12\"."},"files":{"type":"integer","minimum":0,"description":"The files it gave."}},"additionalProperties":true}}},"additionalProperties":true}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/databases":{"get":{"operationId":"listDatabases","tags":["System"],"summary":"The sets and databases this server searches","responses":{"200":{"description":"Each snapshot set and database. A search names a set by snapshotId and set, or a database by databaseId.","content":{"application/json":{"schema":{"type":"object","required":["databases"],"properties":{"databases":{"type":"array","items":{"$ref":"#/components/schemas/Database"}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"importDatabase","tags":["System"],"summary":"Import a FASTA collection (local workbench only)","description":"A hosted server refuses with 403: it searches its own snapshot.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fasta","type"],"properties":{"fasta":{"type":"string","description":"The sequences in FASTA or PIR (NBRF)."},"type":{"enum":["nucl","prot"]},"title":{"type":"string","description":"A name, up to 500 characters."},"source":{"type":"string","description":"Where the sequences came from, up to 500 characters."}}}}}},"responses":{"202":{"description":"The import job.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs":{"get":{"operationId":"listJobs","tags":["Searches"],"summary":"The account's jobs, newest first","parameters":[{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/JobText"},{"$ref":"#/components/parameters/JobStatus"}],"responses":{"200":{"description":"One page of jobs.","content":{"application/json":{"schema":{"type":"object","required":["jobs","total","offset","limit"],"properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"total":{"type":"integer","minimum":0,"description":"All jobs that match."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createJob","tags":["Searches"],"summary":"Start a search","description":"On a server with compute limits, a search estimated to take longer than the server's time for asking, or one of a large set, answers 409 with confirm and does not start: send it again with \"confirmed\": true. An account whose searches have used the CPU hours the server allows in a UTC day gets 429 until 00:00 UTC.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"202":{"description":"The queued search. Ask GET /api/jobs/{id} until the search ends: completed, failed, cancelled or interrupted.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/estimate":{"post":{"operationId":"estimateSearch","tags":["Searches"],"summary":"How long a search would take, without starting it","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Seconds, or null where the server has not yet timed this kind of search.","content":{"application/json":{"schema":{"type":"object","required":["seconds"],"properties":{"seconds":{"type":["number","null"]}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs/{id}":{"get":{"operationId":"getJob","tags":["Searches"],"summary":"One job and its state","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"delete":{"operationId":"cancelJob","tags":["Searches"],"summary":"Cancel a job that has not finished","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job, cancelled, or as it ended.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/jobs/{id}/result":{"get":{"operationId":"getJobResult","tags":["Searches"],"summary":"The full search record","description":"The record a search keeps: its database or snapshot, parameters, queries, every hit, and SHA-256 fingerprints. 409 until the search has completed. computed, beside the record, lists the measures Sequences computes when it reads the result; the record and its fingerprint stay as the search wrote them.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["record"],"properties":{"record":{"$ref":"#/components/schemas/SearchRecord"},"computed":{"type":"array","items":{"type":"object","description":"A measure Sequences computes when it reads the result.","properties":{"measure":{"type":"string","description":"Its name, such as \"Identity, X as a match\"."},"field":{"type":"string","description":"The hit row field that holds it, such as identityXPct."},"letter":{"enum":["X","N"],"description":"The letter a stored sequence writes for any residue: X in a protein, N in DNA."},"computed":{"type":"boolean","description":"False when the alignments are too large to count."},"rules":{"type":"string","description":"The version of the rules."},"method":{"type":"string"}},"additionalProperties":true}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/again":{"post":{"operationId":"runJobAgain","tags":["Searches"],"summary":"Run a search again as a new job","description":"A search that still waits or runs answers 409 with the code not-allowed-in-state: run it again once it has ended, or cancel it first.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"An empty object, or confirmed for a search this server asks about first.","properties":{"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}}}}}},"responses":{"202":{"description":"The new job, with the same query, settings, snapshot and deltas.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs/{id}/request":{"get":{"operationId":"getJobRequest","tags":["Searches"],"summary":"The request a search was started with","description":"The fields the search was started with, query included: the ones Run again sends. Null for a search saved before searches kept them, and for a job that is not a search.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request.","content":{"application/json":{"schema":{"type":"object","required":["request"],"properties":{"request":{"type":["object","null"],"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/jobs/{id}/follow-ups":{"get":{"operationId":"getFollowUps","tags":["Searches"],"summary":"The searches a finished search suggests running next","description":"Fixed rules read the finished search and suggest the next searches, each with its rule, its reason from the result and the search it would run. No model takes part, so the same result gives the same suggestions. The rules, in order: few hits or none at the identity asked (a more sensitive method on the same sets, or a set not yet searched), the hit limit reached (more hits, or a narrower identity or coverage), part of the query unmatched (that part as a fragment), the other molecule type (a translated search) and an antibody chain (its CDRs). The first 3 not dismissed are listed, each recorded the first time it is. fill gives what the search form takes to run one. A search run from a case's plan lists none here: caseId names its case, which lists them (GET /api/cases/{id}/follow-ups).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The suggestions, the search this one follows and the record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUps"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"answerFollowUp","tags":["Searches"],"summary":"Dismiss a suggested search, or record that its filter went on the list","description":"dismiss hides a suggestion, and the next one that applies takes its place. apply records that a narrower identity or coverage, which only the hit limit rule suggests, went on the list as filters. To run a suggestion, start its search with followUp naming this search (POST /api/jobs, POST /api/groups or POST /api/antibody/searches): the record of each search then names the other. 404 for a suggestion this search did not show; 409 for a search run from a case's plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUpAction"}}}},"responses":{"200":{"description":"The suggestions and the record after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUps"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/jobs/{id}/hits":{"get":{"operationId":"getHits","tags":["Results"],"summary":"One page of hits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/HitSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"},{"$ref":"#/components/parameters/Publication"}],"responses":{"200":{"description":"The hits after filters and marks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HitPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/charts":{"get":{"operationId":"getCharts","tags":["Results"],"summary":"The numbers behind the three result charts","description":"Identity against coverage, Where hits align on the query and Hits by year, from the rows the hits list reads with the same filters and marks. The cutoffs, the area and publishedBefore do not drop hits here: each hit keeps its date group and says whether it passes the cutoffs and the area, and listed counts the hits the list shows. Hits that publishedFrom leaves out of the list are left out here too. The alignment chart takes the list's first 20 hits of one query (query, or the first row's), in its sort and order, each with the runs of query positions where it differs, has a gap, or has the letter for any residue (X, or N in DNA). The years chart counts the Patents list's rows, later ones shown, by year of publication (group=family: each family by its first), or the hits by year of first publication on a database with no patents.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/HitSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"},{"$ref":"#/components/parameters/Group"}],"responses":{"200":{"description":"The numbers of each chart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charts"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/species":{"get":{"operationId":"getSpecies","tags":["Results"],"summary":"The species and groups of a search's hits, with counts","description":"The choices of the species filter: each group and each NCBI taxon that a record of a hit holds, with the hits that hold it, whatever the other filters. 409 for a search whose records no taxa folder placed: one run before the server had BIOSEQUENCE_TAXA.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The groups in the order the filter lists them, then the taxa by hits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeciesCounts"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/hits/{row}":{"get":{"operationId":"getHit","tags":["Results"],"summary":"One hit by its row number","description":"The hit with its measures, positions, records and mark, whatever the filters. A combined search's references name each match by its job and row, and the page's review pane reads the match here.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"row","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The hit and the search's queries.","content":{"application/json":{"schema":{"type":"object","required":["row","queries"],"properties":{"row":{"$ref":"#/components/schemas/HitRow"},"queries":{"type":"array","items":{}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/hits/{row}/alignment":{"get":{"operationId":"getHitAlignment","tags":["Results"],"summary":"The alignment of one hit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"row","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The aligned query and subject.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alignment"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/export.csv":{"get":{"operationId":"exportHits","tags":["Results"],"summary":"The hits as CSV, or in an export format","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/HitSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"},{"$ref":"#/components/parameters/ExportFormat"}],"responses":{"200":{"description":"Every hit that passes the filters. The search's exports list notes the export.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}},"text/tab-separated-values":{"schema":{"type":"string","contentMediaType":"text/tab-separated-values"}},"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/labitem.zip":{"get":{"operationId":"exportNotebookItem","tags":["Results"],"summary":"A portable result for the Lab Notebook Inbox","description":"Completed paged sequence searches only. Includes the search record and all stored match rows, including excluded matches; query filters and external export formats do not apply. Expanded ZIP entries are limited to 32 MiB. The record may describe source files not included here; this is not a restorable search directory.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A conductscience.lab-notebook.item/1 package, imported offline.","content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}},"headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"}}}},"/api/patent-context":{"get":{"operationId":"getPatentContext","tags":["Results"],"summary":"What a US publication says about its SEQ ID NOs","description":"From the patent context folder the server names (BIOSEQUENCE_CONTEXT), built from the US patent office's weekly full-text files with the snapshot; a search adds no time and no outside site is asked. Without a folder the answer is installed: false, and a publication the folder does not hold answers found: false. A US publication answers context; one of another office answers other, where the folder holds what EPO's Open Patent Services gave for it (cli.mjs context ops). lines comes from fixed rules, such as \"SEQ ID NO 1 is named in claims 1 and 3 and in paragraphs [0012] and [0040].\"; the quotes are the document's own words, and a quote cut at its length says cut.","parameters":[{"name":"publication","in":"query","required":true,"description":"The publication by its id from the patents list: office|number|kind|published.","schema":{"type":"string"}},{"name":"seq","in":"query","description":"The matching SEQ ID NOs, as 1,3,10; at most 200.","schema":{"type":"string","pattern":"^\\d+(,\\d+)*$"}}],"responses":{"200":{"description":"What the pane shows for the publication.","content":{"application/json":{"schema":{"type":"object","description":"Whether the server holds a folder and the publication, and its context.","properties":{"installed":{"type":"boolean"},"found":{"type":"boolean"},"office":{"type":"string"},"folder":{"type":"object","description":"The folder: when it was built and the snapshot it was built for.","properties":{"builtAt":{"type":"string","format":"date-time","description":"When the folder was built."},"snapshotId":{"type":"string"}},"additionalProperties":true},"context":{"type":"object","description":"The lines and quotes for the matching SEQ ID NOs.","properties":{"publication":{"type":"string","description":"The publication, as US 12788009-B2."},"lines":{"type":"array","items":{"type":"string"}},"abstract":{"type":["object","null"],"description":"The abstract, or null where the document has none.","properties":{"text":{"type":"string"},"cut":{"type":"boolean"}},"additionalProperties":true},"claims":{"type":"array","items":{"type":"object","description":"A claim that names a matching SEQ ID NO, or the first claim (first) when none does.","properties":{"number":{"type":"integer"},"text":{"type":"string"},"cut":{"type":"boolean"},"first":{"type":"boolean"},"seqIds":{"type":"array","items":{"type":"integer"}}},"additionalProperties":true}},"paragraphs":{"type":"array","items":{"type":"object","description":"A description paragraph that names one, at most three for each.","properties":{"key":{"type":"string"},"label":{"type":"string","description":"[0012], or \"the text after [0011]\" for a block without a number."},"text":{"type":"string"},"cut":{"type":"boolean"},"seqIds":{"type":"array","items":{"type":"integer"}}},"additionalProperties":true}},"claimsTotal":{"type":"integer","minimum":0,"description":"The claims the document has."},"described":{"type":"boolean","description":"false where the full text has no description to search."},"notes":{"type":"array","items":{"type":"object","description":"A note of the sequence listing.","properties":{"seqIdNo":{"type":"integer"},"key":{"type":["string","null"]},"location":{"type":["string","null"]},"note":{"type":"string"}},"additionalProperties":true}},"more":{"type":"object","description":"How many of each the answer leaves out.","properties":{},"additionalProperties":true}},"additionalProperties":true},"other":{"type":"object","description":"For a publication of another office, where the folder holds what EPO's Open Patent Services gave: the English title and abstract as written.","properties":{"publication":{"type":"string"},"source":{"type":"string"},"fetchedAt":{"type":["string","null"]},"title":{"type":["string","null"]},"abstract":{"type":["object","null"],"description":"The English abstract, or null where OPS gives none.","properties":{"text":{"type":"string"},"cut":{"type":"boolean"}},"additionalProperties":true},"abstractLanguages":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}},"required":["installed"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"}}}},"/api/jobs/{id}/publications":{"get":{"operationId":"getPublications","tags":["Results"],"summary":"One page of patents with hits","description":"Rows equal in the chosen measure go earliest publication first, undated last, then by ID. Under published, rows of one date go highest Query Match first, then highest identity, then by ID. group=family gives one row per patent family, and later=hide folds the publications from on or after publishedBefore and counts them. group=applicant, office or year gives one row per publication, in the sort, gathered under groups: by applicant as the applicants route groups them, by office most publications first, or by year of publication oldest first (newest first under sort=published&order=desc), with the rows of no applicant, office or date last. Each row then has groupKey, and groups says how many groups have a name, how many rows have none, and the groups the page shows.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/PublicationSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"},{"$ref":"#/components/parameters/PublicationGroup"},{"$ref":"#/components/parameters/Later"},{"$ref":"#/components/parameters/Row"}],"responses":{"200":{"description":"The patents after filters and marks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/publications.csv":{"get":{"operationId":"exportPublications","tags":["Results"],"summary":"The patents as CSV, or in an export format","description":"One line per publication, the later ones too, whatever group and later say. The last four columns are family (the label of the family's earliest publication), family_size, family_basis and date_group (empty when no date is set).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PublicationSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"},{"$ref":"#/components/parameters/ExportFormat"}],"responses":{"200":{"description":"Every patent that passes the filters. The search's exports list notes the export.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}},"text/tab-separated-values":{"schema":{"type":"string","contentMediaType":"text/tab-separated-values"}},"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/export.xlsx":{"get":{"operationId":"exportWorkbook","tags":["Results"],"summary":"Every tab and the search record as one Excel workbook","description":"Sheets in the page's order: Patents (the rows of publications.csv), Families when group=family, Applicants (the rows of applicants.csv), Alignments (Matches for an exact or pattern search; the rows of export.csv), Aligned letters for a search that aligns (the first 10,000 rows of Alignments in its order, each with the aligned letters of the query, the match line and the subject, and those of its exact alignment where there is one), then Search record. The filters apply to every sheet. Text over 32,767 characters and rows past 1,048,575 are cut, and the Search record says so. X-Export-Rows counts every sheet but Aligned letters and the Search record. 413 when the file would pass 4 GiB. The search's exports list notes it as workbook.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/WorkbookHitSort"},{"$ref":"#/components/parameters/WorkbookHitOrder"},{"$ref":"#/components/parameters/WorkbookPatentSort"},{"$ref":"#/components/parameters/WorkbookPatentOrder"},{"$ref":"#/components/parameters/Group"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"}],"responses":{"200":{"description":"The workbook.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","contentMediaType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"}}}},"/api/jobs/{id}/hits.fasta":{"get":{"operationId":"exportHitsFasta","tags":["Results"],"summary":"The hits' stored sequences as FASTA","description":"which=filtered, as when absent, holds the hits the list shows with the same filters, sort and marks, every page; kept, every row marked Keep; selected, the rows that rows names. The kept and the selected rows keep the list's order whatever its filters. Each stored sequence comes once, whole, from the search's snapshot, 60 letters a line, and the file stops before 100,000,000 letters. 409 for a search that read no snapshot, and when no hit is kept or none passes the filters. The search's exports list does not note it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/FastaWhich"},{"$ref":"#/components/parameters/Rows"},{"$ref":"#/components/parameters/HitSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"}],"responses":{"200":{"description":"One entry for each stored sequence: its accession and first publication, then the query it matched and how well, such as >A00003.1 EP 0238993-A2; published 1987-09-30, Example Pharma A/S; query cb1, identity 100.0%, query coverage 100.0%.","content":{"text/x-fasta":{"schema":{"type":"string","contentMediaType":"text/x-fasta"}}},"headers":{"X-Export-Rows":{"description":"The rows the file holds: hits, selected rows or kept publications.","schema":{"type":"integer","minimum":0}},"X-Export-Sequences":{"description":"The stored sequences in the file, each once.","schema":{"type":"integer","minimum":0}},"X-Export-Limited":{"description":"true when the file stopped before 100,000,000 letters.","schema":{"type":"boolean"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/alignments.txt":{"get":{"operationId":"exportAlignments","tags":["Results"],"summary":"The alignments of chosen rows as text","description":"rows names 1 to 1,000 rows. Each row's alignment comes as the review pane's Copy alignment gives it, with its exact alignment where there is one, in the list's order. A row with no alignment, such as a row of an imported result file, says so. The search's exports list does not note it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Rows"},{"$ref":"#/components/parameters/HitSort"},{"$ref":"#/components/parameters/Order"}],"responses":{"200":{"description":"A head that names the search, then each row.","content":{"text/plain":{"schema":{"type":"string","contentMediaType":"text/plain"}}},"headers":{"X-Export-Rows":{"description":"The rows the file holds: hits, selected rows or kept publications.","schema":{"type":"integer","minimum":0}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/jobs/{id}/references.txt":{"get":{"operationId":"exportReferences","tags":["Results"],"summary":"The kept publications as a reference list","description":"Every publication marked Keep, earliest first and undated last, each numbered with its number and kind, date, title and applicant. 409 when none is kept, or the search has no publication records. The search's exports list does not note it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A head that names the search, then one numbered line for each publication.","content":{"text/plain":{"schema":{"type":"string","contentMediaType":"text/plain"}}},"headers":{"X-Export-Rows":{"description":"The rows the file holds: hits, selected rows or kept publications.","schema":{"type":"integer","minimum":0}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/exports":{"get":{"operationId":"listJobExports","tags":["Results"],"summary":"Each export of the hits and the patents","description":"Oldest first. Each names when and by whom, the export, the format's name, version, audience, type and SHA-256, the file's SHA-256 and size, its rows, and the rows and fields redacted. It never holds a value from the file.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The exports of the search.","content":{"application/json":{"schema":{"type":"object","required":["exports"],"properties":{"exports":{"type":"array","items":{"$ref":"#/components/schemas/ExportRecord"}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/jobs/{id}/applicants":{"get":{"operationId":"getApplicants","tags":["Results"],"summary":"One page of applicants with hits","description":"The patents after the filters, by applicant: spellings that differ only in case, accents, punctuation or a legal ending such as Inc share a row, and the account's joins apply. 50 rows by default.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"}],"responses":{"200":{"description":"The applicants after the filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicantPage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/applicants.csv":{"get":{"operationId":"exportApplicants","tags":["Results"],"summary":"The applicants as CSV","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Species"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Claimed"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Area"},{"$ref":"#/components/parameters/XAsMatch"}],"responses":{"200":{"description":"Every applicant row that passes the filters.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/align":{"post":{"operationId":"alignRows","tags":["Results"],"summary":"Exact alignments of chosen hits","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rows"],"properties":{"rows":{"type":"array","items":{"type":"integer","minimum":1},"minItems":1,"maxItems":1000,"description":"Hit row numbers."},"method":{"enum":["local","query"],"description":"local (Smith-Waterman) or query (the whole query against a part of the subject)."}}}}}},"responses":{"202":{"description":"The alignment job.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs/{id}/marks":{"post":{"operationId":"markResult","tags":["Results"],"summary":"Keep or exclude a patent, a family or a hit","description":"Give id to mark one patent or hit. Give ids to mark up to 500 patents at once, as Keep or Exclude on a family row does with its family.ids: each gets its own mark entry, written together.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkRequest"}}}},"responses":{"201":{"description":"The mark, or with ids the marks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/jobs/{id}/transforms":{"get":{"operationId":"listTransforms","tags":["Results"],"summary":"The changes in force on a search's hits, and every change and undo","description":"The changes in force on the search's hits, in the order they were added, each with what it does to the whole list, and every change and undo, oldest first, with its time. GET /api/jobs/{id}/hits (without publication), export.csv and the Alignments sheet of export.xlsx show the hits under the changes in force, and the Search record sheet lists them. The Patents and Applicants lists, a patent's own hits and a case report read the hits as the search left them. The changes are kept beside the search, so its record and its SHA-256 never change.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The changes in force and the history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transforms"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}},"post":{"operationId":"addTransform","tags":["Results"],"summary":"Change a search's hits: fold them, count X as a match, or keep some","description":"Adds one change, up to 12 in force at once. fold makes hits with the same alignment (the same query letters against the same letters) one row, the one first published, and its folded gives the count and the rows. countX counts an X in a protein hit, or an N in DNA, as a match: identity and query identity are counted again from the alignment, and Query Match too on a protein search; each row it changed carries counted. cover keeps the hits of one query whose alignment covers every query position between from and to, both included. differ keeps the hits of one query that differ from it, by another letter or a gap, at any of up to 50 positions, or with all at every one; a position outside a hit's alignment does not count, and under countX an X or N matches. intersect keeps the hits whose sequence each of up to 5 other finished searches also found: by subject on the same snapshot, set and weekly additions, else by the SHA-256 of the letters. fold, countX and differ read every alignment, on searches of up to 200,000 rows. 409 when a search it names has not finished or cannot be matched: it keeps its results only in its full record, it read another database, or the searches found more than 200,000 sequences to match by their letters.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformRequest"}}}},"responses":{"201":{"description":"The change as kept, then the changes in force and the history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/jobs/{id}/transforms/{n}/undo":{"post":{"operationId":"undoTransform","tags":["Results"],"summary":"Undo one change to a search's hits","description":"Takes back the change whose seq is n. The undo is kept as a change of its own, so the history holds both. 404 for a number the search never gave; 409 for a change already undone.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The undo as kept, then the changes in force and the history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/compare":{"get":{"operationId":"compareSearches","tags":["Results"],"summary":"Two to six finished searches, matched by the sequences they found","description":"Each search is one the account can open, finished, with its results in pages, and is numbered by its place in jobs. Each sequence found falls in one part, named by the numbers of the searches that found it, lowest first: 1 holds the sequences only search 1 found, and 1,2 those searches 1 and 2 found. parts lists them one search first, then two and so on, each with its count. matchedBy says how sequences match: subject when every search read the same snapshot set and deltas, or the same database; sequence, by the SHA-256 of the letters the snapshots store, when they read different snapshots or sets, for at most 200,000 sequences over all the searches (400 past that); and target otherwise, so a sequence matches only within its own database. rows is one page of part, or of the first part when part is absent, by the best Query Match any search gives a sequence, then identity, then the earliest published, undated last. part=any lists every sequence any of the searches found, the union of the parts, in the same order. Each row's found holds an entry for each search in order, null where that search did not find the sequence: its best row for it (highest Query Match, then identity, bit score and lowest E-value) and how many rows it has. 404 for a search the account cannot open; 409 for one that is not a search, is waiting or running, ended without finishing, keeps its results in its full record, or read a snapshot no longer on this server.","parameters":[{"$ref":"#/components/parameters/CompareJobs"},{"$ref":"#/components/parameters/ComparePart"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/CompareLimit"}],"responses":{"200":{"description":"The searches, their parts and one page of one part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comparison"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/batches":{"post":{"operationId":"createBatch","tags":["Batches"],"summary":"Start many searches at once","description":"Takes 1 to 100 searches, each the body of POST /api/jobs, and checks every one before any job starts. If any cannot run, the answer is 400 with a problem for each, and nothing starts. A search this server would ask about first is a problem with status 409 until it has \"confirmed\": true. An account may have 200 batch searches waiting or running at once, and the server 1000. Batch jobs wait behind searches started from the page.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"202":{"description":"The batch: its ID and one job ID for each search, in order.","content":{"application/json":{"schema":{"type":"object","required":["batch"],"properties":{"batch":{"$ref":"#/components/schemas/BatchCreated"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/batches/{id}":{"get":{"operationId":"getBatch","tags":["Batches"],"summary":"Each job's state","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The batch and its jobs.","content":{"application/json":{"schema":{"type":"object","required":["batch"],"properties":{"batch":{"$ref":"#/components/schemas/Batch"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/batches/{id}/multi-hits":{"get":{"operationId":"getBatchMultiHits","tags":["Batches"],"summary":"The publications or sequences that several of a batch's queries hit","description":"Counts the batch's finished searches together, a query group's among them: for each publication (by=publication, as each search's Patents tab groups its hits) or each stored sequence (by=sequence, from each search's Alignments list), how many of the batch's queries hit it. rows lists those that at least minQueries queries hit, most queries first, then by best Query Match, best identity and earliest date, each with the names of its queries in the batch's order and the numbers of the searches that found it. A query counts once, however many of the searches ran it: queries with the same letters are one query. identity, coverage, publishedFrom, publishedBefore and office apply to each search as they apply to its own lists, and what its marks exclude does not count. levels counts the rows each number of queries hit. A search that has not finished is in searches.waiting; one that did not finish, is no longer on the server, keeps its results in one record or, counting publications, has no publication records is in searches.notCounted with its reason. A stored sequence is one sequence within one set or database, so when the searches read more than one, matchedBy is target and a sequence counts the queries of its own set's searches. A query group's search is one batch: its ID is batchId in the group's searches. One count holds up to 200,000 publications or sequences; past that the answer is 409.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/MultiHitBy"},{"$ref":"#/components/parameters/MinQueries"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/MultiHitLimit"}],"responses":{"200":{"description":"The count and one page of its rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiHits"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/batches/{id}/multi-hits.csv":{"get":{"operationId":"getBatchMultiHitsCsv","tags":["Batches"],"summary":"Every row of that count as CSV","description":"Every row that at least minQueries queries hit, in the order of the JSON answer, counted the same way. query_names joins the names with \"; \" and searches the numbers with spaces.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/MultiHitBy"},{"$ref":"#/components/parameters/MinQueries"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"}],"responses":{"200":{"description":"One row for each publication (by=publication): queries, query_names, office, number, kind, published, applicant, title, sequences_hit, best_query_match, best_identity, searches, link. Or one for each stored sequence (by=sequence): queries, query_names, subject, accession, title, set, first_published, publications, subject_length, best_query_match, best_identity, searches.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/groups":{"post":{"operationId":"createGroup","tags":["Combined searches"],"summary":"Search several sets at once","description":"Takes the body of POST /api/jobs with targets in place of one set: 2 to 8 snapshot sets or attached databases, each once. Each target gets its own job, with the program the query's type and the set's type call for and the engine's usual choice of tool: a protein query searches a DNA set with tblastn, and such a job has no Query Match. Every target is checked before any job starts. One that cannot run, such as an unknown set, or a set of the other type under Exact text, Pattern, Smith-Waterman or a global method, answers 400 with a problem naming it, and nothing starts. The jobs take room in the queue as searches from the page do, whether the request came from the page or with an API token. With too little room the answer is 429 with room, and nothing starts. On a server with compute limits, a combined search that reads a large set, or whose jobs should take longer together than the server's time for asking, answers 409 with confirm: send it again with \"confirmed\": true.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CombinedSearchRequest"}}}},"responses":{"202":{"description":"The combined search, with one job for each target, in order. Ask GET /api/groups/{id} until finished is true.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"$ref":"#/components/schemas/CombinedSearch"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"get":{"operationId":"listGroups","tags":["Combined searches"],"summary":"The account's combined searches, newest first","parameters":[{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of combined searches.","content":{"application/json":{"schema":{"type":"object","required":["groups","total","offset","limit"],"properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/CombinedSearch"}},"total":{"type":"integer","minimum":0,"description":"All combined searches."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size, 100 unless asked."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/groups/{id}":{"get":{"operationId":"getGroup","tags":["Combined searches"],"summary":"Each target's job, and the time left","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The combined search.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"$ref":"#/components/schemas/CombinedSearch"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"delete":{"operationId":"cancelGroup","tags":["Combined searches"],"summary":"Cancel the jobs still waiting or running","description":"Finished jobs stay, with their results.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The combined search after the cancel.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"$ref":"#/components/schemas/CombinedSearch"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/groups/{id}/references":{"get":{"operationId":"getGroupReferences","tags":["Combined searches"],"summary":"One page of what the sets found, joined","description":"The publications and database entries the completed jobs found, each once: a publication by its ID, whichever sets found it, and an entry by its accession, with or without its version. A row keeps the best Query Match and identity across the sets, the earliest date, the sets and queries that found it, its best match and its first matches, each naming its job and hit row. The hit filters, sort, order, publishedFrom, publishedBefore, office, group, later and excluded work as on the Patents list, and office keeps publications alone. set and kind choose among the rows. group=family forms families over the joined publications, so one family can hold publications that different sets found; entries stay rows of their own. A job still waiting or running adds nothing until it completes, and a failed one adds nothing; members says which jobs the list holds.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/PublicationSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Group"},{"$ref":"#/components/parameters/Later"},{"$ref":"#/components/parameters/Set"},{"$ref":"#/components/parameters/Kind"}],"responses":{"200":{"description":"The references after filters and marks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferencePage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/groups/{id}/references.csv":{"get":{"operationId":"exportGroupReferences","tags":["Combined searches"],"summary":"The references as CSV, or in an export format","description":"One line per reference, every one the filters keep, later and excluded ones too, whatever group, later and the page say. Beside the patents CSV's columns it has reference (patent or entry), id, accession, source, sets (the sets' names, joined by semicolons), queries, best_set, best_query, best_job and best_row.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PublicationSort"},{"$ref":"#/components/parameters/Order"},{"$ref":"#/components/parameters/Strand"},{"$ref":"#/components/parameters/Text"},{"$ref":"#/components/parameters/Identity"},{"$ref":"#/components/parameters/Coverage"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/PublishedFrom"},{"$ref":"#/components/parameters/PublishedBefore"},{"$ref":"#/components/parameters/Office"},{"$ref":"#/components/parameters/Drugs"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Set"},{"$ref":"#/components/parameters/Kind"},{"$ref":"#/components/parameters/ExportFormat"}],"responses":{"200":{"description":"Every reference that passes the filters. The combined search's exports list notes the export.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}},"text/tab-separated-values":{"schema":{"type":"string","contentMediaType":"text/tab-separated-values"}},"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/groups/{id}/marks":{"post":{"operationId":"markGroupReferences","tags":["Combined searches"],"summary":"Keep, exclude or clear references in every set that holds them","description":"Give id for one reference, or ids for up to 500, such as a family row's family.ids. Each is marked in every completed job that holds it: a publication with the job's own publication mark, and a database entry by marking the job's hit rows that found it, so the mark shows in that job's own patents list and hits. Entries of one stored sequence share its rows, so they share a mark. Every ID is found before anything is written; an unknown one answers 404.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceMarkRequest"}}}},"responses":{"201":{"description":"One mark for each reference, with the jobs it went to.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceMarkAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/groups/{id}/again":{"post":{"operationId":"runGroupAgain","tags":["Combined searches"],"summary":"Run every target again, or only some","description":"With an empty object, runs every target again as a new combined search, with the same request. With only, runs those targets again as new jobs of this combined search; the jobs they replace stay on the server, with their marks, and are listed under earlier. A target still waiting or running answers 409. The queue takes every new job or none, as when the combined search was made.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"only":{"type":"array","minItems":1,"maxItems":8,"uniqueItems":true,"items":{"type":"integer","minimum":0},"description":"The targets to run again, by index, counting from 0."},"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}}}}}},"responses":{"202":{"description":"The new combined search, or with only this one.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"$ref":"#/components/schemas/CombinedSearch"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/groups/{id}/follow-ups":{"get":{"operationId":"getGroupFollowUps","tags":["Combined searches"],"summary":"The searches a finished combined search suggests running next","description":"Fixed rules read the finished search and suggest the next searches, each with its rule, its reason from the result and the search it would run. No model takes part, so the same result gives the same suggestions. The rules, in order: few hits or none at the identity asked (a more sensitive method on the same sets, or a set not yet searched), the hit limit reached (more hits, or a narrower identity or coverage), part of the query unmatched (that part as a fragment), the other molecule type (a translated search) and an antibody chain (its CDRs). The first 3 not dismissed are listed, each recorded the first time it is. fill gives what the search form takes to run one. A search run from a case's plan lists none here: caseId names its case, which lists them (GET /api/cases/{id}/follow-ups). The rules read the sets' jobs together, once every one has ended: the hits they found added up, and the best match of any.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The suggestions, the search this one follows and the record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUps"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"answerGroupFollowUp","tags":["Combined searches"],"summary":"Dismiss a suggested search, or record that its filter went on the list","description":"dismiss hides a suggestion, and the next one that applies takes its place. apply records that a narrower identity or coverage, which only the hit limit rule suggests, went on the list as filters. To run a suggestion, start its search with followUp naming this search (POST /api/jobs, POST /api/groups or POST /api/antibody/searches): the record of each search then names the other. 404 for a suggestion this search did not show; 409 for a search run from a case's plan.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUpAction"}}}},"responses":{"200":{"description":"The suggestions and the record after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUps"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/tokens":{"get":{"operationId":"listTokens","tags":["Tokens"],"summary":"The account's API tokens","responses":{"200":{"description":"The tokens, never their secrets, with the longest a new one may last.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenList"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createToken","tags":["Tokens"],"summary":"Make an API token (browser sign-in only)","description":"A request signed in with a token gets 403: make tokens on the API tokens page. The answer holds the token once; the server keeps only its SHA-256 hash.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"1 to 100 characters, such as the program that will use it."},"days":{"type":"integer","minimum":1,"maximum":90,"description":"How long it lasts. The default and the most is the server's setting."}}}}}},"responses":{"201":{"description":"The token record and the token itself.","content":{"application/json":{"schema":{"type":"object","required":["token","secret"],"properties":{"token":{"$ref":"#/components/schemas/Token"},"secret":{"type":"string","description":"The token. Send it as Authorization: Bearer <token>. It is not shown again."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/tokens/{id}":{"delete":{"operationId":"revokeToken","tags":["Tokens"],"summary":"Revoke one of the account's tokens","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The token, revoked.","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/Token"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/usage":{"get":{"operationId":"getUsage","tags":["Admin"],"summary":"Searches and other work by account and day, with the compute of the searches (admins)","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":30}}],"responses":{"200":{"description":"The usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/usage.csv":{"get":{"operationId":"downloadUsage","tags":["Admin"],"summary":"The searches and their compute by day, account and set, as CSV (admins)","description":"One row for each UTC day, account and set a search ran on, newest day first, with the columns day, account, account_ref, set, searches, cpu_seconds, wall_seconds, peak_memory_bytes, bytes_read. A measure no search recorded is empty, and peak_memory_bytes is the most one search held.","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":30}}],"responses":{"200":{"description":"The CSV.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/tokens":{"get":{"operationId":"listAllTokens","tags":["Admin"],"summary":"Every account's API tokens (admins)","responses":{"200":{"description":"The tokens.","content":{"application/json":{"schema":{"type":"object","required":["tokens"],"properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/AdminToken"}},"days":{"type":"integer","minimum":0,"description":"The longest a token may last; 0 when tokens are off."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/tokens/{id}":{"delete":{"operationId":"revokeAnyToken","tags":["Admin"],"summary":"Revoke any token (admins)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The token, revoked.","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/Token"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/connector-tokens":{"get":{"operationId":"listConnectorTokens","tags":["Admin"],"summary":"The connector tokens (admins)","responses":{"200":{"description":"The tokens, never their secrets, with the limits for a new one.","content":{"application/json":{"schema":{"type":"object","required":["tokens","days","choices","limit","owners"],"properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorToken"}},"days":{"type":"integer","minimum":0,"description":"The longest a new token may last; 0 when tokens are off."},"choices":{"type":"array","items":{"type":"integer"},"description":"The lengths the page offers."},"limit":{"type":"integer","minimum":0,"description":"Live connector tokens this server may have."},"owners":{"type":"integer","minimum":0,"description":"Accounts one token may name."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createConnectorToken","tags":["Admin"],"summary":"Make a connector token (admins, browser sign-in only)","description":"A token for another system to send documents into cases (POST /api/connector/imports). It calls only that route, makes cases only for the accounts named here, and works only while the admin who made it is an admin. Each account must have signed in here and be let in now. A request signed in with a token gets 403. The answer holds the token once; the server keeps only its SHA-256 hash. 409 at 20 live connector tokens.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","owners"],"properties":{"name":{"type":"string","description":"1 to 100 characters, such as the system that will use it."},"days":{"type":"integer","minimum":1,"maximum":90,"description":"How long it lasts. The default and the most is the server's setting."},"owners":{"description":"1 to 50 accounts it may make cases for, as each signs in: a list, or one text with commas or new lines between them.","oneOf":[{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string"}},{"type":"string"}]}}}}}},"responses":{"201":{"description":"The token record and the token itself.","content":{"application/json":{"schema":{"type":"object","required":["token","secret"],"properties":{"token":{"$ref":"#/components/schemas/ConnectorToken"},"secret":{"type":"string","description":"The token. The system sends it as Authorization: Bearer <token>. It is not shown again."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/admin/connector-tokens/{id}":{"delete":{"operationId":"revokeConnectorToken","tags":["Admin"],"summary":"Revoke a connector token (admins)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The token, revoked.","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/ConnectorToken"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/connector/imports":{"post":{"operationId":"importDocuments","tags":["Connectors"],"summary":"Send a document set into a case (connector tokens)","description":"For another system, such as a document system, with a connector token an admin made on the API tokens page; any other sign-in gets 403. Send multipart/form-data: first the part manifest, the JSON object ConnectorManifest, then a part named file for each file it lists, with the manifest's name for the file as the part's filename. The whole request is read before anything goes in: a manifest that cannot be read, an owner the token may not name, or a file that is missing, extra, too large or not the file its SHA-256 names answers 400, 403 or 413 and imports nothing. Then a listing goes in as an upload does, the case is made with it, and each file of claims or publication XML goes in as a set of claims; a publication's XML that holds its listing gives the listing too when the manifest lists none. A source and sourceId sent before add to the case they made, so the same manifest and files sent again change nothing and answer 200 with each file already. The answer gives a line for each file: imported, already or refused, with the reason. 409 when that case belongs to another account now; 429 with Retry-After when the queue has no room for the listing.","requestBody":{"required":true,"description":"The manifest, then its files.","content":{"multipart/form-data":{"schema":{"type":"object","required":["manifest","file"],"properties":{"manifest":{"$ref":"#/components/schemas/ConnectorManifest"},"file":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","contentMediaType":"application/octet-stream"},"description":"Each file the manifest lists, named as it names it."}}},"encoding":{"manifest":{"contentType":"application/json"}}}}},"responses":{"200":{"description":"The case these documents went into before, with a line for each file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorImport"}}}},"201":{"description":"A new case, made from the documents, with a line for each file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorImport"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"description":"Send the manifest and its files as multipart/form-data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/admin/workers":{"get":{"operationId":"listWorkers","tags":["Admin"],"summary":"The workers that run searches for this server (admins)","description":"On a coordinator (BIOSEQUENCE_ROLE=coordinator), each worker that joined it, by name: in contact, lost, or refused while it had the worker key. Any other server lists none. A lost worker stays listed until a worker of its name joins or the coordinator starts again; a refused worker that stops saying hello leaves the list after 60 seconds. Times are this server's.","responses":{"200":{"description":"The role and the workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerList"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/cases/{id}":{"delete":{"operationId":"deleteCase","tags":["Admin"],"summary":"Delete a case with its searches (admins)","description":"Deletes the case and everything it holds: its claims, plan, runs, decisions, notes, reports, log and imported result files, every search its plan ran, and each search added to it that no other case holds, with their exact alignments. Each plan run that still waits or runs is cancelled first, with its plan.cancelled event in the case's log, which events and lastEvent then count, and so is any other search still queued or running. Listings stay. A deletion cannot be undone. The service's audit log keeps a case.deleted event with the case ID, its owner, its log's last event by number and SHA-256, the count of searches deleted and the bytes. 404 for a case that does not exist; 409 while the claims model reads the case, or while one of its searches is still stopping.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"What was deleted.","content":{"application/json":{"schema":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"object","required":["caseId","events","lastEvent","searches","bytes"],"properties":{"caseId":{"type":"string","format":"uuid"},"owner":{"type":["string","null"],"description":"The account ID of the case's owner."},"events":{"type":"integer","minimum":0,"description":"The events in the case's log."},"lastEvent":{"type":["string","null"],"description":"The SHA-256 of the log's last event."},"searches":{"type":"integer","minimum":0,"description":"The searches deleted with the case."},"bytes":{"type":"integer","minimum":0,"description":"The bytes deleted."}}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/admin/decisions.json":{"get":{"operationId":"exportAllDecisions","tags":["Admin"],"summary":"Every case's decisions, to measure the claim rules and prompts (admins)","description":"One row for each claim feature, call to the claims model, dropped suggestion, sentence decision and summary decision in every case, with the case ID and the account by the start of its ID, and totals. A drop reason is in fixed words. It holds no claim words, quotes, details, notes or edits: claims pasted into a case can be from an unpublished application. A case that cannot be read is listed under skipped. The file comes as an attachment.","responses":{"200":{"description":"The rows and their totals.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{"format":{"const":"sequences-decisions-admin"},"version":{"type":"string","description":"The form of the export."},"exportedAt":{"type":"string","format":"date-time","description":"When it was made."},"totals":{"type":"object","description":"Counts by source, kind, status, rule, prompt, drop reason and action.","properties":{},"additionalProperties":true},"skipped":{"type":"array","items":{"type":"string","description":"A case ID."}},"rows":{"type":"array","items":{"type":"object","description":"One row, keyed as the CSV columns.","properties":{},"additionalProperties":true}}},"required":["format","version","totals","rows"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/decisions.csv":{"get":{"operationId":"exportAllDecisionsCsv","tags":["Admin"],"summary":"Every case's decisions as CSV (admins)","description":"The rows of GET /api/admin/decisions.json, and a row for each case that could not be read. The columns: record, case, account_ref, at, claims_source, rules_version, feature, source, rule, claim, kind, status, edited, action, latest, model, prompt_id, prompt_sha256, template_id, template_sha256, checks, kept, dropped, seconds, reason, claim_set.","responses":{"200":{"description":"The rows.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/admin/audit.jsonl":{"get":{"operationId":"exportAudit","tags":["Admin"],"summary":"The audit log for a day or a time range, as JSON lines for a SIEM (admins)","description":"Give day, a UTC date, or from and to, ISO 8601 times with a time zone (from is in the range and to is not). Each line is one JSON object, and its record says what it is. An event line gives one event of one log: the service's own (sign-ins, sign-outs, API tokens, trials, starts with their settings, invite list changes, audit exports, deleted working files and records, and deleted cases), a case's, or an account's applicant joins. Its event holds the stored event whole for the service's log, and otherwise its type, time, user, IDs, counts and hashes, with the fields left out named in withheld: claims pasted into a case can be from an unpublished application. A log's events in the file follow one another in its chain, from the first in the range to the last, and a chain line after them gives the first and last event numbers, the hash before the first, the log's head and the server's check of the whole log. The export line comes last, with the counts. Each export is noted in the service's log. The file comes as an attachment.","parameters":[{"name":"day","in":"query","schema":{"type":"string","format":"date"}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"The lines.","content":{"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/sequences":{"get":{"operationId":"getSequence","tags":["Results"],"summary":"A snapshot record's letters","description":"Name the record by accession, or by publication and SEQ ID NO; from and to give a stretch.","parameters":[{"name":"snapshotId","in":"query","schema":{"type":"string"}},{"name":"set","in":"query","schema":{"type":"string"}},{"name":"accession","in":"query","schema":{"type":"string"}},{"name":"publication","in":"query","schema":{"type":"string"}},{"name":"seqIdNo","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"integer","minimum":1}},{"name":"to","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"The record and its letters.","content":{"application/json":{"schema":{"type":"object","description":"The sequence, its type and where it came from.","properties":{"sequence":{"type":"string","description":"The letters."},"type":{"enum":["nucl","prot"]}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"}}}},"/api/listings":{"get":{"operationId":"listListings","tags":["Listings"],"summary":"The account's sequence listings","parameters":[{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of listings.","content":{"application/json":{"schema":{"type":"object","description":"The listings.","properties":{"listings":{"type":"array","items":{"type":"object","description":"A listing.","properties":{},"additionalProperties":true}},"total":{"type":"integer","minimum":0,"description":"All listings."}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"uploadListing","tags":["Listings"],"summary":"Upload a WIPO ST.26 sequence listing","description":"The import job reads the file once. A WIPO ST.26 XML file is checked against the standard as it is read: the listing keeps the verdict and the counts as st26 (checker, standard, verdict, errors, warnings, sequences, skipped, sequencesWithErrors, errorsOutsideSequences, stoppedAt and summary), never the problems themselves. A listing in another format, or one imported before the check, has no st26.","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"},"description":"The file name."}],"requestBody":{"required":true,"description":"The listing file: XML, or gzip.","content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"text/xml":{"schema":{"type":"string","contentMediaType":"text/xml"}},"application/gzip":{"schema":{"type":"string","contentMediaType":"application/gzip"}},"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"202":{"description":"The listing and its import job.","content":{"application/json":{"schema":{"type":"object","description":"The listing.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/listings/{id}":{"get":{"operationId":"getListing","tags":["Listings"],"summary":"One listing","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The listing.","content":{"application/json":{"schema":{"type":"object","required":["listing"],"properties":{"listing":{"type":"object","description":"The listing and its checks.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"delete":{"operationId":"deleteListing","tags":["Listings"],"summary":"Delete a listing","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"What was removed.","content":{"application/json":{"schema":{"type":"object","description":"The removal.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/listings/{id}/sequences":{"get":{"operationId":"listListingSequences","tags":["Listings"],"summary":"A listing's sequences","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of sequences.","content":{"application/json":{"schema":{"type":"object","description":"The sequences.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/listings/{id}/sequences/{n}":{"get":{"operationId":"getListingSequence","tags":["Listings"],"summary":"One sequence of a listing, by SEQ ID NO","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The sequence.","content":{"application/json":{"schema":{"type":"object","required":["sequence"],"properties":{"sequence":{"type":"object","description":"The sequence and its features.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/listings/{id}/searches":{"post":{"operationId":"searchListing","tags":["Listings"],"summary":"Search a listing's sequences","description":"On a server with compute limits, searches that together are estimated to take longer than its time for asking, or that read a large set, answer 409 with confirm and none starts: send the request again with \"confirmed\": true.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Which sequences, and the search settings, as on the page.","properties":{"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}},"additionalProperties":true}}}},"responses":{"202":{"description":"The searches started.","content":{"application/json":{"schema":{"type":"object","description":"The jobs.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/query-tools/variants":{"post":{"operationId":"makeVariants","tags":["Query tools"],"summary":"Variants from changes written as K26R","description":"base is a sequence ({ sequence, type, name }), a saved fragment ({ fragmentId }) or a listing sequence ({ listingId, seqIdNo }). changes holds one variant to a line: K26R, Lys26Arg, K26R/Q (one variant each), A8Aib (a modified residue), 20-30A (a scan), des-B30, del1-3, M1_K3del, 20insR or K20_L21insR, with the changes on a line joined by spaces. first numbers the first residue (1 unless the sequence starts at another, as GLP-1(7-37) starts at 7). modified says how a modified residue is searched: parent, x or both, which makes two variants. Each line gets what it was read as, or a problem. With \"save\": true each variant is saved as a fragment whose edit step is its changes, after the base when it is not a fragment yet.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The base sequence and the changes.","properties":{"base":{"type":"object","description":"A sequence, a fragment or a listing sequence.","properties":{},"additionalProperties":true},"changes":{"type":"string","description":"One variant to a line."},"first":{"type":"integer"},"modified":{"enum":["parent","x","both"]},"save":{"type":"boolean"}},"required":["base","changes"],"additionalProperties":true}}}},"responses":{"200":{"description":"The variants, what each line was read as, the problems, and with save the fragments.","content":{"application/json":{"schema":{"type":"object","description":"The variants.","properties":{"variants":{"type":"array","items":{"type":"object","description":"A variant: name, sequence, the changes in words, and its edit step.","properties":{},"additionalProperties":true}},"read":{"type":"array","items":{"type":"object","description":"A line and what it was read as.","properties":{},"additionalProperties":true}},"problems":{"type":"array","items":{"type":"object","description":"A line and its problem.","properties":{},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-tools/proposals":{"post":{"operationId":"proposeSearches","tags":["Query tools"],"summary":"Searches for a claim phrase","description":"Reads phrase with the claim rules a case uses, so a case and this route read it the same way, and drafts its searches as a case drafts its plan. listingId gives the SEQ ID NOs the phrase names their letters; base stands for the first one the listing does not hold, or for the sequence a phrase that names none speaks of. Each search gives its queries, method (engine), results filter, settings and the reasons for each, in words. At least 90% identical proposes Global on the query (glsearch36) with Minimum identity at 90 where FASTA36 runs, and the automatic choice elsewhere; at least 15 consecutive amino acids proposes every window of 15 letters as Exact text; up to 3 substitutions proposes Within k changes where the server offers it; X at position 26 is K or R proposes a Pattern search with [KR] at that position, with the sequences the choices make as queries. Nothing is searched: start a proposed search with POST /api/jobs, or save it as a query group.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The phrase and where its sequences come from.","properties":{"phrase":{"type":"string","description":"A claim, or part of one."},"listingId":{"type":"string","description":"A listing that holds the SEQ ID NOs."},"base":{"type":"object","description":"A sequence, a fragment or a listing sequence.","properties":{},"additionalProperties":true},"first":{"type":"integer","description":"The number of the base sequence's first residue, 1 unless given. A position in the phrase counts from it."}},"required":["phrase"],"additionalProperties":true}}}},"responses":{"200":{"description":"What the phrase was read as, notes, and the proposed searches.","content":{"application/json":{"schema":{"type":"object","description":"The proposals.","properties":{"read":{"type":"array","items":{"type":"object","description":"A feature of the phrase in words.","properties":{},"additionalProperties":true}},"notes":{"type":"array","items":{"type":"string","description":"A note."}},"searches":{"type":"array","items":{"type":"object","description":"A proposed search: what, queries, method, methodName, filters, settings, within, windows, pattern and why.","properties":{},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-tools/windows":{"post":{"operationId":"cutWindows","tags":["Query tools"],"summary":"Windows of a sequence","description":"Give one way to cut: length with step (every window of that length, and one more ending at the last letter), lengths { min, max } with step (each length, such as peptides of 8 to 15), around (positions) with flank (letters on each side), ranges ([{ name, from, to }]), or cdrs ({ scheme: kabat, chothia or imgt }) for the CDRs of an antibody chain where antibody numbering runs (409 where it does not). from and to keep the windows inside a stretch. Positions count from first. Up to 2,000 windows. searches says how the windows run: up to 20 queries and 100,000 letters in each search.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The base sequence and how to cut it.","properties":{"base":{"type":"object","description":"A sequence, a fragment or a listing sequence.","properties":{},"additionalProperties":true},"length":{"type":"integer","minimum":1},"step":{"type":"integer","minimum":1},"lengths":{"type":"object","description":"min and max.","properties":{},"additionalProperties":true},"around":{"type":"array","items":{"type":"integer"}},"flank":{"type":"integer","minimum":0},"ranges":{"type":"array","items":{"type":"object","description":"name, from and to.","properties":{},"additionalProperties":true}},"cdrs":{"type":"object","description":"scheme.","properties":{},"additionalProperties":true}},"required":["base"],"additionalProperties":true}}}},"responses":{"200":{"description":"The windows and the searches they make.","content":{"application/json":{"schema":{"type":"object","description":"The windows.","properties":{"windows":{"type":"array","items":{"type":"object","description":"A window: name, from, to, length and sequence.","properties":{},"additionalProperties":true}},"read":{"type":"array","items":{"type":"string","description":"What was cut."}},"searches":{"type":"array","items":{"type":"object","description":"The windows one search holds.","properties":{},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-tools/dna-pattern":{"post":{"operationId":"peptidePattern","tags":["Query tools"],"summary":"A peptide as a DNA pattern","description":"A peptide of 4 to 200 amino acids as DNA with an IUPAC code for each codon, in genetic code geneticCode (1, the standard code, unless another NCBI table is named): K is AAR. pattern is the PROSITE pattern of those triplets, allowed says how many DNA sequences it allows and coding how many of them code for the peptide. Where one triplet allows more codons than the residue has, as YTN for L, exact gives a regular expression with a choice for each such residue (L is CTN or TTR) when it makes at most 8 choices. Search either with method Pattern on a DNA set, which reads both strands.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The peptide.","properties":{"peptide":{"type":"string","description":"One-letter amino acid codes."},"geneticCode":{"type":"integer","minimum":1,"maximum":33}},"required":["peptide"],"additionalProperties":true}}}},"responses":{"200":{"description":"The pattern, its counts and notes.","content":{"application/json":{"schema":{"type":"object","description":"The DNA pattern.","properties":{"pattern":{"type":"string","description":"PROSITE syntax."},"allowed":{"type":"string","description":"DNA sequences the pattern allows, as a decimal string."},"coding":{"type":"string","description":"Of them, those that code for the peptide."},"exact":{"type":"object","description":"A regular expression that allows only coding DNA, or null.","properties":{},"additionalProperties":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-tools/modified":{"post":{"operationId":"modifiedResidues","tags":["Query tools"],"summary":"A peptide with modified residues as queries","description":"text is HELM (PEPTIDE1{H.[Aib].E.G}$$$$), one-letter codes with modified residues in square brackets (H[Aib]EG) or a side chain after a letter (K(palmitoyl-γE)), or residues joined by hyphens (H-His-Aib-Glu-NH2). notes takes a listing's MOD_RES or MISC_FEATURE notes with one-letter text. Each modified residue gets its parent residue where its name gives one (Aib is alanine with a second methyl group, D-Ala is alanine, acylated lysine is K), or none. choice makes the queries: parent, x or both, which makes two queries. Each query's name says the choice, so the search record keeps it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The peptide and the choice.","properties":{"text":{"type":"string","description":"HELM, bracketed or hyphenated residues."},"notes":{"type":"string","description":"A listing's notes."},"choice":{"enum":["parent","x","both"]},"name":{"type":"string","description":"The name the queries start with."}},"required":["text"],"additionalProperties":true}}}},"responses":{"200":{"description":"The residues read and the queries.","content":{"application/json":{"schema":{"type":"object","description":"The modified residues.","properties":{"sequence":{"type":"string","description":"The peptide with each modified residue as X."},"residues":{"type":"array","items":{"type":"object","description":"position, name, parent and how.","properties":{},"additionalProperties":true}},"queries":{"type":"array","items":{"type":"object","description":"name, sequence and choice.","properties":{},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-groups":{"get":{"operationId":"listQueryGroups","tags":["Query tools"],"summary":"The account's query groups, newest first","parameters":[{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of query groups, without their letters.","content":{"application/json":{"schema":{"type":"object","description":"The query groups.","properties":{"groups":{"type":"array","items":{"type":"object","description":"A query group.","properties":{},"additionalProperties":true}},"total":{"type":"integer","minimum":0,"description":"All query groups."}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createQueryGroup","tags":["Query tools"],"summary":"Save queries as a query group","description":"A query group holds 1 to 2,000 queries of one type, up to 2,000,000 letters in all, each up to 20,000 letters. tool names what made it (variants, phrase for a claim phrase, windows, dna-pattern, modified or entered), read keeps what the tool read, and proposed the method, results filter and reasons of the proposed search it was saved from.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The group.","properties":{"name":{"type":"string","description":"Up to 200 characters."},"type":{"enum":["nucl","prot"]},"queries":{"type":"array","items":{"type":"object","description":"name and sequence.","properties":{},"additionalProperties":true}},"tool":{"type":"string","description":"What made it."},"read":{"type":"array","items":{"type":"string","description":"A line."}},"proposed":{"type":"object","description":"method, filters and why.","properties":{},"additionalProperties":true}},"required":["type","queries"],"additionalProperties":true}}}},"responses":{"201":{"description":"The saved group.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"type":"object","description":"The query group with its queries.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/query-groups/{id}":{"get":{"operationId":"getQueryGroup","tags":["Query tools"],"summary":"One query group, with its queries and searches","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The query group.","content":{"application/json":{"schema":{"type":"object","required":["group"],"properties":{"group":{"type":"object","description":"The query group.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"delete":{"operationId":"deleteQueryGroup","tags":["Query tools"],"summary":"Delete a query group","description":"Its searches and their results stay.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"What was removed.","content":{"application/json":{"schema":{"type":"object","description":"The removal.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/query-groups/{id}/searches":{"post":{"operationId":"searchQueryGroup","tags":["Query tools"],"summary":"Search a query group's queries","description":"Takes the body of POST /api/jobs without fasta: the set and the method (engine) to search with, the method of the proposed search it was saved from unless another is named. The queries run in order, up to 20 and 100,000 letters in each search, as one batch (POST /api/batches): every search is checked before any starts, and the batch's limits apply. The group records the batch and which queries each search holds.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The search settings, as for POST /api/jobs.","properties":{"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}},"additionalProperties":true}}}},"responses":{"202":{"description":"The batch and the searches it holds.","content":{"application/json":{"schema":{"type":"object","description":"The searches.","properties":{"batch":{"$ref":"#/components/schemas/BatchCreated"},"searches":{"type":"array","items":{"type":"object","description":"jobId, queries and letters.","properties":{},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/antibody/number":{"post":{"operationId":"numberAntibody","tags":["Antibodies"],"summary":"Number an antibody chain's regions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sequence"],"properties":{"sequence":{"type":"string","description":"One chain as letters, or up to 10 as FASTA."}}}}}},"responses":{"200":{"description":"Each chain's domains, regions and numbering.","content":{"application/json":{"schema":{"type":"object","description":"The numbering.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/antibody/searches":{"post":{"operationId":"searchAntibody","tags":["Antibodies"],"summary":"Search antibody regions","description":"An antibody search has no estimate, so on a server with compute limits only a search of a large set answers 409 with confirm and does not start: send it again with \"confirmed\": true.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A chain (sequence) or typed CDRs (cdrs), with the snapshot and settings.","properties":{"sequence":{"type":"string","description":"A chain."},"cdrs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"H1 to H3 or L1 to L3."},"sequence":{"type":"string","description":"The letters."}}}},"snapshotId":{"type":"string","description":"The snapshot."},"set":{"type":"string","description":"The set."},"followUp":{"$ref":"#/components/schemas/FollowUpFrom"},"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}},"additionalProperties":true}}}},"responses":{"202":{"description":"The antibody search.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs/{id}/antibody":{"get":{"operationId":"getAntibodyGroups","tags":["Antibodies"],"summary":"The groups of an antibody search","description":"On a server with an antibody name table, each group's names lists the therapeutic antibodies whose variable domain or chain CDRs its stored sequence holds, from ChEMBL, and the answer's names gives ChEMBL's release, credit and license (CC BY-SA 3.0), or unread when the snapshot cannot be read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"by","in":"query","schema":{"enum":["sequence","publication"]}},{"name":"identity","in":"query","schema":{"type":"integer","minimum":50,"maximum":100}},{"name":"complete","in":"query","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"The groups.","content":{"application/json":{"schema":{"type":"object","description":"The groups.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/antibody.csv":{"get":{"operationId":"exportAntibodyGroups","tags":["Antibodies"],"summary":"The groups as CSV","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A column for each CDR, then named_antibodies on a server with an antibody name table.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/watches":{"get":{"operationId":"listWatches","tags":["Watches"],"summary":"The account's watches","responses":{"200":{"description":"The watches, newest first, each with its last run.","content":{"application/json":{"schema":{"type":"object","description":"The watches.","properties":{"watches":{"type":"array","items":{"type":"object","description":"A watch.","properties":{},"additionalProperties":true}},"mail":{"type":"boolean"},"limit":{"type":"integer","minimum":0,"description":"The most watches an account may have."}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createWatch","tags":["Watches"],"summary":"Watch a finished snapshot search, or an applicant","description":"Give jobId to watch a search: each weekly addition runs it again and lists the matches it has not found before. Or give applicant to watch an applicant: each weekly addition lists the publications it adds whose applicant is that name or a name the account has joined to it. Give one of the two.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","description":"A finished snapshot search of the account."},"newFrom":{"type":"string","format":"date","description":"With jobId: count the matches dated on or after this day as new. The watch lists them at once, from the search it starts from, as its first run, which sends no email. The other matches, and those with no date, count as seen. A patent record is dated by its publication, and a database entry by its own date."},"applicant":{"type":"string","description":"An applicant's name as its publications give it, up to 300 characters. Case, accents, punctuation and legal endings such as Inc do not matter."},"snapshotId":{"type":"string","description":"With applicant: the snapshot to follow. The newest snapshot with patent sets when left out."},"title":{"type":"string","description":"Up to 200 characters. A watch on an applicant takes its name when left out."}}}}}},"responses":{"201":{"description":"The watch.","content":{"application/json":{"schema":{"type":"object","required":["watch"],"properties":{"watch":{"type":"object","description":"The watch.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/watches/{id}":{"get":{"operationId":"getWatch","tags":["Watches"],"summary":"One watch and its runs","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The watch.","content":{"application/json":{"schema":{"type":"object","required":["watch"],"properties":{"watch":{"type":"object","description":"The watch and its runs.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"patch":{"operationId":"renameWatch","tags":["Watches"],"summary":"Rename a watch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Up to 200 characters."}}}}}},"responses":{"200":{"description":"The watch.","content":{"application/json":{"schema":{"type":"object","required":["watch"],"properties":{"watch":{"type":"object","description":"The watch.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}},"delete":{"operationId":"deleteWatch","tags":["Watches"],"summary":"Delete a watch; its searches stay","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The removal.","content":{"application/json":{"schema":{"type":"object","description":"The removal.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/watches/{id}/pause":{"post":{"operationId":"pauseWatch","tags":["Watches"],"summary":"Pause a watch","description":"A watch that is paused already stays as it is, with the reason it was paused for.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The watch.","content":{"application/json":{"schema":{"type":"object","required":["watch"],"properties":{"watch":{"type":"object","description":"The watch.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/watches/{id}/resume":{"post":{"operationId":"resumeWatch","tags":["Watches"],"summary":"Resume a watch","description":"A watch paused for its size (pausedBy size) answers 409 with the code not-allowed-in-state, since it would pause again at the next weekly addition: delete it, then watch a narrower search.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The watch.","content":{"application/json":{"schema":{"type":"object","required":["watch"],"properties":{"watch":{"type":"object","description":"The watch.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/portfolios":{"post":{"operationId":"exportPortfolio","tags":["Applicants"],"summary":"Export one applicant's publications with their sequences","description":"Starts a job of kind portfolio. It reads the patent sets of the snapshot and all its weekly additions for the publications whose applicant is the name given or a name the account has joined to it, and writes their sequences as CSV and FASTA: the oldest publications first, then by SEQ ID number, up to 100,000 sequences and 100 million letters. The finished job says how many it holds (exported) of how many there are (sequences), and limited is true when the export stopped at a limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["applicant"],"properties":{"applicant":{"type":"string","description":"An applicant's name as its publications give it, up to 300 characters."},"snapshotId":{"type":"string","description":"The snapshot to read. The newest snapshot with patent sets when left out."}}}}}},"responses":{"202":{"description":"The export job, queued.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/jobs/{id}/portfolio.csv":{"get":{"operationId":"downloadPortfolioCsv","tags":["Applicants"],"summary":"A finished export as CSV","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"One row for each sequence: publication, published, applicant, seq_id_no, accession, molecule_type, length, sequence.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/jobs/{id}/portfolio.fasta":{"get":{"operationId":"downloadPortfolioFasta","tags":["Applicants"],"summary":"A finished export as FASTA","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"One entry for each sequence, named by publication and SEQ ID number, such as >US11236170-B2/10947.","content":{"text/x-fasta":{"schema":{"type":"string","contentMediaType":"text/x-fasta"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/cases/{id}":{"get":{"operationId":"getCase","tags":["Cases"],"summary":"One case","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["case"],"properties":{"case":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"patch":{"operationId":"changeCase","tags":["Cases"],"summary":"Change the name, listing, snapshot, application number or prior art date","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"title":{"type":"string","description":"Up to 200 characters."},"listingId":{"type":["string","null"]},"snapshotId":{"type":["string","null"]},"applicationNumber":{"type":["string","null"],"description":"Up to 40 characters, such as US 17/123,456. Null clears it."},"priorArtDate":{"type":["string","null"],"description":"YYYY-MM-DD. New plan searches look for what was published before it. Null clears it."},"priorArtDateBasis":{"enum":["filing","priority","other"],"description":"What the date is: the filing date, the earliest priority date, or another date (the default). Sent with priorArtDate."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["case"],"properties":{"case":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}},"delete":{"operationId":"deleteDemoCase","tags":["Cases"],"summary":"Delete a demo case (its owner)","description":"Deletes a demo case as DELETE /api/admin/cases/{id} deletes a case, but for the searches added to it by hand, which stay with the account. A demo case was started with demo: true and holds the demo files alone: every set of its claims was read from a demo claims file, every listing it names was imported from a demo listing, and every result file it imported is a demo result file. Its GET answers demo: true. The audit log's case.deleted event adds by: owner and demo: true. 409 for any other case, which only an admin deletes, and in the cases where the admin's delete answers 409.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"What was deleted, as the admin's delete answers it.","content":{"application/json":{"schema":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"object","description":"The case ID, its owner, its log's last event by number and SHA-256, the searches deleted with it and the bytes.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/cases/{id}/claims":{"get":{"operationId":"getClaims","tags":["Cases"],"summary":"The claims","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["claims"],"properties":{"claims":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"importClaims","tags":["Cases"],"summary":"Add a set of claims: pasted text, a publication's XML, or a Word or text file","description":"Each import is a new set of claims; the case keeps every set. The answer names the set (n, label, date, current). When the set becomes current, the rules find features again, and a feature on a claim whose words did not change keeps its ID, decision, note and edit; changes counts the claims unchanged, amended, added and cancelled, and carried what came over. A locked plan stays locked and follows the older set until it is unlocked, with a reason, and drafted again. A set dated before the current one stays beside it, and current names the set that stays current. A second import of the same claims with the same label and date answers 409.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"text":{"type":"string","description":"The claims."},"xml":{"type":"string","description":"One publication's full-text XML, an application or a grant. Its description comes with it."},"file":{"type":"object","required":["name","data"],"properties":{"name":{"type":"string","description":"The file name, up to 200 characters."},"data":{"type":"string","description":"The file in base64, up to 15 MiB: a Word file (.docx), a text file or XML. A Word file marked up as an amendment loses its struck-through words and tracked deletions."}}},"label":{"enum":["filed","amended","published","granted"],"description":"What the claims are. A publication's XML gives published or granted by its kind code when left out. Claims as amended need a date."},"date":{"type":"string","description":"The date of the claims, YYYY-MM-DD. A publication's XML gives its publication date, or its filing date for claims as filed, when left out."},"current":{"type":"boolean","description":"Whether the set becomes the current claims. Left out, it does, unless it is dated before the current set. A case's first set is always current."}},"additionalProperties":true}}}},"responses":{"201":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/claims/sets":{"get":{"operationId":"listClaimSets","tags":["Cases"],"summary":"The sets of claims, oldest first, each without its claims, and which is current","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/claims/sets/{n}":{"get":{"operationId":"getClaimSet","tags":["Cases"],"summary":"One set of claims, with its claims","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["set"],"properties":{"set":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/claims/sets/{n}/current":{"post":{"operationId":"makeClaimSetCurrent","tags":["Cases"],"summary":"Make a set the current claims","description":"Finds features and carries them over as an import does, and logs a claims.current event with the note. A locked plan stays locked and follows the set it was drafted for.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"note":{"type":"string","description":"Why, up to 500 characters."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/claims/changes":{"get":{"operationId":"compareClaimSets","tags":["Cases"],"summary":"What changed from one set of claims to another, claim by claim","description":"Each claim is unchanged, amended (with the words added and removed), added or cancelled, with its number in each set. Claims that were renumbered but read the same, with their references to other claims renumbered, are unchanged.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"integer","minimum":1},"description":"The older set. The set before to when left out."},{"name":"to","in":"query","schema":{"type":"integer","minimum":1},"description":"The newer set. The current set when left out."}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/features":{"get":{"operationId":"getFeatures","tags":["Cases"],"summary":"The claim features","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"addFeature","tags":["Cases"],"summary":"Add a feature by hand","description":"Takes claim, kind (seqId, identity, fragment, complement, fusion, cdr, region, sequence, changes, wildcard, choice), start, end, links and the kind's details in the field the service README names. changes is { max, values, kinds, conservative, unit }: the most changes the claim allows (1 to 10,000), the counts it writes, kinds from addition, deletion, substitution (a match meets it only through these), whether only conservative substitutions (not checked: every substitution counts), and amino acids, nucleotides or null. wildcard is { letters, type }: the capital letters the claim reads as any residue (Xaa reads as X), and nucl or prot. choice is { at, numbers, letters, named, absent }: what the numbers count (position, a position of the sequence; x, the claim's numbered X; or each, every X, with no numbers), the one-letter codes of the amino acids the claim allows there, other residues by name (such as Aib), and whether the position may be empty.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"201":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["feature"],"properties":{"feature":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/features/review":{"post":{"operationId":"reviewFeatures","tags":["Cases"],"summary":"Accept or reject features","description":"features answers each feature as it stands after the review. A feature already accepted, or already rejected with no note or the same note, stays as it is and nothing is logged for it. A feature accepted after a rejection drops the rejection's note, which the case log keeps; a model suggestion gets the model's own note back.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"accept":{"type":"array","items":{"type":"string"}},"reject":{"type":"array","items":{"type":"string"}},"note":{"type":"string","description":"Why."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["features"],"properties":{"features":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/features/{featureId}":{"post":{"operationId":"reviewFeature","tags":["Cases"],"summary":"Accept, reject or change one feature","description":"A change takes start, end, links and the details of the feature's kind, checked as for adding one: changes for allowed changes, wildcard for letters the claim reads as any residue, choice for residues allowed at a position. An edit is always logged. Accepting an accepted feature, or rejecting a rejected one with no note or the same note, changes nothing and logs nothing.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"featureId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["feature"],"properties":{"feature":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/suggestions":{"get":{"operationId":"getSuggestionsState","tags":["Cases"],"summary":"The state of the case's last call to the claims model","description":"state is none, asking (with seconds so far), done (with suggested, dropped and paragraphs), failed or interrupted (with error); busy is true while the model answers for another case.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"suggestFeatures","tags":["Cases"],"summary":"Ask the claims model for features the rules missed","description":"The model gets the claims, the features found and, for claims from publication XML, up to 40 description paragraphs. A server makes one call at a time; while one runs, another answers 409. Without background, a call that fails answers 502 with the reason.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"background":{"type":"boolean","description":"True starts the call and answers 202 with its state at once; GET /api/cases/{id}/suggestions reads it until it ends. Left out, the request waits for the model and answers with suggestions, dropped and paragraphs; a proxy that stops waiting first ends the request, not the call, and the GET reads how it ended."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/sequences":{"get":{"operationId":"getCaseSequences","tags":["Cases"],"summary":"The case's sequences","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/plan":{"get":{"operationId":"getPlan","tags":["Cases"],"summary":"The search plan","description":"coverage.uncovered lists the features no search covers. Where the listing's letters that stand for more than one residue, such as X for any amino acid, lower the identity a search for one would keep, or a count of changes the claim allows sets it, its entry has filter: { identity, words }, as a draft gives it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"put":{"operationId":"editPlan","tags":["Cases"],"summary":"Edit the search plan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/draft":{"post":{"operationId":"draftPlan","tags":["Cases"],"summary":"Draft the plan from the features","description":"Each SEQ ID NO is searched once, at the lowest identity any claim gives it. A search's identity counts a letter that stands for more than one residue, such as X for any amino acid, as a difference, while the case's references read it as each residue it stands for. So where the listing gives a SEQ ID NO such letters, its search keeps less identity, by what those letters take away, and its reason says why. A count of changes a claim allows is an alternative too: N changes leave at least 100(L - N - W)/L identity over the alignment of L letters, W of them such letters, and the search keeps the lowest filter of its claims' alternatives. A count of changes on a SEQ ID NO of unknown length sets no filter.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/lock":{"post":{"operationId":"lockPlan","tags":["Cases"],"summary":"Lock the plan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/unlock":{"post":{"operationId":"unlockPlan","tags":["Cases"],"summary":"Unlock the plan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"reason":{"type":"string","description":"Why, up to 500 characters. Needed while the plan follows an older set of claims than the current one."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/versions/{n}":{"get":{"operationId":"getPlanVersion","tags":["Cases"],"summary":"One locked version of the plan","description":"A lock writes the version and then the plan, so a version numbered above the plan's own version is what a stop left part-way through a lock and is not a version: it answers 404 here, a run or a search request that names it answers 404, the plan and the decisions export leave it out, and the next lock writes over it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/plan/groups":{"post":{"operationId":"changePlanGroups","tags":["Cases"],"summary":"Move SEQ ID NOs to another query group, split a group or join two","description":"The plan's query groups are its searches of SEQ ID NOs that share a query, an engine and thresholds, one search on each set; GET /api/cases/{id}/plan lists them in groups, with the plan's size against the server's limits and the runs it makes in size. A move or a join puts together groups on the same sets with the same E-value, hit count and date, and a join also needs the same engine; the group that takes SEQ ID NOs keeps the lower identity and coverage of the two. A split makes a new search beside each search of the group, under the next free numbers. The changed searches get new reasons, and the case log gets a plan.edited event with the change in group. Answers with the plan; 400 when the change does not fit, 409 when the plan is locked.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"action":{"enum":["move","split","join"]},"from":{"type":"string","description":"For a move: a search of the group the SEQ ID NOs leave, such as P1."},"to":{"type":"string","description":"For a move: a search of the group they join."},"group":{"type":"string","description":"For a split: a search of the group to split. For a join: a search of the group that stays."},"with":{"type":"string","description":"For a join: a search of the group that joins it."},"seqIds":{"type":"array","items":{"type":"integer","minimum":1},"description":"For a move or a split: the SEQ ID NOs, each once."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/targets":{"get":{"operationId":"listPlanTargets","tags":["Cases"],"summary":"Where plan searches can run: each set and attached database, with the searches and time a set offered on request adds","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"addPlanTarget","tags":["Cases"],"summary":"Add a copy of each fitting search on a set offered on request, or on an attached database","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"snapshotId":{"type":"string","description":"The snapshot."},"set":{"type":"string","description":"The set, such as trembl."},"databaseId":{"type":"string","description":"An attached database, in place of snapshotId and set."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/runs":{"get":{"operationId":"listRuns","tags":["Cases"],"summary":"The plan runs, each with its progress and the searches it has not started yet","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["runs"],"properties":{"runs":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"runPlan","tags":["Cases"],"summary":"Run the plan, in several runs when it needs more jobs than the queue has room for","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"202":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"}}}},"/api/cases/{id}/runs/{runId}/again":{"post":{"operationId":"runSearchAgain","tags":["Cases"],"summary":"Run one search of a run again","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"jobId":{"type":"string","description":"A failed, cancelled or interrupted job of the run."},"unit":{"type":"integer","minimum":0,"description":"A search of the run that could not start, in place of jobId."}},"additionalProperties":true}}}},"responses":{"202":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["run"],"properties":{"run":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"}}}},"/api/cases/{id}/runs/{runId}":{"get":{"operationId":"getRun","tags":["Cases"],"summary":"One plan run, with its progress and the searches it has not started yet","description":"The run as GET /api/cases/{id}/runs lists it. progress counts total, done, failed (every job that ended without completing), cancelled and interrupted (those of the failed that were cancelled or cut off by a stop of the service), running, queued and pending. A cancelled run has cancelled: { at, user, dropped, runs }.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["run"],"properties":{"run":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/runs/{runId}/cancel":{"post":{"operationId":"cancelRun","tags":["Cases"],"summary":"Cancel a plan run","description":"Drops the searches of the run that have not started, and the runs still to start after it when the plan was cut into runs, and cancels its searches that wait or run. Searches that finished keep their results, and each cancelled search can run again. Answers the run, whose cancelled names who cancelled it and when, and dropped and runs count what went; its progress counts the dropped searches as cancelled. Logs plan.cancelled with the jobs it stopped and the counts. A run that has ended answers 200 as it stands, with no event.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["run"],"properties":{"run":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/searches":{"get":{"operationId":"listCaseSearches","tags":["Cases"],"summary":"The case's searches","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["searches"],"properties":{"searches":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"addCaseSearch","tags":["Cases"],"summary":"Add a finished search","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"jobId":{"type":"string","description":"A finished search of the account."}},"additionalProperties":true}}}},"responses":{"201":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["search"],"properties":{"search":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/searches/remove":{"post":{"operationId":"removeCaseSearch","tags":["Cases"],"summary":"Take out a search added by hand or imported","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"jobId":{"type":"string","description":"The search."}},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/notes":{"get":{"operationId":"listNotes","tags":["Cases"],"summary":"The notes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["notes"],"properties":{"notes":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"addNote","tags":["Cases"],"summary":"Add a note","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"text":{"type":"string","description":"Up to 5,000 characters."}},"additionalProperties":true}}}},"responses":{"201":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["note"],"properties":{"note":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/notes/{n}/withdraw":{"post":{"operationId":"withdrawNote","tags":["Cases"],"summary":"Withdraw a note","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["note"],"properties":{"note":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/explanations":{"get":{"operationId":"listExplanations","tags":["Cases"],"summary":"The drafted sentences on why each reference counts, with their decisions","description":"Each sentence has n, kind, text, source, fingerprint (the SHA-256 of its text, which a decision sends back as ifFingerprint) and decision.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"decideExplanation","tags":["Cases"],"summary":"Accept, edit or reject a drafted sentence","description":"The service drafts the sentence again from the facts as they are now and records the decision against that draft. Send ifFingerprint so that a decision never stands for words you did not read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The change, as the page sends it.","properties":{"search":{"type":"string","description":"A search in the case."},"publication":{"type":"string","description":"A publication with a draft in that search."},"sentence":{"type":"integer","minimum":1,"maximum":4,"description":"The sentence: 1 alignment, 2 plan, 3 date, 4 paper."},"action":{"enum":["accept","edit","reject"]},"text":{"type":"string","description":"Your words for the sentence, for an edit. Up to 2,000 characters."},"ifFingerprint":{"type":"string","description":"The fingerprint of the sentence you read, as GET /api/cases/{id}/explanations gives it. When the sentence reads differently now, because its facts changed, the answer is 409 with code changed-elsewhere and nothing is decided: read it again. Left out, the decision binds to the sentence as it reads when the service answers.","pattern":"^[0-9a-f]{64}$"}},"additionalProperties":true}}}},"responses":{"201":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","required":["explanation"],"properties":{"explanation":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/events":{"get":{"operationId":"listCaseEvents","tags":["Cases"],"summary":"The event log","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/events/verify":{"get":{"operationId":"verifyCaseEvents","tags":["Cases"],"summary":"Check the event log's hash chain","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/marks":{"post":{"operationId":"markCaseResult","tags":["Cases"],"summary":"Keep or exclude a result in the case","description":"Marks a result of a search in the case, as POST /api/jobs/{id}/marks does, and logs one mark.keep, mark.exclude or mark.clear event. With ids the event names every publication in ids, and its id is the first of them.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobId","target","action"],"properties":{"jobId":{"type":"string","description":"A search in the case."},"target":{"enum":["publication","row"]},"id":{"description":"The patent ID or the hit row number."},"ids":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string"},"description":"Up to 500 patent IDs, such as a family row's family.ids. Each gets its own mark. target must be publication."},"action":{"enum":["keep","exclude","clear"]},"reason":{"type":"string","description":"Why, up to 500 characters."}}}}}},"responses":{"201":{"description":"The mark, or with ids the marks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAnswer"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases":{"get":{"operationId":"listCases","tags":["Cases"],"summary":"The account's cases","responses":{"200":{"description":"The cases, newest first.","content":{"application/json":{"schema":{"type":"object","description":"The cases.","properties":{"cases":{"type":"array","items":{"type":"object","description":"A case.","properties":{},"additionalProperties":true}},"total":{"type":"integer","minimum":0,"description":"All cases."}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"createCase","tags":["Cases"],"summary":"Open a case","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The case.","properties":{"title":{"type":"string","description":"Up to 200 characters."},"listingId":{"type":"string","description":"A listing of the account."},"snapshotId":{"type":"string","description":"The snapshot to search."},"applicationNumber":{"type":"string","description":"Up to 40 characters."},"priorArtDate":{"type":"string","description":"YYYY-MM-DD."},"priorArtDateBasis":{"enum":["filing","priority","other"]},"demo":{"type":"boolean","description":"true for a case started with Use demo data. Such a case answers demo: whether it still holds the demo files alone (GET /demo/README.md lists them), in which case its owner may delete it."}},"additionalProperties":true}}}},"responses":{"201":{"description":"The case.","content":{"application/json":{"schema":{"type":"object","required":["case"],"properties":{"case":{"type":"object","description":"The case.","properties":{},"additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/handover":{"post":{"operationId":"handOverCase","tags":["Cases"],"summary":"Hand the case to a colleague's account","description":"The case changes owner and keeps everything it holds: its claims and sets of claims, plan, searches and their results, imported result files, references, decisions, summaries, notes and log. Nothing is copied. The colleague opens each search and listing the case holds, through the case and on its own; the account that handed it over no longer opens the case or them, unless the case comes back. Its other searches stay its own. A search still counts for the account that ran it. to names the colleague as they sign in: by email on the hosted service and on a server whose sign-in names accounts by email, where it must be at your own email domain, and otherwise by the name the sign-in gives. The colleague must have signed in here at least once and be let in by the sign-in rule now. The case log gets a case.handed_over event with from and to, and the service's audit log one with the case, from and to. 400 for your own account or a name that cannot be an account; 403 for an account at another email domain or one the sign-in rule does not let in now; 404 for an account that has not signed in here, or a case that is not yours; 409 while the claims model reads the case or its listing imports, or when two accounts signed in with that name on the same day. The local workbench has no accounts and answers 404.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"The colleague's account: the email address or name they sign in with.","maxLength":254}}}}}},"responses":{"200":{"description":"Who handed the case to whom, and when.","content":{"application/json":{"schema":{"type":"object","required":["handover"],"properties":{"handover":{"type":"object","required":["caseId","at","from","to"],"properties":{"caseId":{"type":"string"},"at":{"type":"string","format":"date-time","description":"When."},"from":{"type":"string","description":"The account that handed the case over."},"to":{"type":"string","description":"The account that holds it now."}}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/references":{"get":{"operationId":"listCaseReferences","tags":["Cases"],"summary":"The references under each claim feature, ranked","description":"Every reference the case's searches found, under the claim feature whose search found it. A feature is a SEQ ID reference of a kept feature, with the qualifiers linked to it, or a sequence written out in a claim with no SEQ ID. A plan's search serves the features its plan item covers, and keeps the identity, coverage and date it was locked with; a search added by hand serves every feature that recites its query's SEQ ID NO when the case's listing ran it, and the group \"other\" otherwise. A reference is a publication, by its ID, or a database entry, by its accession, joined across the searches. Inside a feature, references rank by meets, coverage, dateClass, queryMatch, evalue: whether the best match meets the feature's identity threshold over the query's whole length (as written means identical; with a fragment length, over at least that many letters of the alignment; a query letter that stands for more than one residue, such as X for any amino acid or R for A or G as WIPO ST.26 defines them, matches each residue it covers, and so does a letter the claim reads as any residue; a count of changes the claim allows is met by a match with that many changes or fewer, or by the identity where the claim gives one too), the coverage of the claimed region, the date class against the case's prior art date (before, filedBefore, undated, later; none when the case has no date), then Query Match and E-value. Ties go to the earliest date, then the ID. Each reference keeps its keys and the marks each search gives it; one that every search that found it excluded leaves the list and is counted. Without feature, each feature lists its first 20 references (or limit); with feature, that feature alone pages with offset and limit. Reading the list writes nothing.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Feature"},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/CaseReferenceLimit"}],"responses":{"200":{"description":"Each feature with its ranked references, and the case's searches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseReferencePage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/references.csv":{"get":{"operationId":"exportCaseReferences","tags":["Cases"],"summary":"Every reference of every feature as CSV, or in an export format","description":"One line per reference in each feature, excluded ones last in their feature with no rank. The columns: feature, claim, claim_words, threshold, rank, meets, coverage, date_class, query_match, evalue, reference, id, label, office, number, kind, accession, source, published, filed, priority, application_number, applicant, title, link, matched, meeting, of, claimed_seq_ids, reference_seq_nos, best_search, best_set, best_job, best_row, best_query, best_seq_id_no, query_identity, identity, bits, align_length, matches, searches, sets, mark, marks, meets_words, date_words, matched_words. The case log gets an export.made event that names the format and the file's SHA-256.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ExportFormat"}],"responses":{"200":{"description":"Every reference of every feature.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}},"text/tab-separated-values":{"schema":{"type":"string","contentMediaType":"text/tab-separated-values"}},"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/references/all":{"get":{"operationId":"listCaseAllReferences","tags":["Cases"],"summary":"All references: each reference once across the case","description":"Each publication or database entry the case's searches and imported result files found, once, with every feature, search, set and imported file that found it. Under each feature that lists it, a row gives its rank there among the references not excluded there, whether its best match meets the feature's threshold, the best match with its rank keys, and the marks. A row also gives the reference's dates, its patent family among the case's publications, and one overall mark only when the marks under every feature agree. Rows sort by the best rank they reach under any feature, then by how many claim features they meet, most first, then the earliest publication date, then the ID. A reference excluded under every feature that lists it leaves the list and is counted; with excluded=true the list holds those alone, with no rank. Pages with offset and limit. Reading the list writes nothing.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Excluded"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/AllReferenceLimit"}],"responses":{"200":{"description":"One page of the list, with the case's searches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAllReferencePage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/references/all.csv":{"get":{"operationId":"exportCaseAllReferences","tags":["Cases"],"summary":"All references as CSV, or in an export format","description":"One line per reference, those excluded under every feature last with no rank. A column with a value for each feature names the feature first, as in \"F2 1; F3 excluded\". The columns: rank, best_rank, features_met, features, reference, id, label, office, number, kind, accession, source, published, filed, priority, application_number, applicant, title, link, date_class, family, family_size, family_basis, feature_ranks, feature_meets, feature_best, feature_marks, mark, searches, sets, files, date_words. The case log gets an export.made event that names the format and the file's SHA-256.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ExportFormat"}],"responses":{"200":{"description":"Each reference once across the case.","headers":{"X-Export-Format":{"description":"The format's name: Built-in for the CSV the export always gives.","schema":{"type":"string"}},"X-Export-Format-Version":{"description":"The format's version. The built-in format's is the release's.","schema":{"type":"string"}},"X-Export-Format-Sha256":{"description":"The SHA-256 of the format's definition.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Sha256":{"description":"The SHA-256 of the file, as the record of the export keeps it.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"X-Export-Rows":{"description":"The rows in the file.","schema":{"type":"integer","minimum":0}},"X-Redacted-Rows":{"description":"The rows an external format left out because a confidential set found them.","schema":{"type":"integer","minimum":0}},"X-Redacted-Fields":{"description":"The fields the format leaves out or masks.","schema":{"type":"integer","minimum":0}}},"content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}},"text/tab-separated-values":{"schema":{"type":"string","contentMediaType":"text/tab-separated-values"}},"application/x-ndjson":{"schema":{"type":"string","contentMediaType":"application/x-ndjson"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/follow-ups":{"get":{"operationId":"listCaseFollowUps","tags":["Cases"],"summary":"The searches the case suggests adding to its plan","description":"Fixed rules suggest searches from the case's facts, with no model. Each claim feature whose plan searches have run gets them from its references, in this order: no reference meets the claim (a more sensitive method on the sets its searches read), the best references cover under 80% of the claimed sequence (the rest as a region), and a set the server holds for the feature's type that no search of it read. With job, one plan search's suggestions, by the rules a search outside a case follows, less the translated and CDR searches a plan does not hold; in a case with a prior art date, a search at its hit limit gets that date as its narrower search. The first 3 not dismissed are listed. A later version's run of the same plan search keeps what became of its suggestions: one added on an earlier run is listed as added, and one dismissed is left out. The case log gets a followup.shown event for each one the first time it is listed, with its rule, so reading this route writes to the log.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"job","in":"query","schema":{"type":"string"},"description":"One of the case's plan searches, by its job: that search's suggestions in place of the features'."}],"responses":{"200":{"description":"Each feature with suggestions, or with job that search's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseFollowUps"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}},"post":{"operationId":"answerCaseFollowUp","tags":["Cases"],"summary":"Add a suggested search to the plan, or dismiss it","description":"add puts the suggestion's searches in the draft plan, one for each place it names, with the plan search or feature it came from and its rule as their reason. A locked plan is unlocked first, with that as its reason, so they go into its next version, which you lock to run them. The case log gets plan.edited and followup.added, with the version and the searches. dismiss hides it and logs followup.dismissed. 404 for a suggestion not listed for that search or feature; 409 for one dismissed or added already, from this job or an earlier run of the same plan search, or no longer suggested.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key","action"],"properties":{"key":{"type":"string","description":"The suggestion, as listed.","pattern":"^[0-9a-f]{14}$"},"action":{"enum":["add","dismiss"]},"job":{"type":"string","description":"The plan search the suggestion is for, by its job."},"feature":{"type":"string","description":"The claim feature the suggestion is for, such as F2. Give job or feature."},"user":{"type":"string","description":"Who, on the local workbench."}}}}}},"responses":{"200":{"description":"With add, the plan version the searches go into and their IDs, or with dismiss the key; then the suggestions as GET /api/cases/{id}/follow-ups gives them, for the plan search or for the features.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CaseFollowUps"},{"type":"object","properties":{"added":{"type":"object","description":"version and items.","properties":{"version":{"type":"integer","minimum":1},"items":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"dismissed":{"type":"string","description":"The key."}}}]}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/summaries":{"get":{"operationId":"listCaseSummaries","tags":["Cases"],"summary":"The summaries of the case, its results, the searches, the references and the claimed SEQ ID NOs, filled in from templates","description":"Sequences fills in each summary from a fixed template and the case's facts each time it is read, with no model, so it says what the case holds now. Every case has its case summary: its application number and prior art date with where the date came from, its claims (how many, the independent ones, and the sets of claims it holds), its features by kind, its listing's sequences by molecule type with their lengths and organisms and the listing's ST.26 check, its claimed SEQ ID NOs, and its plan with its groups, sets and the features no search covers, ending with where the case stands. Once a search adds references, the results summary says how many references the case has, how many meet a claim feature's threshold, how many came before the prior art date, the top references in the list across the case, the features no reference meets, and the searches and files behind them. There is one for each search that adds references; for each feature's first 5 references and its kept ones; and for each claimed SEQ ID NO, with the claims that recite it and the paragraphs of the description that cite it. Each sentence names its source. A subject that has a decision keeps its summary while it is in the case. A decision holds while the template, its words, the facts and the draft all match what is filled in now. After a change in the case, decision.current is false and the report leaves the summary out until a new decision. Reading the summaries writes nothing.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SummarySeqIds"}],"responses":{"200":{"description":"The summaries, with the templates and the claimed SEQ ID NOs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSummaries"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/summaries/decisions":{"post":{"operationId":"decideCaseSummary","tags":["Cases"],"summary":"Accept, edit or reject a summary, or a model's draft of one","description":"The decision binds to the summary as it is filled in now. It names the template, the SHA-256 of the template's words and of the facts, and the draft it answers, and for an edit your words. The case keeps every decision, and the case log gets summary.accepted, summary.edited or summary.rejected with the same fields. 404 when the case no longer has the subject. 409 when its facts changed after you read it (send the factsSha256 you read), when it has nothing to summarize, or when it failed its checks. The report prints each summary accepted or edited while its decision holds. A decision on a model's draft sends its draftId in place of factsSha256 and names the draft's model, prompt ID and prompt SHA-256; 409 when a newer draft replaced it or the case changed after it was made. While an accept or an edit of a draft holds, the report prints it in place of the template's summary, marked as drafted by the model (Pilot). A rejected draft never reaches the report.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSummaryDecision"}}}},"responses":{"201":{"description":"The summary with its decision, or for a draft its subject with modelDraft and modelTry.","content":{"application/json":{"schema":{"type":"object","required":["summary"],"properties":{"summary":{"$ref":"#/components/schemas/CaseSummary"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/summaries/drafts":{"post":{"operationId":"draftCaseSummary","tags":["Cases"],"summary":"Ask the model for a draft of a summary (Pilot)","description":"Off unless the server names a model with the claims model settings: then the answer is 409 and nothing is sent. Drafting happens only on this request. The model gets one fixed prompt for the kind and the facts the kind's template reads, each part with its source, up to 20,000 characters, and the request asks for at most 2,048 answer tokens within the claims model's time limit. A server makes one call at a time, shared with claim suggestions; while one runs, another answers 409. Each span in quotation marks must appear in the text of a source in the facts, and each number in the facts, a percent matching one there to one decimal place; a draft that fails either check is dropped, with the check it failed. Every try is kept in the case with its model, prompt ID, prompt SHA-256, seconds and tokens, and the case log gets summary.drafted, summary.dropped or model.failed. The draft sits beside the template's text, which stays the default. With background, the answer is 202 with drafting, and GET /api/cases/{id}/summaries reads it until it ends. Without it, a call that fails answers 502 with the reason.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseSummaryDraftRequest"}}}},"responses":{"201":{"description":"The try: passed with its text, or dropped with the checks it failed and why, without its words.","content":{"application/json":{"schema":{"type":"object","required":["draft"],"properties":{"draft":{"$ref":"#/components/schemas/CaseSummaryDraft"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/decisions.json":{"get":{"operationId":"exportCaseDecisions","tags":["Cases"],"summary":"Every decision in the case, tied to the case's log","description":"Each claim feature as it stands, with where it came from; each accept, reject, edit and feature added by hand, with who and when, and for an edit the feature before and after; each call to the claims model with each suggestion kept or dropped and why; each decision on a drafted sentence and on a summary; and the plan's locked versions with each draft, edit, lock and unlock. Each decision names its event in the log by seq and hash, and log gives the chain's check. Reading it writes nothing. The file comes as an attachment.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The decisions.","content":{"application/json":{"schema":{"type":"object","description":"See the service README.","properties":{"format":{"const":"sequences-decisions"},"version":{"type":"string","description":"The form of the export."},"exportedAt":{"type":"string","format":"date-time","description":"When it was made."},"log":{"type":"object","description":"The log's check: events, unreadable, ok, head, and broken when the chain breaks.","properties":{},"additionalProperties":true},"claims":{"type":"object","description":"Each claims import with its set, the claims now in the case and their set, every set in brief, and each switch from one set to another.","properties":{},"additionalProperties":true},"features":{"type":"array","items":{"type":"object","description":"A feature as it stands.","properties":{},"additionalProperties":true}},"reviews":{"type":"array","items":{"type":"object","description":"A decision on a feature.","properties":{},"additionalProperties":true}},"suggestions":{"type":"array","items":{"type":"object","description":"A call to the claims model, with kept and droppedItems.","properties":{},"additionalProperties":true}},"explanations":{"type":"array","items":{"type":"object","description":"A decision on a drafted sentence.","properties":{},"additionalProperties":true}},"summaries":{"type":["array","null"],"items":{"type":"object","description":"A decision on a summary.","properties":{},"additionalProperties":true},"description":"Null when the case has no summary decisions."},"plan":{"type":"object","description":"current, versions and events.","properties":{},"additionalProperties":true}},"required":["format","version","log","features","reviews","suggestions","explanations","plan"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/decisions.csv":{"get":{"operationId":"exportCaseDecisionsCsv","tags":["Cases"],"summary":"Every decision in the case as CSV","description":"One row for each claims import, switch from one set of claims to another, feature, decision on a feature, call to the claims model, suggestion kept or dropped, sentence decision, summary decision, plan event and locked plan version, named in record. A row on claims names their set, and current_set says whether it is the current set. The columns: record, seq, at, user, action, feature, source, rule, claim, kind, quote, start, end, details, links, status, note, before_quote, before_start, before_end, before_details, before_links, model, prompt_id, prompt_sha256, request_sha256, template_id, template_sha256, facts_sha256, checks, reason, kept, dropped, search, publication, sentence, subject, label, draft, text, latest, plan_version, plan_sha256, items, uncovered, rules_version, claims_sha256, hash, claim_set, set_label, set_date, current_set.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The decisions.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}},"/api/cases/{id}/reports":{"post":{"operationId":"makeCaseReport","tags":["Cases"],"summary":"The case report as PDF or Word","description":"The file comes with its SHA-256 in the X-Report-Sha256 header.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["format"],"properties":{"format":{"enum":["pdf","docx"]}}}}}},"responses":{"200":{"description":"The report.","headers":{"X-Report-Sha256":{"schema":{"type":"string"},"description":"The SHA-256 of the file."}},"content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","contentMediaType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/plan/versions/{n}/request":{"post":{"operationId":"downloadSearchRequest","tags":["Cases"],"summary":"A locked plan version's search request, as Word or JSON","description":"What a search team or another system needs to run the version's searches: the case, its application number and prior art date, then each query group with its sequences in FASTA, its searches with their method and set, its thresholds and reasons, and the claims and features it serves, and last the version and the SHA-256 its lock recorded. The JSON file has format sequences-search-request and its version. The file comes with its own SHA-256 in the X-Report-Sha256 header, and the case log gets a plan.request event with it and the plan's SHA-256. 409 when the version no longer matches its fingerprint or its listing is gone.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"n","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["format"],"properties":{"format":{"enum":["docx","json"]}}}}}},"responses":{"200":{"description":"The search request.","headers":{"X-Report-Sha256":{"schema":{"type":"string"},"description":"The SHA-256 of the file."}},"content":{"application/json":{"schema":{"type":"string","contentMediaType":"application/json"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"type":"string","contentMediaType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"415":{"$ref":"#/components/responses/Error415"}}}},"/api/cases/{id}/imports":{"post":{"operationId":"importResultFile","tags":["Cases"],"summary":"Import a result file from BLAST+, FASTA36 or another program","description":"Reads the file a program wrote on your own machine: BLAST+ tabular (-outfmt 6, or 7 with its # Fields: line), XML (-outfmt 5) or JSON (-outfmt 15); FASTA36 -m 8, with or without its comment lines; or CSV with a header row, such as a CSV of Sequences' own. Any other comma- or tab-separated file with a header row reads by the column map that columns gives (column map 1.0.0): every other column is kept with its row, as the row's file.extra, and the job's record keeps the import report, which GET /api/cases/{id}/imports/{jobId}/report gives; the case, the job and the log keep the map. The start of the file is checked at once, so a file the service cannot read is refused before it takes a place in the queue. Then a job joins each row's subject to the patent sequences of the case's snapshot and its weekly additions, by accession, by publication and SEQ ID NO, or by place (cb26) when the file names its database by a path that holds the case's snapshot, as a search of the snapshot's own databases does, and keeps the rows as a search of the case, of kind imported, that opens in the review view as any search does. Rows that do not join stay in its list; GET /api/cases/{id}/imports/{jobId}/unresolved gives the reason for each. The case log gets a results.imported event with the file's name, size, format and SHA-256. Up to 200 MB and 1,000,000 rows. A case holds up to 100 searches added by hand or imported.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","required":true,"schema":{"type":"string","maxLength":200},"description":"The file name."},{"name":"set","in":"query","schema":{"enum":["patent_nucl","patent_prot"]},"description":"The patent set to join to. Left out, the program a file names decides, and a file that names none is joined to both."},{"name":"packed","in":"query","schema":{"enum":["page"]},"description":"page when the sender compressed the file only to send it: the case then records the unpacked file as the one chosen."},{"name":"columns","in":"query","schema":{"type":"string","contentMediaType":"application/json"},"description":"For a file read by its columns: a JSON object of each field and the name of its column in the header row, such as {\"hit\":\"Subject\",\"identity\":\"% identity\"}. The fields are query, hit, publication, seqNo, identity, coverage and score, and a map names the hit, or the publication and the SEQ ID NO. A header row has up to 1,000 columns. 400 when a name is not a column of the header row, or a column fills two fields."},{"name":"header","in":"query","schema":{"type":"integer","minimum":1},"description":"With columns: the line of the header row, counting from 1, in the first 64 KB of the file. Left out, the first line that is not blank."},{"name":"delimiter","in":"query","schema":{"enum":["comma","tab"]},"description":"With columns: what splits the columns. Left out, the header row decides."}],"requestBody":{"required":true,"description":"The file as the program wrote it, or gzip compressed.","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}},"application/gzip":{"schema":{"type":"string","contentMediaType":"application/gzip"}}}},"responses":{"202":{"description":"The search the import adds to the case, and its job, queued. Read GET /api/jobs/{id} until it ends.","content":{"application/json":{"schema":{"type":"object","description":"The import.","properties":{"search":{"type":"object","description":"The search, as GET /api/cases/{id}/searches lists it.","properties":{},"additionalProperties":true},"job":{"$ref":"#/components/schemas/Job"}},"required":["search","job"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"415":{"$ref":"#/components/responses/Error415"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/cases/{id}/imports/{jobId}/unresolved":{"get":{"operationId":"listImportUnresolved","tags":["Cases"],"summary":"The rows of an imported file that did not join a stored patent sequence","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":50}}],"responses":{"200":{"description":"One page of rows, in file order.","content":{"application/json":{"schema":{"type":"object","required":["total","offset","limit","rows"],"properties":{"total":{"type":"integer","minimum":0,"description":"Every row that did not join."},"offset":{"type":"integer","minimum":0,"description":"The first row given."},"limit":{"type":"integer","minimum":0,"description":"Rows a page."},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":1,"description":"The row number in the search."},"line":{"type":"integer","minimum":1,"description":"The line of the file; for XML and JSON, the place of the hit in the file, counting from 1."},"query":{"type":"string","description":"The query as the file names it."},"subject":{"type":["string","null"],"description":"The subject or accession as the file gives it."},"publication":{"type":["string","null"]},"seqNo":{"type":["integer","null"],"description":"The SEQ ID NO the file gives."},"reason":{"type":"string","description":"Why the row did not join."}}}}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/cases/{id}/imports/{jobId}/unresolved.csv":{"get":{"operationId":"downloadImportUnresolved","tags":["Cases"],"summary":"Every row of an imported file that did not join, as CSV","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"One line per row: row, line, query, subject, publication, seq_id_no, reason.","content":{"text/csv":{"schema":{"type":"string","contentMediaType":"text/csv"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/cases/{id}/imports/{jobId}/report":{"get":{"operationId":"getImportReport","tags":["Cases"],"summary":"The column map and import report of an imported file","description":"For a file read by its columns: the map it was read with, and what was read and skipped, and why, as the Report step shows it. A file read by its format has a null columnMap and report, and no sentences. 409 while the file is still being read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The import report.","content":{"application/json":{"schema":{"type":"object","required":["jobId","name","format","label","columnMap","rows","joined","unresolved","report","sentences"],"properties":{"jobId":{"type":"string","description":"The import job."},"name":{"type":"string","description":"The file name."},"format":{"type":"string","description":"The format the file was read as: delimited-comma or delimited-tab for a file read by its columns."},"label":{"type":"string","description":"The format in words."},"columnMap":{"type":["object","null"],"description":"The column map: its version, delimiter, header (the line of the header row), encoding (utf-8, utf-16le or utf-16be) and fields, each field and the name of its column."},"rows":{"type":"integer","minimum":0,"description":"Rows read."},"joined":{"type":"integer","minimum":0,"description":"Rows that joined a stored patent sequence."},"unresolved":{"type":"integer","minimum":0,"description":"Rows that did not join."},"report":{"type":["object","null"],"description":"What the reader found: the header row, the first and last lines read, the lines skipped by reason with the first lines of each, the cells it could not read, and the columns kept as extra columns."},"sentences":{"type":"array","items":{"type":"string"},"description":"The report in words."}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"}}}},"/api/variants/references/{sha256}":{"get":{"operationId":"getVariantsReference","tags":["Known variants"],"summary":"The ClinVar variations placed on a reference protein","description":"The protein is named by the SHA-256 of its letters, in lowercase, as a hit row's variants.sha256 gives it: a reviewed human UniProtKB/Swiss-Prot sequence whose letters are exactly those of a RefSeq protein ClinVar names. One page of the ClinVar variations whose protein changes are placed on it, by position, then change, then variation, and each classification with how many changes have it. significance keeps one classification, and an empty value those ClinVar leaves unclassified. 25 a page by default. 400 for text that is not a SHA-256; 404 when no reviewed human protein in this server's release has those letters.","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/VariantLimit"},{"$ref":"#/components/parameters/Significance"}],"responses":{"200":{"description":"The protein and one page of its ClinVar variations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantsReference"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API token from the API tokens page."}},"schemas":{"Error":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"What went wrong, in words to show a person."},"code":{"type":"string","description":"Only for a refusal a program handles in its own way: its problem code, such as not-allowed-in-state when the work is not in a state that allows it."},"problems":{"type":"array","description":"Only when a batch or a combined search is refused: each search or target that cannot run.","items":{"$ref":"#/components/schemas/Problem"}},"room":{"type":"integer","minimum":0,"description":"Only when the queue has too little room for a combined search: the searches it takes now."},"confirm":{"type":"object","required":["seconds","sets"],"description":"Only when a search asks first (409): the same request with \"confirmed\": true runs it.","properties":{"seconds":{"type":["integer","null"],"minimum":1,"description":"The estimate in seconds, or null where the server has not yet timed a search like it. For a combined search, the time its jobs should take together."},"sets":{"type":"array","items":{"type":"string"},"description":"The large sets it reads, by their names on the page. Empty when it asks for its time alone."},"limitSeconds":{"type":"integer","minimum":60,"description":"Only when the estimate passes the server's time for asking: that time in seconds."}}}}},"Problem":{"type":"object","required":["index","status","message"],"properties":{"index":{"type":"integer","minimum":0,"description":"The search, or in a combined search the target, counting from 0."},"status":{"type":"integer","description":"The status POST /api/jobs would give it."},"message":{"type":"string","description":"Why it cannot run."},"set":{"type":["string","null"],"description":"Only in a combined search: the set's name or the database ID, or null when the target gives neither."},"label":{"type":"string","description":"Only in a combined search: the target as the page names it, such as Patent DNA."}}},"SearchRequest":{"type":"object","description":"A search: the queries and where to search. Name a snapshot set (snapshotId and set) or a database (databaseId). Up to 20 queries, 20,000 letters in a query and 100,000 in all. The scoring settings (matrix, gapOpen, gapExtend, wordSize, lowComplexity and geneticCode) need a chosen engine, blast or a FASTA36 one: with auto, the default on a snapshot, any of them answers 400 with \"Choose a method to change its settings.\", and an exact or pattern search takes none. A setting the program cannot take answers 400 with the reason before anything is queued. The search record lists every setting each query ran with, defaults included, in queries[].settings, and those the request named in parameters.chosenSettings; Run again sends them again.","properties":{"fasta":{"type":"string","description":"The queries in FASTA or PIR (NBRF), or one sequence as plain letters. A PIR record such as >P1;name has a description line after its header and ends with *; its header gives its type, which must match the search."},"snapshotId":{"type":"string","description":"The snapshot, as GET /api/databases lists it."},"set":{"type":"string","description":"The set in the snapshot, such as patent_prot."},"deltas":{"type":"array","maxItems":1000,"items":{"type":"string"},"description":"Weekly additions to search with the snapshot, in order from the first."},"databaseId":{"type":"string","description":"An attached or imported database, instead of a snapshot."},"engine":{"enum":["auto","blast","exact","pattern","within","ssearch36","ggsearch36","glsearch36"],"description":"auto (the default on a snapshot) picks the tool for each query. within (Within k changes) lists every sequence of a snapshot set of the query's own type within k changes of each query, DNA on both strands, with no score or E-value cut, where kscan is installed: queries of up to 64 letters, k up to 5, and up to 50,000 hits a query, the closest first. It takes k and changes, and refuses any other search setting. ssearch36 (Smith-Waterman), glsearch36 (global on the query) and ggsearch36 (global on both sequences) compare each query with every sequence of a snapshot set of its own type, DNA on both strands, where FASTA36 is installed. Each DNA query reads the whole set, so a DNA search whose estimate passes the server's time limit for one search answers 400 and does not start."},"program":{"enum":["blastn","blastp","blastx","tblastn"],"description":"The query type and direction."},"task":{"type":"string","description":"A BLAST task, such as blastn-short. BLAST only."},"evalue":{"type":"number","minimum":1e-20,"maximum":1000},"maxHits":{"type":"integer","minimum":1,"maximum":5000},"short":{"type":"boolean","description":"Settings for short queries."},"matrix":{"enum":["BLOSUM45","BLOSUM50","BLOSUM62","BLOSUM80","BLOSUM90","PAM30","PAM70","PAM250"],"description":"The protein scoring matrix, for blastp, blastx and tblastn and for ssearch36, glsearch36 and ggsearch36 on protein. Default BLOSUM62, or PAM30 for a blastp query of 30 residues or fewer. Gap costs start at BLAST's default pair for the matrix, and Query Match is scored under it."},"gapOpen":{"type":"integer","minimum":0,"description":"The cost to open a gap; a gap of n letters costs gapOpen plus n times gapExtend. BLAST takes only the pairs it lists for the matrix, or for blastn's match and mismatch scores, and a request with another pair answers 400 naming the pairs it takes. FASTA36 takes 0 to 99. A cost left out keeps its default."},"gapExtend":{"type":"integer","minimum":0,"description":"The cost of each letter in a gap. FASTA36 takes 1 to 99."},"wordSize":{"type":"integer","minimum":2,"maximum":100,"description":"BLAST only: the length of the words a search starts from, 4 to 100 for blastn and 2 to 7 for the others. Default 11 for blastn (7 under 50 bases), 3 for blastp (2 for 30 residues or fewer), and 3 for blastx and tblastn."},"lowComplexity":{"type":"boolean","description":"BLAST only: the low-complexity filter, DUST for blastn and SEG for the others. Default on for blastn (off under 50 bases), blastx and tblastn, and off for blastp."},"geneticCode":{"enum":[1,2,3,4,5,6,9,10,11,12,13,14,15,16,21,22,23,24,25,26,27,28,29,30,31,33],"description":"blastx and tblastn only: the genetic code that reads the DNA, the query in blastx and the stored sequences in tblastn, as NCBI numbers the codes. Default 1, Standard."},"pattern":{"type":"string","description":"The pattern of a pattern search, in the syntax patternSyntax names."},"patternSyntax":{"enum":["prosite","regex"],"default":"prosite","description":"How the pattern is written: prosite, such as AAGCTT-x(2,6)-GGATCC, or regex, a regular expression such as AAGCTT.{2,6}GGATCC or (GGATCC|AAGCTT). It is never guessed from the pattern. A regular expression takes letters, [AG], [^P], ., {m}, {m,n}, {m,}, ?, + (up to 1,000), * (up to 1,000), up to 8 choices and ^ and $; backreferences, lookarounds and repeats on a group are refused. The search record keeps the expression and its PROSITE translation."},"strands":{"type":"string","description":"Which strands an exact or pattern search reads."},"k":{"type":"integer","minimum":0,"maximum":5,"description":"Within k changes only: the most changes a hit may have, below each query's length."},"changes":{"enum":["substitutions","edits"],"description":"Within k changes only: substitutions counts letters changed in place; edits also counts letters inserted or deleted. An N, an X or another IUPAC code in a query, or a code in a stored protein, matches any letter it stands for, so it is never a change. Stored DNA is read letter for letter: a stored N or other code matches only the same code."},"title":{"type":"string","description":"A name for the search, up to 500 characters."},"followUp":{"$ref":"#/components/schemas/FollowUpFrom"},"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."}}},"FollowUpFrom":{"type":"object","required":["kind","id","key"],"description":"The search this one follows and the suggestion it takes up, as GET /api/jobs/{id}/follow-ups or GET /api/groups/{id}/follow-ups lists it. It is checked before the search starts; the search it names records this one as run, and this one's record names that search. The search itself is not changed by it.","properties":{"kind":{"enum":["job","group"]},"id":{"type":"string","description":"The search or combined search."},"key":{"type":"string","description":"The suggestion.","pattern":"^[0-9a-f]{14}$"}}},"FollowUpAction":{"type":"object","required":["action","key"],"properties":{"action":{"enum":["dismiss","apply"]},"key":{"type":"string","description":"The suggestion, as listed.","pattern":"^[0-9a-f]{14}$"}}},"FollowUp":{"type":"object","description":"One suggested search.","properties":{"key":{"type":"string","description":"Names the suggestion: the same rule and search give the same key."},"rule":{"enum":["few","limit","uncovered","translated","cdr","unmet","partial","unsearched"]},"name":{"type":"string","description":"The rule's name."},"label":{"type":"string","description":"The search it would run, in words."},"why":{"type":"string","description":"The reason, from the result's own facts."},"search":{"type":"object","description":"The search: method, sets, databaseIds, and for a search queries, fragments, filters, maxHits and translated, or for a feature region.","properties":{},"additionalProperties":true},"take":{"enum":["run","antibody","apply"],"description":"Outside a case: run starts its search, antibody numbers the chain and searches its CDRs, and apply puts its filters on the list."},"state":{"enum":["open","run","applied","added"],"description":"What became of it."},"started":{"type":"array","items":{"type":"object","description":"A search started from it: kind and id.","properties":{},"additionalProperties":true}},"fill":{"type":"object","description":"What the search form takes to run it, from the search's own request. Left out for apply, and for a search saved before searches kept their requests.","properties":{},"additionalProperties":true},"added":{"type":"object","description":"In a case, once added: the plan version and its searches.","properties":{},"additionalProperties":true}},"required":["key","rule","name","label","why","search"],"additionalProperties":true},"FollowUps":{"type":"object","description":"A search's suggestions and their record.","properties":{"version":{"type":"string","description":"The version of the rules."},"caseId":{"type":"string","description":"For a search run from a case's plan: the case, which lists its suggestions."},"from":{"type":["object","null"],"description":"The search this one follows, with the suggestion it took up, or null.","additionalProperties":true},"followUps":{"type":"array","items":{"$ref":"#/components/schemas/FollowUp"}},"records":{"type":"array","items":{"type":"object","description":"An entry, oldest first: type (from, shown, run, applied or dismissed), at, key and rule; shown adds name, label, why and version, run the search it started, and from the search it came from.","properties":{},"additionalProperties":true}}},"required":["version","followUps","records"],"additionalProperties":true},"CaseFollowUps":{"type":"object","description":"A case's suggestions.","properties":{"version":{"type":"string","description":"The version of the rules."},"features":{"type":"array","items":{"type":"object","description":"A claim feature with suggestions.","properties":{"id":{"type":"string","description":"The feature, such as F2."},"followUps":{"type":"array","items":{"$ref":"#/components/schemas/FollowUp"}}},"additionalProperties":true}},"job":{"type":"string","description":"With job: the search."},"item":{"type":"string","description":"With job: its plan search, such as P3."},"planVersion":{"type":"integer","description":"With job: the locked version it ran from."},"finished":{"type":"boolean","description":"With job: whether it has completed. A search that has not lists none."},"followUps":{"type":"array","items":{"$ref":"#/components/schemas/FollowUp"},"description":"With job: its suggestions."}},"required":["version"],"additionalProperties":true},"Job":{"type":"object","description":"A job: a search, an alignment, an import, a listing import or a portfolio export.","properties":{"id":{"type":"string","format":"uuid"},"kind":{"enum":["search","align","msa","index","listing","portfolio"]},"title":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled","interrupted"]},"createdAt":{"type":"string","format":"date-time","description":"When it was queued."},"startedAt":{"type":"string","format":"date-time","description":"When it started."},"finishedAt":{"type":"string","format":"date-time","description":"When it ended."},"error":{"type":"string","description":"Why it failed."},"hits":{"type":"integer","minimum":0,"description":"Hits found, once completed: the sequences found, or the matches of an exact or pattern search. The hit list has a row for each alignment, so its total can differ."},"batch":{"type":"string","description":"The batch it belongs to, if any."},"group":{"type":"string","description":"The combined search it belongs to, if any."},"url":{"type":"string","format":"uri","description":"Only for a search: its result's own page, /results/{id}, at the address the request came to. Older links, /?job={id}, go on to it."},"imported":{"type":"object","description":"A result file imported into a case: the file's name, bytes, format, label and sha256 (and unpacked, for a gzip file), and once read, rows, joined, unresolved and otherVersion, the rows joined by an accession of another version. A file read by its columns adds columnMap, and once read skipped, the lines the reader skipped. A FASTA36 -m 8C file whose # Fields: lines name 14 columns above rows of 12, as FASTA36 36.3.8i writes it, adds fields: { named, read, rows }.","properties":{},"additionalProperties":true},"estimateSeconds":{"type":["number","null"]},"progress":{"type":"object","description":"A Smith-Waterman or global search, once it runs: done, the queries finished, of total; share, the part of the estimated work those queries hold; and at, when the count last changed. On a DNA set FASTA36 runs once for each query, so the count moves with each. The time the whole search should take is (at - startedAt) / share.","properties":{"done":{"type":"integer","minimum":0,"description":"Queries finished."},"total":{"type":"integer","minimum":0,"description":"Queries in the search."},"share":{"type":"number","minimum":0,"maximum":1,"description":"The part of the estimated work done, from 0 to 1. A query counts its letters and, on DNA, the reading of the set."},"at":{"type":"string","format":"date-time","description":"When the count last changed."}},"additionalProperties":true},"shared":{"type":"boolean","description":"Only on a coordinator (BIOSEQUENCE_ROLE=coordinator): true for a search of a snapshot, which a worker may run and which keeps its place in the queue across a restart."},"worker":{"type":"string","description":"Only on a coordinator: the name of the worker that runs the search, or ran it once it ends. Absent while it waits and for a search the coordinator runs itself."},"retries":{"type":"integer","minimum":0,"description":"Only on a coordinator: the times the search was cut off because its worker stopped answering or did not renew its lease. Absent until the first. At 3 the search fails. A worker's stop or drain never counts."},"ahead":{"type":"integer","minimum":0,"description":"Only from GET /api/jobs/{id} on a coordinator, for a shared search that waits: how many shared searches wait before it, in the order the coordinator and its workers take them."},"compute":{"$ref":"#/components/schemas/Compute"}},"required":["id","kind","title","status","createdAt"],"additionalProperties":true},"SearchRecord":{"type":"object","description":"The record a search keeps.","properties":{"format":{"type":"string"},"version":{},"jobId":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string"},"parameters":{"type":"object"},"compute":{"$ref":"#/components/schemas/Compute"},"recordSha256":{"type":"string"}},"additionalProperties":true},"Compute":{"type":"object","required":["cpuSeconds","wallSeconds","peakMemoryBytes","bytesRead"],"description":"Only on a search, once it has ended: what it used. Its record keeps the same. A search made before searches recorded it has none. Where the server cannot read a program's CPU time or memory, as on Windows, those two are null.","properties":{"cpuSeconds":{"type":["number","null"],"minimum":0,"description":"The CPU seconds of the programs it ran: BLAST+, FASTA36 or the threads of an exact, pattern or antibody scan."},"wallSeconds":{"type":["number","null"],"minimum":0,"description":"The seconds from its start to its end."},"peakMemoryBytes":{"type":["integer","null"],"minimum":0,"description":"The most memory one of its programs held, in bytes; for a scan, its threads together."},"bytesRead":{"type":["integer","null"],"minimum":0,"description":"The bytes of the set's files its programs read."}}},"Database":{"type":"object","description":"A set or database.","properties":{"id":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"type":{"enum":["nucl","prot"]},"snapshotId":{"type":"string"},"set":{"type":"string"},"sequences":{"type":"integer","minimum":0,"description":"Sequences in it."}},"additionalProperties":true},"Status":{"type":"object","description":"What this server can do.","properties":{"ready":{"type":"boolean"},"account":{"type":"object","description":"The signed-in account, on a hosted server.","properties":{},"additionalProperties":true},"license":{"type":"object","description":"The license, on a licensed server.","properties":{},"additionalProperties":true},"addons":{"type":"object","description":"The add-ons this server runs, by name, each with its release and the dates of its sources. Empty when it runs none.","properties":{},"additionalProperties":true},"imports":{"type":"object","description":"Result files a case imports: maxBytes, maxRows, the formats read by name, and the reader version.","properties":{"columns":{"type":"object","required":["reader","formats","maxColumns"],"description":"Files read by their columns, with ?columns= on POST /api/cases/{id}/imports.","properties":{"reader":{"type":"string","description":"The column map version."},"formats":{"type":"array","items":{"enum":["delimited-comma","delimited-tab"]}},"maxColumns":{"type":"integer","minimum":0,"description":"The most columns a header row has."}}}},"additionalProperties":true},"servers":{"type":"object","description":"Only on a coordinator (BIOSEQUENCE_ROLE=coordinator).","required":["workers","slots"],"properties":{"workers":{"type":"integer","minimum":0,"description":"The workers that take searches now: in contact, and not refused, reading their folders or draining."},"slots":{"type":"integer","minimum":0,"description":"How many searches of a snapshot run at once: this server's own (BIOSEQUENCE_CONCURRENCY) and those of the workers that take searches. A combined search's and a case run's time left divide by it."}}},"exports":{"type":"object","required":["formats","confidential"],"description":"The export formats of this server's file, beside each export's Built-in CSV.","properties":{"formats":{"type":"array","items":{"type":"object","required":["name","version","audience","export","type","sha256"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"audience":{"enum":["internal","external"]},"export":{"enum":["matches","patents","combined","case-references","case-all-references"]},"type":{"enum":["csv","tsv","jsonl"]},"sha256":{"type":"string"}}}},"confidential":{"type":"boolean","description":"True when external formats leave out the rows of confidential sets."}}}},"additionalProperties":true},"WorkerList":{"type":"object","required":["role","workers"],"properties":{"role":{"enum":["single","coordinator"],"description":"This server's BIOSEQUENCE_ROLE."},"workers":{"type":"array","items":{"$ref":"#/components/schemas/Worker"},"description":"By name. Empty on any server that is not a coordinator."}}},"Worker":{"type":"object","required":["name","state","refused","running","slots","threads","matched","differ","joinedAt","lastContact"],"properties":{"name":{"type":"string","description":"Its BIOSEQUENCE_WORKER_NAME, or its container's ID."},"state":{"enum":["starting","hashing","ready","busy","waiting","refused","draining","drained","lost"],"description":"ready and busy take searches. hashing: it reads the SHA-256 lists of its folders. draining: it finishes the searches it runs and takes no more; drained: it runs none and can be stopped. lost: not heard from for 60 seconds; its searches went back to the queue. refused: see refused. starting and waiting are a worker's own states and seldom show here."},"refused":{"enum":["release","tools","papers","addons","taxa","duplicate","hello","parameters",null],"description":"Why the coordinator refused it, or null: another release; other search programs (tools); another paper folder (papers); other folders of the add-ons that write into a search, such as genes (addons); another taxa folder (taxa); its name in use by another worker (duplicate); a hello this release cannot read (hello); or a search it would run with other settings (parameters)."},"running":{"type":"integer","minimum":0,"description":"The searches it runs for this server."},"slots":{"type":["integer","null"],"minimum":1,"description":"The searches it runs at a time (its BIOSEQUENCE_CONCURRENCY). Null for a worker refused before its hello was read."},"threads":{"type":["integer","null"],"minimum":1,"description":"The threads of each search (its BIOSEQUENCE_THREADS). Null as slots is."},"matched":{"type":"array","items":{"type":"string"},"description":"The snapshot and delta folders whose copy matches this server's, each a snapshot ID or <snapshotId>/<deltaId>. It takes searches of these alone."},"differ":{"type":"array","items":{"type":"string"},"description":"The folders this server holds that the worker holds differently. It takes no search of them until its copy matches."},"joinedAt":{"type":["string","null"],"format":"date-time","description":"When it joined. Null for a worker refused before it joined."},"lastContact":{"type":"string","format":"date-time","description":"When this server last heard from it."}}},"ExportRecord":{"type":"object","required":["at","user","export","format","file","rows","redacted"],"properties":{"at":{"type":"string","format":"date-time","description":"When the file was written."},"user":{"type":["string","null"],"description":"Who exported it."},"export":{"enum":["matches","patents","combined","case-references","case-all-references","workbook"]},"format":{"type":"object","required":["name","version","audience","type","sha256"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"audience":{"enum":["internal","external"]},"type":{"enum":["csv","tsv","jsonl","xlsx","zip"]},"sha256":{"type":"string","description":"The SHA-256 of the format's definition."}}},"file":{"type":"object","required":["sha256","bytes"],"properties":{"sha256":{"type":"string","description":"The SHA-256 of the file."},"bytes":{"type":"integer","minimum":0,"description":"Its size."}}},"rows":{"type":"integer","minimum":0,"description":"The rows in the file."},"redacted":{"type":"object","required":["rows","fields"],"properties":{"rows":{"type":"integer","minimum":0,"description":"Rows left out because a confidential set found them."},"fields":{"type":"integer","minimum":0,"description":"Fields left out or masked."}}}}},"HitRow":{"type":"object","description":"One hit.","properties":{"row":{"type":"integer","minimum":1,"description":"The row number, for alignments and marks."},"identityPct":{"type":"number"},"xLetters":{"type":["integer","null"],"minimum":0,"description":"The X letters (N in DNA) of the stored sequence that face a query letter in the alignment, counted apart from mismatches. 0 for an exact row; null for a pattern row, or when the alignments were not counted."},"identityXPct":{"type":["number","null"],"description":"Identity, X as a match: identityPct with each of those letters counted as a match. The score and identityPct stay as the engine wrote them."},"coveragePct":{"type":"number"},"evalue":{"type":"number"},"bits":{"type":"number"},"title":{"type":["string","null"]},"entryList":{"type":"array","items":{"type":"object","description":"A database entry.","properties":{"accession":{"type":"string"},"source":{"type":"string"},"description":{"type":"string"},"dated":{"type":["string","null"]},"link":{"type":["string","null"],"description":"Its record at UniProt or the ENA browser, where the source is known."}},"additionalProperties":true},"description":"The first database entries of the sequence by date, up to 5. entries counts them all."},"seqNos":{"type":"array","items":{"type":["integer","string"]},"description":"With publication only: the SEQ ID NOs of the sequence in that publication."},"folded":{"type":"object","description":"Only under a fold change: the hits with the same alignment that this row, the one first published, stands for.","properties":{"count":{"type":"integer","minimum":2,"description":"The hits, this one too."},"rows":{"type":"array","items":{"type":"integer","minimum":1},"maxItems":50,"description":"Their row numbers, earliest published first, up to 50."}}},"counted":{"type":"object","description":"Only under a countX change, on a row it counted again: the letter, the columns it counted, and the measures as the search gave them.","properties":{"letter":{"enum":["X","N"]},"columns":{"type":"integer","minimum":1},"identityPct":{"type":"number"},"queryIdentityPct":{"type":["number","null"]},"queryMatchPct":{"type":["number","null"]}}},"paperList":{"type":"array","items":{"type":"object"},"description":"The papers shown under the hit, earliest first, each with its citation lines and, with a paper folder, its PubMed day and marks, or the date Crossref gives the DOI of a paper PubMed holds no record of."},"paperDates":{"type":"array","items":{"type":"string"},"description":"Every paper the hit cites, with its day, as in the CSV column paper_dates. A date Crossref gives ends \"(Crossref)\"."},"paperMarks":{"type":"array","items":{"type":"string"},"description":"Each retraction, expression of concern or reinstatement of those papers, as in the CSV column paper_marks."},"filedFirst":{"type":"string","format":"date","description":"The earliest filing or priority date of the sequence's US and WO publications. Absent when they give none."},"firstPublishedBy":{"type":"string","description":"Only when firstPublished gives just a year or a month and another record of the sequence dates it earlier inside that span: the day by which the sequence was published, the last day of the month where that record gives only a month. publishedFrom reads it in place of firstPublished."},"filedBefore":{"type":"boolean","description":"Only on a row kept under publishedBefore because a US or WO publication of its sequence was filed or claims priority before the date, while its first publication is on or after it."},"firstPublication":{"type":"object","description":"The earliest publication of the sequence, which the title names, as in the CSV columns first_publication to first_priority. Absent when no publication of the sequence is known.","properties":{"label":{"type":"string","description":"Office, number and kind, such as \"US 20260345831-A1\"."},"kind":{"type":["string","null"]},"applicant":{"type":"string","description":"Empty when the records give none."},"applicationNumber":{"type":["string","null"],"description":"The application number, when the records give it."},"filed":{"type":["string","null"],"format":"date","description":"The filing date, when the records give it."},"priority":{"type":"array","description":"Every priority claim the records give, earliest first.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"number":{"type":"string","description":"The earlier application, such as \"US63627314\"."}}}}},"additionalProperties":true},"species":{"type":"array","description":"The organisms the records of the sequence state, most records first, up to 100, as in the CSV column species. An empty name is a record that states none. Absent on a search from before species.","items":{"type":"object","required":["name","records"],"properties":{"name":{"type":"string"},"taxon":{"type":"integer","minimum":1,"description":"Its NCBI taxon, when it is placed."},"group":{"enum":["human","mouse","rat","other-rodents","other-primates","camelids","other-mammals","other-animals","plants","fungi","bacteria","viruses","other","artificial","not-stated","not-matched"]},"records":{"type":"integer","minimum":0,"description":"The records that state it."}}}},"speciesMore":{"type":"integer","minimum":0,"description":"The other names the records state, past the 100 listed."},"taxa":{"type":"array","items":{"type":"integer","minimum":1},"description":"Every NCBI taxon of the records, as in the CSV column taxa."},"groups":{"type":"array","items":{"enum":["human","mouse","rat","other-rodents","other-primates","camelids","other-mammals","other-animals","plants","fungi","bacteria","viruses","other","artificial","not-stated","not-matched"]},"description":"Every species group of the records, in the order the filter lists them, as in the CSV column species_groups."},"variants":{"allOf":[{"$ref":"#/components/schemas/VariantsHit"}],"description":"What the search kept of a hit that is a reviewed human protein ClinVar places changes on: its letters' SHA-256, its UniProt accessions, its count of ClinVar variations and, for a protein search that realigned the query to it, the query's changes against it, each with the ClinVar records of the same change. Written when the search ran. Only on such a row."},"genes":{"type":"array","items":{"$ref":"#/components/schemas/GeneEntry"},"description":"The human genes the hit links to, by symbol: those its Swiss-Prot entries name, or, for a patent protein, those of each Swiss-Prot entry with the same SHA-256 and length. Written when the search ran. Only on a row that links to one."},"drugs":{"type":"array","items":{"$ref":"#/components/schemas/DrugEntry"},"description":"The drugs whose chains are the same sequence as the hit, highest stage first, as the search wrote them into its job. Only on a row that names one."}},"additionalProperties":true},"Charts":{"type":"object","description":"The numbers behind the result charts. A part that has nothing to draw says available: false and why (reason).","properties":{"version":{"type":"integer"},"date":{"type":["string","null"],"format":"date"},"dates":{"type":"boolean","description":"Whether the hits of the search have dates."},"charted":{"type":"integer","minimum":0,"description":"Hits the charts read: every filter but the cutoffs, the area and the date."},"listed":{"type":"integer","minimum":0,"description":"Of those, the hits the list shows."},"scatter":{"type":"object","description":"Identity against coverage. points: [coverage, identity, date group index, hits, 1 when inside the cutoffs and area, and the name of a single hit], on a grid of step percent.","properties":{},"additionalProperties":true},"alignment":{"type":"object","description":"Where the top hits align: query { number, name, length, letters }, unit, any (X or N), and bars, each with row, name, from, to, identity and runs of positions: differs, gaps and any.","properties":{},"additionalProperties":true},"years":{"type":"object","description":"Hits by year: kind (publications, families or hits), size (years a bar), bins [first year, counts by date group], undated counts, total.","properties":{},"additionalProperties":true}},"required":["version","charted","listed","scatter","alignment","years"],"additionalProperties":true},"SpeciesCounts":{"type":"object","required":["groups","species"],"properties":{"groups":{"type":"array","items":{"type":"object","required":["id","label","hits"],"properties":{"id":{"enum":["human","mouse","rat","other-rodents","other-primates","camelids","other-mammals","other-animals","plants","fungi","bacteria","viruses","other","artificial","not-stated","not-matched"]},"label":{"type":"string","description":"As the filter shows it, such as Human."},"hits":{"type":"integer","minimum":0,"description":"The hits with a record in the group."}}}},"species":{"type":"array","items":{"type":"object","required":["taxon","name","group","hits"],"properties":{"taxon":{"type":"integer","minimum":1},"name":{"type":"string","description":"NCBI's scientific name, or the name most of its records state. Empty when none is known."},"group":{"enum":["human","mouse","rat","other-rodents","other-primates","camelids","other-mammals","other-animals","plants","fungi","bacteria","viruses","other","artificial","not-stated","not-matched",null]},"hits":{"type":"integer","minimum":0,"description":"The hits with a record of the taxon."}}}}}},"HitPage":{"type":"object","required":["total","offset","limit","rows"],"properties":{"total":{"type":"integer","minimum":0,"description":"Hits after the filters."},"excluded":{"type":"integer","minimum":0,"description":"Hits marked excluded."},"changes":{"type":"integer","minimum":0,"description":"The changes in force that this page shows (GET /api/jobs/{id}/transforms); 0 with publication."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/HitRow"}},"queries":{"type":"array","items":{}}},"additionalProperties":true},"PublicationRow":{"type":"object","description":"One patent and its hits. With group=family, one family: its earliest member's row with the family's best Query Match and identity, its sequences and hits counted once across the members, and family.","properties":{"id":{"type":"string","description":"The publication ID. A family row has its earliest member's ID."},"office":{"type":["string","null"]},"number":{"type":["string","null"]},"kind":{"type":["string","null"]},"published":{"type":["string","null"]},"title":{"type":["string","null"]},"sequencesHit":{"type":"integer","minimum":0,"description":"Its sequences that hit."},"hits":{"type":"integer","minimum":0,"description":"Its hits."},"link":{"type":["string","null"]},"bestQueryMatch":{"type":["number","null"]},"bestIdentity":{"type":["number","null"]},"undated":{"type":"boolean"},"afterDate":{"type":"boolean","description":"Published on or after publishedBefore."},"dateGroup":{"enum":["before","filedBefore","later","undated",null],"description":"Where the publication falls against publishedBefore: before it; a US or WO publication from on or after it that was filed or claims priority before it; later; or undated. Null when no date is set."},"applicationNumber":{"type":["string","null"],"description":"The application number, when the records give it."},"filed":{"type":["string","null"],"format":"date","description":"The filing date, when the records give it."},"priority":{"type":"array","description":"Every priority claim the records give, earliest first.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"number":{"type":"string","description":"The earlier application, such as \"US63627314\"."}}}},"family":{"$ref":"#/components/schemas/Family"},"whyListed":{"type":"string","description":"Why the publication is listed, in fixed words: how its sequences match the query, where it falls against publishedBefore, and which publication of the result holding the query unchanged came first. Empty when the result has no rows for it."}},"additionalProperties":true},"Family":{"type":"object","description":"Only with group=family. How the family was formed and its members, earliest first, undated last.","required":["size","basis","shared","members","membersMore","ids"],"properties":{"size":{"type":"integer","minimum":0,"description":"Its members in this list. Excluded members, and with later=hide later members, are not in it."},"basis":{"enum":["priority","application","title","single"],"description":"priority: members share a priority claim, or one's application number is another's claim. application: members are publications of one application. title: the same title and first applicant, with no priority claim on record. single: a family of one."},"shared":{"type":["string","null"],"description":"The priority claim or application number most members carry, as the records write it, such as \"US 61/618868\". Null for title and single."},"members":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/FamilyMember"},"description":"The first 20 members."},"membersMore":{"type":"integer","minimum":0,"description":"Members after the first 20."},"ids":{"type":"array","items":{"type":"string"},"description":"Every member's publication ID, earliest first. Send it as ids to mark the family."},"kept":{"type":"integer","minimum":0,"description":"Its members marked keep. Equal to size when the whole family is kept."},"later":{"type":"integer","minimum":0,"description":"Only with later=hide: members from on or after the date, folded and counted in later.count."}}},"FamilyMember":{"type":"object","description":"One member of a family.","properties":{"id":{"type":"string"},"office":{"type":["string","null"]},"number":{"type":["string","null"]},"kind":{"type":["string","null"]},"published":{"type":["string","null"]},"filed":{"type":["string","null"]},"applicationNumber":{"type":["string","null"]},"priorityDate":{"type":["string","null"],"description":"Its earliest priority date."},"applicant":{"type":"string"},"link":{"type":["string","null"]},"bestQueryMatch":{"type":["number","null"]},"bestIdentity":{"type":["number","null"]},"sequencesHit":{"type":"integer","minimum":0,"description":"Its sequences that hit."},"dateGroup":{"enum":["before","filedBefore","later","undated",null],"description":"Where the publication falls against publishedBefore: before it; a US or WO publication from on or after it that was filed or claims priority before it; later; or undated. Null when no date is set."},"via":{"enum":["priority","application","title",null],"description":"How it joined the family. Null in a family of one."},"mark":{"enum":["keep","exclude"]},"markReason":{"type":"string"},"whyListed":{"type":"string","description":"Why the publication is listed, in fixed words: how its sequences match the query, where it falls against publishedBefore, and which publication of the result holding the query unchanged came first. Empty when the result has no rows for it."}},"additionalProperties":true},"ApplicantRow":{"type":"object","description":"One applicant and its patents.","properties":{"id":{"type":"string","description":"The row's key, empty for patents that name no applicant."},"name":{"type":"string","description":"The most used spelling, empty when no applicant is given."},"spellings":{"type":"array","items":{"type":"string"},"description":"The other spellings in the row."},"publications":{"type":"array","items":{"type":"object","description":"One patent.","properties":{"id":{"type":"string"},"label":{"type":"string"},"published":{"type":["string","null"]},"bestIdentity":{"type":["number","null"]},"link":{"type":["string","null"]}},"additionalProperties":true}},"earliest":{"type":["string","null"]},"bestIdentity":{"type":["number","null"],"description":"Null for an exact or pattern search."},"joins":{"type":"array","items":{"type":"object","description":"A join that made this row.","properties":{},"additionalProperties":true}},"ror":{"type":"array","items":{"type":"object","description":"A suggested ROR record.","properties":{"id":{"type":"string"},"display":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true},"ApplicantPage":{"type":"object","required":["total","publications","offset","limit","rows"],"properties":{"total":{"type":"integer","minimum":0,"description":"Applicant rows after the filters."},"publications":{"type":"integer","minimum":0,"description":"Patents after the filters."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ApplicantRow"}},"ror":{"type":["object","null"],"description":"The ROR release the suggestions come from, or null."}},"additionalProperties":true},"PublicationPage":{"type":"object","required":["total","offset","limit","rows"],"properties":{"total":{"type":"integer","minimum":0,"description":"Patents after the filters, or families with group=family."},"excluded":{"type":"integer","minimum":0,"description":"Patents marked excluded."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/PublicationRow"}},"later":{"type":"object","description":"Only with later=hide: the publications folded.","required":["count","usWoNoFilingDate"],"properties":{"count":{"type":"integer","minimum":0,"description":"Publications from on or after the date, folded."},"usWoNoFilingDate":{"type":"integer","minimum":0,"description":"Of those, US and WO publications with neither a filing date nor a priority date on record."}}},"publications":{"type":"integer","minimum":0,"description":"Only with group=family: the patents the families hold."},"groups":{"type":"object","description":"Only with group=applicant, office or year.","required":["by","named","missing","shown"],"properties":{"by":{"enum":["applicant","office","year"]},"named":{"type":"integer","minimum":0,"description":"The groups with a name: applicants, offices or years."},"missing":{"type":"integer","minimum":0,"description":"The rows with no applicant, office or date."},"shown":{"type":"array","description":"The groups this page shows rows of, in order.","items":{"type":"object","required":["key","label","count","start","continued"],"properties":{"key":{"type":"string","description":"The group's key, as each of its rows has it in groupKey; empty for the rows with no applicant, office or date."},"label":{"type":"string","description":"Its name as shown."},"count":{"type":"integer","minimum":0,"description":"Its rows, on every page."},"start":{"type":"integer","minimum":0,"description":"Where its first row is in the whole list."},"continued":{"type":"boolean","description":"The group began on an earlier page."}}}}}},"bases":{"type":"object","description":"Only with group=family: how many families each basis formed.","properties":{"priority":{"type":"integer","minimum":0,"description":"Families formed by a shared priority claim."},"application":{"type":"integer","minimum":0,"description":"Families formed by one application."},"title":{"type":"integer","minimum":0,"description":"Families formed by title and applicant."},"single":{"type":"integer","minimum":0,"description":"Families of one."}}}},"additionalProperties":true},"Alignment":{"type":"object","description":"One alignment.","properties":{"queryAlignment":{"type":"string"},"midline":{"type":"string"},"subjectAlignment":{"type":"string"}},"additionalProperties":true},"MarkRequest":{"type":"object","required":["target","action"],"properties":{"target":{"enum":["publication","row"]},"id":{"description":"The patent ID or the hit row number."},"ids":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string"},"description":"Up to 500 patent IDs, such as a family row's family.ids. Each gets its own mark. target must be publication."},"action":{"enum":["keep","exclude","clear"]},"reason":{"type":"string","description":"Why, up to 500 characters."}}},"MarkAnswer":{"type":"object","description":"mark with id, marks with ids.","properties":{"mark":{"type":"object","description":"The mark as stored.","properties":{},"additionalProperties":true},"marks":{"type":"array","items":{"type":"object","description":"One mark as stored.","properties":{},"additionalProperties":true}}}},"TransformRequest":{"type":"object","required":["kind"],"description":"One change. query names a query by its number, from 1; a search of one query needs none.","properties":{"kind":{"enum":["fold","countX","cover","differ","intersect"]},"query":{"type":"integer","minimum":1,"description":"cover and differ: the query."},"from":{"type":"integer","minimum":1,"description":"cover: the first query position."},"to":{"type":"integer","minimum":1,"description":"cover: the last query position."},"positions":{"description":"differ: up to 50 query positions, as an array or as text such as \"3, 7, 12\".","oneOf":[{"type":"array","items":{"type":"integer","minimum":1},"minItems":1,"maxItems":50},{"type":"string"}]},"all":{"type":"boolean","description":"differ: true keeps the hits that differ at every position; false, the default, at any of them."},"jobs":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":5,"description":"intersect: the other finished searches."}}},"TransformStep":{"type":"object","required":["seq","at","step","label","line"],"properties":{"seq":{"type":"integer","minimum":1,"description":"Its number, which undo names."},"at":{"type":"string","format":"date-time","description":"When it was added."},"step":{"type":"object","description":"The change as kept: its kind and what it reads. An intersect keeps the titles of the searches it names.","properties":{},"additionalProperties":true},"label":{"type":"string","description":"Its name, as the page shows it."},"line":{"type":"string","description":"What it does to the whole list, such as \"6 of 7 hits cover query positions 1 to 20.\""}}},"TransformEvent":{"type":"object","required":["seq","at","action","line"],"properties":{"seq":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time","description":"When."},"action":{"enum":["add","undo"]},"step":{"type":"object","description":"add: the change.","properties":{},"additionalProperties":true},"target":{"type":"integer","minimum":1,"description":"undo: the change it took back."},"line":{"type":"string","description":"As the Search record lists it, such as \"Undid: Count an X as a match\"."}}},"Transforms":{"type":"object","required":["steps","history","stamp"],"properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/TransformStep"},"description":"The changes in force, in the order they were added."},"history":{"type":"array","items":{"$ref":"#/components/schemas/TransformEvent"},"description":"Every change and undo, oldest first."},"stamp":{"type":"string","description":"Changes whenever the history does."}}},"TransformAnswer":{"type":"object","required":["transform","steps","history","stamp"],"properties":{"transform":{"type":"object","description":"The change or the undo as kept: seq, at, action, and step or target.","properties":{},"additionalProperties":true},"steps":{"type":"array","items":{"$ref":"#/components/schemas/TransformStep"},"description":"The changes in force, in the order they were added."},"history":{"type":"array","items":{"$ref":"#/components/schemas/TransformEvent"},"description":"Every change and undo, oldest first."},"stamp":{"type":"string","description":"Changes whenever the history does."}}},"Comparison":{"type":"object","required":["searches","matchedBy","total","parts","part","count","offset","limit","rows"],"properties":{"searches":{"type":"array","minItems":2,"maxItems":6,"items":{"$ref":"#/components/schemas/ComparedSearch"}},"matchedBy":{"enum":["subject","sequence","target"],"description":"How the sequences were matched."},"total":{"type":"integer","minimum":0,"description":"The sequences any of the searches found."},"parts":{"type":"array","description":"The parts that hold a sequence: one search first, then two and so on.","items":{"type":"object","required":["id","searches","label","count"],"properties":{"id":{"type":"string","description":"The numbers of the searches that found its sequences, lowest first, such as 1,2."},"searches":{"type":"array","items":{"type":"integer","minimum":1,"maximum":6}},"label":{"type":"string","description":"Its name as the page shows it, such as Only in search 1, In both or In all 3."},"count":{"type":"integer","minimum":0,"description":"Its sequences."}}}},"part":{"type":["string","null"],"description":"The part rows lists, or any for every sequence; null when the searches found nothing."},"count":{"type":"integer","minimum":0,"description":"The sequences of that part, or with any of them all."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ComparedSequence"}}}},"ComparedSearch":{"type":"object","description":"One search compared.","properties":{"number":{"type":"integer","minimum":1,"maximum":6,"description":"Its place in jobs."},"id":{"type":"string"},"title":{"type":"string"},"method":{"type":"string","description":"Its method as the search form names it, such as Exact text or Alignment (BLAST)."},"engine":{"type":["string","null"]},"set":{"type":["string","null"]},"setLabel":{"type":"string","description":"Its set's name as shown."},"snapshotId":{"type":["string","null"]},"queries":{"type":"integer","minimum":0,"description":"Its queries."},"query":{"type":["string","null"],"description":"Its query, when it has one."},"rows":{"type":"integer","minimum":0,"description":"Its hit rows."},"sequences":{"type":"integer","minimum":0,"description":"The sequences it found."}},"required":["number","id","method","rows","sequences"],"additionalProperties":true},"ComparedSequence":{"type":"object","description":"One sequence, with what each search found of it.","properties":{"subject":{"type":"string"},"accession":{"type":"string","description":"Its accession; empty for a stored sequence with none."},"title":{"type":"string"},"firstPublished":{"type":["string","null"]},"publications":{"type":"integer","minimum":0,"description":"Its publications."},"offices":{"type":"array","items":{"type":"string"}},"subjectLength":{"type":["integer","null"]},"found":{"type":"array","description":"An entry for each search, in order; null where that search did not find the sequence.","items":{"type":["object","null"],"properties":{"row":{"type":"integer","minimum":1,"description":"The search's best row for the sequence, as its hit routes number it."},"query":{"type":"integer","minimum":1,"description":"The query of that row, by number: 1 is the first of queries."},"queryMatchPct":{"type":["number","null"]},"identityPct":{"type":["number","null"]},"coveragePct":{"type":["number","null"]},"evalue":{"type":["number","null"]},"bits":{"type":["number","null"]},"strand":{"type":["string","null"]},"rows":{"type":"integer","minimum":1,"description":"The search's rows for the sequence."},"occurrences":{"type":["integer","null"],"description":"How many times an exact or pattern search found it, over those rows."}}}}},"required":["subject","accession","title","found"],"additionalProperties":true},"BatchRequest":{"type":"object","required":["searches"],"properties":{"searches":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/SearchRequest"}}}},"BatchCreated":{"type":"object","required":["id","createdAt","jobs"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","description":"When it was made."},"jobs":{"type":"array","items":{"type":"string","format":"uuid"},"description":"One job for each search, in order."}}},"BatchJob":{"type":"object","required":["index","id","status"],"properties":{"index":{"type":"integer","minimum":0,"description":"The search, counting from 0."},"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri","description":"The search's own page, /results/{id}. Absent for a search no longer on the server."},"title":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled","interrupted","missing"]},"createdAt":{"type":"string","format":"date-time","description":"When it was queued."},"startedAt":{"type":"string","format":"date-time","description":"When it started."},"finishedAt":{"type":"string","format":"date-time","description":"When it ended."},"error":{"type":"string"},"hits":{"type":"integer","minimum":0,"description":"Hits found, counted as on the job."}}},"Batch":{"type":"object","required":["id","createdAt","total","counts","finished","jobs"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","description":"When it was made."},"total":{"type":"integer","minimum":0,"description":"Searches in it."},"counts":{"type":"object","description":"Jobs in each state.","properties":{"queued":{"type":"integer","minimum":0,"description":"Jobs queued."},"running":{"type":"integer","minimum":0,"description":"Jobs running."},"completed":{"type":"integer","minimum":0,"description":"Jobs completed."},"failed":{"type":"integer","minimum":0,"description":"Jobs failed."},"cancelled":{"type":"integer","minimum":0,"description":"Jobs cancelled."},"interrupted":{"type":"integer","minimum":0,"description":"Jobs interrupted."},"missing":{"type":"integer","minimum":0,"description":"Jobs missing."}}},"finished":{"type":"boolean","description":"True when no job is queued or running."},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/BatchJob"}}}},"MultiHits":{"type":"object","required":["batch","by","minQueries","filters","searches","queries","matchedBy","levels","total","offset","limit","rows"],"properties":{"batch":{"type":"object","required":["id","createdAt","total","finished"],"properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","description":"When it was made."},"total":{"type":"integer","minimum":0,"description":"Searches in it."},"finished":{"type":"boolean","description":"True when no search is queued or running."}}},"by":{"enum":["publication","sequence"]},"minQueries":{"type":"integer","minimum":1},"filters":{"type":"object","description":"The filters applied to each search, as given.","properties":{"identity":{"type":"string"},"coverage":{"type":"string"},"publishedFrom":{"type":"string"},"publishedBefore":{"type":"string"},"office":{"type":"string"}}},"searches":{"type":"object","required":["total","counted","waiting","notCounted"],"properties":{"total":{"type":"integer","minimum":0,"description":"Searches in the batch."},"counted":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches counted, by number: 1 is the batch's first."},"waiting":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches that have not finished."},"notCounted":{"type":"array","items":{"type":"object","required":["number","id","reason"],"properties":{"number":{"type":"integer","minimum":1},"id":{"type":"string"},"reason":{"enum":["failed","missing","whole","unpublished"],"description":"failed: it did not finish; missing: it is no longer on this server; whole: it keeps its results in one record; unpublished: it has no publication records"}}}}}},"queries":{"type":"integer","minimum":0,"description":"The queries of the counted searches, each counted once."},"matchedBy":{"enum":["subject","target"],"description":"subject when every counted search read one set or database; target when they read more than one, and each stored sequence counts the queries of the searches that read its own set or database."},"levels":{"type":"array","description":"How many rows each number of queries hit, fewest queries first.","items":{"type":"object","required":["queries","count"],"properties":{"queries":{"type":"integer","minimum":1},"count":{"type":"integer","minimum":0,"description":"Rows that exactly that many queries hit."}}}},"total":{"type":"integer","minimum":0,"description":"Rows that at least minQueries queries hit."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/MultiHitPublication"},{"$ref":"#/components/schemas/MultiHitSequence"}]}}}},"MultiHitPublication":{"type":"object","description":"A publication, with the queries that hit it.","properties":{"id":{"type":"string","description":"Its key, as the Patents tab gives it."},"office":{"type":"string"},"number":{"type":"string"},"kind":{"type":"string"},"published":{"type":["string","null"]},"applicant":{"type":"string"},"title":{"type":"string"},"link":{"type":["string","null"]},"queries":{"type":"integer","minimum":1,"description":"How many of the batch's queries hit it."},"queryNames":{"type":"array","items":{"type":"string"},"description":"Their names, in the batch's order."},"searches":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches that found it, by number."},"sequencesHit":{"type":"integer","minimum":0,"description":"Its stored sequences that any of the counted searches hit."},"bestQueryMatch":{"type":["number","null"]},"bestIdentity":{"type":["number","null"]}},"required":["id","queries","queryNames","searches","sequencesHit"],"additionalProperties":true},"MultiHitSequence":{"type":"object","description":"A stored sequence, with the queries that hit it.","properties":{"subject":{"type":"string"},"accession":{"type":"string","description":"Its accession; empty for a stored sequence with none."},"title":{"type":"string"},"set":{"type":"string","description":"The snapshot set or attached database it is stored in."},"firstPublished":{"type":["string","null"]},"publications":{"type":"integer","minimum":0,"description":"Its publications."},"subjectLength":{"type":["integer","null"]},"queries":{"type":"integer","minimum":1,"description":"How many of the batch's queries hit it."},"queryNames":{"type":"array","items":{"type":"string"},"description":"Their names, in the batch's order."},"searches":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches that found it, by number."},"bestQueryMatch":{"type":["number","null"]},"bestIdentity":{"type":["number","null"]}},"required":["subject","set","queries","queryNames","searches"],"additionalProperties":true},"Token":{"type":"object","required":["id","name","createdAt","expiresAt","state"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"When it was made."},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When it stops working."},"state":{"enum":["live","expired","revoked"]},"revokedAt":{"type":"string","format":"date-time","description":"When it was revoked."},"revokedBy":{"enum":["account","admin"]}}},"TokenList":{"type":"object","required":["tokens","days","choices","limit"],"properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/Token"}},"days":{"type":"integer","minimum":0,"description":"The longest a new token may last; 0 when tokens are off."},"choices":{"type":"array","items":{"type":"integer"},"description":"The lengths the page offers."},"limit":{"type":"integer","minimum":0,"description":"Live tokens an account may have."}}},"ConnectorToken":{"allOf":[{"$ref":"#/components/schemas/Token"},{"type":"object","required":["account","owners"],"properties":{"account":{"type":["string","null"],"description":"The admin who made it, by email or user name. The token acts as that admin."},"owners":{"type":"array","items":{"type":"string"},"description":"The accounts it may make cases for."},"revokedByName":{"type":"string","description":"The admin who revoked it."}}}]},"ConnectorManifest":{"type":"object","additionalProperties":false,"required":["source","sourceId","title","owner","files"],"properties":{"version":{"const":1,"description":"The manifest's version: 1."},"source":{"type":"string","description":"The system that sends the documents, such as its product name.","maxLength":40,"pattern":"^[A-Za-z0-9][A-Za-z0-9 ._-]*$"},"sourceId":{"type":"string","description":"That system's own ID for the document set, such as its matter or docket number. With source, it names the case these documents go into.","maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9 ._:/#,()-]*$"},"title":{"type":"string","description":"The name of a new case. A case made before keeps its own.","maxLength":200},"owner":{"type":"string","description":"The account that will own the case, as it signs in: one the token may name."},"applicationNumber":{"type":"string","description":"The application number, for a new case. A publication's XML gives one when this is absent.","maxLength":40},"priorArtDate":{"type":"string","format":"date","description":"The prior art date, for a new case. A publication's XML gives its filing date when this is absent."},"priorArtDateBasis":{"enum":["filing","priority","other"],"default":"other","description":"What priorArtDate is. Only with priorArtDate."},"files":{"type":"array","minItems":1,"maxItems":5,"description":"The files, each sent as a part named file. At most one listing.","items":{"type":"object","additionalProperties":false,"required":["name","role","sha256"],"properties":{"name":{"type":"string","description":"The part's filename, with no folder.","maxLength":200},"role":{"enum":["claims","listing","publication-xml"],"description":"claims: claims as text, Word or XML. listing: a WIPO ST.26 sequence listing. publication-xml: a publication's full-text XML, read for its claims, and for its listing when it holds one."},"sha256":{"type":"string","description":"Its SHA-256, as 64 hexadecimal digits.","pattern":"^[0-9a-fA-F]{64}$"}}}}}},"ConnectorImport":{"type":"object","required":["case","source","sourceId","files"],"properties":{"case":{"type":"object","required":["id","title","owner","made","url"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"owner":{"type":"string","description":"Its owner, as the account signs in."},"made":{"type":"boolean","description":"true when this call made it."},"url":{"type":"string","description":"Where the owner opens it.","format":"uri"}}},"source":{"type":"string"},"sourceId":{"type":"string"},"files":{"type":"array","items":{"type":"object","required":["name","role","sha256","result"],"properties":{"name":{"type":"string","description":"The file's name in the manifest."},"role":{"enum":["claims","listing","publication-xml"]},"sha256":{"type":"string","description":"Its SHA-256.","pattern":"^[0-9a-f]{64}$"},"result":{"enum":["imported","already","refused"],"description":"imported now, already in the case from an earlier call, or refused with the reason."},"reason":{"type":"string","description":"Why it was refused, as the importer said."},"claims":{"type":"integer","minimum":0,"description":"A file of claims or publication XML: the claims it gave."},"features":{"type":"integer","minimum":0,"description":"The features the rules found in them."},"set":{"type":"integer","minimum":1,"description":"The case's set of claims it made."},"warnings":{"type":"array","items":{"type":"string"},"description":"What the claims reader noted."},"sequences":{"type":"integer","minimum":0,"description":"A listing: the sequences it holds."},"listingId":{"type":"string","format":"uuid","description":"A listing: the listing it made."},"listing":{"type":"object","required":["result"],"description":"A publication's XML that holds its listing: what became of the listing.","properties":{"result":{"enum":["imported","refused"]},"reason":{"type":"string"},"sequences":{"type":"integer","minimum":0},"listingId":{"type":"string","format":"uuid"}}}}}}}},"AdminToken":{"allOf":[{"$ref":"#/components/schemas/Token"},{"type":"object","properties":{"account":{"type":["string","null"],"description":"Its account by email or user name."},"ref":{"type":"string","description":"The start of the account ID."},"revokedByName":{"type":"string","description":"The admin who revoked it."}}}]},"Usage":{"type":"object","description":"Searches and other work by account and day, and the compute the searches recorded: cpuSeconds, wallSeconds and bytesRead added up, and peakMemoryBytes the most one search held, each null where no search recorded it.","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"days":{"type":"integer"},"totals":{"type":"object","description":"The totals: searches, other work, accounts, and the compute.","properties":{},"additionalProperties":true},"rows":{"type":"array","items":{"type":"object","description":"One account on one day: searches, other work, and the compute.","properties":{},"additionalProperties":true}},"sets":{"type":"array","items":{"type":"object","description":"One set on one day: day, set (its name on the page), searches, and the compute.","properties":{},"additionalProperties":true}},"limits":{"type":"object","required":["cpuHoursPerDay","confirmMinutes","largeSets"],"description":"The compute limits this server runs with, each null or empty when off.","properties":{"cpuHoursPerDay":{"type":["number","null"],"description":"The CPU hours each account's searches may use in a UTC day."},"confirmMinutes":{"type":["integer","null"],"description":"A search estimated to take longer asks first."},"largeSets":{"type":"array","items":{"type":"string"},"description":"The sets whose searches always ask first, by their names on the page."}}},"license":{"type":"object","description":"The license, on a licensed server, as in the status.","properties":{},"additionalProperties":true}},"additionalProperties":true},"CombinedSearchTarget":{"type":"object","description":"A snapshot set, by snapshotId and set (with deltas to search Main plus New), or an attached database, by databaseId alone, as GET /api/databases lists them.","properties":{"snapshotId":{"type":"string","description":"The snapshot."},"set":{"type":"string","description":"The set in the snapshot, such as patent_nucl."},"deltas":{"type":"array","maxItems":1000,"items":{"type":"string"},"description":"Weekly additions to search with the snapshot, in order from the first."},"databaseId":{"type":"string","description":"An attached database, instead of a snapshot set."}}},"CombinedSearchRequest":{"type":"object","required":["targets"],"description":"The body of POST /api/jobs with targets in place of one set. program names the query type, and each target gets the program its own type calls for: DNA against a protein set runs blastx, protein against a DNA set runs tblastn. Exact text, Pattern, Smith-Waterman and the global methods compare like with like, so every target must hold the query's type; without program, the first target sets it.","properties":{"fasta":{"type":"string","description":"The queries in FASTA or PIR (NBRF), or one sequence as plain letters. A PIR record such as >P1;name has a description line after its header and ends with *; its header gives its type, which must match the search."},"engine":{"enum":["auto","blast","exact","pattern","within","ssearch36","ggsearch36","glsearch36"],"description":"auto (the default on a snapshot) picks the tool for each query. within (Within k changes) lists every sequence of a snapshot set of the query's own type within k changes of each query, DNA on both strands, with no score or E-value cut, where kscan is installed: queries of up to 64 letters, k up to 5, and up to 50,000 hits a query, the closest first. It takes k and changes, and refuses any other search setting. ssearch36 (Smith-Waterman), glsearch36 (global on the query) and ggsearch36 (global on both sequences) compare each query with every sequence of a snapshot set of its own type, DNA on both strands, where FASTA36 is installed. Each DNA query reads the whole set, so a DNA search whose estimate passes the server's time limit for one search answers 400 and does not start."},"program":{"enum":["blastn","blastp","blastx","tblastn"],"description":"The query type and direction."},"task":{"type":"string","description":"A BLAST task, such as blastn-short. BLAST only."},"evalue":{"type":"number","minimum":1e-20,"maximum":1000},"maxHits":{"type":"integer","minimum":1,"maximum":5000},"short":{"type":"boolean","description":"Settings for short queries."},"matrix":{"enum":["BLOSUM45","BLOSUM50","BLOSUM62","BLOSUM80","BLOSUM90","PAM30","PAM70","PAM250"],"description":"The protein scoring matrix, for blastp, blastx and tblastn and for ssearch36, glsearch36 and ggsearch36 on protein. Default BLOSUM62, or PAM30 for a blastp query of 30 residues or fewer. Gap costs start at BLAST's default pair for the matrix, and Query Match is scored under it."},"gapOpen":{"type":"integer","minimum":0,"description":"The cost to open a gap; a gap of n letters costs gapOpen plus n times gapExtend. BLAST takes only the pairs it lists for the matrix, or for blastn's match and mismatch scores, and a request with another pair answers 400 naming the pairs it takes. FASTA36 takes 0 to 99. A cost left out keeps its default."},"gapExtend":{"type":"integer","minimum":0,"description":"The cost of each letter in a gap. FASTA36 takes 1 to 99."},"wordSize":{"type":"integer","minimum":2,"maximum":100,"description":"BLAST only: the length of the words a search starts from, 4 to 100 for blastn and 2 to 7 for the others. Default 11 for blastn (7 under 50 bases), 3 for blastp (2 for 30 residues or fewer), and 3 for blastx and tblastn."},"lowComplexity":{"type":"boolean","description":"BLAST only: the low-complexity filter, DUST for blastn and SEG for the others. Default on for blastn (off under 50 bases), blastx and tblastn, and off for blastp."},"geneticCode":{"enum":[1,2,3,4,5,6,9,10,11,12,13,14,15,16,21,22,23,24,25,26,27,28,29,30,31,33],"description":"blastx and tblastn only: the genetic code that reads the DNA, the query in blastx and the stored sequences in tblastn, as NCBI numbers the codes. Default 1, Standard."},"pattern":{"type":"string","description":"The pattern of a pattern search, in the syntax patternSyntax names."},"patternSyntax":{"enum":["prosite","regex"],"default":"prosite","description":"How the pattern is written: prosite, such as AAGCTT-x(2,6)-GGATCC, or regex, a regular expression such as AAGCTT.{2,6}GGATCC or (GGATCC|AAGCTT). It is never guessed from the pattern. A regular expression takes letters, [AG], [^P], ., {m}, {m,n}, {m,}, ?, + (up to 1,000), * (up to 1,000), up to 8 choices and ^ and $; backreferences, lookarounds and repeats on a group are refused. The search record keeps the expression and its PROSITE translation."},"strands":{"type":"string","description":"Which strands an exact or pattern search reads."},"k":{"type":"integer","minimum":0,"maximum":5,"description":"Within k changes only: the most changes a hit may have, below each query's length."},"changes":{"enum":["substitutions","edits"],"description":"Within k changes only: substitutions counts letters changed in place; edits also counts letters inserted or deleted. An N, an X or another IUPAC code in a query, or a code in a stored protein, matches any letter it stands for, so it is never a change. Stored DNA is read letter for letter: a stored N or other code matches only the same code."},"title":{"type":"string","description":"A name for the combined search, up to 500 characters. Each job is named after it, with its set."},"followUp":{"$ref":"#/components/schemas/FollowUpFrom"},"confirmed":{"type":"boolean","description":"true runs a search this server would ask about first: one estimated to take longer than its time for asking, or one of a large set. Without it, such a search answers 409 with confirm and does not start."},"targets":{"type":"array","minItems":2,"maxItems":8,"items":{"$ref":"#/components/schemas/CombinedSearchTarget"},"description":"Each set once. Where to search goes here, never beside targets."}}},"CombinedSearchJob":{"type":"object","required":["index","set","label","type","jobId","status","program","translated","secondsLeft"],"properties":{"index":{"type":"integer","minimum":0,"description":"The target, counting from 0."},"set":{"type":"string","description":"The set's name, such as patent_nucl, or the database ID. The references list names sets this way."},"label":{"type":"string","description":"The set as the page names it, such as Patent DNA."},"type":{"enum":["nucl","prot"]},"snapshotId":{"type":"string","description":"The snapshot, for a snapshot set."},"deltas":{"type":"array","items":{"type":"string"},"description":"The deltas searched with it, when any."},"databaseId":{"type":"string","description":"The database, for an attached database."},"jobId":{"type":"string","format":"uuid","description":"The job: its own hits, patents and CSV files read as any search's."},"status":{"enum":["queued","running","completed","failed","cancelled","interrupted","missing"],"description":"missing when the job is no longer on the server."},"program":{"enum":["blastn","blastp","blastx","tblastn",null]},"engine":{"type":["string","null"],"description":"The method the job runs, as on the job's parameters."},"translated":{"type":"boolean","description":"True for blastx and tblastn, whose rows have no Query Match."},"createdAt":{"type":"string","format":"date-time","description":"When it was queued."},"startedAt":{"type":"string","format":"date-time","description":"When it started."},"finishedAt":{"type":"string","format":"date-time","description":"When it ended."},"error":{"type":"string","description":"Why it failed."},"hits":{"type":"integer","minimum":0,"description":"Hits found, counted as on the job."},"estimateSeconds":{"type":["number","null"],"description":"The job's own estimate, or null where the server has not yet timed a search like it."},"secondsLeft":{"type":["integer","null"],"minimum":0,"description":"All of the estimate while it waits, the rest while it runs, 0 once it has ended, and null with no estimate."},"recordSha256":{"type":"string","description":"The SHA-256 fingerprint of the job's search record, once it has completed."}}},"CombinedSearch":{"type":"object","required":["id","title","createdAt","total","done","finished","secondsLeft","counts","failed","members"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"When it was made."},"url":{"type":"string","format":"uri","description":"Its result's own page, /results/group/{id}, at the address the request came to. Older links, /?group={id}, go on to it."},"total":{"type":"integer","minimum":0,"description":"Its targets."},"done":{"type":"integer","minimum":0,"description":"Targets whose job has completed."},"finished":{"type":"boolean","description":"True when no job is waiting or running."},"secondsLeft":{"type":["integer","null"],"minimum":0,"description":"What the jobs still waiting or running have left by their estimates, added up over the searches the server runs at once: 0 when every job has ended, and null while one has no estimate."},"counts":{"type":"object","description":"Jobs in each state.","properties":{"queued":{"type":"integer","minimum":0,"description":"Jobs queued."},"running":{"type":"integer","minimum":0,"description":"Jobs running."},"completed":{"type":"integer","minimum":0,"description":"Jobs completed."},"failed":{"type":"integer","minimum":0,"description":"Jobs failed."},"cancelled":{"type":"integer","minimum":0,"description":"Jobs cancelled."},"interrupted":{"type":"integer","minimum":0,"description":"Jobs interrupted."},"missing":{"type":"integer","minimum":0,"description":"Jobs missing."}}},"failed":{"type":"array","description":"The targets whose job failed, was interrupted or is no longer on the server. The other targets stand, and the list holds what they found.","items":{"type":"object","required":["index","set","label","status"],"properties":{"index":{"type":"integer","minimum":0,"description":"The target, counting from 0."},"set":{"type":"string"},"label":{"type":"string"},"status":{"enum":["failed","interrupted","missing"]},"error":{"type":"string","description":"Why it failed."}}}},"members":{"type":"array","items":{"$ref":"#/components/schemas/CombinedSearchJob"},"description":"One for each target, in order."},"earlier":{"type":"array","description":"Only after a run again with only: the jobs it replaced, oldest first.","items":{"type":"object","required":["index","jobId","replacedAt"],"properties":{"index":{"type":"integer","minimum":0,"description":"The target, counting from 0."},"jobId":{"type":"string","format":"uuid"},"replacedAt":{"type":"string","format":"date-time","description":"When it was replaced."}}}},"exports":{"type":"array","items":{"$ref":"#/components/schemas/ExportRecord"},"description":"Once its references have been exported: each export, oldest first."}}},"ReferenceMatch":{"type":"object","required":["jobId","set","row","query","queryMatch","identity","coverage"],"properties":{"jobId":{"type":"string","format":"uuid"},"set":{"type":"string","description":"The set that found it, as members[].set names it."},"row":{"type":"integer","minimum":1,"description":"The hit row in that job, for its alignment and marks."},"query":{"type":"integer","minimum":1,"description":"The query, by number: 1 is the first of queries."},"queryMatch":{"type":["number","null"],"description":"Null for a translated search."},"identity":{"type":["number","null"]},"coverage":{"type":["number","null"]}}},"Reference":{"type":"object","description":"One reference: a publication, whichever sets found it, or a database entry, found by its accession in any of them. With group=family, a publication row stands for its family: its earliest member's row, with the best measures, the sets and the queries of all its members.","properties":{"id":{"type":"string","description":"The publication ID, or for an entry \"entry:\" and its accession without the version, such as entry:BE000001. Marks name references by it."},"referenceKind":{"enum":["patent","entry"]},"office":{"type":["string","null"]},"number":{"type":["string","null"]},"kind":{"type":["string","null"],"description":"A publication's kind code, such as B2. Absent on an entry."},"published":{"type":["string","null"],"description":"The publication date, or an entry's earliest date: its record's own or its earliest paper's."},"applicant":{"type":"string"},"title":{"type":["string","null"],"description":"The publication's title, or the entry's description."},"link":{"type":["string","null"]},"applicationNumber":{"type":["string","null"],"description":"The application number, when the records give it."},"filed":{"type":["string","null"],"format":"date","description":"The filing date, when the records give it."},"priority":{"type":"array","description":"Every priority claim the records give, earliest first.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"number":{"type":"string","description":"The earlier application, such as \"US63627314\"."}}}},"accession":{"type":"string","description":"Only on an entry: the accession, with its version when the record gives one."},"source":{"type":["string","null"],"description":"Only on an entry: the source that holds it, such as uniprot-swissprot or ena-est. Null for a hit an attached database's index does not know."},"description":{"type":"string","description":"Only on an entry: its description."},"papers":{"type":"integer","minimum":0,"description":"Only on an entry: its papers."},"sets":{"type":"array","items":{"type":"string"},"description":"The sets that found it, in the order of the targets."},"queries":{"type":"array","items":{"type":"integer","minimum":1},"description":"The queries that found it, by number."},"sequencesHit":{"type":"integer","minimum":0,"description":"Its sequences that hit, a sequence counted once in each set."},"hits":{"type":"integer","minimum":0,"description":"Its hit rows, across the sets."},"seqNos":{"type":"array","items":{},"description":"A publication's SEQ ID NOs that hit, across the sets."},"bestQueryMatch":{"type":["number","null"],"description":"The best across the sets. Null when only translated searches found it, and such a row sorts last under Query Match in either order."},"bestIdentity":{"type":["number","null"]},"undated":{"type":"boolean"},"afterDate":{"type":"boolean","description":"Published on or after publishedBefore."},"dateGroup":{"enum":["before","filedBefore","later","undated",null],"description":"Where the publication falls against publishedBefore: before it; a US or WO publication from on or after it that was filed or claims priority before it; later; or undated. Null when no date is set."},"best":{"type":["object","null"],"description":"The best match: highest Query Match, then identity, coverage and bit score, a match with no value last.","properties":{"jobId":{"type":"string","format":"uuid"},"set":{"type":"string"},"row":{"type":"integer"},"query":{"type":"integer"}}},"matches":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ReferenceMatch"},"description":"The first 20 matches: the best of each set and query, then the rest, best first."},"matchesMore":{"type":"integer","minimum":0,"description":"Matches after the first 20."},"mark":{"enum":["keep","exclude"],"description":"The newest mark of the jobs that hold it."},"markReason":{"type":"string"},"family":{"$ref":"#/components/schemas/Family"}},"additionalProperties":true},"ReferencePage":{"type":"object","required":["total","excluded","offset","limit","rows","members","queries"],"properties":{"total":{"type":"integer","minimum":0,"description":"References after the filters, or rows with group=family."},"excluded":{"type":"integer","minimum":0,"description":"References marked excluded, among those set and kind choose."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Reference"}},"members":{"type":"array","description":"Each target's job and whether the list holds its results.","items":{"type":"object","required":["index","set","label","jobId","status","included"],"properties":{"index":{"type":"integer","minimum":0,"description":"The target, counting from 0."},"set":{"type":"string"},"label":{"type":"string"},"jobId":{"type":"string","format":"uuid"},"status":{"enum":["queued","running","completed","failed","cancelled","interrupted","missing"]},"included":{"type":"boolean","description":"True once its job has completed and its rows are in the list."}}}},"queries":{"type":"array","items":{"type":"string"},"description":"The query names, in order."},"later":{"type":"object","description":"Only with later=hide: the publications folded.","required":["count","usWoNoFilingDate"],"properties":{"count":{"type":"integer","minimum":0,"description":"Publications from on or after the date, folded."},"usWoNoFilingDate":{"type":"integer","minimum":0,"description":"Of those, US and WO publications with neither a filing date nor a priority date on record."}}},"publications":{"type":"integer","minimum":0,"description":"Only with group=family: the patents the families hold."},"bases":{"type":"object","description":"Only with group=family: how many families each basis formed.","properties":{"priority":{"type":"integer","minimum":0,"description":"Families formed by a shared priority claim."},"application":{"type":"integer","minimum":0,"description":"Families formed by one application."},"title":{"type":"integer","minimum":0,"description":"Families formed by title and applicant."},"single":{"type":"integer","minimum":0,"description":"Families of one."}}}},"additionalProperties":true},"ReferenceMarkRequest":{"type":"object","required":["action"],"description":"Give id or ids, not both.","properties":{"id":{"type":"string","description":"One reference ID, as the list gives it."},"ids":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string"},"description":"Up to 500 reference IDs, such as a family row's family.ids. Each gets its own mark."},"action":{"enum":["keep","exclude","clear"]},"reason":{"type":"string","description":"Why, up to 500 characters."}}},"ReferenceMarkAnswer":{"type":"object","required":["marks"],"properties":{"marks":{"type":"array","items":{"type":"object","required":["id","action","reason","at","jobs"],"properties":{"id":{"type":"string"},"action":{"enum":["keep","exclude","clear"]},"reason":{"type":"string"},"at":{"type":"string","format":"date-time","description":"When it was written."},"jobs":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The jobs it was written to. Each holds the reference, and its own patents list or hits show the mark."}}}}}},"CaseReference":{"type":"object","required":["rank","id","referenceKind","label","keys","best","matched","searches","mark","marks","words"],"additionalProperties":true,"properties":{"rank":{"type":["integer","null"],"minimum":1,"description":"Its place in the feature among the references shown."},"id":{"type":"string","description":"The publication ID, or for an entry \"entry:\" and its accession without the version."},"referenceKind":{"enum":["patent","entry"]},"label":{"type":"string","description":"A publication as the page names it, such as WO 2011113872-A1, or an entry's accession."},"office":{"type":["string","null"]},"number":{"type":["string","null"]},"kind":{"type":["string","null"]},"accession":{"type":["string","null"]},"source":{"type":["string","null"]},"published":{"type":["string","null"]},"applicant":{"type":"string"},"title":{"type":"string"},"link":{"type":["string","null"]},"applicationNumber":{"type":["string","null"],"description":"The application number, when the records give it."},"filed":{"type":["string","null"],"format":"date","description":"The filing date, when the records give it."},"priority":{"type":"array","description":"Every priority claim the records give, earliest first.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"number":{"type":"string","description":"The earlier application, such as \"US63627314\"."}}}},"seqNos":{"type":"array","items":{},"description":"The publication's own SEQ ID NOs that matched, up to 20; seqNosMore counts the rest."},"dateClass":{"enum":["before","filedBefore","undated","later",null]},"keys":{"type":"object","required":["meets","coverage","dateClass","queryMatch","evalue"],"description":"The rank keys, in order, as plain values.","properties":{"meets":{"type":["boolean","null"],"description":"Whether the best match meets the feature's threshold. Null in the group \"other\", which has none."},"coverage":{"type":["number","null"],"description":"The share of the claimed region the best match covers, in percent."},"dateClass":{"enum":["before","filedBefore","undated","later",null],"description":"Null when the case has no prior art date."},"queryMatch":{"type":["number","null"],"description":"Null for a translated search."},"evalue":{"type":["number","null"]}}},"best":{"type":["object","null"],"description":"The best match in this feature, naming its search by number, its job and hit row, and its query as the claims name it.","properties":{"search":{"type":"integer","minimum":1},"jobId":{"type":"string","format":"uuid"},"set":{"type":["string","null"]},"row":{"type":"integer","minimum":1},"query":{"type":"string"},"seqIdNo":{"type":["integer","null"],"description":"The claimed SEQ ID NO the query is."},"meets":{"type":["boolean","null"]},"coverage":{"type":["number","null"]},"queryIdentity":{"type":["number","null"]},"identity":{"type":["number","null"]},"queryMatch":{"type":["number","null"]},"evalue":{"type":["number","null"]},"bits":{"type":["number","null"]},"alignLength":{"type":["integer","null"]},"changes":{"type":["integer","null"],"minimum":0,"description":"Only under a threshold with a count of allowed changes: the match's substitutions, deletions, additions and query letters outside the alignment (with a fragment length, those inside it). Null where the search gives none to count, as a translated search, or where the claim names only some kinds and the search does not tell them apart."},"changesByKind":{"type":["object","null"],"description":"Only under a threshold with a count of allowed changes: how many of the match's changes are additions, deletions (query letters outside the alignment among them) and substitutions. Null where the search does not tell them apart.","properties":{"addition":{"type":"integer","minimum":0},"deletion":{"type":"integer","minimum":0},"substitution":{"type":"integer","minimum":0}}},"reading":{"type":"object","description":"Only where the query's letters cover other residues: the match read that way. Its queryIdentity and identity count those positions as matches, changes counts substitutions, deletions, additions and query letters outside the alignment, and covered names each letter, what it reads as, its positions and how many of them lie outside the alignment. The best match's own queryIdentity and identity stay the search's.","properties":{"queryIdentity":{"type":"number"},"identity":{"type":"number"},"changes":{"type":"integer","minimum":0},"covered":{"type":"array","items":{"type":"object","properties":{"letter":{"type":"string"},"means":{"type":"string"},"positions":{"type":"integer","minimum":1},"outside":{"type":"integer","minimum":0}}}}}}}},"matched":{"type":"object","description":"How many of the feature's SEQ ID NOs it matches (count), how many of those meet the threshold (meeting), of how many (of), and the first 20 it matches.","properties":{"count":{"type":"integer","minimum":0,"description":"SEQ ID NOs matched."},"meeting":{"type":"integer","minimum":0,"description":"SEQ ID NOs matched at the threshold."},"of":{"type":"integer","minimum":0,"description":"The feature's SEQ ID NOs."},"seqIds":{"type":"array","items":{"type":"integer"}}}},"matches":{"type":"integer","minimum":0,"description":"Its matches in this feature, across the searches."},"searches":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches that found it for this feature, by number."},"sets":{"type":"array","items":{"type":["string","null"]}},"mark":{"enum":["keep","exclude","mixed",null],"description":"keep when every mark is Keep; exclude when every search that found it excluded it; mixed otherwise."},"marks":{"type":"array","description":"Each search's own mark.","items":{"type":"object","properties":{"search":{"type":"integer"},"jobId":{"type":"string","format":"uuid"},"action":{"enum":["keep","exclude"]},"reason":{"type":"string"},"at":{"type":"string","format":"date-time","description":"When it was written."}}}},"words":{"type":"object","description":"What the page says: whether it meets the threshold, its date against the prior art date, how many SEQ ID NOs it matches, and its marks. Empty where nothing applies.","properties":{"meets":{"type":"string"},"date":{"type":"string"},"matched":{"type":"string"},"mark":{"type":"string"}}},"whyListed":{"type":"string","description":"A publication only: why it is listed, in fixed words, as on Patents: how its sequences match the query, where it falls against the prior art date, and which publication of the case's results holding the query unchanged came first."}}},"CaseReferenceGroup":{"type":"object","required":["id","kind","claim","words","threshold","searches","total","excluded","offset","limit","references"],"additionalProperties":true,"properties":{"id":{"type":"string","description":"The feature ID of the SEQ ID reference or written sequence, or \"other\"."},"kind":{"enum":["seqId","sequence","other"]},"claim":{"type":["integer","null"]},"words":{"type":"string","description":"The claim's words for the feature."},"description":{"type":"string"},"seqIds":{"type":"array","items":{"type":"integer"}},"threshold":{"type":["object","null"],"description":"identity null and changes null read as written. Null in the group \"other\".","properties":{"identity":{"type":["number","null"]},"fragment":{"type":["object","null"]},"changes":{"type":["object","null"],"description":"The lowest count of allowed changes linked to the feature: a match meets with max changes or fewer of the kinds it names and none of another kind. A claim that names no kind lists all three. Conservative substitutions count as any substitution: Sequences does not check them.","properties":{"max":{"type":"integer","minimum":1},"kinds":{"type":"array","items":{"enum":["addition","deletion","substitution"]}},"conservative":{"type":"boolean"}}},"wildcards":{"type":["array","null"],"description":"The letters the claim reads as any residue.","items":{"type":"object","properties":{"letter":{"type":"string"},"type":{"enum":["nucl","prot"]}}}}}},"thresholdWords":{"type":"string","description":"Such as 95%, as written, 90% over 20 or more nucleotides, up to 3 changes, up to 3 substitutions, or 90% or up to 3 changes."},"features":{"type":"array","items":{"type":"string"},"description":"The features the group stands for."},"searches":{"type":"array","items":{"type":"integer","minimum":1},"description":"The searches that serve it, by number, finished or not."},"total":{"type":"integer","minimum":0,"description":"The references the list holds: those not excluded, or with excluded=true the excluded ones."},"excluded":{"type":"integer","minimum":0,"description":"References that every search that found them excluded."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"references":{"type":"array","items":{"$ref":"#/components/schemas/CaseReference"}}}},"CaseAllReference":{"type":"object","required":["rank","id","referenceKind","label","bestRank","meets","features","searches","sets","files","mark"],"additionalProperties":true,"properties":{"rank":{"type":["integer","null"],"minimum":1,"description":"Its place in the list across the case. Null for a reference excluded under every feature."},"id":{"type":"string","description":"The publication ID, or for an entry \"entry:\" and its accession without the version."},"referenceKind":{"enum":["patent","entry"]},"label":{"type":"string"},"office":{"type":["string","null"]},"number":{"type":["string","null"]},"kind":{"type":["string","null"]},"accession":{"type":["string","null"]},"source":{"type":["string","null"]},"published":{"type":["string","null"]},"applicant":{"type":"string"},"title":{"type":"string"},"link":{"type":["string","null"]},"applicationNumber":{"type":["string","null"],"description":"The application number, when the records give it."},"filed":{"type":["string","null"],"format":"date","description":"The filing date, when the records give it."},"priority":{"type":"array","description":"Every priority claim the records give, earliest first.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"number":{"type":"string","description":"The earlier application, such as \"US63627314\"."}}}},"dateClass":{"enum":["before","filedBefore","undated","later",null]},"family":{"type":["object","null"],"description":"Its patent family among the case's publications, as the Patents tab groups them: a label, how many of the case's publications it holds, and what the grouping rests on.","properties":{"label":{"type":"string"},"size":{"type":"integer","minimum":1},"basis":{"type":"string"}}},"bestRank":{"type":["integer","null"],"minimum":1,"description":"The best rank it reaches under any feature."},"meets":{"type":"integer","minimum":0,"description":"The claim features whose threshold its best match meets, where it is not excluded."},"features":{"type":"array","description":"Each feature that lists it, in claim order.","items":{"type":"object","required":["id","rank","excluded","meets","best","mark"],"additionalProperties":true,"properties":{"id":{"type":"string","description":"The feature, such as F2, or other."},"kind":{"enum":["seqId","sequence","other"]},"claim":{"type":["integer","null"]},"thresholdWords":{"type":"string"},"rank":{"type":["integer","null"],"description":"Its rank under the feature. Null where it is excluded there."},"excluded":{"type":"boolean"},"meets":{"type":["boolean","null"]},"coverage":{"type":["number","null"]},"queryMatch":{"type":["number","null"]},"evalue":{"type":["number","null"]},"best":{"type":["object","null"],"description":"Its best match under the feature, as CaseReference.best gives it."},"matched":{"type":"object"},"mark":{"enum":["keep","exclude","mixed",null]},"marks":{"type":"array","items":{"type":"object"}},"words":{"type":"object","properties":{"meets":{"type":"string"},"matched":{"type":"string"},"mark":{"type":"string"}}}}}},"searches":{"type":"array","items":{"type":"integer","minimum":1},"description":"Every search that found it, by number."},"sets":{"type":"array","items":{"type":["string","null"]}},"files":{"type":"array","items":{"type":"string"},"description":"The imported result files that found it, by name."},"mark":{"enum":["keep","exclude","mixed",null],"description":"The marks' one state when they agree under every feature (Kept, Excluded, Mixed), null when they do not or there is none."},"words":{"type":"object","properties":{"date":{"type":"string"}}}}},"CaseAllReferencePage":{"type":"object","required":["version","priorArtDate","total","excluded","offset","limit","references","searches"],"properties":{"version":{"type":"string","description":"The version of the rules of the list."},"priorArtDate":{"type":["string","null"]},"priorArtDateBasis":{"enum":["filing","priority","other",null]},"total":{"type":"integer","minimum":0,"description":"The references the list holds: those not excluded under every feature, or with excluded=true those that are."},"excluded":{"type":"integer","minimum":0,"description":"References excluded under every feature that lists them."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"references":{"type":"array","items":{"$ref":"#/components/schemas/CaseAllReference"}},"searches":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The case's searches, as GET /api/cases/{id}/references gives them."}}},"CaseReferencePage":{"type":"object","required":["version","priorArtDate","rankKeys","groups","searches"],"properties":{"version":{"type":"string","description":"The version of the grouping and ranking rules."},"priorArtDate":{"type":["string","null"]},"priorArtDateBasis":{"enum":["filing","priority","other",null]},"rankKeys":{"type":"array","items":{"enum":["meets","coverage","dateClass","queryMatch","evalue"]}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CaseReferenceGroup"},"description":"In claim order, the group \"other\" last."},"searches":{"type":"array","description":"The case's searches, numbered as the Report step numbers them.","items":{"type":"object","properties":{"number":{"type":"integer","minimum":1},"jobId":{"type":"string","format":"uuid"},"title":{"type":"string"},"kind":{"enum":["plan","added","imported"]},"version":{"type":["integer","null"]},"item":{"type":["string","null"]},"set":{"type":["string","null"]},"label":{"type":"string"},"status":{"type":"string"},"included":{"type":"boolean","description":"True when its results are in the list."},"problem":{"type":["string","null"],"description":"Why it adds nothing, such as a search still running."}}}}}},"CaseSummary":{"type":"object","required":["kind","key","label","templateId","templateSha256","factsSha256","draft","problem","excluded","decision","accepted"],"properties":{"kind":{"enum":["search","reference","seqId","case","results"]},"search":{"type":"string","description":"For a summary of a search: its job ID.","format":"uuid"},"feature":{"type":"string","description":"For a summary of a reference: the claim feature, such as F2, or other."},"reference":{"type":"string","description":"For a summary of a reference: its ID, as GET /api/cases/{id}/references gives it."},"seqId":{"type":"integer","minimum":1,"description":"For a summary of a claimed SEQ ID NO: the number."},"key":{"type":"string","description":"The kind and the subject in one string."},"label":{"type":"string","description":"The subject as the page names it: the case, the results, search 2, WO 2011113872-A1 under F3, or SEQ ID NO: 1."},"templateId":{"type":"string","description":"The template that filled it in, such as conductbiology.summaries.template.reference.v1. A change to the words of a template is a new ID."},"templateSha256":{"type":"string","description":"The SHA-256 of the template's words."},"factsSha256":{"type":"string","description":"The SHA-256 of the facts it was filled in from. A decision sends it back."},"draft":{"type":"object","required":["text","sentences","quotes"],"properties":{"text":{"type":"string","description":"The summary: one paragraph, up to 3,000 characters."},"sentences":{"type":"array","items":{"type":"object","required":["text","source"],"properties":{"text":{"type":"string"},"source":{"type":["object","null"],"additionalProperties":true,"description":"Where its values come from: kind (case, claim, paragraph, search, row, publication or entry) and label, with the claim, paragraph, search, row or link it names. Null for a sentence in the words of the template alone."}}}},"quotes":{"type":"array","description":"For a claimed SEQ ID NO: each sentence quoted from the description, with its paragraph.","items":{"type":"object","properties":{"paragraph":{"type":"string"},"quote":{"type":"string"}}}}}},"problem":{"type":["array","null"],"items":{"type":"string"},"description":"Why the draft failed its checks, so it cannot be decided or printed. Null when it passes, as every template's draft does."},"excluded":{"type":"boolean","description":"True for a reference the examiner has excluded since: the report leaves its summary out."},"decision":{"type":["object","null"],"description":"The last decision on it, or null.","properties":{"action":{"enum":["accept","edit","reject"]},"at":{"type":"string","format":"date-time","description":"When it was made."},"user":{"type":"string"},"text":{"type":"string","description":"For an edit: the examiner's words."},"current":{"type":"boolean","description":"True while the template, its words, the facts and the draft all match what is filled in now. False after a change in the case: the summary waits for a new decision."}}},"accepted":{"type":["string","null"],"description":"The words the report prints: the draft, or the examiner's words for an edit, while an accept or an edit holds. Null otherwise, and while a model's draft is printed in its place."},"modelDraft":{"type":["object","null"],"description":"For the case, its results and a claimed SEQ ID NO: The newest draft by the model to pass its checks, marked (Pilot), or null. The template's text stays the default.","properties":{"id":{"type":"string","description":"The draft, such as D3."},"at":{"type":"string","format":"date-time","description":"When it was asked for."},"user":{"type":"string"},"model":{"type":"string","description":"The model that drafted it."},"promptId":{"type":"string","description":"The fixed prompt, such as conductbiology.summaries.draft.case.v1."},"promptSha256":{"type":"string","description":"The SHA-256 of the prompt's words."},"factsSha256":{"type":"string","description":"The SHA-256 of the facts the model read."},"text":{"type":"string","description":"The draft."},"seconds":{"type":["number","null"],"description":"How long the call took."},"tokens":{"type":["object","null"],"description":"The tokens the model's server reported for the call, or null when it reported none.","properties":{"prompt":{"type":["integer","null"],"minimum":0},"answer":{"type":["integer","null"],"minimum":0}}},"current":{"type":"boolean","description":"True while the case gives the facts the draft read. False after a change in the case: it cannot be decided, and a new draft is asked for."},"decision":{"type":["object","null"],"description":"The last decision on the draft, with current true while it holds."},"accepted":{"type":["string","null"],"description":"The words the report prints in place of the template's text while an accept or an edit holds. Null otherwise."}}},"modelTry":{"type":["object","null"],"description":"A newer try that was dropped by its checks or failed, without its words, or null.","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","description":"When it was asked for."},"user":{"type":"string"},"model":{"type":"string"},"state":{"enum":["dropped","failed"]},"failed":{"type":"array","items":{"enum":["quote","number"]},"description":"The checks it failed."},"reasons":{"type":"array","items":{"type":"string"}},"error":{"type":["string","null"],"description":"Why the call failed."},"seconds":{"type":["number","null"]},"tokens":{"type":["object","null"],"description":"The tokens the model's server reported for the call, or null when it reported none.","properties":{"prompt":{"type":["integer","null"],"minimum":0},"answer":{"type":["integer","null"],"minimum":0}}}}}}},"CaseSummaryDraft":{"type":"object","required":["id","kind","label","state","model","promptId","promptSha256"],"description":"One try at a draft by the model.","properties":{"kind":{"enum":["case","results","seqId","explanation"]},"search":{"type":"string","description":"For a kept publication: the search's job ID.","format":"uuid"},"reference":{"type":"string","description":"For a kept publication: its ID, as GET /api/cases/{id}/explanations gives it."},"seqId":{"type":"integer","minimum":1,"description":"For a claimed SEQ ID NO: the number."},"id":{"type":"string","description":"The draft, such as D3."},"at":{"type":"string","format":"date-time","description":"When it was asked for."},"user":{"type":"string"},"label":{"type":"string","description":"The subject as the page names it."},"state":{"enum":["passed","dropped"],"description":"passed: it is shown beside the template's text. dropped: a check failed, and it is never shown."},"model":{"type":"string"},"promptId":{"type":"string"},"promptSha256":{"type":"string"},"factsSha256":{"type":"string"},"seconds":{"type":["number","null"]},"tokens":{"type":["object","null"],"description":"The tokens the model's server reported for the call, or null when it reported none.","properties":{"prompt":{"type":["integer","null"],"minimum":0},"answer":{"type":["integer","null"],"minimum":0}}},"text":{"type":"string","description":"For a draft that passed: its words."},"failed":{"type":"array","items":{"enum":["quote","number"]},"description":"For a dropped draft: the checks it failed."},"reasons":{"type":"array","items":{"type":"string"},"description":"For a dropped draft: why."}}},"CaseSummaryDraftRequest":{"type":"object","required":["kind"],"description":"Name what to draft: the case, its results, a claimed SEQ ID NO, or a publication kept in a search.","properties":{"kind":{"enum":["case","results","seqId","explanation"]},"search":{"type":"string","description":"For a kept publication: the search's job ID.","format":"uuid"},"reference":{"type":"string","description":"For a kept publication: its ID, as GET /api/cases/{id}/explanations gives it."},"seqId":{"type":"integer","minimum":1,"description":"For a claimed SEQ ID NO: the number."},"background":{"type":"boolean","description":"True starts the call and answers 202 with drafting at once; GET /api/cases/{id}/summaries reads it until it ends."},"user":{"type":"string","description":"On a server of your own with no sign-in, your name, up to 100 characters. A hosted server names the signed-in account."}}},"CaseSummaries":{"type":"object","required":["version","templates","top","specification","seqIds","seqIdsMore","seqIdsFilled","summaries"],"properties":{"version":{"type":"string","description":"The version of the facts and the rules the summaries follow."},"templates":{"type":"object","description":"Each kind's template: its ID and the SHA-256 of its words.","additionalProperties":{"type":"object","required":["id","sha256"],"properties":{"id":{"type":"string"},"sha256":{"type":"string"}}}},"top":{"type":"integer","minimum":0,"description":"How many of each feature's first references get a summary. Kept ones get one too."},"specification":{"type":["object","null"],"description":"Null when the claims came without a description.","properties":{"paragraphs":{"type":"integer","minimum":0,"description":"The description's paragraphs."}}},"seqIds":{"type":"array","description":"The claimed SEQ ID NOs, up to 2,000, each with the claims that recite it and the paragraphs that cite it, by their keys.","items":{"type":"object","required":["seqId","claims","paragraphs"],"properties":{"seqId":{"type":"integer","minimum":1},"claims":{"type":"array","items":{"type":"integer"}},"paragraphs":{"type":"array","items":{"type":"string"}}}}},"seqIdsMore":{"type":"integer","minimum":0,"description":"Claimed SEQ ID NOs after the first 2,000."},"seqIdsFilled":{"type":"integer","minimum":0,"description":"How many claimed SEQ ID NOs, from the first, have a summary here."},"summaries":{"type":"array","items":{"$ref":"#/components/schemas/CaseSummary"},"description":"The case summary, then the results summary, then the searches' summaries in search order, then the references' by feature and rank, then the claimed SEQ ID NOs'."},"model":{"type":["object","null"],"description":"The model the server names for drafts (Pilot), or null when it names none and nothing is drafted.","properties":{"name":{"type":"string"},"seconds":{"type":"number","description":"The time limit of a call."},"answerTokens":{"type":"integer","minimum":0,"description":"The most answer tokens a call asks for."},"maxFacts":{"type":"integer","minimum":0,"description":"The most characters of facts a call sends."},"kinds":{"type":"array","items":{"enum":["case","results","seqId","explanation"]}},"version":{"type":"string","description":"The version of the facts, the prompts and the checks."},"prompts":{"type":"object","description":"Each kind's prompt: its ID and the SHA-256 of its words.","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"sha256":{"type":"string"}}}}}},"drafting":{"type":["object","null"],"description":"The draft the model is making for this case now, with its subject, label, model, startedAt and seconds so far, or null."},"busy":{"type":"boolean","description":"True while the model answers another request, for another case or for claim suggestions."},"drafts":{"type":"array","description":"The drafts of why a kept publication counts: each subject with label, modelDraft and modelTry.","items":{"type":"object","description":"A kept publication's drafts.","properties":{"kind":{"enum":["case","results","seqId","explanation"]},"search":{"type":"string","description":"For a kept publication: the search's job ID.","format":"uuid"},"reference":{"type":"string","description":"For a kept publication: its ID, as GET /api/cases/{id}/explanations gives it."},"seqId":{"type":"integer","minimum":1,"description":"For a claimed SEQ ID NO: the number."},"modelDraft":{"type":["object","null"],"description":"The newest draft by the model to pass its checks, marked (Pilot), or null. The template's text stays the default.","properties":{"id":{"type":"string","description":"The draft, such as D3."},"at":{"type":"string","format":"date-time","description":"When it was asked for."},"user":{"type":"string"},"model":{"type":"string","description":"The model that drafted it."},"promptId":{"type":"string","description":"The fixed prompt, such as conductbiology.summaries.draft.case.v1."},"promptSha256":{"type":"string","description":"The SHA-256 of the prompt's words."},"factsSha256":{"type":"string","description":"The SHA-256 of the facts the model read."},"text":{"type":"string","description":"The draft."},"seconds":{"type":["number","null"],"description":"How long the call took."},"tokens":{"type":["object","null"],"description":"The tokens the model's server reported for the call, or null when it reported none.","properties":{"prompt":{"type":["integer","null"],"minimum":0},"answer":{"type":["integer","null"],"minimum":0}}},"current":{"type":"boolean","description":"True while the case gives the facts the draft read. False after a change in the case: it cannot be decided, and a new draft is asked for."},"decision":{"type":["object","null"],"description":"The last decision on the draft, with current true while it holds."},"accepted":{"type":["string","null"],"description":"The words the report prints in place of the template's text while an accept or an edit holds. Null otherwise."}}},"modelTry":{"type":["object","null"],"description":"A newer try that was dropped by its checks or failed, without its words, or null.","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time","description":"When it was asked for."},"user":{"type":"string"},"model":{"type":"string"},"state":{"enum":["dropped","failed"]},"failed":{"type":"array","items":{"enum":["quote","number"]},"description":"The checks it failed."},"reasons":{"type":"array","items":{"type":"string"}},"error":{"type":["string","null"],"description":"Why the call failed."},"seconds":{"type":["number","null"]},"tokens":{"type":["object","null"],"description":"The tokens the model's server reported for the call, or null when it reported none.","properties":{"prompt":{"type":["integer","null"],"minimum":0},"answer":{"type":["integer","null"],"minimum":0}}}}}},"additionalProperties":true}},"cost":{"type":"object","description":"What the case's drafts have cost: calls, seconds, the prompt and answer tokens the model's server reported, and unreported, the calls that reported none.","properties":{"calls":{"type":"integer","minimum":0,"description":"Calls."},"seconds":{"type":"number"},"promptTokens":{"type":"integer","minimum":0,"description":"Prompt tokens."},"answerTokens":{"type":"integer","minimum":0,"description":"Answer tokens."},"unreported":{"type":"integer","minimum":0,"description":"Calls with no tokens reported."}},"additionalProperties":true}}},"CaseSummaryDecision":{"type":"object","required":["kind","action"],"description":"Name the summary by its kind and its subject: search; feature and reference; seqId; or the kind alone for case and results. A decision on a model's draft names the draft by draftId, and a kept publication's by explanation with search and reference.","properties":{"kind":{"enum":["search","reference","seqId","case","results","explanation"]},"search":{"type":"string","description":"For a summary of a search: its job ID.","format":"uuid"},"feature":{"type":"string","description":"For a summary of a reference: the claim feature, such as F2, or other."},"reference":{"type":"string","description":"For a summary of a reference: its ID, as GET /api/cases/{id}/references gives it."},"seqId":{"type":"integer","minimum":1,"description":"For a summary of a claimed SEQ ID NO: the number."},"action":{"enum":["accept","edit","reject"]},"factsSha256":{"type":"string","description":"For a template's summary: the factsSha256 of the summary you read. When its facts changed since, the answer is 409: read it again.","pattern":"^[0-9a-f]{64}$"},"draftId":{"type":"string","description":"For a model's draft: the id of the draft you read, such as D3.","pattern":"^D[1-9][0-9]{0,8}$"},"text":{"type":"string","description":"For an edit: your summary, one paragraph of up to 3,000 characters. Line breaks and runs of spaces read as one space."},"user":{"type":"string","description":"On a server of your own with no sign-in, your name, up to 100 characters. A hosted server names the signed-in account."}}},"VariantsHit":{"type":"object","required":["sha256","accessions","clinvar"],"properties":{"sha256":{"type":"string","description":"The SHA-256 of the hit's letters, in lowercase."},"accessions":{"type":"array","items":{"type":"string"},"description":"The reviewed human UniProt accessions with these letters."},"clinvar":{"type":"integer","minimum":0,"description":"How many ClinVar variations are placed on the protein, each counted once."},"tool":{"type":"string","description":"The program that aligned the query with the protein exactly, such as ssearch36. tool, from, to, changes and unread are given only where the search realigned the query to the protein."},"from":{"type":"integer","minimum":1,"description":"The first position of the protein the exact alignment covers."},"to":{"type":"integer","minimum":1,"description":"The last position of the protein it covers."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/QueryChange"},"description":"Where the query differs from the protein within the alignment, in the protein's numbering and in order."},"unread":{"type":"integer","minimum":0,"description":"Stretches where the query differs that are not named, as they hold X or another letter that is not one amino acid."}}},"QueryChange":{"type":"object","required":["change","position","kind","known"],"properties":{"change":{"type":"string","description":"The change in HGVS protein form with three-letter codes and Ter for a stop, such as p.Val600Glu, p.Lys5del, p.Gln10dup or p.Cys28delinsTrpVal."},"position":{"type":"integer","minimum":1,"description":"The position the change starts at, after a deletion, insertion or duplication is moved as far toward the end as gives the same protein."},"kind":{"enum":["substitution","deletion","insertion","duplication","delins"]},"known":{"type":"array","items":{"$ref":"#/components/schemas/ClinvarRecord"},"description":"The ClinVar variations that record the same change on this protein. Empty when ClinVar records none, which does not show that the change is new."}}},"ClinvarRecord":{"type":"object","required":["variation","significance","review","public"],"properties":{"variation":{"type":"string","description":"The ClinVar variation ID."},"significance":{"type":"string","description":"ClinVar's germline classification, empty where it gives none."},"review":{"type":"string","description":"Its review status."},"public":{"type":["string","null"],"format":"date","description":"The day ClinVar first made the record public, or null where no file gives it."}}},"VariantsReference":{"type":"object","required":["sha256","length","accessions","refseq","clinvar","release","significance","offset","limit","total","significances","changes"],"properties":{"sha256":{"type":"string"},"length":{"type":"integer","minimum":1,"description":"How many letters the protein has."},"accessions":{"type":"array","items":{"type":"object","required":["accession","entry","geneId","symbol"],"properties":{"accession":{"type":"string","description":"The UniProt accession."},"entry":{"type":"string","description":"The entry name, such as BRAF_HUMAN."},"geneId":{"type":["string","null"],"description":"The NCBI Gene ID the entry gives, or null where it gives none or several."},"symbol":{"type":["string","null"],"description":"The first gene name the entry gives, or null where it gives none."}}}},"refseq":{"type":"array","items":{"type":"string"},"description":"The RefSeq proteins ClinVar names whose letters these are, such as NP_004324.2."},"clinvar":{"type":"integer","minimum":0,"description":"How many ClinVar variations are placed on the protein, each counted once."},"release":{"type":"string","description":"The data release, such as protein-variants-2026-11-08-0.1.0."},"significance":{"type":["string","null"],"description":"The classification asked for, or null for all."},"offset":{"type":"integer","minimum":0,"description":"Where the page starts."},"limit":{"type":"integer","minimum":0,"description":"The page size."},"total":{"type":"integer","minimum":0,"description":"The changes of the classification asked for."},"significances":{"type":"array","items":{"type":"object","required":["value","count"],"properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":0,"description":"Changes with it."}}},"description":"Each classification on the protein with how many changes have it, most first."},"changes":{"type":"array","items":{"type":"object","required":["position","change","variation","significance","review","public","type","name"],"properties":{"position":{"type":"integer","minimum":1},"change":{"type":"string","description":"The change, in the form a query change takes."},"variation":{"type":"string","description":"The ClinVar variation ID."},"significance":{"type":"string","description":"Its germline classification, empty where ClinVar gives none."},"review":{"type":"string","description":"Its review status."},"public":{"type":["string","null"],"format":"date"},"type":{"type":"string","description":"The variant type, such as single nucleotide variant."},"name":{"type":"string","description":"ClinVar's name for the variation."}}}}}},"GeneEntry":{"type":"object","required":["symbol","name","ncbiGene","hgnc","how","accessions"],"properties":{"symbol":{"type":"string","description":"The gene symbol, as HGNC approves it."},"name":{"type":"string","description":"The gene name."},"ncbiGene":{"type":"string","description":"The NCBI Gene ID."},"hgnc":{"type":["string","null"],"description":"The HGNC ID, such as HGNC:3430; null when HGNC names none."},"how":{"type":"string","enum":["stated","same-sequence"],"description":"stated: the hit's Swiss-Prot entry names the gene. same-sequence: the hit's sequence is the same as that of the Swiss-Prot entries in accessions, which name it."},"accessions":{"type":"array","items":{"type":"string"},"description":"The Swiss-Prot accessions that give the gene."}}},"DrugEntry":{"type":"object","required":["drug","source","name","match","stage","credit"],"properties":{"drug":{"type":"string","description":"The drug's ID at its source: a ChEMBL ID, or a GSRS record's UNII."},"source":{"enum":["chembl","gsrs"]},"name":{"type":"string","description":"Its name as the source writes it, empty when it gives none."},"match":{"enum":["chain","domains","bases"],"description":"What is the same: the whole chain, variable domains, or an oligonucleotide's bases with U read as T."},"domains":{"type":"array","items":{"enum":["heavy","light"]},"description":"With match domains, the variable domains the hit holds whole."},"also":{"type":"array","items":{"type":"object","required":["drug","source","credit"],"properties":{"drug":{"type":"string"},"source":{"enum":["chembl","gsrs"]},"credit":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string"}}},"description":"The drug's other record, with its source's credit, where it holds a variable domain this record does not: ChEMBL's and GSRS's records of one antibody can hold different chains, and `domains` then lists the domains of both."},"stage":{"enum":["APPROVED","PHASE_3","PHASE_2","PHASE_1","EARLY_PHASE_1","CLINICAL","PRECLINICAL","NONE"],"description":"The highest stage from ChEMBL's max_phase. NONE when no source states one."},"approved":{"type":"string","description":"The year ChEMBL gives for its first approval."},"publicSince":{"type":"string","format":"date","description":"The day it was first public, where a source gives one."},"credit":{"type":"string","description":"The source's credit."},"license":{"type":"string","description":"The license of the source's data, CC BY-SA 3.0 for ChEMBL. Absent for GSRS, which states none."},"licenseUrl":{"type":"string","description":"The license's address."}}}},"parameters":{"Offset":{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},"Order":{"name":"order","in":"query","schema":{"enum":["asc","desc"]}},"HitSort":{"name":"sort","in":"query","description":"identityX sorts by Identity with an X (N in DNA) in the stored sequence counted as a match.","schema":{"enum":["score","bits","evalue","identity","identityX","coverage","queryIdentity","queryMatch","occurrences"],"default":"score"}},"PublicationSort":{"name":"sort","in":"query","schema":{"enum":["bestQueryMatch","bestIdentity","published","sequencesHit","hits"]}},"Strand":{"name":"strand","in":"query","schema":{"enum":["plus","minus"]}},"Text":{"name":"text","in":"query","description":"Text to find in a hit, up to 200 characters.","schema":{"type":"string","maxLength":200}},"JobText":{"name":"text","in":"query","description":"Text to find in a job's name, or in the name of the set or database it searched, in any case. Up to 200 characters.","schema":{"type":"string","maxLength":200}},"JobStatus":{"name":"status","in":"query","description":"The states to keep, separated by commas, such as queued,running.","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["queued","running","completed","failed","cancelled","interrupted"]}}},"Identity":{"name":"identity","in":"query","description":"The lowest identity, in percent.","schema":{"type":"number","minimum":0,"maximum":100}},"XAsMatch":{"name":"xAsMatch","in":"query","description":"true holds identity to Identity, X as a match (identityXPct): an X in a stored protein, or an N in stored DNA, counts as a match. Exact and pattern searches keep their meaning.","schema":{"enum":["true","false"],"default":"false"}},"Coverage":{"name":"coverage","in":"query","description":"The lowest query coverage, in percent.","schema":{"type":"number","minimum":0,"maximum":100}},"Query":{"name":"query","in":"query","description":"One query, by its number.","schema":{"type":"integer","minimum":1,"maximum":20}},"PublishedFrom":{"name":"publishedFrom","in":"query","description":"Only hits none of whose sequence's dates falls before this date: its first published date (firstPublishedBy where a row has it) and the earliest filing or priority date of its US and WO publications. A date known only to the month or year counts as its last day. With publishedBefore, the hits from this date up to that one. Hits with no date stay.","schema":{"type":"string","format":"date"}},"PublishedBefore":{"name":"publishedBefore","in":"query","description":"Only hits first published before this date, and hits whose sequence has a US or WO publication filed or claiming priority before it (such a hit row has filedBefore: true). Hits with no date stay.","schema":{"type":"string","format":"date"}},"Group":{"name":"group","in":"query","description":"family gives one row per patent family. Absent, one row per publication.","schema":{"enum":["family","publication"],"default":"publication"}},"PublicationGroup":{"name":"group","in":"query","description":"family gives one row per patent family; applicant, office and year give one row per publication under a heading for each group. Absent, one row per publication.","schema":{"enum":["family","publication","applicant","office","year"],"default":"publication"}},"WorkbookHitSort":{"name":"hitSort","in":"query","description":"The sort of the Alignments or Matches sheet.","schema":{"enum":["score","bits","evalue","identity","coverage","queryIdentity","queryMatch","occurrences"]}},"WorkbookHitOrder":{"name":"hitOrder","in":"query","schema":{"enum":["asc","desc"]}},"WorkbookPatentSort":{"name":"patentSort","in":"query","description":"The sort of the Patents and Families sheets.","schema":{"enum":["bestQueryMatch","bestIdentity","published","sequencesHit","hits"]}},"WorkbookPatentOrder":{"name":"patentOrder","in":"query","schema":{"enum":["asc","desc"]}},"CompareJobs":{"name":"jobs","in":"query","required":true,"description":"2 to 6 search job IDs, separated by commas, each named once. Their order numbers the searches.","style":"form","explode":false,"schema":{"type":"array","minItems":2,"maxItems":6,"uniqueItems":true,"items":{"type":"string"}}},"ComparePart":{"name":"part","in":"query","description":"The part to list, by the numbers of the searches that found its sequences, lowest first, such as 1 or 1,2, or any for every sequence any of them found. Absent, the first part.","schema":{"type":"string","pattern":"^(any|[0-9]+(,[0-9]+)*)$"}},"CompareLimit":{"name":"limit","in":"query","description":"Sequences in the page.","schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},"MultiHitBy":{"name":"by","in":"query","description":"What to count: publication, each publication as the Patents tab lists it, or sequence, each stored sequence.","schema":{"enum":["publication","sequence"],"default":"publication"}},"MinQueries":{"name":"minQueries","in":"query","description":"Lists the rows that at least this many of the batch's queries hit.","schema":{"type":"integer","minimum":1,"maximum":1000000,"default":2}},"MultiHitLimit":{"name":"limit","in":"query","description":"Rows in the page.","schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},"Later":{"name":"later","in":"query","description":"hide folds the publications from on or after publishedBefore and adds later to the answer. Absent, they show.","schema":{"enum":["hide","show"],"default":"show"}},"Office":{"name":"office","in":"query","description":"Only patents of this office, such as US or EP.","schema":{"type":"string"}},"Species":{"name":"species","in":"query","description":"Only hits with a record in one of these species groups or NCBI taxa, separated by commas, up to 50, such as human,10090. On the patents list, only the publications whose own record is. The groups: human, mouse, rat, other-rodents, other-primates, camelids, other-mammals, other-animals, plants, fungi, bacteria, viruses, other, artificial, not-stated, not-matched. 409 for a search whose records no taxa folder placed.","schema":{"type":"string"}},"Drugs":{"name":"drugs","in":"query","description":"only keeps the hits that name a drug: those whose sequence is the same as a drug's chain, on a search the drug names add-on wrote into.","schema":{"enum":["only"]}},"Claimed":{"name":"claimed","in":"query","description":"only keeps the hits whose SEQ ID NO a claim of one of their US publications names, on a search the claimed sequences add-on wrote into. On the patents list, only the publications whose own claims name a hit's SEQ ID NO.","schema":{"enum":["only"]}},"Excluded":{"name":"excluded","in":"query","description":"true shows the rows marked excluded instead.","schema":{"type":"boolean"}},"FastaWhich":{"name":"which","in":"query","description":"The hits a FASTA file holds: filtered, those the list shows; kept, those marked Keep; selected, the rows that rows names.","schema":{"enum":["filtered","kept","selected"],"default":"filtered"}},"Rows":{"name":"rows","in":"query","description":"Rows by the numbers the hits route gives, with runs, such as 12,15,40-49: 1 to 1,000 rows of the search.","schema":{"type":"string","pattern":"^\\d+(-\\d+)?(,\\d+(-\\d+)?)*$"}},"Area":{"name":"area","in":"query","description":"Only hits inside an area of the Identity against coverage chart: identity from and to, then query coverage from and to, in percent, both ends included, such as 80,95,60,100. A hit with no identity, such as a pattern row, is outside every area.","schema":{"type":"string"}},"Publication":{"name":"publication","in":"query","description":"Only the hits whose sequence has a record in this publication, by its id from the patents list (\"unknown\" for records of no known publication). Each row then gains seqNos, its SEQ ID NOs there. 404 for a publication the search does not hold.","schema":{"type":"string"}},"Row":{"name":"row","in":"query","description":"Every publication of this hit's sequence, by the row number the alignment route takes, whatever the filters. The earliest comes first unless a sort is given, and undated publications come last. publishedBefore marks later publications and hides none. Each row keeps its mark, so excluded patents are listed too. 404 for a row the search does not hold.","schema":{"type":"integer","minimum":1}},"Set":{"name":"set","in":"query","description":"Only references this set found, named as members[].set names it. Give it again for more sets.","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"Kind":{"name":"kind","in":"query","description":"patent keeps publications only, and entry database entries only.","schema":{"enum":["patent","entry"]}},"ExportFormat":{"name":"format","in":"query","description":"The export format, by its name: Built-in, the CSV this export always gives, as when absent, or a format this server's export formats file defines for this export, as GET /api/status lists them under exports.formats. An external format leaves out every row a confidential set found. 400 for a name that serves no format of this export.","schema":{"type":"string","default":"Built-in"}},"Feature":{"name":"feature","in":"query","description":"One feature alone, by its ID, such as F2, or other. 404 for a feature the list does not hold.","schema":{"type":"string"}},"CaseReferenceLimit":{"name":"limit","in":"query","description":"References per feature, 20 unless asked.","schema":{"type":"integer","minimum":1,"maximum":500,"default":20}},"AllReferenceLimit":{"name":"limit","in":"query","description":"References per page, 20 unless asked.","schema":{"type":"integer","minimum":1,"maximum":500,"default":20}},"SummarySeqIds":{"name":"seqIds","in":"query","description":"How many claimed SEQ ID NOs, from the first, get a summary: 0 to 200, 10 unless asked. One with a decision always has its summary.","schema":{"type":"integer","minimum":0,"maximum":200,"default":10}},"VariantLimit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":25}},"Significance":{"name":"significance","in":"query","description":"One germline classification, as significances gives it. Empty keeps the changes ClinVar leaves unclassified.","schema":{"type":"string"}}},"responses":{"Error400":{"description":"The request is not one the service can run; the message says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"Sign in: send a valid API token. The message says whether it is unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"This account may not do this, or the license or trial has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Not found, or it belongs to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"Not ready, or the account is at its limit. A search this server asks about first answers 409 with confirm; the same request with \"confirmed\": true runs it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error413":{"description":"The request is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error415":{"description":"Send the body as application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"The queue is full: wait for jobs to finish. Or the account's searches have used the CPU hours this server allows in a UTC day: Retry-After gives the seconds until 00:00 UTC.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Only at the daily CPU hours: the seconds until 00:00 UTC, when new searches can start.","schema":{"type":"integer","minimum":1}}}},"Error503":{"description":"The service is stopping, or cannot check tokens right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}