Skip to main content

GENERAL

Gets a collection of Custom Tasks (Scan Actions)

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/customTasks", data)
    req.Header = headers

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

p JSON.parse(result)

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[Cx.CustomTasks.Presentation.Dtos.GetCustomTaskDto]

false

none

none

» id

integer(int64)

false

none

none

» name

string

false

none

none

» type

string

false

none

none

» data

string

false

none

none

» link

Cx.SuperTypes.API.Dtos.LinkDtoBase

false

none

none

»» rel

string

false

read-only

none

»» uri

string

false

read-only

none

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

Get all CustomFields

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/customFields", data)
    req.Header = headers

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

p JSON.parse(result)

Responses

Status

Meaning

Description

Schema

200

OK

OK

Inline

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[Cx.CustomFields.Api.ViewModels.CustomFieldViewModel]

false

none

none

» id

integer(int64)

false

none

none

» name

string

false

none

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 project

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/projects/{id}", data)
    req.Header = headers

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

fetch('https://***.***.***.***/cxrestapi/help/projects/{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.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://***.***.***.***/cxrestapi/help/projects/{id}', 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/projects/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a specific project

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Cx.ProjectManagement.Presentation.Dtos.ProjectBaseDto

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 )

Updates an existing project

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{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",
  "owningTeam": 0,
  "customFields": [
    {
      "id": 0,
      "value": "string"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

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

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

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

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

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a project to update

body

body

Cx.ProjectManagement.Presentation.Dtos.UpdateFullProjectDto

true

Project details

» name

body

string

true

Specifies the name of the project

» owningTeam

body

integer(int32)

true

Specifies the team id which owns the project

» customFields

body

[Cx.ProjectManagement.Presentation.Dtos.UpdateCustomFieldDto]

true

Specifies the custom fields in a project

»» id

body

integer(int64)

false

none

»» value

body

string

false

none

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 )

Deletes an existing project with all related scans

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{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 inputBody = '{
  "deleteRunningScans": true
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}',
{
  method: 'DELETE',
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://***.***.***.***/cxrestapi/help/projects/{id}', headers = headers)

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

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

result = RestClient.delete 'https://***.***.***.***/cxrestapi/help/projects/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Updates an existing project’s name or team Id

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{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": "SomeProject",
  "owningTeam": 12345678
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://***.***.***.***/cxrestapi/help/projects/{id}', headers = headers)

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

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

result = RestClient.patch 'https://***.***.***.***/cxrestapi/help/projects/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a project to update

body

body

Cx.ProjectManagement.Presentation.Dtos.UpdateProjectDto

true

Project details

» name

body

string

false

Specifies the name of the project

» owningTeam

body

integer(int32)

false

Specifies the team id which owns the project

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 )

Returns version and hotfix number

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/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.0',
  '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.0',
  '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.0',
  'Authorization' => 'Bearer {access-token}'
}

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

p JSON.parse(result)

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Cx.CrossCutting.WebAPIHost.ValueObjects.VersionResponse

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

Gets a Custom Task (Scan Action) by 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/customTasks/{id}", data)
    req.Header = headers

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

fetch('https://***.***.***.***/cxrestapi/help/customTasks/{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.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://***.***.***.***/cxrestapi/help/customTasks/{id}', 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/customTasks/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a specific Custom task

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Cx.CustomTasks.Presentation.Dtos.GetCustomTaskDto

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 )

Gets details of all issue tracking systems

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

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

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

headers = {
  'Accept' => '0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://***.***.***.***/cxrestapi/help/issueTrackingSystems',
  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 )

Gets the report when ready

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/reports/sastScan/{id}", data)
    req.Header = headers

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

fetch('https://***.***.***.***/cxrestapi/help/reports/sastScan/{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.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://***.***.***.***/cxrestapi/help/reports/sastScan/{id}', 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/reports/sastScan/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific report

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

204

No Content

No Content

Inline

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 )

Gets a Custom Task (Scan Action) by name

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/customTasks/name/{name}", data)
    req.Header = headers

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

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

name

path

string

true

Name of a specific Custom task

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[Cx.CustomTasks.Presentation.Dtos.GetCustomTaskDto]

false

none

none

» id

integer(int64)

false

none

none

» name

string

false

none

none

» type

string

false

none

none

» data

string

false

none

none

» link

Cx.SuperTypes.API.Dtos.LinkDtoBase

false

none

none

»» rel

string

false

read-only

none

»» uri

string

false

read-only

none

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

Verification of team existence

Used to verify before creating a new project for a team

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/projects/precheck/teams/{id}", data)
    req.Header = headers

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

fetch('https://***.***.***.***/cxrestapi/help/projects/precheck/teams/{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.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://***.***.***.***/cxrestapi/help/projects/precheck/teams/{id}', 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/projects/precheck/teams/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int32)

true

none

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Cx.ProjectManagement.Presentation.Dtos.PrecheckTeamDto

403

Forbidden

Forbidden

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 )

Gets the status of a specific report in the queue

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/reports/sastScan/{id}/status", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/reports/sastScan/{id}/status");
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/reports/sastScan/{id}/status',
{
  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/reports/sastScan/{id}/status', 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/reports/sastScan/{id}/status',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific report

Ok

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

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 )

