Skip to main content

SAST

Update an existing project’s queue settings

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings");
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 = '{
  "queueKeepMode": "KeepAll",
  "scansType": "OnlyFull",
  "includeScansInProcess": false,
  "identicalCodeOnly": false
}';
const headers = {
  'Content-Type':'application/json;v=2.1',
  'Accept':'application/json;v=2.1',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings',
{
  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=2.1',
  'Accept': 'application/json;v=2.1',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings', headers = headers)

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

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

result = RestClient.put 'https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Project ID

body

body

Cx.ProjectManagement.Presentation.Dtos.ProjectQueueSettingsDto

true

Specifies the project’s scans behavior in the queue.

» queueKeepMode

body

string

false

none

» scansType

body

string

false

none

» includeScansInProcess

body

boolean

false

none

» identicalCodeOnly

body

boolean

false

none

Detailed descriptions

body: Specifies the project’s scans behavior in the queue. QueueKeepMode Options: KeepAll, KeepNew, KeepOld. ScansType Options: All, OnlyIncremental, OnlyFull Note: • The automatic cancellation of parallel scans affects only public scans and the selected scan type (Full / Incremental / All).

Enumerated Values

Parameter

Value

» queueKeepMode

KeepAll

» queueKeepMode

KeepOld

» queueKeepMode

KeepNew

» scansType

All

» scansType

OnlyFull

» scansType

OnlyIncremental

Responses

Status

Meaning

Description

Schema

204

No Content

No Content

Inline

400

Bad Request

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 )

Set project’s queue settings

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings");
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 = '{
  "queueKeepMode": "KeepAll",
  "scansType": "OnlyFull",
  "includeScansInProcess": false,
  "identicalCodeOnly": false
}';
const headers = {
  'Content-Type':'application/json;v=2.1',
  'Accept':'application/json;v=2.1',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings',
{
  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=2.1',
  'Accept': 'application/json;v=2.1',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/sast/project/{id}/queueSettings',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Project ID

body

body

Cx.ProjectManagement.Presentation.Dtos.ProjectQueueSettingsDto

true

Specifies the project’s scans behavior in the queue.

» queueKeepMode

body

string

false

none

» scansType

body

string

false

none

» includeScansInProcess

body

boolean

false

none

» identicalCodeOnly

body

boolean

false

none

Detailed descriptions

body: Specifies the project’s scans behavior in the queue. QueueKeepMode Options: KeepAll, KeepNew, KeepOld. ScansType Options: All, OnlyIncremental, OnlyFull Note: • The automatic cancellation of parallel scans affects only public scans and the selected scan type (Full / Incremental / All).

Enumerated Values

Parameter

Value

» queueKeepMode

KeepAll

» queueKeepMode

KeepOld

» queueKeepMode

KeepNew

» scansType

All

» scansType

OnlyFull

» scansType

OnlyIncremental

Responses

Status

Meaning

Description

Schema

204

No Content

No Content

Inline

400

Bad Request

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 )