Skip to content

API feature: Subtype/segment query overrides #1459

Description

@anna-parker

Currently when querying mutli-segmented organisms (or pathogens with multiple subtypes) the segment can be added to the alignedNucleotideSequences download but also needs to be added as a prefix to all mutation queries - ideally we could re-route requests and add this prefix in LAPIS.

Now:

curl -X 'GET' \
  'https://lapis-main.loculus.org/cchf/sample/alignedNucleotideSequences/L\
  -H 'accept: application/json'
curl -X 'POST' \
  'https://lapis-main.loculus.org/cchf/sample/aminoAcidMutations' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "nucleotideMutations": [
    "sequence1:A123T"
  ],
  "aminoAcidMutations": [
    "sequence1_gene:123T"
  ],
}'

Would become (the top query would still work but the bottom one would be changed to the top one internally when querying SILO):

curl -X 'GET' \
  'https://lapis-main.loculus.org/cchf/L/sample/alignedNucleotideSequences/\
  -H 'accept: application/json'
curl -X 'POST' \
  'https://lapis-main.loculus.org/cchf/L/sample/aminoAcidMutations' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "nucleotideMutations": [
    "A123T"
  ],
  "aminoAcidMutations": [
    "gene:123T"
  ],
}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions