Skip to main content

SAST

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://10.32.9.160/cxrestapi/help/sast/engineServers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/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://10.32.9.160/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://10.32.9.160/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://10.32.9.160/cxrestapi/help/sast/engineServers',
  params: {
  }, headers: headers

p JSON.parse(result)
OK

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 )

Registers an Engine Server

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/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.3',
  'Accept':'application/json;v=1.3',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/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.3',
  'Accept': 'application/json;v=1.3',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://10.32.9.160/cxrestapi/help/sast/engineServers', headers = headers)

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

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

result = RestClient.post 'https://10.32.9.160/cxrestapi/help/sast/engineServers',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

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

Created

Cx.Sast.EngineServers.Presentation.Dtos.CreateEngineServerDto

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 details of a specific Engine Server

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

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

fetch('https://10.32.9.160/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.3',
  'Authorization': 'Bearer {access-token}'
}

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

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

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

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

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Engine Server

OK

Responses

Status

Meaning

Description

Schema

200

OK

OK

Cx.Sast.EngineServers.ApplicationContracts.DTOs.EngineServerResponse13Dto

404

Not Found

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.3"},
        "Accept": []string{"application/json;v=1.3"},
        "Authorization": []string{"Bearer {access-token}"},
    }

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/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.3',
  'Accept':'application/json;v=1.3',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/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.3',
  'Accept': 'application/json;v=1.3',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}', headers = headers)

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

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

result = RestClient.put 'https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

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

OK

Cx.SuperTypes.API.Dtos.LinkedResource

400

Bad Request

Bad Request

None

404

Not Found

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.3"},
        "Authorization": []string{"Bearer {access-token}"},
    }

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

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

fetch('https://10.32.9.160/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.3',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}', headers = headers)

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

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

result = RestClient.delete 'https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific Engine Server

Responses

Status

Meaning

Description

Schema

204

No Content

Deleted

Inline

400

Bad Request

Bad Request

None

404

Not Found

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.3"},
        "Accept": []string{"application/json;v=1.3"},
        "Authorization": []string{"Bearer {access-token}"},
    }

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://10.32.9.160/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.3',
  'Accept':'application/json;v=1.3',
  'Authorization':'Bearer {access-token}'
};

fetch('https://10.32.9.160/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.3',
  'Accept': 'application/json;v=1.3',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}', headers = headers)

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

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

result = RestClient.patch 'https://10.32.9.160/cxrestapi/help/sast/engineServers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

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

OK

Cx.SuperTypes.API.Dtos.LinkedResource

400

Bad Request

Bad Request

None

404

Not Found

Not Found

None

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