- Checkmarx Documentation
- Checkmarx SAST
- SAST API Guide
- CXSAST (REST) API
- CxSAST (REST) API v1
- SAST
SAST
Get details of all presets
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/presets", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/presets"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/presets', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/presets', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/presets', params: { }, headers: headers p JSON.parse(result)
GET /sast/presets
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets details of a specific Scan
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scans/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scans/{id}', params: { }, headers: headers p JSON.parse(result)
GET /sast/scans/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique ID of a specific scan |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Delete a specific Scan
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("DELETE", "https://***.***.***.***/cxrestapi/help/sast/scans/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("DELETE"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.delete('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.delete 'https://***.***.***.***/cxrestapi/help/sast/scans/{id}', params: { }, headers: headers p JSON.parse(result)
DELETE /sast/scans/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique ID of a specific scan |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Inline | |
400 | Bad Request | None | |
404 | Not Found | None |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Creates or overrides comment of existing scan
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PATCH", "https://***.***.***.***/cxrestapi/help/sast/scans/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PATCH"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "comment": "Some comment" }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', { method: 'PATCH', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.patch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/sast/scans/{id}', params: { }, headers: headers p JSON.parse(result)
PATCH /sast/scans/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique ID of a scan the comment to add for |
body | body | true | Comment’s content | |
» comment | body | string | true | Specifies the scan comment |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get details of specific preset
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/presets/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/presets/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/presets/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/presets/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/presets/{id}', params: { }, headers: headers p JSON.parse(result)
GET /sast/presets/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific preset |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets details of all Engine Servers
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/engineServers", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': '0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/engineServers', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => '0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/engineServers', params: { }, headers: headers p JSON.parse(result)
GET /sast/engineServers
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Registers an Engine Server
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/engineServers", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "name": "string", "uri": "string", "minLoc": 0, "maxLoc": 0, "isBlocked": true, "maxScans": 0 }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/engineServers', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/engineServers', params: { }, headers: headers p JSON.parse(result)
POST /sast/engineServers
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Cx.Sast.EngineServers.ApplicationContracts.DTOs.EngineServerDTO | true | Engine Server details |
» name | body | string | true | none |
» uri | body | string | true | none |
» minLoc | body | integer(int32) | true | none |
» maxLoc | body | integer(int32) | true | none |
» isBlocked | body | boolean | true | none |
» maxScans | body | integer(int32) | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Cx.Sast.EngineServers.Presentation.Dtos.CreateEngineServerDto | |
400 | Bad Request | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets details of a scan in queue
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', params: { }, headers: headers p JSON.parse(result)
GET /sast/scansQueue/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Filters the Scans Queue by an unique ID of a specific scan |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | none | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Update status of a scan in queue
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PATCH", "https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PATCH"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "status": "Canceled" }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', { method: 'PATCH', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.patch('https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/sast/scansQueue/{id}', params: { }, headers: headers p JSON.parse(result)
PATCH /sast/scansQueue/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique ID of a specific scan in the queue |
body | body | true | ScanRequest data that is needed to be updated, Status options: Canceled | |
» status | body | string | true | none |
Enumerated Values
Parameter | Value |
---|---|
» status | Empty |
» status | Canceled |
» status | Postponed |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | none | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets details of a specific Engine Server
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', params: { }, headers: headers p JSON.parse(result)
GET /sast/engineServers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific Engine Server |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cx.Sast.EngineServers.ApplicationContracts.DTOs.EngineServerResponse10Dto | |
404 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Updates an Engine Server
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PUT", "https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PUT"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "name": "string", "uri": "string", "minLoc": 0, "maxLoc": 0, "isBlocked": true, "maxScans": 0 }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.put('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.put 'https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', params: { }, headers: headers p JSON.parse(result)
PUT /sast/engineServers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific Engine Server |
body | body | Cx.Sast.EngineServers.ApplicationContracts.DTOs.EngineServerDTO | true | Engine Server details |
» name | body | string | true | none |
» uri | body | string | true | none |
» minLoc | body | integer(int32) | true | none |
» maxLoc | body | integer(int32) | true | none |
» isBlocked | body | boolean | true | none |
» maxScans | body | integer(int32) | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ||
400 | Bad Request | None | |
404 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Unregisters an Engine Server
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("DELETE", "https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("DELETE"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.delete('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.delete 'https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', params: { }, headers: headers p JSON.parse(result)
DELETE /sast/engineServers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific Engine Server |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | Deleted | Inline | |
400 | Bad Request | None | |
404 | Not Found | None |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Updates an Engine Server by edit single field
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PATCH", "https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PATCH"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "name": "string", "uri": "string", "minLoc": 0, "maxLoc": 0, "isBlocked": true, "maxScans": 0 }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', { method: 'PATCH', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.patch('https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/sast/engineServers/{id}', params: { }, headers: headers p JSON.parse(result)
PATCH /sast/engineServers/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific Engine Server |
body | body | Cx.Sast.EngineServers.ApplicationContracts.Models.EngineServerPatchModel | true | Engine Server details |
» name | body | string | false | Engine Server name |
» uri | body | string | false | Engine Server Uri |
» minLoc | body | integer(int32) | false | Minimum LinesOfCode for the server |
» maxLoc | body | integer(int32) | false | Maximum LinesOfCode for the server |
» isBlocked | body | boolean | false | Flag to determine if EngineServer is blocked |
» maxScans | body | integer(int32) | false | Max concurrent scans |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ||
400 | Bad Request | None | |
404 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets engine configurations list
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/engineConfigurations", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineConfigurations"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineConfigurations', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/engineConfigurations', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/engineConfigurations', params: { }, headers: headers p JSON.parse(result)
GET /sast/engineConfigurations
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Cx.Sast.ScanSettings.Application.Dtos.EngineConfigurationDto] | false | none | none |
» id | integer(int64) | false | read-only | none |
» name | string | false | read-only | none |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets the scan settings
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scanSettings/{projectId}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scanSettings/{projectId}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scanSettings/{projectId}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scanSettings/{projectId}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scanSettings/{projectId}', params: { }, headers: headers p JSON.parse(result)
GET /sast/scanSettings/{projectId}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | integer(int64) | true | Unique Id of the specific Project |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cx.Sast.ScanSettings.Presentation.Dtos.ScanSettingsResponseDto | |
400 | Bad Request | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets a specific engine configuration by id
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/engineConfigurations/{id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/engineConfigurations/{id}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/engineConfigurations/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/engineConfigurations/{id}', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/engineConfigurations/{id}', params: { }, headers: headers p JSON.parse(result)
GET /sast/engineConfigurations/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific Engine Configuration |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cx.Sast.ScanSettings.Application.Dtos.EngineConfigurationDto | |
400 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get the results statistics of a specific scan
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scans/{id}/resultsStatistics", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{id}/resultsStatistics"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}/resultsStatistics', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scans/{id}/resultsStatistics', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scans/{id}/resultsStatistics', params: { }, headers: headers p JSON.parse(result)
GET /sast/scans/{id}/resultsStatistics
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cx.Sast.ScanExecution.Presentation.Dtos.ResultsStatisticsDto |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets scans in queue list
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scansQueue", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scansQueue"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scansQueue', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': '0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scansQueue', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => '0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scansQueue', params: { }, headers: headers p JSON.parse(result)
GET /sast/scansQueue
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | query | integer(int64) | false | Filters the Scans Queue by an unique ID of a specific project |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | none | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get scan result labels fields
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', params: { }, headers: headers p JSON.parse(result)
GET /sast/scans/{scanId}/results/{pathId}/labels
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scanId | path | integer(int64) | true | Unique Id of a scan |
pathId | path | integer(int64) | true | Unique Id of the result path |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Labels are changes made on the results’ properties by the user. If no changes were made to the result’s properties by the user - the state is “null” |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Update scan result labels fields
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PATCH", "https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PATCH"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "state": 0, "severity": 0, "userAssignment": "string", "comment": "string" }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', { method: 'PATCH', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.patch('https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/sast/scans/{scanId}/results/{pathId}/labels', params: { }, headers: headers p JSON.parse(result)
PATCH /sast/scans/{scanId}/results/{pathId}/labels
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scanId | path | integer(int64) | true | Unique Id of a scan |
pathId | path | integer(int64) | true | Unique Id of the result path |
body | body | true | Result label details | |
» state | body | integer(int32) | false | none |
» severity | body | integer(int32) | false | none |
» userAssignment | body | string | false | none |
» comment | body | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | No Content |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets a scan result’s short vulnerability description
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scans/{id}/results/{pathId}/shortDescription", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans/{id}/results/{pathId}/shortDescription"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans/{id}/results/{pathId}/shortDescription', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scans/{id}/results/{pathId}/shortDescription', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scans/{id}/results/{pathId}/shortDescription', params: { }, headers: headers p JSON.parse(result)
GET /sast/scans/{id}/results/{pathId}/shortDescription
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the scan |
pathId | path | integer(int64) | true | Unique Id of the result path |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | No Content | Cx.Sast.Results.Presentation.Models.GetResultShortDescriptionModel | |
400 | Bad Request | None | |
403 | Forbidden | None | |
404 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get the project status of the scan results publishing process
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings/status", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings/status"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings/status', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings/status', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings/status', params: { }, headers: headers p JSON.parse(result)
GET /sast/projects/{id}/publisher/policyFindings/status
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific project |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Gets a collection of scans By Project
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/scans", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scans"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scans', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/scans', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/scans', params: { }, headers: headers p JSON.parse(result)
GET /sast/scans
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
last | query | integer(int32) | false | Amount of the latest scans |
scanStatus | query | string | false | Specifies the scan stage |
projectId | query | integer(int64) | false | Unique ID of a specific project |
Enumerated Values
Parameter | Value |
---|---|
scanStatus | Scanning |
scanStatus | Finished |
scanStatus | Canceled |
scanStatus | Failed |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | false | none | none | |
» id | integer(int64) | false | none | none |
» project | false | none | none | |
»» id | integer(int64) | false | read-only | none |
»» name | string | false | read-only | none |
»» link | false | none | none | |
»»» rel | string | false | read-only | none |
»»» uri | string | false | read-only | none |
» status | false | none | none | |
»» id | integer(int64) | false | read-only | none |
»» name | string | false | read-only | none |
»» details | Cx.Sast.ScanExecution.Presentation.Dtos.ScanStatusDetailsDto | false | none | none |
»»» stage | string | false | read-only | none |
»»» step | string | false | read-only | none |
» scanType | string | false | none | none |
» comment | string | false | none | none |
» dateAndTime | false | none | none | |
»» startedOn | string(date-time) | false | read-only | none |
»» finishedOn | string(date-time) | false | read-only | none |
»» engineStartedOn | string(date-time) | false | read-only | none |
»» engineFinishedOn | string(date-time) | false | read-only | none |
» resultsStatistics | Cx.Sast.ScanExecution.Presentation.Dtos.ResultsStatisticsLink | false | none | none |
»» link | false | none | none | |
» scanState | false | none | none | |
»» path | string | false | none | none |
»» sourceId | string | false | none | none |
»» filesCount | integer(int64) | false | none | none |
»» linesOfCode | integer(int64) | false | none | none |
»» failedLinesOfCode | integer(int64) | false | none | none |
»» cxVersion | string | false | none | none |
»» languageStateCollection | false | none | none | |
»»» languageID | integer(int32) | false | none | none |
»»» languageName | string | false | none | none |
»»» languageHash | string | false | none | none |
»»» stateCreationDate | string(date-time) | false | none | none |
» owner | string | false | none | none |
» origin | string | false | none | none |
» initiatorName | string | false | none | none |
» owningTeamId | integer(int32) | false | none | none |
» isPublic | boolean | false | none | none |
» isLocked | boolean | false | none | none |
» isIncremental | boolean | false | none | none |
» scanRisk | integer(int64) | false | none | none |
» scanRiskSeverity | integer(int64) | false | none | none |
» engineServer | false | none | none | |
»» id | integer(int64) | false | none | none |
»» name | string | false | none | none |
»» link | false | none | none | |
» finishedScanStatus | string | false | none | none |
» partialScanReasons | false | none | none | |
»» abortedMessage | string | false | none | none |
»» abortedStatus | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
scanType | Unknown |
scanType | AllScans |
scanType | Regular |
scanType | Subset |
scanType | Partial |
scanType | Running |
finishedScanStatus | None |
finishedScanStatus | Completed |
finishedScanStatus | Partial |
abortedStatus | None |
abortedStatus | Queries |
abortedStatus | Stages |
abortedStatus | QueriesExceededResultThreshold |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Creates a new scan
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/x-www-form-urlencoded"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/scanWithSettings", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scanWithSettings"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "projectId": 0, "overrideProjectSetting": "false", "isIncremental": "false", "isPublic": "true", "forceScan": "true", "comment": "string", "presetId": 0, "engineConfigurationId": 0, "zippedSource": "string" }'; const headers = { 'Content-Type':'application/x-www-form-urlencoded', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scanWithSettings', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/scanWithSettings', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/scanWithSettings', params: { }, headers: headers p JSON.parse(result)
POST /sast/scanWithSettings
projectId: 0 overrideProjectSetting: "false" isIncremental: "false" isPublic: "true" forceScan: "true" comment: string presetId: 0 engineConfigurationId: 0 zippedSource: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» projectId | body | integer | true | Specifies the Unique Id of the specific project to be scanned |
» overrideProjectSetting | body | boolean | false | Specifies whether to overwrite project settings to be the default for the next scans .If set to false or empty - do not overwrite project settings. If set to true - overwrite project settings |
» isIncremental | body | boolean | false | Specifies whether the scan is incremental of full |
» isPublic | body | boolean | false | Specifies whether the requested scan is public or private |
» forceScan | body | boolean | false | Specifies whether the code should be scanned regardless of unchanged code |
» comment | body | string | false | Specifies the scan comment |
» presetId | body | integer | false | Specify the preset id to use during the scan, 0 = use project’s default |
» engineConfigurationId | body | integer | false | Specify the engine-configuration to use during the scan, 0 = use project’s default |
» zippedSource | body | string(binary) | false | source Zip |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | ||
400 | Bad Request | None | |
404 | Not Found | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get the scan results for a specific query in Attack Vector format. This format includes all nodes.
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors?scanId=0&queryVersion=0"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors?scanId=0&queryVersion=0', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors', params={ 'scanId': '0', 'queryVersion': '0' }, headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors', params: { 'scanId' => 'integer(int64)', 'queryVersion' => 'integer(int64)' }, headers: headers p JSON.parse(result)
GET /sast/results/attack-vectors
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scanId | query | integer(int64) | true | Unique ID of a scan |
queryVersion | query | integer(int64) | true | Query version code |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Get the scan results for a specific query in Attack Vector format grouped by BFL (Best Fix Location node).
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors-by-bfl", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors-by-bfl?scanId=0&queryVersion=0"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors-by-bfl?scanId=0&queryVersion=0', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.get('https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors-by-bfl', params={ 'scanId': '0', 'queryVersion': '0' }, headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.get 'https://***.***.***.***/cxrestapi/help/sast/results/attack-vectors-by-bfl', params: { 'scanId' => 'integer(int64)', 'queryVersion' => 'integer(int64)' }, headers: headers p JSON.parse(result)
GET /sast/results/attack-vectors-by-bfl
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scanId | query | integer(int64) | true | Unique ID of a scan |
queryVersion | query | integer(int64) | true | Query version code |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cx.Sast.Results.Presentation.Models.GetAttackVectorsByBFLModel |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Update the scan settings
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PUT", "https://***.***.***.***/cxrestapi/help/sast/scanSettings", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scanSettings"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PUT"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "projectId": 1, "presetId": 1, "engineConfigurationId": 1, "postScanActionId": 1, "emailNotifications": { "failedScan": [ "string" ], "beforeScan": [ "string" ], "afterScan": [ "string" ] } }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scanSettings', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.put('https://***.***.***.***/cxrestapi/help/sast/scanSettings', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.put 'https://***.***.***.***/cxrestapi/help/sast/scanSettings', params: { }, headers: headers p JSON.parse(result)
PUT /sast/scanSettings
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Cx.Sast.ScanSettings.Presentation.Dtos.ScanSettingsRequestDto | true | Scan settings details |
» projectId | body | integer(int64) | true | none |
» presetId | body | integer(int64) | true | none |
» engineConfigurationId | body | integer(int64) | true | none |
» postScanActionId | body | integer(int64) | false | none |
» emailNotifications | body | Cx.Sast.ScanSettings.Presentation.Dtos.EmailNotificationsDto | false | none |
»» failedScan | body | [string] | false | none |
»» beforeScan | body | [string] | false | none |
»» afterScan | body | [string] | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ||
400 | Bad Request | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Define the scan settings
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/scanSettings", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/scanSettings"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "projectId": 1, "presetId": 1, "engineConfigurationId": 1, "postScanActionId": 1, "emailNotifications": { "failedScan": [ "string" ], "beforeScan": [ "string" ], "afterScan": [ "string" ] } }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/scanSettings', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/scanSettings', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/scanSettings', params: { }, headers: headers p JSON.parse(result)
POST /sast/scanSettings
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Cx.Sast.ScanSettings.Presentation.Dtos.ScanSettingsRequestDto | true | Scan settings details |
» projectId | body | integer(int64) | true | none |
» presetId | body | integer(int64) | true | none |
» engineConfigurationId | body | integer(int64) | true | none |
» postScanActionId | body | integer(int64) | false | none |
» emailNotifications | body | Cx.Sast.ScanSettings.Presentation.Dtos.EmailNotificationsDto | false | none |
»» failedScan | body | [string] | false | none |
»» beforeScan | body | [string] | false | none |
»» afterScan | body | [string] | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | ||
400 | Bad Request | None |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Define the project’s scans scheduling
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PUT", "https://***.***.***.***/cxrestapi/help/sast/project/{projectId}/scheduling", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/project/{projectId}/scheduling"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PUT"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "scheduleType": "string", "scheduledDays": [ "string" ], "scheduleTime": "string" }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/project/{projectId}/scheduling', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.put('https://***.***.***.***/cxrestapi/help/sast/project/{projectId}/scheduling', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.put 'https://***.***.***.***/cxrestapi/help/sast/project/{projectId}/scheduling', params: { }, headers: headers p JSON.parse(result)
PUT /sast/project/{projectId}/scheduling
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | integer(int32) | true | Project ID |
body | body | true | Scan scheduling details | |
» scheduleType | body | string | false | The Schedule type. |
» scheduledDays | body | [string] | false | The Schedule days, relevant just in case ScheduleType is “Weekly”.type, allowed values are: “None”, “Weekly”. |
» scheduleTime | body | string | false | The Schedule time in each scheduled days format {HH:MM}. |
Detailed descriptions
» scheduleType: The Schedule type. Allowed values are: “None”, “Weekly”.
» scheduledDays: The Schedule days, relevant just in case ScheduleType is “Weekly”.type, allowed values are: “None”, “Weekly”. Allowed Values: “Sunday”,“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | NoContent | Inline | |
400 | Bad Request | None |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Attach ticket id to scan results
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/results/tickets", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/results/tickets"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "resultsId": [ "string" ], "ticketId": "string" }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/results/tickets', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/results/tickets', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/results/tickets', params: { }, headers: headers p JSON.parse(result)
POST /sast/results/tickets
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | true | Result ticket details | |
» resultsId | body | [string] | true | none |
» ticketId | body | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Inline | |
400 | Bad Request | None |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Stops data retention execution
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/dataRetention/stop", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/dataRetention/stop"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/dataRetention/stop', { method: 'POST', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/dataRetention/stop', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/dataRetention/stop', params: { }, headers: headers p JSON.parse(result)
POST /sast/dataRetention/stop
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Starts data retention execution, by given date range
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/dataRetention/byDateRange", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/dataRetention/byDateRange"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "startDate": "2019-08-24", "endDate": "2019-08-24", "durationLimitInHours": 0 }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/dataRetention/byDateRange', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/dataRetention/byDateRange', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/dataRetention/byDateRange', params: { }, headers: headers p JSON.parse(result)
POST /sast/dataRetention/byDateRange
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | true | Specify the data retention by dates range settings | |
» startDate | body | string(date) | true | none |
» endDate | body | string(date) | true | none |
» durationLimitInHours | body | integer(int64) | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Starts data retention execution, by given number of last successful scans
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/dataRetention/byNumberOfScans", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/dataRetention/byNumberOfScans"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '{ "numOfSuccessfulScansToPreserve": 0, "durationLimitInHours": 0 }'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/dataRetention/byNumberOfScans', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/dataRetention/byNumberOfScans', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/dataRetention/byNumberOfScans', params: { }, headers: headers p JSON.parse(result)
POST /sast/dataRetention/byNumberOfScans
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | true | Specify the data retention by number of last successful scans settings | |
» numOfSuccessfulScansToPreserve | body | integer(int32) | true | none |
» durationLimitInHours | body | integer(int64) | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | Inline |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Publish project’s last scan results
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const headers = { 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings', { method: 'POST', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.post('https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/projects/{id}/publisher/policyFindings', params: { }, headers: headers p JSON.parse(result)
POST /sast/projects/{id}/publisher/policyFindings
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | Unique Id of the specific project |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created |
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )
Update the Iast Correlation score between IAST and SAST scan results.
package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json;v=1.0"}, "Accept": []string{"application/json;v=1.0"}, "Authorization": []string{"Bearer {access-token}"}, } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("PATCH", "https://***.***.***.***/cxrestapi/help/sast/results", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... }
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/results"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("PATCH"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString());
const inputBody = '[ { "scanId": 0, "pathId": 0, "iastCorrelationScore": 0 } ]'; const headers = { 'Content-Type':'application/json;v=1.0', 'Accept':'application/json;v=1.0', 'Authorization':'Bearer {access-token}' }; fetch('https://***.***.***.***/cxrestapi/help/sast/results', { method: 'PATCH', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
import requests headers = { 'Content-Type': 'application/json;v=1.0', 'Accept': 'application/json;v=1.0', 'Authorization': 'Bearer {access-token}' } r = requests.patch('https://***.***.***.***/cxrestapi/help/sast/results', headers = headers) print(r.json())
require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json;v=1.0', 'Accept' => 'application/json;v=1.0', 'Authorization' => 'Bearer {access-token}' } result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/sast/results', params: { }, headers: headers p JSON.parse(result)
PATCH /sast/results
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Cx.Sast.Results.Presentation.Models.IastResultsCorrelationUpdateModel | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Inline | |
500 | Internal Server Error | None |
Response Schema
To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )