Is it possible to restart the pod using manage Pod GraphQL API?
Is it possible to restart the pod using manage Pod GraphQL API?
/** */
restartPod: async function({ id }: { id: string }) {
const response = await fetch(
`https://api.runpod.io/graphql?api_key=${}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
operationName: "editPodJob",
variables: {
input: {
podId: id,
imageName: "runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04",
containerDiskInGb: 20,
volumeInGb: 20,
},
},
query: `
mutation editPodJob($input: PodEditJobInput!) {
podEditJob(input: $input) {
id
}
}`,
}),
},
)
const res = await response.json()
return res
},