v4.0 Rule Export Tasks API


TrueSight Network Automation REST API – RuleExportTaskService
The base URL for the API is:

https://serverName:portNumber/bca-networks/api

rule_export_tasks

{{status subtle="false" colour="Blue" title="GET"/}}

 /v4.0/rule_export_tasks
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

orderBy

query

Sort by the specified attribute (name, executionStatus, enabled, lastExecutedTimestamp, recurring, or schedule) in the specified order (prefix with a '+' for ascending or a '-' for descending)

"+name"

string 
Enum: [
 "+name",
 "-name",
 "+executionStatus",
 "-executionStatus",
 "+enabledFlag",
 "-enabledFlag",
 "+lastExecutedTimestamp",
 "-lastExecutedTimestamp",
 "+recurring",
 "-recurring",
 "+schedule",
 "-schedule"
]

offset

query

Return the specified page number

1

integer

limit

query

Define the number of rows in a page or the maximum number of rule export tasks to return

25

integer

Authorization

header

Authorization token formatted as 'Bearer [token]'


String *

Responses

Code

Description

Schema

200

successful operation

401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to access rule export tasks


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Green" title="POST"/}}

 /v4.0/rule_export_tasks
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

body

body

Complete attributes of the new rule export task


Authorization

header

Authorization token formatted as 'Bearer [token]'


string *

Responses

Code

Description

Schema

201

Created: New rule export task successfully added


400

Bad request: Input rule export task DTO is missing or new rule export task is invalid


401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to add a new rule export task


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Blue" title="GET"/}}

 /v4.0/rule_export_tasks/{nameOrKey
}
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the rule export task of interest


string *

Authorization

header

Authorization token formatted as 'Bearer [token]'


String *

Responses

Code

Description

Schema

200

successful operation

401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to access rule export tasks


404

Not found: No single matching accessible rule export task found


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Yellow" title="PUT"/}}

 /v4.0/rule_export_tasks/{nameOrKey
}
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the rule export task to be modified


string *

body

body

Complete new attribute values for the rule export task; anything left out will be considered to be null and will be nulled out in the rule export task


Authorization

header

Authorization token formatted as 'Bearer [token]'


string *

Responses

Code

Description

Schema

200

successful operation

400

Bad request: Input rule export task DTO is missing or modified rule export task is invalid


401

Unauthorized: Failed to provide a suitable authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to modify the rule export task


404

Not found: No single matching accessible rule export task found


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Red" title="DELETE"/}}

 /v4.0/rule_export_tasks/{nameOrKey
}
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the rule export task to be deleted


string *

Authorization

header

Authorization token formatted as 'Bearer [token]'


string *

Responses

Code

Description

Schema

200

successful operation

string

401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to delete the rule export task


404

Not found: No single matching accessible rule export task found


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Blue" title="GET"/}}

 /v4.0/rule_export_tasks/{nameOrKey}/exported_rules
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the rule export task of interest


string *

Authorization

header

Authorization token formatted as 'Bearer [token]'


String *

Responses

Code

Description

Schema

401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to access rule export tasks


404

Not found: No single matching accessible rule export task found, or no execution results are currently present in the task


500

Internal server error: Unexpected exception occurred


{{status subtle="false" colour="Blue" title="GET"/}}

 /v4.0/rule_export_tasks/{nameOrKey}/results
Click here to expand...


Parameters

Name

Located in

Description

Default

Schema

nameOrKey

path

Name or database key of the rule export task of interest


string *

filter.status

query

Filter for individual results with this execution status


integer

orderBy

query

Sort by the specified attribute (name, message, or status) in the specified order (prefix with a '+' for ascending or a '-' for descending)

"+status"

string 
Enum: [
 "+name",
 "-name",
 "+message",
 "-message",
 "+status",
 "-status"
]

offset

query

Return the specified page number

1

integer

limit

query

Define the number of rows in a page or the maximum number of individual rule export results to return

25

integer

Authorization

header

Authorization token formatted as 'Bearer [token]'


string *

Responses

Code

Description

Schema

200

successful operation

401

Unauthorized: Failed to provide a suitable Authorization header or accessToken cookie, or the specified user is not logged in


403

Forbidden: Not allowed to access rule export tasks


404

Not found: No single matching accessible rule export task found, or no execution results are currently present in the task


500

Internal server error: Unexpected exception occurred



Object Definitions

Object

Schema

ComponentId


Click here to expand...


