List available workflow types
curl --request GET \
--url https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry \
--header 'Authorization: Bearer <token>'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry', 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}/registry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflows": [
{
"name": "<string>",
"description": "<string>",
"targetType": "<string>",
"version": "<string>",
"graph": {
"schemaVersion": 123,
"startStep": "<string>",
"endStep": "<string>",
"steps": [
{
"name": "<string>",
"type": "<string>",
"next": [
"<string>"
],
"doc": "<string>",
"line": 123,
"matchingJoin": "<string>",
"foreachArtifact": "<string>",
"numParallel": 123,
"condition": "<string>",
"switchCases": [
{
"caseValue": "<string>",
"step": "<string>"
}
]
}
]
},
"displayName": "<string>",
"inputs": {
"schemaVersion": 123,
"triggerKind": "WORKFLOW_TRIGGER_KIND_GENERIC",
"jsonSchema": {},
"fields": [
{
"name": "<string>",
"type": "WORKFLOW_INPUT_TYPE_STRING",
"required": true,
"defaultValue": "<unknown>",
"description": "<string>",
"visibility": "WORKFLOW_INPUT_VISIBILITY_USER",
"ui": "WORKFLOW_INPUT_UI_TEXT",
"semanticType": "<string>"
}
]
},
"enabled": true,
"supportsPr": true,
"phases": [
"<string>"
],
"productSkus": [
"<string>"
],
"unavailableReason": "<string>"
}
]
}Semgrep Agentic Workflows
List available workflow types
Lists the Semgrep Agentic Workflows available to the deployment, including whether each is enabled and can run on pull requests. Run one with SemgrepWorkflowsService_TriggerSemgrepWorkflow.
GET
/
api
/
workflows
/
v1
/
deployments
/
{deploymentId}
/
registry
List available workflow types
curl --request GET \
--url https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry \
--header 'Authorization: Bearer <token>'import requests
url = "https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry', 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}/registry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://semgrep.dev/api/workflows/v1/deployments/{deploymentId}/registry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workflows": [
{
"name": "<string>",
"description": "<string>",
"targetType": "<string>",
"version": "<string>",
"graph": {
"schemaVersion": 123,
"startStep": "<string>",
"endStep": "<string>",
"steps": [
{
"name": "<string>",
"type": "<string>",
"next": [
"<string>"
],
"doc": "<string>",
"line": 123,
"matchingJoin": "<string>",
"foreachArtifact": "<string>",
"numParallel": 123,
"condition": "<string>",
"switchCases": [
{
"caseValue": "<string>",
"step": "<string>"
}
]
}
]
},
"displayName": "<string>",
"inputs": {
"schemaVersion": 123,
"triggerKind": "WORKFLOW_TRIGGER_KIND_GENERIC",
"jsonSchema": {},
"fields": [
{
"name": "<string>",
"type": "WORKFLOW_INPUT_TYPE_STRING",
"required": true,
"defaultValue": "<unknown>",
"description": "<string>",
"visibility": "WORKFLOW_INPUT_VISIBILITY_USER",
"ui": "WORKFLOW_INPUT_UI_TEXT",
"semanticType": "<string>"
}
]
},
"enabled": true,
"supportsPr": true,
"phases": [
"<string>"
],
"productSkus": [
"<string>"
],
"unavailableReason": "<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
Query Parameters
Was this page helpful?