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

  1. Log in to IBM Spectrum Discover GUI.
  2. Go to Administration > Data Management tab.
    The policy status can also be checked with the following REST API read request:
    /policyengine/v1/policies: GET and /policyengine/v1/policies/<policy_name>: GET
    For more information, see /policyengine/v1/policies: GET and /policyengine/v1/policies/<policy_name>: GET.For more information, see /policyengine/v1/policies: GET and /policyengine/v1/policies/<policy_name>: GET in the Data Cataloging: REST API Guide.
    Note: As import tags policies rely on an external list of objects/file and not on a policy filter, the policy preview service does not apply to this policy type. The number of records updated in IBM Spectrum Discover will be no more than the number of entries in the external tag file.
  3. Go to Policies tab.
    Policies are listed with their status as active or inactive.

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.