List workflow jobs
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>",
"statuses": [],
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>",
"workflowTypes": [
"<string>"
],
"repositoryRefIds": [
"<string>"
],
"repoIds": [
"<string>"
]
},
"sortColumn": "<string>"
}
'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload = {
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"statuses": [],
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>",
"workflowTypes": ["<string>"],
"repositoryRefIds": ["<string>"],
"repoIds": ["<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>',
statuses: [],
workflowType: '<string>',
eventSource: '<string>',
repoId: '<string>',
targetType: '<string>',
repositoryRefId: '<string>',
workflowTypes: ['<string>'],
repositoryRefIds: ['<string>'],
repoIds: ['<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>',
'statuses' => [
],
'workflowType' => '<string>',
'eventSource' => '<string>',
'repoId' => '<string>',
'targetType' => '<string>',
'repositoryRefId' => '<string>',
'workflowTypes' => [
'<string>'
],
'repositoryRefIds' => [
'<string>'
],
'repoIds' => [
'<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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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>",
"supportedWorkflowNames": [
"<string>"
],
"workflowNameOptions": {
"names": [
"<string>"
]
}
}Semgrep Agentic Workflows
List workflow jobs
Lists workflow jobs for a deployment, with support for filtering, sorting, and cursor-based pagination. To fetch issues associated with a job, call PublicIssuesService_ListIssues with the same deploymentId and body.filters.workflowJobIds set to an array containing the job’s numeric ID, such as “123” for job_123. Follow the returned cursor to fetch all issue pages.
POST
/
api
/
workflows
/
v1
/
deployments
/
{deploymentId}
/
jobs
/
list
List workflow jobs
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>",
"statuses": [],
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>",
"workflowTypes": [
"<string>"
],
"repositoryRefIds": [
"<string>"
],
"repoIds": [
"<string>"
]
},
"sortColumn": "<string>"
}
'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/jobs/list"
payload = {
"pageSize": 123,
"cursor": "<string>",
"filter": {
"searchQuery": "<string>",
"statuses": [],
"workflowType": "<string>",
"eventSource": "<string>",
"repoId": "<string>",
"targetType": "<string>",
"repositoryRefId": "<string>",
"workflowTypes": ["<string>"],
"repositoryRefIds": ["<string>"],
"repoIds": ["<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>',
statuses: [],
workflowType: '<string>',
eventSource: '<string>',
repoId: '<string>',
targetType: '<string>',
repositoryRefId: '<string>',
workflowTypes: ['<string>'],
repositoryRefIds: ['<string>'],
repoIds: ['<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>',
'statuses' => [
],
'workflowType' => '<string>',
'eventSource' => '<string>',
'repoId' => '<string>',
'targetType' => '<string>',
'repositoryRefId' => '<string>',
'workflowTypes' => [
'<string>'
],
'repositoryRefIds' => [
'<string>'
],
'repoIds' => [
'<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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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 \"statuses\": [],\n \"workflowType\": \"<string>\",\n \"eventSource\": \"<string>\",\n \"repoId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"repositoryRefId\": \"<string>\",\n \"workflowTypes\": [\n \"<string>\"\n ],\n \"repositoryRefIds\": [\n \"<string>\"\n ],\n \"repoIds\": [\n \"<string>\"\n ]\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>",
"supportedWorkflowNames": [
"<string>"
],
"workflowNameOptions": {
"names": [
"<string>"
]
}
}This endpoint is experimental. It may change or be removed without notice and is not covered by API stability guarantees.
Authorizations
SemgrepWebTokenSemgrepJWT
Path Parameters
Body
application/json
Response
200 - application/json
OK
Was this page helpful?