Submit compact GWAS Catalog REST API v2 requests for studies, associations, SNPs, EFO traits, genes, publications, loci, and metadata. Use when a user wants concise GWAS Catalog summaries
scripts/rest_request.py for all GWAS Catalog API calls.base_url=https://www.ebi.ac.uk/gwas/rest/api/v2.max_items; for collection endpoints, start with API size=10 and max_items=10.studies/<accession> generally do not need max_items.record_path to target _embedded.<resource> lists.... in tool previews as UI truncation, not literal request content.metadata, studies, , , , , , , and .studies/<accession>associationssnpsefoTraitsgenespublicationslocisave_raw=true if the user needs the full HATEOAS payload or pagination links.base_url, pathmethod, params, headers, json_body, form_body, record_path, response_format, max_items, max_depth, timeout_sec, save_raw, raw_output_path{"base_url":"https://www.ebi.ac.uk/gwas/rest/api/v2","path":"metadata"}{"base_url":"https://www.ebi.ac.uk/gwas/rest/api/v2","path":"studies","params":{"efo_trait":"asthma","size":10},"record_path":"_embedded.studies","max_items":10}{"base_url":"https://www.ebi.ac.uk/gwas/rest/api/v2","path":"associations","params":{"mapped_gene":"BRCA1","size":10},"record_path":"_embedded.associations","max_items":10}ok, source, path, method, status_code, warnings, and either compact records or a compact summary.raw_output_path when save_raw=true.ok=false with error.code and error.message.echo '{"base_url":"https://www.ebi.ac.uk/gwas/rest/api/v2","path":"studies","params":{"efo_trait":"asthma","size":10},"record_path":"_embedded.studies","max_items":10}' | python scripts/rest_request.py
scripts/rest_request.py.