8 months ago
i have too many projects in railway & i dont want to manually delete each of them in the dashboard
so i want to list them first, get their id, and use the projectDelete method
4 Replies
8 months ago
To get all your projects via graphql you'd use something like this:
query {
me {
workspaces {
id
team {
id
projects {
edges {
node {
id
name
}
}
}
}
}
}
}this will fetch all projects across all teams you're apart of
8 months ago
Hi you can try to Automate It with a Script
Here's a simple bash script:
#!/bin/bash TOKEN="<YOUR_TOKEN>" # Get all project IDs project_ids=$(curl -s -H "Authorization: Bearer $TOKEN" https://backboard.railway.app/project | jq -r '.[].id') for id in $project_ids; do echo "Deleting project $id" curl -X DELETE -H "Authorization: Bearer $TOKEN" https://backboard.railway.app/project/$id done
8 months ago
!s
Status changed to Solved dev • 8 months ago