Retrieves CxComponentConfiguration settings

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/configurationsExtended/{group}", data)
    req.Header = headers

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

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

group

path

string

true

Configuration group name associated with the settings to be retrieved

Enumerated Values

Parameter

Value

group

None

group

AppSecCoach

group

AuthorizationService

group

Portal

group

Scanning

group

SystemSettings

group

QueueSettings

group

Audit

group

Logging

group

DataRetention

group

Reports

Responses

Status

Meaning

Description

Schema

200

OK

OK

Inline

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[Cx.CrossCutting.Configuration.DTOs.ComponentConfiguration]

false

none

none

» key

string

false

none

none

» value

string

false

none

none

» description

string

false

none

none

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

Updates CxComponentConfiguration settings

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/configurationsExtended/{group}");
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 = '[
  {
    "key": "MAXIMUM_CONCURRENT_SCAN_EXECUTERS",
    "value": "5"
  }
]';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/configurationsExtended/{group}',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://***.***.***.***/cxrestapi/help/configurationsExtended/{group}', headers = headers)

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

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

result = RestClient.put 'https://***.***.***.***/cxrestapi/help/configurationsExtended/{group}',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

group

path

string

true

Configuration group name associated with the settings to be updated

body

body

Cx.CrossCutting.Configuration.Swagger.ComponentConfigurationUpdate

true

Array of configuration settings in JSON format to be updated

Enumerated Values

Parameter

Value

group

None

group

AppSecCoach

group

AuthorizationService

group

Portal

group

Scanning

group

SystemSettings

group

QueueSettings

group

Audit

group

Logging

group

DataRetention

group

Reports

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 the metadata of specific issue tracking system

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/issueTrackingSystems/{id}/metadata", data)
    req.Header = headers

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

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

The Id of issue tracking system the metadata to retrieve for

OK

Responses

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

Set project’s exclude folders/files patterns

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/excludeSettings");
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 = '{
  "excludeFoldersPattern": "string",
  "excludeFilesPattern": "string"
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/excludeSettings',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/excludeSettings', headers = headers)

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

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

result = RestClient.put 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/excludeSettings',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a specific project

body

body

Cx.ProjectManagement.Presentation.Dtos.ExcludeSettingsDto

true

Exclude folders/files pattern settings

» excludeFoldersPattern

body

string

false

none

» excludeFilesPattern

body

string

false

none

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

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 )

Gets details of GIT source settings

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/projects/{id}/sourceCode/remoteSettings/git", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git");
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/projects/{id}/sourceCode/remoteSettings/git',
{
  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/projects/{id}/sourceCode/remoteSettings/git', 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/projects/{id}/sourceCode/remoteSettings/git',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as GIT

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git");
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 = '{
  "url": "string",
  "branch": "string",
  "privateKey": "string"
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.GitSourceSettingsDto

true

GIT settings details

» url

body

string

true

The URL which is used to connect to GIT repository

» branch

body

string

true

The branch of a GIT repository

» privateKey

body

string

false

The private key which is used to connect to GIT repository using SSH protocol

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 )

