Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Op Scripts for Troubleshooting Services Management RESTful Web Services

 

The following operations can be performed using the Connectivity Services Director Op Scripts for Troubleshooting Services Management RESTful Web Services. Op scripts are based on the Junos XML management protocol, and the Junos XML API. Op scripts can be written in either the Extensible Stylesheet Language Transformations (XSLT) or Stylesheet Language Alternative Syntax (SLAX) scripting language. Op scripts use XPath to locate the operational objects to be inspected and XSLT constructs to specify the actions to perform on the located operational objects. The actions can change the output or execute additional commands based on the output. The troubleshooting feature provides an easy and unique way to troubleshoot the services. You do not have to manually login to a device to check the status of services in the Connectivity Services Director application, but you can do the same using the functionality of operational scripts. You do have the flexibility of writing your own scripts to view the results.

Get a List of Op Scripts for a VPN Service

This request is used to retrieve the list of operational (op) scripts for a particular service.

URI

serviceui/resteasy/troubleshoot-service/

op-scripts/{service-id}

HTTP Method

GET

Consumes

application/json

application/xml

Produces

Retrieves the op scripts configured for a particular service.

Output

Sample XML Output

Execute the Op Script for an Endpoint of a VPN Service

This request is used to execute the op script for endpoints of a service for troubleshooting purposes.

URI

serviceui/resteasy/troubleshoot-service/execute-

script/{service-id}

HTTP Method

POST

Consumes

application/json

application/xml

Produces

Executes the op script for endpoints of a particular service.

Input

Sample XML Input

Output

Sample XML Output

Note

The message field signifies the job ID in the preceding output.

View the Job Results of an Executed Op Script for a VPN Service

This request is used to view the results of the job run to execute the op script.

URI

serviceui/resteasy/troubleshoot-service/

op-scripts/job-result/{job-id}

HTTP Method

GET

Consumes

application/json

application/xml

Produces

Displays the results of the job that was run to execute the op script.

Output

Sample XML Output

Get a List of Op Scripts for an LSP Service

This request is used to retrieve the list of operational (op) scripts for a particular LSP service.

URI

serviceui/resteasy/troubleshoot-service/

TA/op-scripts/{service-id}

HTTP Method

GET

Consumes

application/json

application/xml

Produces

Retrieves the op scripts configured for a particular LSP service.

Output

Sample XML Output

Execute the Op Script for an Endpoint of an LSP Service

This request is used to execute the op script for endpoints of an LSP service for troubleshooting purposes.

URI

serviceui/resteasy/troubleshoot-service/TA/execute-

script/{service-id}

HTTP Method

POST

Consumes

application/json

application/xml

Produces

Executes the op script for endpoints of a particular LSP service.

Input

Sample XML Input

Output

Sample XML Output

Note

The message field signifies the job ID in the preceding output.

View the Job Results of an Executed Op Script for an LSP Service

This request is used to view the results of the job run to execute the op script.

URI

serviceui/resteasy/troubleshoot-service/TA/

op-scripts/job-result/{job-id}

HTTP Method

GET

Consumes

application/json

application/xml

Produces

Displays the results of the job that was run to execute the op script for an LSP service.

Output

Sample XML Output