Skip to main content

How to Get Projects

When you don't know Project ID

If you don't know the ID of your project you can fetch a list of projects that you have access to through the accounts.

Operation: query MyProjects { me { id username accounts(first: 1) { totalCount nodes { id name projects(first: 2) { totalCount nodes { id name } } } } } }Response Example: { "data": { "me": { "id": "TjAwNFVzZXI4NjE", "username": "Your User Name", "accounts": { "totalCount": 1, "nodes": [ { "id": "TjAwN0FjY291bnQ3MTU", "name": "Your Account Name", "projects": { "totalCount": 10, "nodes": [ { "id": "TjAwN1Byb2plY3Q2MTMy", "name": "www.example.com Project" }, { "id": "TjAwN1Byb2plY3Q5OTA2", "name": "www.example.co.uk Project" } ] } } ] } } } }
Get projects from accounts you have access toTry in Explorer
GraphQL
query MyProjects {
me {
id
username
accounts(first: 1) {
totalCount
nodes {
id
name
projects(first: 2) {
totalCount
nodes {
id
name
}
}
}
}
}
}

When you know your Project ID

If project ID is known (for example from URL) you can fetch the project directly.

Operation: query MyProjectById { getProject(id: "TjAwN1Byb2plY3Q2MTMy") { id name primaryDomain } }Response Example: { "data": { "getProject": { "id": "TjAwN1Byb2plY3Q2MTMy", "name": "www.example.com Project", "primaryDomain": "https://www.example.com/" } } }
Get a specific project by IDTry in Explorer
GraphQL
query MyProjectById {
getProject(id: "TjAwN1Byb2plY3Q2MTMy") {
id
name
primaryDomain
}
}