Gets details of SVN source settings

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/projects/{id}/sourceCode/remoteSettings/svn", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn");
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/projects/{id}/sourceCode/remoteSettings/svn',
{
  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/projects/{id}/sourceCode/remoteSettings/svn', 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/projects/{id}/sourceCode/remoteSettings/svn',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as SVN

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn");
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 = '{
  "uri": {
    "absoluteUrl": "string",
    "port": 1
  },
  "paths": [
    "string"
  ],
  "credentials": {
    "userName": "string",
    "password": "string"
  },
  "privateKey": "string"
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.SvnSourceSettingsDto

true

Svn settings details

» uri

body

Cx.ProjectManagement.Presentation.Dtos.UriDto

true

none

»» absoluteUrl

body

string

true

Specifies the absolute url

»» port

body

integer(int32)

true

Specifies the port number of this Uri

» paths

body

[string]

true

Specifies the list of paths to scan at SVN repository

» credentials

body

Cx.ProjectManagement.Presentation.Dtos.OptionalCredentialsDto

false

none

»» userName

body

string

false

none

»» password

body

string

false

none

» privateKey

body

string

false

The private key which is used to connect to SVN repository using SSH protocol

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 )

Gets details of TFS source settings

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/projects/{id}/sourceCode/remoteSettings/tfs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/tfs");
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/projects/{id}/sourceCode/remoteSettings/tfs',
{
  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/projects/{id}/sourceCode/remoteSettings/tfs', 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/projects/{id}/sourceCode/remoteSettings/tfs',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as TFS

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/tfs");
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 = '{
  "credentials": {
    "userName": "string",
    "password": "string"
  },
  "uri": {
    "absoluteUrl": "string",
    "port": 1
  },
  "paths": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/tfs',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/tfs', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/tfs',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.TfsSourceSettingsDto

true

TFS settings details

» credentials

body

Cx.ProjectManagement.Presentation.Dtos.CredentialsDto

false

none

»» userName

body

string

true

none

»» password

body

string

true

none

» uri

body

Cx.ProjectManagement.Presentation.Dtos.UriDto

true

none

»» absoluteUrl

body

string

true

Specifies the absolute url

»» port

body

integer(int32)

true

Specifies the port number of this Uri

» paths

body

[string]

true

Specifies the list of paths to scan at TFS repository

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 )

Gets details of Source Pulling parameters

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/projects/{id}/sourceCode/remoteSettings/custom", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/custom");
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/projects/{id}/sourceCode/remoteSettings/custom',
{
  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/projects/{id}/sourceCode/remoteSettings/custom', 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/projects/{id}/sourceCode/remoteSettings/custom',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as Source Pulling

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/custom");
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 = '{
  "credentials": {
    "userName": "string",
    "password": "string"
  }
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/custom',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/custom', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/custom',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.CustomSourceSettingsDto

true

Custom settings details

» path

body

string

false

none

» preScanCommandId

body

integer(int64)

false

none

» credentials

body

Cx.ProjectManagement.Presentation.Dtos.CredentialsDto

true

none

»» userName

body

string

true

none

»» password

body

string

true

none

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 )

Gets details of Shared source settings

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/projects/{id}/sourceCode/remoteSettings/shared", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/shared");
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/projects/{id}/sourceCode/remoteSettings/shared',
{
  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/projects/{id}/sourceCode/remoteSettings/shared', 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/projects/{id}/sourceCode/remoteSettings/shared',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as shared

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/shared");
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 = '{
  "paths": [
    "string"
  ],
  "credentials": {
    "userName": "string",
    "password": "string"
  }
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/shared',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/shared', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/shared',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.SharedSourceSettingsDto

true

Shared settings details

» paths

body

[string]

true

none

» credentials

body

Cx.ProjectManagement.Presentation.Dtos.CredentialsDto

true

none

»» userName

body

string

true

none

»» password

body

string

true

none

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 )

