Skip to main content

Returns a Json summary report for the specified scan 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/osa/reports", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/osa/reports?scanId=497f6eca-6276-4993-bfeb-53cbbbba6f08");
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/osa/reports?scanId=497f6eca-6276-4993-bfeb-53cbbbba6f08',
{
  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/osa/reports', params={
  'scanId': '497f6eca-6276-4993-bfeb-53cbbbba6f08'
}, 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/osa/reports',
  params: {
  'scanId' => 'string(uuid)'
}, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

scanId

query

string(uuid)

true

Unique Id of the specific scan

Responses

Status

Meaning

Description

Schema

200

OK

none

System.Net.Http.ByteArrayContent

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