affectedProjectIds field not being returned in mutation endpoint

I am trying to retrieve a list of projects affected by a mutation (/v1/mutations/{mutationId})

I have tried https://dcc.icgc.org/api/v1/mutations/MU62030?field=affectedProjectIds and https://dcc.icgc.org/api/v1/mutations/MU62030but none of them seem to return this field.

Am I doing something wrong?

Thanks,
Andrew Duncan

Hi Andrew,

In order to get additional information about donors (and associated projects) that carry the specific mutation, you will need to fire additional requests against ‘donors’ endpoint, one request per mutation. This we call it ‘secondary queries’.

Here is one such secondary query: https://dcc.icgc.org/api/v1/donors?filters={"donor":{"gender":{"is":["female"]}},"mutation":{"id":{"is":["MU62030"]}}}&from=1&include=facets&size=0

See the attached screenshot (taken from this query: https://icgc.org/ZDC) for more intuitive explanation.

secondaryQuery

I know it’s a bit complicated, hopeful this makes it clear. Feel free to let me know if you have any questions.

Best regards,
Junjun

Hey Junjun,

Awesome, thanks for the detailed answer. This is exactly what I needed.

Andrew Duncan