Gets details of Perforce source settings

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/projects/{id}/sourceCode/remoteSettings/perforce", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/perforce");
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/projects/{id}/sourceCode/remoteSettings/perforce',
{
  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/projects/{id}/sourceCode/remoteSettings/perforce', 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/projects/{id}/sourceCode/remoteSettings/perforce',
  params: {
  }, headers: headers

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique Id of the specific project

Responses

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

Set project’s remote source settings as perforce

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/perforce");
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 = '{
  "credentials": {
    "userName": "string",
    "password": "string"
  },
  "uri": {
    "absoluteUrl": "string",
    "port": 1
  },
  "paths": [
    "string"
  ],
  "browseMode": "string"
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/perforce',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/perforce', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/perforce',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.PerforceSourceSettingDto

true

Perforce settings details

» credentials

body

Cx.ProjectManagement.Presentation.Dtos.CredentialsDto

false

none

»» userName

body

string

true

none

»» password

body

string

true

none

» uri

body

Cx.ProjectManagement.Presentation.Dtos.UriDto

false

none

»» absoluteUrl

body

string

true

Specifies the absolute url

»» port

body

integer(int32)

true

Specifies the port number of this Uri

» paths

body

[string]

true

Specifies the list of paths to scan at Perforce repository

» browseMode

body

string

true

Specifies the browse mode of Perforce repository

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 )

Gets details of all visible projects

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/projects", data)
    req.Header = headers

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

p JSON.parse(result)

Parameters

Name

In

Type

Required

Description

projectName

query

string

false

Name of a specific project

teamId

query

string

false

Unique ID of a specific team

Responses

Status

Meaning

Description

Schema

200

OK

Ok

Inline

404

Not Found

Not Found

None

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[Cx.ProjectManagement.Presentation.Dtos.ProjectBaseDto]

false

none

none

» id

integer(int64)

false

read-only

none

» teamId

integer(int32)

false

read-only

none

» name

string

false

read-only

none

» isPublic

boolean

false

none

none

» sourceSettingsLink

Cx.SuperTypes.API.Dtos.LinkDto

false

none

none

»» type

string

false

none

none

»» rel

string

false

read-only

none

»» uri

string

false

read-only

none

» link

Cx.SuperTypes.API.Dtos.LinkDtoBase

false

none

none

»» rel

string

false

read-only

none

»» uri

string

false

read-only

none

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

Creates a new project with default preset and configuration settings

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects");
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": "SomeProject",
  "owningTeam": "1",
  "isPublic": true
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

body

body

Cx.ProjectManagement.Presentation.Dtos.SaveProjectDto

true

Project details

» name

body

string

false

Specifies the name of the project

» owningTeam

body

string

true

Specifies the team id which owns the project

» isPublic

body

boolean

true

Specifies whether the project public or not

Responses

Status

Meaning

Description

Schema

201

Created

Created

Cx.SuperTypes.API.Dtos.LinkedResource

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 )

Register a new scan report

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/reports/sastScan");
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 = '{
  "reportType": "string",
  "scanId": 0
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/reports/sastScan',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/reports/sastScan', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/reports/sastScan',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

body

body

Cx.Reports.SastScan.Presentation.Dtos.SastReportRequestDTO

true

Report type options: PDF, RTF, CSV, XML

» reportType

body

string

true

none

» scanId

body

integer(int64)

true

none

Responses

Status

Meaning

Description

Schema

202

Accepted

Accepted

Cx.Reports.SastScan.Presentation.Dtos.CreateReportResponseDto

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 )

Branch an existing project

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/branch");
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"
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

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

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/branch', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/branch',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter

Parameters

Name

In

Type

Required

Description

id

path

integer(int64)

true

Unique ID of a specific project

body

body

Cx.ProjectManagement.Presentation.Dtos.BranchProjectDto

true

Branched Project details

» name

body

string

true

Specifies the name of the project

Responses

Status

Meaning

Description

Schema

201

Created

Created

Cx.SuperTypes.API.Dtos.LinkedResource

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 )

Set project’s data retention settings

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/dataRetentionSettings");
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 = '{
  "scansToKeep": 10
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

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

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/dataRetentionSettings', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/dataRetentionSettings',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.DataRetentionSettingsDto

