Viewing the policy status
You can view policy status either from the IBM Spectrum® Discover GUI or by running read (GET) request.
About this task
Follow the procedure shown to view the policy status:
Procedure
Example
A sample REST API request for checking import tag policy and the corresponding response is shown:
curl -k -H' Authorizati on:Bearer <token>'
https://<spectrum_discover_host>/policyengine/v1/policies/importtags_ut
Response:
{
"pol_id": "importtags_ut",
"action_id": "IMPORT_TAGS",
"action_params":"{\"agent\":\"Import Tags\", \"source_connection\": \"camera_vault\", \"tag_file_path\": \"camera_lidar_semantic/A2D2_labels.csv\",\"tag_file_type\":\"csv\"}",
"schedule":"NOW",
"pol_filter":"datasource='camera_lidar_semantic' ",
"pol_state":"active",
"pol_status":"running",
"explicit": "true",
"execution_info":"{\"start_time\":\"2020-09-17 21: 04: 35\",\"total _count\":350,\"submitted_count\": 400,\"failed_count\": 8,\"completed_count\":300,\"ski pped_count\":0,\"i mport _tags_count\": 0,\"run_id\":\"a3b0f 7647647443e8c5237aebe2c5408\"}",
"policy_owner": "sdadmin",
"last_updated_by": "sdadmin",
"last_updated":"2020-09-17T21:04:35.000Z",
"collections":[]
}
During processing, the import tags application does some basic checking on the CSV file. If a row has fewer columns than the header row, the row is skipped. If a header value contains an invalid or missing tag name, the values for that column are not imported. These records are added to the failed count in the policy.