How to Get Crawls
The following guide will provide you with the essentials needed to query the Lumar API for your previously completed crawls.
Note: in order to execute getProject
queries, make sure you're authenticated.
Using the getProject query​
Make sure you have the Project ID. This can be obtained by clicking on a project and copying it from the URL.
For example: https://analyze.lumar.io/accounts/1479/projects/[COPY_PROJECT_ID]/crawls/1583246
)
- Query
- Variables
- Response
- cURL
query GetProject($id: ObjectID!) {
getProject(id: $id) {
name
sitePrimary
crawls(first: 10) {
nodes {
finishedAt
id
project {
name
}
status
}
}
}
}
{
"id": 62023
}
{
"data": {
"getProject": {
"name": "Deep Crawl",
"sitePrimary": "https://www.lumar.io/",
"crawls": {
"nodes": [
{
"finishedAt": "2020-07-09T16:25:35.000Z",
"id": "TjAwNUNyYXdsMTU4MzI0NQ",
"project": {
"name": "Deep Crawl"
},
"status": "finished"
},
{
"finishedAt": "2020-07-09T17:03:44.000Z",
"id": "TjAwNUNyYXdsMTU4MzI0Ng",
"project": {
"name": "Deep Crawl"
},
"status": "finished"
}
]
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetProject($id: ObjectID!) { getProject(id: $id) { name sitePrimary crawls(first: 10) { nodes { finishedAt id project { name } status } } } }","variables":{"id":62023}}' https://api.lumar.io/graphql
The following guide will provide you with the essentials needed to query the Lumar API for your previously completed crawls.
Note: in order to execute getCrawl
queries, make sure you're authenticated.
Using the getCrawl query​
If you already know the crawl ID, you can use the getCrawl
query to get the crawl details.
- Query
- Response
- cURL
query {
getCrawl(id: 1583246) {
finishedAt
id
project {
name
}
status
}
}
{
"data": {
"getCrawl": {
"finishedAt": "2020-07-09T17:03:44.000Z",
"id": "TjAwNUNyYXdsMTU4MzI0Ng",
"project": {
"name": "Deep Crawl"
},
"status": "finished"
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query { getCrawl(id: 1583246) { finishedAt id project { name } status } }"}' https://api.lumar.io/graphql