jobs
Recent jobs for a project
What the dashboard polls while waiting for data. active is true when any job is pending or processing.
GET
/
v1
/
projects
/
{projectId}
/
jobs
Recent jobs for a project
curl --request GET \
--url https://api.surnex.io/v1/projects/{projectId}/jobsimport requests
url = "https://api.surnex.io/v1/projects/{projectId}/jobs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.surnex.io/v1/projects/{projectId}/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/projects/{projectId}/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/projects/{projectId}/jobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.surnex.io/v1/projects/{projectId}/jobs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/projects/{projectId}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"jobs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type": "rank_check",
"status": "pending",
"error_message": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"active": true
}
}Path Parameters
Query Parameters
Available options:
rank_check, rank_check_poll, rank_check_process, backlink_snapshot, backlink_profile_fetch, backlink_gap_fetch, site_audit_start, site_audit_poll, site_audit_process, geo_snapshot, keyword_research, keyword_research_job, domain_overview_fetch, tech_stack_fetch, ai_search_fetch, usage_report, report_send, ranking_alert_notification, web_vitals_check, web_vitals_poll, web_vitals_process, local_ranking_check, email_send Required range:
1 <= x <= 100⌘I
Recent jobs for a project
curl --request GET \
--url https://api.surnex.io/v1/projects/{projectId}/jobsimport requests
url = "https://api.surnex.io/v1/projects/{projectId}/jobs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.surnex.io/v1/projects/{projectId}/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.surnex.io/v1/projects/{projectId}/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.surnex.io/v1/projects/{projectId}/jobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.surnex.io/v1/projects/{projectId}/jobs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.surnex.io/v1/projects/{projectId}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"jobs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_type": "rank_check",
"status": "pending",
"error_message": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"active": true
}
}