{
  "openapi": "3.1.0",
  "info": {
    "title": "DimerIQ shared-platform pilot API",
    "version": "2026-10-10-pilot",
    "description": "Selected public adapter operations. The isolated staging pilot is separate from production. Engine response schemas are preserved; an unconstrained response is not a promise of fixed fields. Check the release availability page."
  },
  "servers": [
    {
      "url": "https://dimeriq-staging.ospribrain.com",
      "description": "Isolated pilot only"
    }
  ],
  "paths": {
    "/api/science/jobs": {
      "get": {
        "tags": [
          "jobs"
        ],
        "summary": "List Jobs",
        "description": "The caller's OWN jobs, newest first. There is no route that lists\nanyone else's, and no parameter that would widen this one.\nRequires the current app/workspace role and record ownership. A documented token scope does not override these checks.",
        "operationId": "list_jobs_v1_jobs_get",
        "parameters": [
          {
            "name": "panel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Panel"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Jobs V1 Jobs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ]
      }
    },
    "/api/science/jobs/{job_id}": {
      "get": {
        "tags": [
          "jobs"
        ],
        "summary": "Get Job",
        "description": "One job, if it is the caller's.\n\nA job belonging to another subject returns 404, identical to an id that\nnever existed. That is deliberate: see the module docstring.\nRequires the current app/workspace role and record ownership. A documented token scope does not override these checks.",
        "operationId": "get_job_v1_jobs__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Job V1 Jobs  Job Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ]
      }
    },
    "/api/science/workflow/discovery/start": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Start",
        "operationId": "start_v1_workflow_discovery_start_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    },
    "/api/science/workflow/discovery/stop": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Stop",
        "operationId": "stop_v1_workflow_discovery_stop_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Control"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    },
    "/api/science/workflow/discovery/resume": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Resume",
        "operationId": "resume_v1_workflow_discovery_resume_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeControl"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    },
    "/api/science/workflow/discovery/intermediates": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Intermediates",
        "operationId": "intermediates_v1_workflow_discovery_intermediates_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntermediateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    },
    "/api/science/workflow/discovery/decision": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Candidate Decision",
        "operationId": "candidate_decision_v1_workflow_discovery_decision_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalystDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    },
    "/api/science/workflow/discovery/decisions": {
      "post": {
        "tags": [
          "discovery"
        ],
        "summary": "Candidate Decisions",
        "operationId": "candidate_decisions_v1_workflow_discovery_decisions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CandidateAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "A valid app-specific user token is required."
          },
          "403": {
            "description": "Your workspace does not grant this operation."
          },
          "404": {
            "description": "No accessible record was found."
          },
          "503": {
            "description": "Access verification or the engine is temporarily unavailable."
          }
        },
        "security": [
          {
            "userToken": []
          }
        ],
        "description": "Requires the current app/workspace role and record ownership. A documented token scope does not override these checks."
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "CandidateAction": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "candidate_id": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Candidate Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "job_id",
          "candidate_id"
        ],
        "title": "CandidateAction"
      },
      "AnalystDecision": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "candidate_id": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Candidate Id"
          },
          "decision": {
            "type": "string",
            "enum": [
              "shortlisted",
              "needs_changes",
              "selected_for_lab",
              "rejected"
            ],
            "title": "Decision"
          },
          "note": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Note"
          },
          "decision_id": {
            "type": "string",
            "format": "uuid",
            "title": "Decision Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "job_id",
          "candidate_id",
          "decision",
          "note",
          "decision_id"
        ],
        "title": "AnalystDecision"
      },
      "IntermediateRequest": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "view": {
            "type": "string",
            "enum": [
              "all",
              "pending",
              "checked",
              "decisions",
              "near_misses"
            ],
            "title": "View",
            "default": "all"
          },
          "candidate_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Candidate Id"
          },
          "detail_view": {
            "type": "string",
            "enum": [
              "full",
              "checks"
            ],
            "title": "Detail View",
            "default": "full"
          },
          "sort": {
            "type": "string",
            "enum": [
              "activity",
              "number",
              "stage",
              "specificity",
              "failures",
              "missing",
              "reference",
              "forward_length",
              "probe_length",
              "reverse_length",
              "probe_gc"
            ],
            "title": "Sort",
            "default": "activity"
          },
          "direction": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "title": "Direction",
            "default": "desc"
          },
          "query": {
            "type": "string",
            "maxLength": 200,
            "title": "Query",
            "default": ""
          },
          "offset": {
            "type": "integer",
            "maximum": 10000.0,
            "minimum": 0.0,
            "title": "Offset",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 20
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "job_id"
        ],
        "title": "IntermediateRequest"
      },
      "ResumeControl": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "run_until_done": {
            "type": "boolean",
            "title": "Run Until Done",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "job_id"
        ],
        "title": "ResumeControl"
      },
      "Control": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "job_id"
        ],
        "title": "Control"
      },
      "DiscoveryRequest": {
        "properties": {
          "project_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Project Name",
            "default": "Automatic assay search"
          },
          "target_name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Target Name"
          },
          "target_taxid": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Target Taxid"
          },
          "inclusions": {
            "items": {
              "$ref": "#/components/schemas/Source"
            },
            "type": "array",
            "maxItems": 12,
            "minItems": 1,
            "title": "Inclusions"
          },
          "exclusions": {
            "items": {
              "$ref": "#/components/schemas/Source"
            },
            "type": "array",
            "maxItems": 24,
            "minItems": 1,
            "title": "Exclusions"
          },
          "chemistry": {
            "$ref": "#/components/schemas/Chemistry"
          },
          "rules": {
            "$ref": "#/components/schemas/DesignRules"
          },
          "max_hours": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 24.0,
                "minimum": 0.05
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Hours"
          },
          "qualification_goal": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Qualification Goal",
            "default": 1
          },
          "pipeline_profile": {
            "type": "string",
            "enum": [
              "legacy",
              "panel_review_v1"
            ],
            "title": "Pipeline Profile",
            "default": "legacy"
          },
          "review_goal": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Review Goal",
            "default": 3
          },
          "global_blast": {
            "type": "boolean",
            "title": "Global Blast",
            "default": true
          },
          "cache_policy": {
            "type": "string",
            "enum": [
              "shared",
              "fresh_run"
            ],
            "title": "Cache Policy",
            "default": "shared"
          },
          "review_policy": {
            "type": "string",
            "enum": [
              "strict",
              "ricardo_priority_v1"
            ],
            "title": "Review Policy",
            "default": "strict"
          },
          "native_panel_required": {
            "type": "boolean",
            "title": "Native Panel Required",
            "default": false
          },
          "specificity_provider": {
            "type": "string",
            "enum": [
              "ncbi_public",
              "aws_native"
            ],
            "title": "Specificity Provider",
            "default": "ncbi_public"
          },
          "early_background": {
            "type": "string",
            "enum": [
              "none",
              "near_neighbors_v1"
            ],
            "title": "Early Background",
            "default": "none"
          },
          "target_sampling": {
            "type": "string",
            "enum": [
              "none",
              "target_strains_v1"
            ],
            "title": "Target Sampling",
            "default": "none"
          },
          "verification_strategy": {
            "type": "string",
            "enum": [
              "ranked_batch_v1",
              "focused_finalists_v1"
            ],
            "title": "Verification Strategy",
            "default": "ranked_batch_v1"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "target_name",
          "target_taxid",
          "inclusions",
          "exclusions"
        ],
        "title": "DiscoveryRequest"
      },
      "DesignRules": {
        "properties": {
          "primer_tm_max": {
            "type": "integer",
            "enum": [
              63,
              65
            ],
            "title": "Primer Tm Max",
            "default": 63
          },
          "probe_reference": {
            "type": "string",
            "enum": [
              "higher",
              "both"
            ],
            "title": "Probe Reference",
            "default": "both"
          },
          "structure_temperature_C": {
            "type": "number",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Structure Temperature C",
            "default": 25
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "default": "Ricardo October 2 \u2014 scientist review"
          },
          "provider": {
            "type": "string",
            "enum": [
              "primer3",
              "idt"
            ],
            "title": "Provider",
            "default": "primer3"
          },
          "confirmed": {
            "type": "boolean",
            "title": "Confirmed",
            "default": false
          },
          "confirmation_note": {
            "type": "string",
            "maxLength": 2000,
            "title": "Confirmation Note",
            "default": ""
          },
          "primer_tm_difference_max": {
            "type": "number",
            "maximum": 5.0,
            "exclusiveMinimum": 0.0,
            "title": "Primer Tm Difference Max",
            "default": 2
          },
          "primer_tm_difference_inclusive": {
            "type": "boolean",
            "title": "Primer Tm Difference Inclusive",
            "default": true
          },
          "self_dimer_dg_min": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 0.0,
                "minimum": -100.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Self Dimer Dg Min",
            "default": -3.0
          },
          "hairpin_dg_min": {
            "type": "number",
            "maximum": 0.0,
            "minimum": -100.0,
            "title": "Hairpin Dg Min",
            "default": -2.5
          },
          "heterodimer_dg_min": {
            "type": "number",
            "maximum": 0.0,
            "minimum": -100.0,
            "title": "Heterodimer Dg Min",
            "default": -11
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DesignRules"
      },
      "Chemistry": {
        "properties": {
          "sodium_mM": {
            "type": "number",
            "maximum": 1000.0,
            "exclusiveMinimum": 0.0,
            "title": "Sodium Mm",
            "default": 50
          },
          "magnesium_mM": {
            "type": "number",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Magnesium Mm",
            "default": 3
          },
          "dntp_mM": {
            "type": "number",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Dntp Mm",
            "default": 0.8
          },
          "primer_uM": {
            "type": "number",
            "maximum": 100.0,
            "exclusiveMinimum": 0.0,
            "title": "Primer Um",
            "default": 0.2
          },
          "probe_uM": {
            "type": "number",
            "maximum": 100.0,
            "exclusiveMinimum": 0.0,
            "title": "Probe Um",
            "default": 0.2
          },
          "confirmed": {
            "type": "boolean",
            "title": "Confirmed",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Chemistry"
      },
      "Source": {
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Label"
          },
          "accession": {
            "type": "string",
            "maxLength": 60,
            "pattern": "^[A-Za-z0-9_.]*$",
            "title": "Accession",
            "default": ""
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "type": "array",
            "maxItems": 200,
            "title": "Parts"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "label"
        ],
        "title": "Source"
      },
      "Part": {
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 300,
            "title": "Path"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "title": "Sha256"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "path",
          "sha256"
        ],
        "title": "Part"
      }
    },
    "securitySchemes": {
      "userToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User OAuth token for this API audience. Never use a backend service key."
      }
    }
  }
}
