vLM - DSC v4.3.0-SNAPSHOT
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Default
login
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/auth/login
POST http://localhost:8080/rest/ng/auth/login HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/auth/login',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/auth/login',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/auth/login')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/auth/login', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/auth/login");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/auth/login", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/auth/login
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | same as for whoami | None |
logout
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/auth/logout
GET http://localhost:8080/rest/ng/auth/logout HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/auth/logout',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/auth/logout',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/auth/logout')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/auth/logout', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/auth/logout");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/auth/logout", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/auth/logout
Method used to logout user out of the application
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | No body returned | None |
whoAmI
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/auth/whoami \
-H 'Accept: application/json'
GET http://localhost:8080/rest/ng/auth/whoami HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/rest/ng/auth/whoami',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/rest/ng/auth/whoami',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/rest/ng/auth/whoami', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/auth/whoami', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/auth/whoami");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/auth/whoami", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/auth/whoami
Example responses
authenticated user data or null if not logged in
{
"username": "admin",
"loginOrigin": "LOCAL",
"isAdmin": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | authenticated user data or null if not logged in | AuthDTO |
getById
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}
GET http://localhost:8080/rest/ng/dsc/deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/deployments/{deploymentId}
Method used to fetch certain deployment by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Deployment DTO returned | None |
404 | Not Found | Returned in case deployment with specified id not found | None |
update
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/deployments/{deploymentId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"platformId": "string",
"platform": "string",
"environments": [
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
],
"scenario": "string",
"scenarioId": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"campaigns": [
"string"
],
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/deployments/{deploymentId}
Method used to update deployment by id
Body parameter
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"platformId": "string",
"platform": "string",
"environments": [
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
],
"scenario": "string",
"scenarioId": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"campaigns": [
"string"
],
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
body | body | DeploymentDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case deployment could not be updated | None |
delete
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}
DELETE http://localhost:8080/rest/ng/dsc/deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/deployments/{deploymentId}
Method used to delete scenario deployment by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case scenario deployment could not be deleted | None |
getAll
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/deployments
GET http://localhost:8080/rest/ng/dsc/deployments HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/deployments',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/deployments',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/deployments')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/deployments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/deployments");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/deployments
Method used to fetch all deployments
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | query | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all deployments | None |
create
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/deployments \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/deployments HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"platformId": "string",
"platform": "string",
"environments": [
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
],
"scenario": "string",
"scenarioId": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"campaigns": [
"string"
],
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/deployments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/deployments',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/deployments', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/deployments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/deployments");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/deployments
Method used to create deployment
Body parameter
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"platformId": "string",
"platform": "string",
"environments": [
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
],
"scenario": "string",
"scenarioId": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"campaigns": [
"string"
],
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | DeploymentDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created deployment id | None |
getById_1
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}
GET http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/meta-deployments/{deploymentId}
Method used to fetch certain meta deployment by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Meta Deployment DTO returned | None |
404 | Not Found | Returned in case meta deployment with specified id not found | None |
update_1
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"deployments": [
{
"id": "string",
"priority": 0
}
],
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"metaScenario": "string",
"metaScenarioName": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/meta-deployments/{deploymentId}
Method used to update meta deployment by id
Body parameter
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"deployments": [
{
"id": "string",
"priority": 0
}
],
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"metaScenario": "string",
"metaScenarioName": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
body | body | MetaDeploymentDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case meta deployment could not be updated | None |
delete_1
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}
DELETE http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/meta-deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/meta-deployments/{deploymentId}
Method used to delete meta deployment by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case meta deployment could not be deleted | None |
getAll_1
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/meta-deployments
GET http://localhost:8080/rest/ng/dsc/meta-deployments HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-deployments',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/meta-deployments',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/meta-deployments')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/meta-deployments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-deployments");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/meta-deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/meta-deployments
Method used to fetch all meta deployments
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all meta deployments | None |
create_1
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/meta-deployments \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/meta-deployments HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"deployments": [
{
"id": "string",
"priority": 0
}
],
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"metaScenario": "string",
"metaScenarioName": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/meta-deployments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/meta-deployments',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/meta-deployments', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/meta-deployments', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-deployments");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/meta-deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/meta-deployments
Method used to create meta deployment
Body parameter
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"deployments": [
{
"id": "string",
"priority": 0
}
],
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"metaScenario": "string",
"metaScenarioName": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | MetaDeploymentDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created meta deployment id | None |
getById_2
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}
GET http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/meta-scenarios/{metaScenarioId}
Method used to fetch certain meta scenario by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Meta Scenario DTO returned | None |
404 | Not Found | Returned in case meta scenario with specified id not found | None |
update_2
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"scenarios": [
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
],
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"status": "ARCHIVED"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/meta-scenarios/{metaScenarioId}
Method used to update meta scenario by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"scenarios": [
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
],
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"status": "ARCHIVED"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
body | body | MetaScenarioDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case meta scenario could not be updated | None |
delete_2
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}
DELETE http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/meta-scenarios/{metaScenarioId}
Method used to delete meta scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case meta scenario could not be deleted | None |
tag
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag
POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/tag", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/meta-scenarios/{metaScenarioId}/tag
Method used to tag meta scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Meta scenario with new version | None |
400 | Bad Request | Returned in case meta scenario could not be tagged | None |
submit
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit
POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/submit", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/meta-scenarios/{metaScenarioId}/submit
Method used to submit meta scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case meta scenario could not be submitted | None |
clone
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone
POST http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/meta-scenarios/{metaScenarioId}/clone", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/meta-scenarios/{metaScenarioId}/clone
Method used to clone meta scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
metaScenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cloned scenario | None |
400 | Bad Request | Returned in case meta scenario could not be cloned | None |
getAll_2
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/meta-scenarios
GET http://localhost:8080/rest/ng/dsc/meta-scenarios HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/meta-scenarios',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/meta-scenarios')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/meta-scenarios', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/meta-scenarios", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/meta-scenarios
Method used to fetch all meta scenarios
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all meta scenarios | None |
create_2
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/meta-scenarios \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/meta-scenarios HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"scenarios": [
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
],
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"status": "ARCHIVED"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/meta-scenarios',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/meta-scenarios',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/meta-scenarios', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/meta-scenarios', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/meta-scenarios");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/meta-scenarios", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/meta-scenarios
Method used to create meta scenario
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"scenarios": [
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
],
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"status": "ARCHIVED"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | MetaScenarioDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created meta scenario id | None |
getOverviews
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/platforms/overviews
GET http://localhost:8080/rest/ng/dsc/platforms/overviews HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/platforms/overviews',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/platforms/overviews',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/platforms/overviews')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/platforms/overviews', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms/overviews");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/platforms/overviews", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/platforms/overviews
Method used to fetch short overviews of all platforms
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | list of overviews of all platforms | None |
getById_3
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/platforms/{platformId}
GET http://localhost:8080/rest/ng/dsc/platforms/{platformId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/platforms/{platformId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/platforms/{platformId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms/{platformId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/platforms/{platformId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/platforms/{platformId}
Method used to fetch certain platform by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
platformId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Platform DTO returned | None |
404 | Not Found | Returned in case platform with specified id not found | None |
update_3
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/platforms/{platformId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/platforms/{platformId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"endpoints": [
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
],
"created": 0,
"groupMappings": [
{
"role": "string",
"value": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/platforms/{platformId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/platforms/{platformId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms/{platformId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/platforms/{platformId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/platforms/{platformId}
Method used to update platform by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"endpoints": [
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
],
"created": 0,
"groupMappings": [
{
"role": "string",
"value": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
platformId | path | string | true | none |
body | body | PlatformDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case platform could not be updated | None |
delete_3
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/platforms/{platformId}
DELETE http://localhost:8080/rest/ng/dsc/platforms/{platformId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/platforms/{platformId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/platforms/{platformId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/platforms/{platformId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms/{platformId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/platforms/{platformId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/platforms/{platformId}
Method used to delete platform by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
platformId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case platform could not be deleted | None |
getAll_3
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/platforms
GET http://localhost:8080/rest/ng/dsc/platforms HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/platforms',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/platforms',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/platforms')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/platforms', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/platforms", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/platforms
Method used to fetch all platforms
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all platforms | None |
create_3
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/platforms \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/platforms HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"endpoints": [
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
],
"created": 0,
"groupMappings": [
{
"role": "string",
"value": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/platforms',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/platforms',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/platforms', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/platforms', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/platforms");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/platforms", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/platforms
Method used to create platform
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"endpoints": [
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
],
"created": 0,
"groupMappings": [
{
"role": "string",
"value": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | PlatformDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | No body returned | None |
400 | Bad Request | Returned when DTO could not be converted to model or created | None |
getNumberOfNewRequests
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/requests/new
GET http://localhost:8080/rest/ng/dsc/requests/new HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/requests/new',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/requests/new',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/requests/new')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/requests/new', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/requests/new");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/requests/new", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/requests/new
Method used to fetch the number of new requested items
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of new requested items | None |
getAll_4
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/requests
GET http://localhost:8080/rest/ng/dsc/requests HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/requests',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/requests',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/requests')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/requests', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/requests");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/requests", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/requests
Method used to fetch all requested items
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all requestedItems | None |
getOverviews_1
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios/overviews
GET http://localhost:8080/rest/ng/dsc/scenarios/overviews HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/overviews',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios/overviews',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios/overviews')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios/overviews', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/overviews");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios/overviews", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios/overviews
Method used to fetch short overviews of all scenarios
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | list of overviews of all scenarios | None |
addSubnet
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/subnets
Method used to add subnet to specified scenario
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
body | body | SubnetDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created subnet id | None |
400 | Bad Request | Returned in case subnet could not be added | None |
updateSubnet
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}
Method used to update scenario subnet by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
subnetId | path | string | true | none |
body | body | SubnetDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case subnet could not be updated | None |
deleteSubnet
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}
DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}
Method used to delete scenario subnet by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
subnetId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case subnet could not be deleted | None |
addSystemsToSubnet
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"systemIds": [
"string"
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/batch
Method used to add systems to specified subnet
Body parameter
{
"systemIds": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
subnetId | path | string | true | none |
body | body | SubnetSystemsSaveDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body | None |
400 | Bad Request | Returned in case systems could not be added to subnet | None |
updateSubnetSystemConfiguration
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"deploymentModel": "DEDICATED",
"tags": [
"string"
],
"primaryHostname": "string",
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}
Method used to update system configuration of specified subnet
Body parameter
{
"deploymentModel": "DEDICATED",
"tags": [
"string"
],
"primaryHostname": "string",
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
subnetId | path | string | true | none |
subnetSystemId | path | string | true | none |
body | body | SubnetSystemUpdateDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body | None |
400 | Bad Request | Returned in case system configuration could not be updated | None |
deleteSubnetSystemConfiguration
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}
DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/scenarios/{scenarioId}/subnets/{subnetId}/systems/{subnetSystemId}
Method used to delete system configuration of specified subnet
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
subnetId | path | string | true | none |
subnetSystemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body | None |
400 | Bad Request | Returned in case system configuration could not be deleted | None |
getScenarioCampaigns
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns
GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios/{scenarioId}/campaigns
Method used to fetch certain scenario campaigns
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all campaings | None |
404 | Not Found | Returned in case scenario with specified id not found | None |
addCampaign
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/campaigns
Method used to add campaign to specified scenario
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
body | body | CampaignDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created campaign id | None |
400 | Bad Request | Returned in case campaign could not be added | None |
getAllCampaigns
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios/campaigns
GET http://localhost:8080/rest/ng/dsc/scenarios/campaigns HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/campaigns',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios/campaigns',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios/campaigns')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios/campaigns', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/campaigns");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios/campaigns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios/campaigns
Method used to fetch all campaigns
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all campaigns | None |
updateCampaign
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}
Method used to update scenario campaign by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
campaignId | path | string | true | none |
body | body | CampaignDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case campaign could not be updated | None |
deleteCampaign
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}
DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}
Method used to delete scenario campaign by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
campaignId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case campaign could not be deleted | None |
getTaskData
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data
GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/task-data", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios/{scenarioId}/task-data
Method used to fetch all task data of certain scenario
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | task data of the systems of the scenario | None |
404 | Not Found | Returned in case scenario with specified id was not found | None |
reorderCampaignItems
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"itemIds": [
"string"
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/campaigns/{campaignId}/items/reorder
Method used to reorder items in campaign for specified scenario
Body parameter
{
"itemIds": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
campaignId | path | string | true | none |
body | body | ScenarioCampaignReorderedItemsDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case items could not be reordered | None |
getById_4
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}
GET http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios/{scenarioId}
Method used to fetch certain scenario by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Scenario DTO returned | None |
404 | Not Found | Returned in case scenario with specified id not found | None |
update_4
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"platformId": "string",
"externalId": "string",
"tags": [
"string"
],
"subnets": [
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
],
"objectives": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
],
"injects": [
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
],
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
],
"status": "ARCHIVED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/scenarios/{scenarioId}
Method used to update scenario by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"platformId": "string",
"externalId": "string",
"tags": [
"string"
],
"subnets": [
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
],
"objectives": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
],
"injects": [
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
],
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
],
"status": "ARCHIVED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
body | body | ScenarioDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case scenario could not be updated | None |
delete_4
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}
DELETE http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/scenarios/{scenarioId}
Method used to delete scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case scenario could not be deleted | None |
tag_1
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/tag", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/tag
Method used to tag scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Scenario with new version | None |
400 | Bad Request | Returned in case scenario could not be tagged | None |
submit_1
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/submit", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/submit
Method used to submit scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case scenario could not be submitted | None |
clone_1
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone
POST http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios/{scenarioId}/clone", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios/{scenarioId}/clone
Method used to clone scenario by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
scenarioId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cloned scenario | None |
400 | Bad Request | Returned in case scenario could not be cloned | None |
getAll_5
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/scenarios
GET http://localhost:8080/rest/ng/dsc/scenarios HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/scenarios',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/scenarios',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/scenarios')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/scenarios', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/scenarios", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/scenarios
Method used to fetch all scenarios
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all scenarios | None |
create_4
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/scenarios \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/scenarios HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"platformId": "string",
"externalId": "string",
"tags": [
"string"
],
"subnets": [
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
],
"objectives": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
],
"injects": [
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
],
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
],
"status": "ARCHIVED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/scenarios',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/scenarios',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/scenarios', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/scenarios', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/scenarios");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/scenarios", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/scenarios
Method used to create scenario
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"platformId": "string",
"externalId": "string",
"tags": [
"string"
],
"subnets": [
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
],
"objectives": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
],
"injects": [
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
],
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
],
"status": "ARCHIVED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ScenarioDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created scenario id | None |
getVulnerabilities
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities
GET http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/systems/{systemId}/vulnerabilities
Method used to fetch all vulnerabilities of certain system
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | list of vulnerabilities of the system | None |
404 | Not Found | Returned in case system with specified id was not found | None |
addVulnerability
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/vulnerabilities
Method used to add vulnerability to specified system
Body parameter
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | VulnerabilityDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created vulnerability id | None |
400 | Bad Request | Returned in case vulnerability could not be added | None |
updateVulnerability
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}
Method used to update system vulnerability by id
Body parameter
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
vulnerabilityId | path | string | true | none |
body | body | VulnerabilityDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case vulnerability could not be updated | None |
deleteVulnerability
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}/vulnerabilities/{vulnerabilityId}
Method used to delete system vulnerability by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
vulnerabilityId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case vulnerability could not be deleted | None |
addTaskDataAction
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/task-data/actions
Method used to add action task data to specified system
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | ActionDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created action id | None |
400 | Bad Request | Returned in case action could not be added | None |
updateTaskDataAction
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}/task-data/actions/{actionId}
Method used to update system action task data by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
actionId | path | string | true | none |
body | body | ActionDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case action could not be updated | None |
deleteTaskDataAction
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/actions/{actionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}/task-data/actions/{actionId}
Method used to delete system action task data by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
actionId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case action could not be deleted | None |
getOverviews_2
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/systems/overviews
GET http://localhost:8080/rest/ng/dsc/systems/overviews HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/overviews',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/systems/overviews',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/systems/overviews')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/systems/overviews', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/overviews");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/systems/overviews", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/systems/overviews
Method used to fetch short overviews of all systems
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
platformId | query | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | list of overviews of all systems | None |
addTaskDataAttack
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/task-data/attacks
Method used to add attack task data to specified system
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | AttackDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created attack id | None |
400 | Bad Request | Returned in case attack could not be added | None |
updateTaskDataAttack
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}/task-data/attacks/{attackId}
Method used to update system attack task data by id
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
attackId | path | string | true | none |
body | body | AttackDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case attack could not be updated | None |
deleteTaskDataAttack
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/attacks/{attackId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}/task-data/attacks/{attackId}
Method used to delete system attack task data by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
attackId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case attack could not be deleted | None |
addTaskDataAvailability
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/task-data/availabilities
Method used to add availability task data to specified system
Body parameter
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | AvailabilityDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created availability id | None |
400 | Bad Request | Returned in case availability could not be added | None |
updateTaskDataAvailability
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}
Method used to update system availability task data by id
Body parameter
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
availabilityId | path | string | true | none |
body | body | AvailabilityDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case availability could not be updated | None |
deleteTaskDataAvailability
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}/task-data/availabilities/{availabilityId}
Method used to delete system availability task data by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
availabilityId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case availability could not be deleted | None |
addTaskDataFlag
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/task-data/flags
Method used to add flag task data to specified system
Body parameter
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | FlagDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created flag id | None |
400 | Bad Request | Returned in case flag could not be added | None |
updateTaskDataFlag
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}/task-data/flags/{flagId}
Method used to update system flag task data by id
Body parameter
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
flagId | path | string | true | none |
body | body | FlagDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case flag could not be updated | None |
deleteTaskDataFlag
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data/flags/{flagId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}/task-data/flags/{flagId}
Method used to delete system flag task data by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
flagId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case flag could not be deleted | None |
getTaskData_1
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data
GET http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/task-data", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/systems/{systemId}/task-data
Method used to fetch task data of certain system
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | task data of the system | None |
404 | Not Found | Returned in case system with specified id was not found | None |
getById_5
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/systems/{systemId}
GET http://localhost:8080/rest/ng/dsc/systems/{systemId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/systems/{systemId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/systems/{systemId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/systems/{systemId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/systems/{systemId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/systems/{systemId}
Method used to fetch certain system by its id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | System DTO returned | None |
404 | Not Found | Returned in case system with specified id not found | None |
update_5
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/systems/{systemId} \
-H 'Content-Type: application/json'
PUT http://localhost:8080/rest/ng/dsc/systems/{systemId} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"type": "CONTAINER",
"subType": "string",
"name": "string",
"description": "string",
"version": "string",
"platformIds": [
"string"
],
"dependencies": [
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
],
"externalId": "string",
"contentType": "CTF",
"systemRole": "NETWORKING",
"configuration": {
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
},
"vulnerabilities": [
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
},
"status": "ARCHIVED",
"created": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/systems/{systemId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.put('http://localhost:8080/rest/ng/dsc/systems/{systemId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/systems/{systemId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/systems/{systemId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/systems/{systemId}
Method used to update system by id
Body parameter
{
"id": "string",
"type": "CONTAINER",
"subType": "string",
"name": "string",
"description": "string",
"version": "string",
"platformIds": [
"string"
],
"dependencies": [
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
],
"externalId": "string",
"contentType": "CTF",
"systemRole": "NETWORKING",
"configuration": {
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
},
"vulnerabilities": [
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
},
"status": "ARCHIVED",
"created": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
body | body | DscSystemDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case system could not be updated | None |
delete_5
Code samples
# You can also use wget
curl -X DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId}
DELETE http://localhost:8080/rest/ng/dsc/systems/{systemId} HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.delete 'http://localhost:8080/rest/ng/dsc/systems/{systemId}',
params: {
}
p JSON.parse(result)
import requests
r = requests.delete('http://localhost:8080/rest/ng/dsc/systems/{systemId}')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost:8080/rest/ng/dsc/systems/{systemId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost:8080/rest/ng/dsc/systems/{systemId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /ng/dsc/systems/{systemId}
Method used to delete system by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case system could not be deleted | None |
tag_2
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/tag", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/tag
Method used to tag system by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | System with new version | None |
400 | Bad Request | Returned in case system could not be tagged | None |
submit_2
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/submit", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/submit
Method used to submit system by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No body returned | None |
400 | Bad Request | Returned in case system could not be submitted | None |
clone_2
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone
POST http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone',
{
method: 'POST'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone',
params: {
}
p JSON.parse(result)
import requests
r = requests.post('http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems/{systemId}/clone", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems/{systemId}/clone
Method used to clone system by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
systemId | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Cloned system | None |
400 | Bad Request | Returned in case system could not be cloned | None |
getAll_6
Code samples
# You can also use wget
curl -X GET http://localhost:8080/rest/ng/dsc/systems
GET http://localhost:8080/rest/ng/dsc/systems HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/systems',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'http://localhost:8080/rest/ng/dsc/systems',
params: {
}
p JSON.parse(result)
import requests
r = requests.get('http://localhost:8080/rest/ng/dsc/systems')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/rest/ng/dsc/systems', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/rest/ng/dsc/systems", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ng/dsc/systems
Method used to fetch all systems
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns list of all systems | None |
create_5
Code samples
# You can also use wget
curl -X POST http://localhost:8080/rest/ng/dsc/systems \
-H 'Content-Type: application/json'
POST http://localhost:8080/rest/ng/dsc/systems HTTP/1.1
Host: localhost:8080
Content-Type: application/json
const inputBody = '{
"id": "string",
"type": "CONTAINER",
"subType": "string",
"name": "string",
"description": "string",
"version": "string",
"platformIds": [
"string"
],
"dependencies": [
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
],
"externalId": "string",
"contentType": "CTF",
"systemRole": "NETWORKING",
"configuration": {
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
},
"vulnerabilities": [
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
},
"status": "ARCHIVED",
"created": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}';
const headers = {
'Content-Type':'application/json'
};
fetch('http://localhost:8080/rest/ng/dsc/systems',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json'
}
result = RestClient.post 'http://localhost:8080/rest/ng/dsc/systems',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json'
}
r = requests.post('http://localhost:8080/rest/ng/dsc/systems', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost:8080/rest/ng/dsc/systems', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/systems");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost:8080/rest/ng/dsc/systems", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /ng/dsc/systems
Method used to create system
Body parameter
{
"id": "string",
"type": "CONTAINER",
"subType": "string",
"name": "string",
"description": "string",
"version": "string",
"platformIds": [
"string"
],
"dependencies": [
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
],
"externalId": "string",
"contentType": "CTF",
"systemRole": "NETWORKING",
"configuration": {
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
},
"vulnerabilities": [
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
},
"status": "ARCHIVED",
"created": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | DscSystemDTO | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Entity with newly created system id | None |
updateLastSeenRequestsTimestamp
Code samples
# You can also use wget
curl -X PUT http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests
PUT http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests HTTP/1.1
Host: localhost:8080
fetch('http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.put 'http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests',
params: {
}
p JSON.parse(result)
import requests
r = requests.put('http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests')
print(r.json())
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests");
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());
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://localhost:8080/rest/ng/dsc/user-settings/current/last-seen-requests", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /ng/dsc/user-settings/current/last-seen-requests
Changes the requests last seen timestamp of the current user
'current' in path refers to the currently logged in user of the request
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
default | Default | successful operation | None |
Schemas
AuthDTO
{
"username": "string",
"loginOrigin": "LDAP",
"roles": [
"string"
],
"isAdmin": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
username | string | false | none | none |
loginOrigin | string | false | none | none |
roles | [string] | false | none | none |
isAdmin | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
loginOrigin | LDAP |
loginOrigin | LOCAL |
loginOrigin | UNKNOWN |
CapacityDTO
{
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
cpu | integer(int32) | false | none | none |
memory | integer(int32) | false | none | none |
storage | integer(int32) | false | none | none |
maxEnvironments | integer(int32) | false | none | none |
referenceCapacity | CapacityDTO | false | none | none |
ContactDTO
{
"name": "string",
"email": "string",
"role": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | none |
string | false | none | none | |
role | string | false | none | none |
DeploymentCapacityDTO
{
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
cpu | integer(int32) | false | none | none |
memory | integer(int32) | false | none | none |
storage | integer(int32) | false | none | none |
networks | integer(int32) | false | none | none |
maxEnvironments | integer(int32) | false | none | none |
referenceCapacity | CapacityDTO | false | none | none |
DeploymentDTO
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"platformId": "string",
"platform": "string",
"environments": [
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
],
"scenario": "string",
"scenarioId": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"campaigns": [
"string"
],
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
deployedBy | string | false | none | none |
description | string | false | none | none |
platformId | string | false | none | none |
platform | string | false | none | none |
environments | [DeploymentEnvironmentDTO] | false | none | none |
scenario | string | false | none | none |
scenarioId | string | false | none | none |
timeslot | TimeSlotDTO | false | none | none |
results | string | false | none | none |
campaigns | [string] | false | none | none |
status | string | false | none | none |
capacity | DeploymentCapacityDTO | false | none | none |
contacts | [ContactDTO] | false | none | none |
Enumerated Values
Property | Value |
---|---|
status | REQUESTED |
status | ACCEPTED |
status | DEPLOYED |
status | PARTIALLY_DEPLOYED |
status | COMPLETED |
status | REJECTED |
DeploymentEnvironmentDTO
{
"id": "string",
"environmentNumber": 0,
"userCount": 0,
"roleMappings": [
{
"roleId": "string",
"scenarioRole": "string"
}
],
"resourceMappings": [
{
"key": "string",
"value": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
environmentNumber | integer(int32) | false | none | none |
userCount | integer(int32) | false | none | none |
roleMappings | [DeploymentRoleMappingDTO] | false | none | none |
resourceMappings | [DeploymentResourceMappingDTO] | false | none | none |
DeploymentResourceMappingDTO
{
"key": "string",
"value": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | false | none | none |
value | string | false | none | none |
DeploymentRoleMappingDTO
{
"roleId": "string",
"scenarioRole": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
roleId | string | false | none | none |
scenarioRole | string | false | none | none |
TimeSlotDTO
{
"startTime": "string",
"duration": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
startTime | string | false | none | none |
duration | integer(int32) | false | none | none |
DeploymentReferenceDTO
{
"id": "string",
"priority": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
priority | integer(int32) | false | none | none |
InterConnectDTO
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
description | string | false | none | none |
platformId | string | false | none | none |
endPointId | string | false | none | none |
endPoint | PlatformEndPointOverviewDTO | false | none | none |
MetaDeploymentDTO
{
"id": "string",
"name": "string",
"deployedBy": "string",
"description": "string",
"deployments": [
{
"id": "string",
"priority": 0
}
],
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"metaScenario": "string",
"metaScenarioName": "string",
"timeslot": {
"startTime": "string",
"duration": 0
},
"results": "string",
"status": "REQUESTED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"networks": 0,
"maxEnvironments": 0,
"referenceCapacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
deployedBy | string | false | none | none |
description | string | false | none | none |
deployments | [DeploymentReferenceDTO] | false | none | none |
interconnects | [InterConnectDTO] | false | none | none |
metaScenario | string | false | none | none |
metaScenarioName | string | false | none | none |
timeslot | TimeSlotDTO | false | none | none |
results | string | false | none | none |
status | string | false | none | none |
capacity | DeploymentCapacityDTO | false | none | none |
contacts | [ContactDTO] | false | none | none |
Enumerated Values
Property | Value |
---|---|
status | REQUESTED |
status | ACCEPTED |
status | DEPLOYED |
status | PARTIALLY_DEPLOYED |
status | COMPLETED |
status | REJECTED |
PlatformEndPointOverviewDTO
{
"id": "string",
"name": "string",
"uri": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
uri | string | false | none | none |
ChildScenarioDTO
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
scenarioId | string | false | none | none |
priority | integer(int32) | false | none | none |
interconnects | [InterConnectDTO] | false | none | none |
name | string | false | none | none |
platformName | string | false | none | none |
MetaScenarioDTO
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"scenarios": [
{
"scenarioId": "string",
"priority": 0,
"interconnects": [
{
"id": "string",
"description": "string",
"platformId": "string",
"endPointId": "string",
"endPoint": {
"id": "string",
"name": "string",
"uri": "string"
}
}
],
"name": "string",
"platformName": "string"
}
],
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"status": "ARCHIVED",
"isLocked": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
version | string | false | none | none |
type | string | false | none | none |
scenarios | [ChildScenarioDTO] | false | none | none |
contacts | [ContactDTO] | false | none | none |
status | string | false | none | none |
isLocked | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | CTF |
type | LIVE_FIRE |
type | TRAINING |
status | ARCHIVED |
status | ACCEPTED |
status | AVAILABLE |
status | IN_PROGRESS |
status | REJECTED |
status | SUBMITTED |
PlatformOverviewDTO
{
"id": "string",
"name": "string",
"endpoints": [
{
"id": "string",
"name": "string",
"uri": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
endpoints | [PlatformEndPointOverviewDTO] | false | none | none |
DscParameterDTO
{
"key": "string",
"value": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | false | none | none |
value | string | false | none | none |
GroupMappingDTO
{
"role": "string",
"value": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
role | string | false | none | none |
value | string | false | none | none |
PlatformDTO
{
"id": "string",
"name": "string",
"description": "string",
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"endpoints": [
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
],
"isPublic": true
}
],
"created": 0,
"groupMappings": [
{
"role": "string",
"value": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
contacts | [ContactDTO] | false | none | none |
capacity | CapacityDTO | false | none | none |
endpoints | [PlatformEndPointDTO] | false | none | none |
created | integer(int64) | false | none | none |
groupMappings | [GroupMappingDTO] | false | none | none |
PlatformEndPointCredentialDTO
{
"username": "string",
"password": "string",
"key": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
username | string | false | none | none |
password | string | false | none | none |
key | string | false | none | none |
PlatformEndPointDTO
{
"id": "string",
"type": "VPN",
"name": "string",
"uri": "string",
"credential": {
"username": "string",
"password": "string",
"key": "string"
},
"parameters": [
{
"key": "string",
"value": "string"
}
],
"isPublic": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
type | string | false | none | none |
name | string | false | none | none |
uri | string | false | none | none |
credential | PlatformEndPointCredentialDTO | false | none | none |
parameters | [DscParameterDTO] | false | none | none |
isPublic | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | VPN |
type | PUBLIC_WEB |
type | SCORING |
type | INTER_CONNECT |
type | OTHER |
DscRequest
{
"id": "string",
"type": "META_DEPLOYMENT",
"name": "string",
"requested": 0,
"isNew": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
type | string | false | none | none |
name | string | false | none | none |
requested | integer(int64) | false | none | none |
isNew | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | META_DEPLOYMENT |
type | META_SCENARIO |
type | DEPLOYMENT |
type | SCENARIO |
type | SYSTEM |
type | PLATFORM |
ScenarioOverviewDTO
{
"id": "string",
"name": "string",
"version": "string",
"description": "string",
"type": "CTF",
"platformId": "string",
"networks": 0,
"cpu": 0,
"memory": 0,
"storage": 0,
"status": "ARCHIVED",
"maxEnvironments": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"isLocked": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
version | string | false | none | none |
description | string | false | none | none |
type | string | false | none | none |
platformId | string | false | none | none |
networks | integer(int32) | false | none | none |
cpu | integer(int32) | false | none | none |
memory | integer(int32) | false | none | none |
storage | integer(int32) | false | none | none |
status | string | false | none | none |
maxEnvironments | integer(int32) | false | none | none |
contacts | [ContactDTO] | false | none | none |
isLocked | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | CTF |
type | LIVE_FIRE |
type | TRAINING |
status | ARCHIVED |
status | ACCEPTED |
status | AVAILABLE |
status | IN_PROGRESS |
status | REJECTED |
status | SUBMITTED |
NetworkingDTO
{
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ipv4Gateway | string | false | none | none |
ipv6Gateway | string | false | none | none |
primaryDns | string | false | none | none |
secondaryDns | string | false | none | none |
interfaces | [ScenarioSystemInterfaceDTO] | false | none | none |
ScenarioSubnetSystemDTO
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
systemDefinition | SystemOverviewDTO | false | none | none |
tags | [string] | false | none | none |
deploymentModel | string | false | none | none |
primaryHostname | string | false | none | none |
configuration | ScenarioSystemConfigurationDTO | false | none | none |
Enumerated Values
Property | Value |
---|---|
deploymentModel | DEDICATED |
deploymentModel | PRESENT |
deploymentModel | SHARED |
ScenarioSystemConfigurationDTO
{
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
networking | NetworkingDTO | false | none | none |
parameters | [DscParameterDTO] | false | none | none |
ScenarioSystemInterfaceDTO
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
subnetId | string | false | none | none |
ipv4Address | string | false | none | none |
ipv6Address | string | false | none | none |
hostname | string | false | none | none |
name | string | false | none | none |
SubnetDTO
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
subnetIPv4Address | string | false | none | none |
subnetIPv6Address | string | false | none | none |
gatewayIPv4 | string | false | none | none |
gatewayIPv6 | string | false | none | none |
dns1 | string | false | none | none |
dns2 | string | false | none | none |
deploymentModel | string | false | none | none |
systems | [ScenarioSubnetSystemDTO] | false | none | none |
type | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
deploymentModel | DEDICATED |
deploymentModel | PRESENT |
deploymentModel | SHARED |
type | NOT_CONNECTED |
type | WAN |
type | STANDARD |
SystemOverviewDTO
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
os | string | false | none | none |
osVersion | string | false | none | none |
version | string | false | none | none |
platformIds | [string] | false | none | none |
status | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
os | ANDROID |
os | APPLE |
os | LINUX |
os | WINDOWS |
os | OTHER |
os | UNKNOWN |
status | ARCHIVED |
status | ACCEPTED |
status | AVAILABLE |
status | IN_PROGRESS |
status | REJECTED |
status | SUBMITTED |
SubnetSystemsSaveDTO
{
"systemIds": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
systemIds | [string] | false | none | none |
SubnetSystemUpdateDTO
{
"deploymentModel": "DEDICATED",
"tags": [
"string"
],
"primaryHostname": "string",
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deploymentModel | string | false | none | none |
tags | [string] | false | none | none |
primaryHostname | string | false | none | none |
ipv4Gateway | string | false | none | none |
ipv6Gateway | string | false | none | none |
primaryDns | string | false | none | none |
secondaryDns | string | false | none | none |
parameters | [DscParameterDTO] | false | none | none |
interfaces | [ScenarioSystemInterfaceDTO] | false | none | none |
Enumerated Values
Property | Value |
---|---|
deploymentModel | DEDICATED |
deploymentModel | PRESENT |
deploymentModel | SHARED |
CampaignDTO
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
objectives | [CampaignObjectiveReferenceDTO] | false | none | none |
injects | [CampaignInjectReferenceDTO] | false | none | none |
tasks | TaskDataReferenceDTO | false | none | none |
CampaignInjectReferenceDTO
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
order | integer(int32) | false | none | none |
data | ScenarioInjectDTO | false | none | none |
CampaignObjectiveReferenceDTO
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
order | integer(int32) | false | none | none |
data | ScenarioObjectiveDTO | false | none | none |
HintDTO
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | none |
content | string | false | none | none |
order | integer(int32) | false | none | none |
penalty | integer(int32) | false | none | none |
ISystemTaskDTO
{
"name": "string",
"id": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | none |
id | string | false | none | none |
ScenarioInjectDTO
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
content | string | false | none | none |
parameters | [DscParameterDTO] | false | none | none |
script | SystemScriptDTO | false | none | none |
trigger | TriggerDTO | false | none | none |
order | integer(int32) | false | none | none |
ScenarioObjectiveDTO
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
result | string | false | none | none |
hints | [HintDTO] | false | none | none |
order | integer(int32) | false | none | none |
SystemScriptDTO
{
"source": "string",
"exec": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
source | string | false | none | none |
exec | string | false | none | none |
TaskDataReferenceDTO
{
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
flags | [TaskReferenceDTO] | false | none | none |
actions | [TaskReferenceDTO] | false | none | none |
availabilities | [TaskReferenceDTO] | false | none | none |
attacks | [TaskReferenceDTO] | false | none | none |
TaskReferenceDTO
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
order | integer(int32) | false | none | none |
data | ISystemTaskDTO | false | none | none |
TriggerDTO
{
"type": "AUTOMATIC",
"content": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
type | string | false | none | none |
content | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | AUTOMATIC |
type | MANUAL |
TaskDataOverviewDTO
{
"flags": [
{
"id": "string",
"systemId": "string",
"systemName": "string",
"systemHostnames": "string",
"name": "string",
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"systemId": "string",
"systemName": "string",
"systemHostnames": "string",
"name": "string",
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"systemId": "string",
"systemName": "string",
"systemHostnames": "string",
"name": "string",
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"systemId": "string",
"systemName": "string",
"systemHostnames": "string",
"name": "string",
"data": {
"name": "string",
"id": "string"
}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
flags | [TaskOverviewDTO] | false | none | none |
actions | [TaskOverviewDTO] | false | none | none |
availabilities | [TaskOverviewDTO] | false | none | none |
attacks | [TaskOverviewDTO] | false | none | none |
TaskOverviewDTO
{
"id": "string",
"systemId": "string",
"systemName": "string",
"systemHostnames": "string",
"name": "string",
"data": {
"name": "string",
"id": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
systemId | string | false | none | none |
systemName | string | false | none | none |
systemHostnames | string | false | none | none |
name | string | false | none | none |
data | ISystemTaskDTO | false | none | none |
ScenarioCampaignReorderedItemsDTO
{
"itemIds": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
itemIds | [string] | false | none | none |
ScenarioDTO
{
"id": "string",
"name": "string",
"description": "string",
"version": "string",
"type": "CTF",
"platformId": "string",
"externalId": "string",
"tags": [
"string"
],
"subnets": [
{
"id": "string",
"name": "string",
"description": "string",
"subnetIPv4Address": "string",
"subnetIPv6Address": "string",
"gatewayIPv4": "string",
"gatewayIPv6": "string",
"dns1": "string",
"dns2": "string",
"deploymentModel": "DEDICATED",
"systems": [
{
"id": "string",
"systemDefinition": {
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
},
"tags": [
"string"
],
"deploymentModel": "DEDICATED",
"primaryHostname": "string",
"configuration": {
"networking": {
"ipv4Gateway": "string",
"ipv6Gateway": "string",
"primaryDns": "string",
"secondaryDns": "string",
"interfaces": [
{
"id": "string",
"subnetId": "string",
"ipv4Address": "string",
"ipv6Address": "string",
"hostname": "string",
"name": "string"
}
]
},
"parameters": [
{
"key": "string",
"value": "string"
}
]
}
}
],
"type": "NOT_CONNECTED"
}
],
"objectives": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
],
"injects": [
{
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
],
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"objectives": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"order": 0
}
}
],
"injects": [
{
"id": "string",
"order": 0,
"data": {
"id": "string",
"name": "string",
"description": "string",
"content": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"script": {
"source": "string",
"exec": "string"
},
"trigger": {
"type": "AUTOMATIC",
"content": "string"
},
"order": 0
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"actions": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"availabilities": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
],
"attacks": [
{
"id": "string",
"order": 0,
"data": {
"name": "string",
"id": "string"
}
}
]
}
}
],
"status": "ARCHIVED",
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"isLocked": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
version | string | false | none | none |
type | string | false | none | none |
platformId | string | false | none | none |
externalId | string | false | none | none |
tags | [string] | false | none | none |
subnets | [SubnetDTO] | false | none | none |
objectives | [ScenarioObjectiveDTO] | false | none | none |
injects | [ScenarioInjectDTO] | false | none | none |
campaigns | [CampaignDTO] | false | none | none |
status | string | false | none | none |
capacity | CapacityDTO | false | none | none |
contacts | [ContactDTO] | false | none | none |
isLocked | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | CTF |
type | LIVE_FIRE |
type | TRAINING |
status | ARCHIVED |
status | ACCEPTED |
status | AVAILABLE |
status | IN_PROGRESS |
status | REJECTED |
status | SUBMITTED |
VulnerabilityDTO
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
type | string | false | none | none |
cveId | string | false | none | none |
description | string | false | none | none |
script | SystemScriptDTO | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | EXPLOIT |
type | MISCONFIGURATION |
type | VULNERABILITY |
ActionDTO
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
result | string | false | none | none |
hints | [HintDTO] | false | none | none |
script | TaskScriptDTO | false | none | none |
TaskScriptDTO
{
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
source | string | false | none | none |
exec | string | false | none | none |
type | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | EXTERNAL |
type | INTERNAL |
AttackDTO
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
type | string | false | none | none |
mitreId | string | false | none | none |
script | TaskScriptDTO | false | none | none |
hints | [HintDTO] | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | CLIENT |
type | NET |
type | WEB |
AvailabilityDTO
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
protocol | string | false | none | none |
port | integer(int32) | false | none | none |
result | string | false | none | none |
script | TaskScriptDTO | false | none | none |
Enumerated Values
Property | Value |
---|---|
protocol | TCP |
protocol | UDP |
protocol | SCTP |
protocol | ICMP |
FlagDTO
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
name | string | false | none | none |
result | string | false | none | none |
location | string | false | none | none |
type | string | false | none | none |
contentType | string | false | none | none |
taskDescription | FlagTaskDescriptionDTO | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | STATIC |
type | DYNAMIC |
contentType | EXECUTABLE |
contentType | TEXT |
contentType | PARAMETER |
FlagTaskDescriptionDTO
{
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
question | string | false | none | none |
description | string | false | none | none |
hints | [HintDTO] | false | none | none |
TaskDataDTO
{
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
flags | [FlagDTO] | false | none | none |
actions | [ActionDTO] | false | none | none |
availabilities | [AvailabilityDTO] | false | none | none |
attacks | [AttackDTO] | false | none | none |
DscSystemDTO
{
"id": "string",
"type": "CONTAINER",
"subType": "string",
"name": "string",
"description": "string",
"version": "string",
"platformIds": [
"string"
],
"dependencies": [
{
"id": "string",
"name": "string",
"os": "ANDROID",
"osVersion": "string",
"version": "string",
"platformIds": [
"string"
],
"status": "ARCHIVED"
}
],
"externalId": "string",
"contentType": "CTF",
"systemRole": "NETWORKING",
"configuration": {
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
},
"vulnerabilities": [
{
"id": "string",
"name": "string",
"type": "EXPLOIT",
"cveId": "string",
"description": "string",
"script": {
"source": "string",
"exec": "string"
}
}
],
"tasks": {
"flags": [
{
"id": "string",
"name": "string",
"result": "string",
"location": "string",
"type": "STATIC",
"contentType": "EXECUTABLE",
"taskDescription": {
"question": "string",
"description": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
}
],
"actions": [
{
"id": "string",
"name": "string",
"description": "string",
"result": "string",
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
],
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"availabilities": [
{
"id": "string",
"name": "string",
"protocol": "TCP",
"port": 0,
"result": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
}
}
],
"attacks": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "CLIENT",
"mitreId": "string",
"script": {
"source": "string",
"exec": "string",
"type": "EXTERNAL"
},
"hints": [
{
"name": "string",
"content": "string",
"order": 0,
"penalty": 0
}
]
}
]
},
"status": "ARCHIVED",
"created": 0,
"contacts": [
{
"name": "string",
"email": "string",
"role": "string"
}
],
"isLocked": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
type | string | false | none | none |
subType | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
version | string | false | none | none |
platformIds | [string] | false | none | none |
dependencies | [SystemOverviewDTO] | false | none | none |
externalId | string | false | none | none |
contentType | string | false | none | none |
systemRole | string | false | none | none |
configuration | SystemConfigurationDTO | false | none | none |
vulnerabilities | [VulnerabilityDTO] | false | none | none |
tasks | TaskDataDTO | false | none | none |
status | string | false | none | none |
created | integer(int64) | false | none | none |
contacts | [ContactDTO] | false | none | none |
isLocked | boolean | false | read-only | none |
Enumerated Values
Property | Value |
---|---|
type | CONTAINER |
type | HARDWARE |
type | VM |
contentType | CTF |
contentType | LIVE_FIRE |
contentType | TRAINING |
systemRole | NETWORKING |
systemRole | SECURITY_TOOL |
systemRole | SERVER |
systemRole | SUPPORT |
systemRole | WORKSTATION |
systemRole | OTHER |
status | ARCHIVED |
status | ACCEPTED |
status | AVAILABLE |
status | IN_PROGRESS |
status | REJECTED |
status | SUBMITTED |
PortInfoDTO
{
"portNumber": 0,
"protocol": "TCP"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
portNumber | integer(int32) | false | none | none |
protocol | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
protocol | TCP |
protocol | UDP |
protocol | SCTP |
protocol | ICMP |
SystemConfigurationDTO
{
"capacity": {
"cpu": 0,
"memory": 0,
"storage": 0,
"maxEnvironments": 0,
"referenceCapacity": {}
},
"systemInfo": {
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
capacity | CapacityDTO | false | none | none |
systemInfo | SystemInfoDTO | false | none | none |
SystemCustomizationInfoDTO
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
source | string | false | none | none |
uploadPath | string | false | none | none |
exec | string | false | none | none |
template | string | false | none | none |
templatePath | string | false | none | none |
type | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | CLOUD_INIT |
type | SCRIPT |
type | SSH |
SystemInfoDTO
{
"os": "ANDROID",
"osVersion": "string",
"source": {
"source": "string",
"version": "string",
"repository": "string"
},
"services": [
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
],
"parameters": [
{
"key": "string",
"value": "string"
}
],
"customizations": [
{
"source": "string",
"uploadPath": "string",
"exec": "string",
"template": "string",
"templatePath": "string",
"type": "CLOUD_INIT"
}
],
"interfaces": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
os | string | false | none | none |
osVersion | string | false | none | none |
source | SystemSourceInfoDTO | false | none | none |
services | [SystemServiceInfoDTO] | false | none | none |
parameters | [DscParameterDTO] | false | none | none |
customizations | [SystemCustomizationInfoDTO] | false | none | none |
interfaces | [string] | false | none | none |
Enumerated Values
Property | Value |
---|---|
os | ANDROID |
os | APPLE |
os | LINUX |
os | WINDOWS |
os | OTHER |
os | UNKNOWN |
SystemServiceInfoDTO
{
"name": "string",
"version": "string",
"ports": [
{
"portNumber": 0,
"protocol": "TCP"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | none |
version | string | false | none | none |
ports | [PortInfoDTO] | false | none | none |
SystemSourceInfoDTO
{
"source": "string",
"version": "string",
"repository": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
source | string | false | none | none |
version | string | false | none | none |
repository | string | false | none | none |