cBioPortal API endpoint malfunctioning

11 views
Skip to first unread message

Charles Olowookere

unread,
Jun 30, 2025, 10:23:59 AM6/30/25
to cbiop...@googlegroups.com

the API is returning a 400 error for valid JSON requests and provide them with the simple, reproducible curl command that fails:n

curl -X POST -H "Content-Type: application/json" -d "{\"geneIds\":[\"BRAF\"]}" "https://www.cbioportal.org/api/molecular-profiles/skcm_ucla_2016_mutations/mutations/fetch" 

& 

(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline>pip show requests
Name: requests
Version: 2.32.4
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: m...@kennethreitz.org
License: Apache-2.0
Location: C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline\venv\Lib\site-packages
Requires: certifi, charset_normalizer, idna, urllib3
Required-by: pybioportal, yarg

(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline>


(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline\src>python httpbin.py
--- Sending request to diagnostic service: https://httpbin.org/post ---

Status Code: 200

{
  "args": {},
  "data": "{\"geneIds\": [\"BRAF\"]}",
  "files": {},
  "form": {},
  "headers": {
    "Accept": "application/json",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "21",
    "Content-Type": "application/json",
    "Host": "httpbin.org",
    "User-Agent": "python-requests/2.32.4",
    "X-Amzn-Trace-Id": "Root=1-686259db-72f3e8f029fd1745360cc5d6"
  },
  "json": {
    "geneIds": [
      "BRAF"
    ]
  },
  "origin": "108.82.239.252",
  "url": "https://httpbin.org/post"
}

(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline\src>



(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline>curl -X POST -H "Content-Type: application/json" -d "{\"geneIds\":[\"BRAF\"]}" "https://www.cbioportal.org/api/molecular-profiles/skcm_ucla_2016_mutations/mutations/fetch"
{"message":"There is an error in the JSON format of the request payload"}
(venv) C:\Users\charl\Documents\ResearchProjects\DAC-GI_Pipeline>

JJ Gao

unread,
Jun 30, 2025, 10:44:34 AM6/30/25
to Charles Olowookere, cbiop...@googlegroups.com
Hi Charles,

Thanks for contacting us. 

Please use entrezGeneIds instead of geneIds. You can try it out here:


Best,
-JJ



--
You received this message because you are subscribed to the Google Groups "cBioPortal for Cancer Genomics Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbioportal+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cbioportal/CAPuqYFWMuBAzYD8RkDEN-KO1wVdB6_6cFHwvgcA6wQZDuifUiQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages