curl --request POST \
--url https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>"
},
"sortColumn": "<string>"
}
'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload = {
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>"
},
"sortColumn": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pageSize: 123,
cursor: '<string>',
filter: {
searchQuery: '<string>',
workflowType: '<string>',
eventSource: '<string>',
repoId: '<string>',
targetType: '<string>',
repositoryRefId: '<string>'
},
sortColumn: '<string>'
})
};
fetch('https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list', 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://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pageSize' => 123,
'cursor' => '<string>',
'filter' => [
'searchQuery' => '<string>',
'workflowType' => '<string>',
'eventSource' => '<string>',
'repoId' => '<string>',
'targetType' => '<string>',
'repositoryRefId' => '<string>'
],
'sortColumn' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload := strings.NewReader("{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobs": [
{
"jobId": "<string>",
"workflowType": "<string>",
"status": "SEMGREP_WORKFLOW_RUN_STATUS_SUBMITTED",
"deploymentId": "<string>",
"repoId": "<string>",
"gitRef": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"totalFindings": 123,
"eventSource": "<string>",
"repoUrl": "<string>",
"totalCostCredits": 123,
"triggerSource": "<string>"
}
],
"nextCursor": "<string>"
}List workflow jobs
Lists workflow jobs for a deployment, with support for filtering, sorting, and cursor-based pagination.
curl --request POST \
--url https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>"
},
"sortColumn": "<string>"
}
'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload = {
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>"
},
"sortColumn": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pageSize: 123,
cursor: '<string>',
filter: {
searchQuery: '<string>',
workflowType: '<string>',
eventSource: '<string>',
repoId: '<string>',
targetType: '<string>',
repositoryRefId: '<string>'
},
sortColumn: '<string>'
})
};
fetch('https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list', 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://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pageSize' => 123,
'cursor' => '<string>',
'filter' => [
'searchQuery' => '<string>',
'workflowType' => '<string>',
'eventSource' => '<string>',
'repoId' => '<string>',
'targetType' => '<string>',
'repositoryRefId' => '<string>'
],
'sortColumn' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload := strings.NewReader("{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pageSize\": 123,\n \"cursor\": \"<string>\",\n \"filter\": {\n \"searchQuery\": \"<string>\",\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\"\n },\n \"sortColumn\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobs": [
{
"jobId": "<string>",
"workflowType": "<string>",
"status": "SEMGREP_WORKFLOW_RUN_STATUS_SUBMITTED",
"deploymentId": "<string>",
"repoId": "<string>",
"gitRef": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"totalFindings": 123,
"eventSource": "<string>",
"repoUrl": "<string>",
"totalCostCredits": 123,
"triggerSource": "<string>"
}
],
"nextCursor": "<string>"
}Authorizations
Get access to data with your API token. Example header:
Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628
The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.
Path Parameters
The unique numerical identifier of the deployment. Can be found via the Deployments Service or in your Settings in the web UI.
"1234"
Body
Maximum number of jobs to return per page.
Opaque pagination cursor returned as next_cursor in a previous response.
Optional filters to narrow the result set.
Show child attributes
Show child attributes
Field to sort by. Supported values: "started_at", "status", "workflow_type".
Sort direction.
| value | description |
|---|---|
| SORT_DIRECTION_ASC | |
| SORT_DIRECTION_DESC |
SORT_DIRECTION_ASC, SORT_DIRECTION_DESC Was this page helpful?