Software Secure Workload
Activity Configure

Scope-Independent APIs

The following APIs can span multiple scopes on the Secure Workload appliance.


 

The number of scope independent and dependent annotated facets must not exceed 32 for any root scope.

Upload Labels

This endpoint is used to upload a CSV file with labels for labeling flows and inventory items on the Secure Workload appliance. Column headers with names IP and VRF must appear in the CSV file and VRF must match the root scope for a label. Of the remaining column headers, up to 32 can be used to annotate flows and inventory items.

POST /openapi/v1/assets/cmdb/upload

Parameters:

User must provide an operation type (X-Tetration-Oper) as a parameter to this API to specify the operation to be performed.

Response object:

Name

Type

Description

warnings

JSON

Key or value map containing warnings that are encountered while setting labels.

Sample python code


  file_path = '/<path_to_file>/user_annotations.csv'
  req_payload = [tetpyclient.MultiPartOption(key='X-Tetration-Oper', val='add')]
  restclient.upload(file_path, '/assets/cmdb/upload', req_payload)

Download User Labels

This endpoint returns the user-uploaded labels for all scopes on the Secure Workload appliance as a CSV file.

GET /openapi/v1/assets/cmdb/download

Parameters: None

Response:

Content-Type: text/csv

CSV file containing user uploaded labels for the scope.

Sample python code


  file_path = '/<path_to_file>/output.csv'
  restclient.download(file_path, '/assets/cmdb/download')