Skip to main content

GENERAL

Returns version, hotfix number and engine pack version

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://***.***.***.***/cxrestapi/help/system/version", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/system/version");
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.1',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/system/version',
{
  method: 'GET',

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

r = requests.get('https://***.***.***.***/cxrestapi/help/system/version', headers = headers)

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

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

result = RestClient.get 'https://***.***.***.***/cxrestapi/help/system/version',
  params: {
  }, headers: headers

p JSON.parse(result)

Responses

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