Skip to main content

SAST

Gets Scan logs.

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/logs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/logs");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/logs',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/logs', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/logs',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

none

Responses

Status

Meaning

Description

Schema

200

OK

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 basic metrics of a scan

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/statistics", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/statistics");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/statistics',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/statistics', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/statistics',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Scan

Responses

Status

Meaning

Description

Schema

200

OK

OK

ScanMetrics.Presentation.DTOs.Api.ScanStatisticsDTO

400

Bad Request

Bad Request

None

To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )

Gets parsed files metrics of a scan

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/parsedFiles", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/parsedFiles");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/parsedFiles',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/parsedFiles', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/parsedFiles',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Scan

Responses

Status

Meaning

Description

Schema

200

OK

OK

ScanMetrics.Presentation.DTOs.Api.ScanParsedFilesDTO

400

Bad Request

Bad Request

None

To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )

Gets failed queries metrics of a scan

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedQueries", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedQueries");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedQueries',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedQueries', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedQueries',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Scan

Responses

Status

Meaning

Description

Schema

200

OK

OK

ScanMetrics.Presentation.DTOs.Api.ScanFailedQueriesDTO

400

Bad Request

Bad Request

None

To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )

Gets failed general queries metrics of a scan

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedGeneralQueries", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedGeneralQueries");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedGeneralQueries',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedGeneralQueries', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/failedGeneralQueries',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Scan

Responses

Status

Meaning

Description

Schema

200

OK

OK

ScanMetrics.Presentation.DTOs.Api.ScanFailedGeneralQueriesDTO

400

Bad Request

Bad Request

None

To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )

Gets succeeded general queries metrics of a scan

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json;v=3.0"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://10.32.9.160/cxrestapi/help/sast/scans/{id}/succeededGeneralQueries", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/cxrestapi/help/sast/scans/{id}/succeededGeneralQueries");
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=3.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/succeededGeneralQueries',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json;v=3.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://10.32.9.160/cxrestapi/help/sast/scans/{id}/succeededGeneralQueries', headers = headers)

print(r.json())
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json;v=3.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://10.32.9.160/cxrestapi/help/sast/scans/{id}/succeededGeneralQueries',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Scan

Responses

Status

Meaning

Description

Schema

200

OK

OK

ScanMetrics.Presentation.DTOs.Api.ScanSucceededGeneralQueriesDTO

400

Bad Request

Bad Request

None

To perform this operation, you must be authenticated by means of one of the following methods: Bearer ( Scopes: sast_api )