R
RunPod4mo ago
artha77

Impossible to launch a CPU Pods via API

when I try to launch a CPu pods via APi with it's id it just crash, with the graphql api it say : Pod resumed: { errors: [ { message: 'Something went wrong. Please try again later or contact support.', path: [Array], extensions: [Object] } ], data: { podResume: null } } via curl it say : Internal Server Error what should i do, I need to be able to resume and pause my pods, else what is the interest of an on demand solution ?!
13 Replies
yhlong00000
yhlong000004mo ago
I am able to create, stop and then resume, can you post the graphql query here? maybe something is missing?
No description
No description
artha77
artha774mo ago
this is a gpu pod try the same with a CPU one, it does not work for me mutation { podResume(input: { podId: "${RUN_POD_ID}" }) { id desiredStatus imageName env machineId machine { podHostId } } } here is my graphql code and the curl : curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer MyToken" \ -d '{ "query": "mutation { podResume(input: { podId: "1784utm8khhhep" }) { id desiredStatus imageName env machineId machine { podHostId } } }" }' \ https://api.runpod.io/graphql => Internal Server Error
artha77
artha774mo ago
I even tried that
No description
artha77
artha774mo ago
but i always get this reponse =>
artha77
artha774mo ago
No description
yhlong00000
yhlong000004mo ago
Ah, I see. Let me try it and let you know.
artha77
artha774mo ago
Thanks a lot ! @yhlong00000
yhlong00000
yhlong000004mo ago
ok, try this query:
mutation {
resumeCpuPod(input: {podId: "06eo7pxkwr02k1"}) {
id
desiredStatus
imageName
env
machineId
machine {
podHostId
}
}
}
mutation {
resumeCpuPod(input: {podId: "06eo7pxkwr02k1"}) {
id
desiredStatus
imageName
env
machineId
machine {
podHostId
}
}
}
yhlong00000
yhlong000004mo ago
No description
artha77
artha774mo ago
it work on postman ! where did you find this endpoint ? https://graphql-spec.runpod.io/#introduction there is nothing on the doc but thanks @yhlong00000 ! i was hopeless with that issue
yhlong00000
yhlong000004mo ago
You’re welcome! I figured it out by inspecting the browser’s network calls tab when I clicked the CPU pod resume button😂😂 Will ask them to update docs and provide more examples.
artha77
artha774mo ago
thanks ! nice idea to sniff their own api calls 😂
nerdylive
nerdylive4mo ago
They're working on better api docs Hahah, for now yeah that's the best way to get working calls
Want results from more Discord servers?
Add your server