R
Railway17mo ago
bereket

Webhook Events

Is there any documentation of the webhook types that Railway supports (or does anyone know what they are)? I'm only aware of "DEPLOY" as of right now that is visible via the example on the webhook page in project settings.
11 Replies
Percy
Percy17mo ago
Project ID: N/A
Brody
Brody17mo ago
there should be an event for every deployment status
Brody
Brody17mo ago
buildergoop
bereket
bereketOP17mo ago
could you link this page please?
Brody
Brody17mo ago
sorry, my bad it's from the graphql playground https://railway.app/graphiql
bereket
bereketOP17mo ago
Ah I see now, do you know if there is an example payload for each one?
bereket
bereketOP17mo ago
or is this the same payload for all of them?
Brody
Brody17mo ago
the json structure would stay the exact same, the values would be the only things that change
bereket
bereketOP17mo ago
ah I see, thanks! also, a type in the SS above by railway says "DEPLOY" is a valid type? but it's not in the enum
bereket
bereketOP17mo ago
Brody
Brody17mo ago
you are right here is a full example webhook
{
"type": "DEPLOY",
"project": {
"id": "b07ded2b-7352-4fb7-b231-d7d4dd47bb02",
"name": "Utilities",
"description": "Web server For Various Tests",
"createdAt": "2023-03-18T07:23:59.711Z"
},
"deployment": {
"id": "89966f04-f5b4-4214-8b34-cfd13b0cac33",
"meta": {
"logsV2": true,
"configFile": null,
"volumeMounts": [],
"rootDirectory": null,
"serviceManifest": {
"build": {
"builder": "DOCKERFILE",
"buildCommand": null,
"nixpacksPlan": null,
"watchPatterns": [],
"dockerfilePath": "Dockerfile",
"nixpacksConfigPath": null
},
"deploy": {
"numReplicas": 1,
"startCommand": null,
"healthcheckPath": null,
"restartPolicyType": "ON_FAILURE",
"healthcheckTimeout": null,
"restartPolicyMaxRetries": 10
}
},
"nixpacksProviders": [
"go"
],
"fileServiceManifest": {},
"propertyFileMapping": {}
},
"creator": {
"id": "0cac2903-0126-4945-aad2-1099a5ae3389",
"name": "Brody Over",
"avatar": "https://f002.backblazeb2.com/file/tele-upl/brody_avatar.png"
}
},
"environment": {
"id": "4e84df83-8fb1-4a5d-b056-3879b95bb915",
"name": "production"
},
"status": "SUCCESS",
"timestamp": "2023-07-21T22:31:31.922Z",
"service": {
"id": "9adcec13-31ae-40e9-ae9c-04786471a8e2",
"name": "Hello, World!"
}
}
{
"type": "DEPLOY",
"project": {
"id": "b07ded2b-7352-4fb7-b231-d7d4dd47bb02",
"name": "Utilities",
"description": "Web server For Various Tests",
"createdAt": "2023-03-18T07:23:59.711Z"
},
"deployment": {
"id": "89966f04-f5b4-4214-8b34-cfd13b0cac33",
"meta": {
"logsV2": true,
"configFile": null,
"volumeMounts": [],
"rootDirectory": null,
"serviceManifest": {
"build": {
"builder": "DOCKERFILE",
"buildCommand": null,
"nixpacksPlan": null,
"watchPatterns": [],
"dockerfilePath": "Dockerfile",
"nixpacksConfigPath": null
},
"deploy": {
"numReplicas": 1,
"startCommand": null,
"healthcheckPath": null,
"restartPolicyType": "ON_FAILURE",
"healthcheckTimeout": null,
"restartPolicyMaxRetries": 10
}
},
"nixpacksProviders": [
"go"
],
"fileServiceManifest": {},
"propertyFileMapping": {}
},
"creator": {
"id": "0cac2903-0126-4945-aad2-1099a5ae3389",
"name": "Brody Over",
"avatar": "https://f002.backblazeb2.com/file/tele-upl/brody_avatar.png"
}
},
"environment": {
"id": "4e84df83-8fb1-4a5d-b056-3879b95bb915",
"name": "production"
},
"status": "SUCCESS",
"timestamp": "2023-07-21T22:31:31.922Z",
"service": {
"id": "9adcec13-31ae-40e9-ae9c-04786471a8e2",
"name": "Hello, World!"
}
}
with $.status being a value in the enum
Want results from more Discord servers?
Add your server