Skip to content

Processes (ROPA)

Manage processes in your Record of Processing Activities.


List processes

GET /external/smart-inventory/process/list

Returns all processes for your company.

curl -X GET https://nightly.api.trustview.eu/external/smart-inventory/process/list \
  -H "X-API-Key: tvw_sk_live_your_key_here"
const res = await fetch(
  "https://nightly.api.trustview.eu/external/smart-inventory/process/list",
  {
    headers: { "X-API-Key": "tvw_sk_live_your_key_here" },
  }
);
const processes = await res.json();
$ch = curl_init('https://nightly.api.trustview.eu/external/smart-inventory/process/list');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: tvw_sk_live_your_key_here']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));
curl_close($ch);
import requests

response = requests.get(
    "https://nightly.api.trustview.eu/external/smart-inventory/process/list",
    headers={"X-API-Key": "tvw_sk_live_your_key_here"},
)
processes = response.json()

Response

[
  {
    "uniqueId": "6a054b8b9ae1a",
    "name": "Employee onboarding",
    "status": "active"
  }
]

Create a process

POST /external/smart-inventory/process/new

Creates a new process.

curl -X POST https://nightly.api.trustview.eu/external/smart-inventory/process/new \
  -H "X-API-Key: tvw_sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Employee onboarding", "description": "<p>Onboarding workflow</p>", "active": true}'
const res = await fetch(
  "https://nightly.api.trustview.eu/external/smart-inventory/process/new",
  {
    method: "POST",
    headers: {
      "X-API-Key": "tvw_sk_live_your_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Employee onboarding",
      description: "<p>Onboarding workflow</p>",
      active: true,
    }),
  }
);
const process = await res.json();
$ch = curl_init('https://nightly.api.trustview.eu/external/smart-inventory/process/new');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: tvw_sk_live_your_key_here',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'name' => 'Employee onboarding',
    'description' => '<p>Onboarding workflow</p>',
    'active' => true,
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));
curl_close($ch);
import requests

response = requests.post(
    "https://nightly.api.trustview.eu/external/smart-inventory/process/new",
    headers={"X-API-Key": "tvw_sk_live_your_key_here"},
    json={
        "name": "Employee onboarding",
        "description": "<p>Onboarding workflow</p>",
        "active": True,
    },
)
process = response.json()

Response

Returns the created process object.


Get a process

GET /external/smart-inventory/process/{ropa}/item

Retrieves a single process by its unique ID.

Name In Type Description
ropa path string Enter process unique ID

Tip

The process unique ID can be found in the address bar when viewing a process.

curl -X GET https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/item \
  -H "X-API-Key: tvw_sk_live_your_key_here"
const res = await fetch(
  "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/item",
  {
    headers: { "X-API-Key": "tvw_sk_live_your_key_here" },
  }
);
const process = await res.json();
$ch = curl_init('https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/item');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: tvw_sk_live_your_key_here']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch));
curl_close($ch);
import requests

response = requests.get(
    "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/item",
    headers={"X-API-Key": "tvw_sk_live_your_key_here"},
)
process = response.json()

Update a process

PATCH /external/smart-inventory/process/{ropa}/edit

Updates an existing process. Send only the fields you want to change.

Name In Type Description
ropa path string Enter process unique ID

Tip

The process unique ID can be found in the address bar when viewing a process.

curl -X PATCH https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/edit \
  -H "X-API-Key: tvw_sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Employee onboarding (revised)"}'
const res = await fetch(
  "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/edit",
  {
    method: "PATCH",
    headers: {
      "X-API-Key": "tvw_sk_live_your_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ name: "Employee onboarding (revised)" }),
  }
);
$ch = curl_init('https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/edit');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: tvw_sk_live_your_key_here',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['name' => 'Employee onboarding (revised)']));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
import requests

response = requests.patch(
    "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/edit",
    headers={"X-API-Key": "tvw_sk_live_your_key_here"},
    json={"name": "Employee onboarding (revised)"},
)

Response

Returns 204 No Content on success.


Delete a process

DELETE /external/smart-inventory/process/{ropa}/delete

Removes a process.

Name In Type Description
ropa path string Enter process unique ID

Tip

The process unique ID can be found in the address bar when viewing a process.

curl -X DELETE https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/delete \
  -H "X-API-Key: tvw_sk_live_your_key_here"
const res = await fetch(
  "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/delete",
  {
    method: "DELETE",
    headers: { "X-API-Key": "tvw_sk_live_your_key_here" },
  }
);
$ch = curl_init('https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/delete');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: tvw_sk_live_your_key_here']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
import requests

response = requests.delete(
    "https://nightly.api.trustview.eu/external/smart-inventory/process/6a054b8b9ae1a/delete",
    headers={"X-API-Key": "tvw_sk_live_your_key_here"},
)

Response

Returns 204 No Content on success.