R
RunPod4w ago
Sasan

How to Terminate a Pod via GraphQL?

Hi everyone, I'm trying to figure out how to terminate a pod using GraphQL on RunPod. However, I couldn't find any related documentation or examples that explain the mutation or process for this. Does anyone know the correct way to terminate a pod through the GraphQL API? If possible, please share the mutation syntax or any tips for handling this process. Thanks in advance for your help!
4 Replies
0xthresh
0xthresh4w ago
I'm not positive because I haven't tried, but it looks like this is the closest thing: https://graphql-spec.runpod.io/#definition-PodTerminateInput
0xthresh
0xthresh4w ago
I'm poking around at their Pulumi provider and I think I found an example of a mutation you can use in Go here: https://github.com/runpod/pulumi-runpod-native/blob/main/provider/pod.go#L415
GitHub
pulumi-runpod-native/provider/pod.go at main · runpod/pulumi-runpod...
Contribute to runpod/pulumi-runpod-native development by creating an account on GitHub.
dxqbYD
dxqbYD3w ago
even if you don't use python, https://github.com/runpod/runpod-python/tree/main/runpod/api can be helpful because it's a wrapper for GraphQL
GitHub
runpod-python/runpod/api at main · runpod/runpod-python
🐍 | Python library for RunPod API and serverless worker SDK. - runpod/runpod-python

Did you find this page helpful?