true

Data retention settings

» scansToKeep

body

integer(int32)

false

The amount of scans to keep before they are deleted (set null back to default)

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 )

Upload a zipped source code

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/attachments");
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 = '{
  "zippedSource": "string"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/attachments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/attachments', headers = headers)

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

headers = {
  'Content-Type' => 'application/x-www-form-urlencoded',
  'Accept' => 'application/json;v=1.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/attachments',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter
zippedSource: string

Parameters

Name

In

Type

Required

Description

id

path

integer

true

Unique Id of the specific project

body

body

object

false

none

» zippedSource

body

string(binary)

false

Zipped source code to scan

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 issue tracking system as JIRA

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/issueTrackingSettings/jira");
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 = '{
  "issueTrackingSystemId": 1,
  "jiraProjectId": "12901",
  "issueType": {
    "id": "123",
    "fields": [
      {
        "id": "priority",
        "values": [
          "1"
        ]
      },
      {
        "id": "customfield_1",
        "values": [
          "c1",
          "c2"
        ]
      }
    ]
  }
}';
const headers = {
  'Content-Type':'application/json;v=1.0',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/issueTrackingSettings/jira',
{
  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.0',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/issueTrackingSettings/jira', headers = headers)

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

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

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/issueTrackingSettings/jira',
  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 project

body

body

Cx.ProjectManagement.Presentation.Dtos.JiraIssueTrackingSettingsDto

true

JIRA issue tracking details

» issueTrackingSystemId

body

integer(int64)

false

The issue tracking system Id

» jiraProjectId

body

string

true

The specific Id of JIRA project

» issueType

body

Cx.ProjectManagement.Presentation.Dtos.JiraIssueType

true

none

»» id

body

string

true

Specifies the Id of issue type

»» fields

body

[Cx.ProjectManagement.Presentation.Dtos.JiraField]

false

Specifies the list of fields associated with issue type

»»» id

body

string

true

Specifies the Id of field

»»» values

body

[string]

false

Specifies the list of values or single value

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 remote source settings as GIT which uses SSH protocol

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git/ssh", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git/ssh");
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 = '{
  "url": "string",
  "branch": "string",
  "privateKey": "string"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git/ssh',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git/ssh', headers = headers)

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

headers = {
  'Content-Type' => 'application/x-www-form-urlencoded',
  'Accept' => 'application/json;v=1.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/git/ssh',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter
url: string
branch: string
privateKey: string

Parameters

Name

In

Type

Required

Description

id

path

integer

true

Unique Id of the specific project

body

body

object

true

none

» url

body

string

true

The URL which is used to connect to GIT repository

» branch

body

string

true

The branch of a GIT repository

» privateKey

body

string(binary)

false

Private key which is used to connect to GIT repository using SSH protocol

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 remote source settings as SVN which uses SSH protocol

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn/ssh", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
URL obj = new URL("https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn/ssh");
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 = '{
  "absoluteUrl": "string",
  "port": 0,
  "paths": "string",
  "privateKey": "string"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json;v=1.0',
  'Authorization':'Bearer {access-token}'
};

fetch('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn/ssh',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
  'Accept': 'application/json;v=1.0',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn/ssh', headers = headers)

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

headers = {
  'Content-Type' => 'application/x-www-form-urlencoded',
  'Accept' => 'application/json;v=1.0',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://***.***.***.***/cxrestapi/help/projects/{id}/sourceCode/remoteSettings/svn/ssh',
  params: {
  }, headers: headers

p JSON.parse(result)
Body parameter
absoluteUrl: string
port: 0
paths: string
privateKey: string

Parameters

Name

In

Type

Required

Description

id

path

integer

true

Unique Id of the specific project

body

body

object

true

none

» absoluteUrl

body

string

true

The URL which is used to connect to SVN repository

» port

body

integer

true

The port number of SVN repository Url

» paths

body

string

true

The paths of a SVN repository, seperated by “;”

» privateKey

body

string(binary)

false

Private key which is used to connect to SVN repository using SSH protocol

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 )