{ 
    id: string 
    The database key of the component; an incoming component can be identified either by its database key, or by its unique name, or by its name with qualifiers which are unique when combined; when this database key is present, it takes precedence and componentName and qualifiers(when present) are used to verify the retrieved component 

     componentName: string 
    The name of the component; an incoming component can be identified either by its database key, or by its unique name, or by its name with qualifiers which are unique when combined; this name is used to verify any component retrieved by database key, and is used if there is no database key or if the database key fails to resolve; for componentType Configuration and HardwareInventory, componentName is the created timestamp (in milliseconds); for componentType SecurityVulnerability, componentName is the securityVulnerabilityID; for componentType SnmpManagerStation, componentName is the address 

     componentType: string * 
    The type of the component, used to verify what is retrieved by key/name; valid values are: Combogroup, Condition, Configuration, Device, DeviceAdapter, DeviceAgent, DeviceSecurityProfile DynamicField, EmailDistributionList, Group, HardwareInventory, JobApprovalType, Keyword, Model, OsImage, PredefinedJob, Realm, RemoteFileServer, Role, Rule, RuleSet, SecurityVulnerability, SnmpManagerStation, Template, and User 

     qualifiers: { 
      Any additional single qualifier needed to identify the component uniquely, when the name alone is not sufficient; the map key is the extra attribute name string; the map value string completes the identification of the component; for componentType Configuration and HardwareInventory: key=deviceKey, value=database key of the device the item belongs to, key=deviceName, value=name of the device the item belongs to, key=timestamp, value=creation date/time in server display format; for componentType DeviceAdapter: key=adapterType, value=type of the device adapter, key=parent, value=parent or owner used for organizing certain types of adapters, key=vendorName, value=name of the vendor that owns a device type; for componentType DynamicField: key=type, value=base class name of the component associated with the dynamic field; for componentType Group, ComboGroup: key=realmName, value=name of the realm the group belongs to; for componentType Model: key=vendorGuid, value=the vendor GUID; for componentType OsImage: key=filename, value=name of the file(s) making up the image; for componentType SecurityVulnerability: key=vendorGuid, value=the vendor GUID 
    } 
}

ImportExportTaskResultsDTO

Click here to expand...


{ 
    lastExecutionCompletedTimestamp: date-time 
    When the task's last execution was completed 
    Example: 2017-01-31T13:45:00.000+0000

     lastExecutionStartedTimestamp: date-time 
    When the task's last execution was started 
    Example: 2017-01-31T13:45:00.000+0000

     lastExecutionStatus: string 
    Overall status of the task's last execution 

     overallErrorMessage: string 
    If the execution failed, the overall error message 

     perComponentResults: [ 
      Status of importing or exporting each individual component 

       IndividualImportExportResultDTO
    ] 
}

ImportExportTaskScheduleDTO

Click here to expand...


{ 
    dayOfMonth: integer 
    When the task is set for monthly execution, the day of the month the task runs 

     executionHour: integer 
    The hour of the day the task runs 

     executionMinute: integer 
    The minute within the hour the task runs 

     executionDays: [ 
      When the task is set for weekly execution, days of the week the task runs 

       integer 
    ] 

     executionTimestamp: date-time 
    When the task is set for a single execution, the exact date/time the task runs; when the timestamp is missing the timezone, the server local timezone is assumed 
    Example: 2017-01-31T13:45:00.000+0000

     repeatTypeId: integer 
    How often the task runs 

     repeatTypeName: string 
    The meaning of the numeric repeatTypeId (read-only) 
}

IndividualImportExportResultDTO

Click here to expand...


{ 
    name: string 
    The name of the component 

     message: string 
    More details about the status; that is, the exact error message for a failure, the reason for a skip, or the specific action taken on a success 

     statusId: integer 
    Specific action taken on the component during the import or export 

     statusName: string 
    The meaning of the numeric statusId 
}

RuleExportTaskDTO

Click here to expand...


{ 
    id: string 
    The unique database key of the task (read-only) 

     name: string * 
    The unique display name of the task 

     annotation: string 
    Notes, comments, description, explanation 

     autoPurgeFlag: boolean 
    Whether or not the task is automatically deleted when it is non-recurring and its execution date/time has passed 

     enabledFlag: boolean 
    Whether or not the task is enabled for execution 

     executionSchedule: ImportExportTaskScheduleDTO*
    When the task is scheduled to execute 

     executionStatus: string 
    Information about the most recent execution of the task (read-only) 

     lastExecutedTimestamp: date-time 
    When this task most recently completed executing (read-only) 
    Example: 2017-01-31T13:45:00.000+0000

     schedule: string 
    A readable representation of the task's schedule (read-only) 

     canCopyFlag: boolean 
    Whether or not the user is allowed to copy this task (read-only) 

     canDeleteFlag: boolean 
    Whether or not the user is allowed to delete this task (read-only) 

     canEditFlag: boolean 
    Whether or not the user is allowed to edit this task (read-only) 

     itemsToExport: [ 
      The rules or rule sets to export; a null or empty list means all rules are exported 

       ComponentId
    ] 
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Network Automation 23.4