Complicated rest api of prometheus not working

How come this doesn’t work,

curl -ks -H ‘Authorization: Bearer sha256~_xxxxxxxxxxxxxxxxxxxxxxxxx’ “[https:]//prometheus-k8s-openshift-monitoring.apps.node1.test.com/api/v1/query?query=sum(container_memory_working_set_bytes{pod=‘application-one-11-pgsl5’,namespace=‘me-sandbox’,container=’’,})

With errors,

{“status”:“error”,“errorType”:“bad_data”,“error”:“invalid parameter ‘query’: 1:42: parse error: unexpected “=” in aggregation”}{“status”:“error”,“errorType”:“bad_data”,“error”:“invalid parameter ‘query’: 1:48: parse error: unexpected “=” in aggregation”}{“status”:“error”,“errorType”:“bad_data”,“error”:“invalid parameter ‘query’: 1:48: parse error: unexpected “=” in aggregation”}{“status”:“success”,“data”:{“resultType”:“vector”,“result”:[{“metme”:{},“value”:[1622082452.048,“1778649063424”]}]}}

But this works,

curl -ks -H ‘Authorization: Bearer sha256~_xxxxxxxxxxxxxxxxxxxxxxxxx’ ‘[https:]//prometheus-k8s-openshift-monitoring.apps.node1.test.com/api/v1/query?query=rate(http_requests_total[5m])[30m:1m]

Output is long,

{“status”:“success”,“data”:{“resultType”:“matrix”,“result”:[{“metric”:{“code”:“200”,“container”:“oauth-proxy”,“endpoint”:“web”,“handler”:“label_values”,“instance”:“172.29.11.248:9091”,“job”:“thanos-querier”,“method”:“get”,“namespace”:“openshift-monitoring”,“pod”:“thanos-querier-5f6698bdb6-jznzs”,“service”:“thanos-querier”},“values”:[[1622080920,“0”],[1622080980,“0”],[1622081040,“0”],[1622081100,“0”],[1622081160,“0”],[1622081220,“0”],[1622081280,“0”],[1622081340,“0”],[1622081400,“0”],[1622081460,“0”],[1622081520,“0.003703703703703704”],[1622081580,“0.003703703703703704”],[1622081640,“0.003703703703703704”],[1622081700,"0.

Is there more documentation on the rest api query?
I want this to work,
sum(container_memory_working_set_bytes{pod=‘application-one-11-pgsl5’,namespace=‘me-sandbox’,container=’’,})

Please help, thanks!

you can inspect the chrome on the prometheus prom ql, u can grab the actual prom ql rest api, you don’t need to know how to create yourself the prom ql rest api, the browser will give it to you.