Where to get this id for `deploymentRestart`?

I tried token id, project id, and service id, no luck
25 Replies
Percy
Percy2y ago
Project ID: c808b54d-c5c8-4c51-a778-f6fad1b0813e
amorfati
amorfatiOP2y ago
c808b54d-c5c8-4c51-a778-f6fad1b0813e
Brody
Brody2y ago
it wants the deploymentId
query Deployments($projectId: String!) {
project(id: $projectId) {
deployments {
edges {
node {
id
createdAt
}
}
}
}
}
query Deployments($projectId: String!) {
project(id: $projectId) {
deployments {
edges {
node {
id
createdAt
}
}
}
}
}
nebula
nebula2y ago
brody has that query memorized 🔺
Brody
Brody2y ago
no i copied it from you
amorfati
amorfatiOP2y ago
only way to get deployment id is to run that query? Is there no way to have a call that restarts existing deployment?
Brody
Brody2y ago
i mean you can copy the deployment id from the url
amorfati
amorfatiOP2y ago
oh nice the one on end ?id=...
Brody
Brody2y ago
yeah just curious, whats your use case for this?
amorfati
amorfatiOP2y ago
curl --request POST \
--url https://backboard.railway.app/graphql/v2 \
--header 'Authorization: Bearer 12345676DFSGW' \
--header 'Content-Type: application/json' \
--data '{"query":"mutation { deploymentRestart(id: "12345") }'
curl --request POST \
--url https://backboard.railway.app/graphql/v2 \
--header 'Authorization: Bearer 12345676DFSGW' \
--header 'Content-Type: application/json' \
--data '{"query":"mutation { deploymentRestart(id: "12345") }'
gives an error {"message":"Unexpected end of JSON input", any idea how to escape the id string "? Tried \ I need to be able to restart my deployment with a simple curl request
Brody
Brody2y ago
sounds like an XY problem thats not a valid query
amorfati
amorfatiOP2y ago
I know cause there's extra " but i'm asking how to escape " if you happen to know
nebula
nebula2y ago
these seem to have become exceedingly common here
Brody
Brody2y ago
indeed
amorfati
amorfatiOP2y ago
TIL https://xyproblem.info/ alright my bad
Brody
Brody2y ago
yep thats it so lets start over why do you want to restart your deployment?
amorfati
amorfatiOP2y ago
another team is making updates to one of the services that deployment uses. I have no control over that service and when they make an update I need to restart the deployment. This is a temporary solution until their service is stable (2-4 weeks)
Brody
Brody2y ago
you lost me at "another team" when you arent on a team account, carry on with the deploymentRestart query then
nebula
nebula2y ago
i'm assuming they meant an upstream provider
Brody
Brody2y ago
sounds like a lot of problems that would not be worth getting into here
amorfati
amorfatiOP2y ago
I just need to use that API you helped me by pointing me to the deployment id I should be good. Thank you
Brody
Brody2y ago
good 🙂
amorfati
amorfatiOP2y ago
amorfati
amorfatiOP2y ago
thank you everyone
Want results from more Discord servers?
Add your server