Rest API – User Experience Checks
Overview
The REST API allows you to work with User Experience Checks (UEC) in FireScope SPM using a REST client in lieu of the SPM user interface.
- Retrieve
- Schema
- Create or Update
- Delete
Retrieve
To retrieve the current information about a UEC in SPM, send unique query parameters in a GET request to the following URL:
http://localhost:38050/web_services/...ver1&name=uec1
Note: Don’t forget to change the domain name (localhost) and query parameter values (account, edge_device, ci, and name) to match your environment and data.
A JSON response will be returned similar in structure to the payload for creation.
Query Parameter Descriptions
Parameter | Description | Type | Required |
account | Name of the SPM Account. | String | Yes |
edge_device | Name of the UEC’s Edge Device. | String | Yes |
ci | Name of the associated CI. | String | Yes |
name | Name of the UEC. | String | Yes |
Schema
To retrieve the full SPM schema for UEC, send the Account name with the schema parameter set to true in a GET request to the following URL:
http://[SPM IP address]:38050/web_services/userexptest?account=[Account name]&schema=true
Note: Don’t forget to change the domain name (localhost) and query parameter values (account, edge_device, ci, and name) to match your environment and data.
Create or Update
To create or update an UEC, POST a JSON document with the specific UEC information to the following URL:
http://[SPM IP address]:38050/web_services/userexptest
Note: Don’t forget to change the domain name (SPM IP address]) to match your environment and data.
You can use the following example as a guide, but note that it does not include all optional properties.
{
"account_id" : "firescope",
"edge_device_id" : "edge1",
"ciid" : "ci1",
"name" : "uec1",
"userexpstep" : [{
"name" : "Step 1",
"url" : "firescope.com"
}]
}
Property Descriptions
The following table provides information about all required and optional properties available for an UEC.
Property | Description | Type | Default Value | Required |
account_id | Name of the SPM Account. | String | Yes | |
edge_device_id | Name of the Edge Device that will process this ESB Transport. | String | Yes | |
ciid | The CI you want to run the User Experience Checks on. | String | Yes | |
name | Unique name of the UEC. | String | Yes | |
agent | The user agent to use when making requests. | String | No | |
attributesetid | The Attribute Set created and managed by this UEC to contain the various attributes that get created. Read only. | String | No | |
auth_id | The username to use for authentication. Required if auth_type is not None. | String | Conditional | |
auth_password | The password to use for authentication. Required if auth_type is not None. | String | Conditional | |
auth_port | The port to use for authentication. | Number | 0 | No |
auth_type | The authentication mechanism the UEC should use against the remote source.0 = None1 = Basic2 = Digest3 = NTLM | Number | 0 | Yes |
auth_url | The URL to authenticate against. | String | No | |
delay | Number of seconds in which an attribute set will poll data. Cannot be less than 30 seconds. | Number | 60 | Yes |
description | An optional description of the UEC. | String | No | |
error | A read only message that is populated with any errors that may occur when processing this UEC. | String | No | |
lastfailedstep | A read only field that identifies which UEC Step number that may have failed. | String | No | |
macros | If there are commonly used macros (e.g. username, password) that will be used in multiple steps in this scenario, enter them here. Format should be {variableName}=value. | String | No | |
ntm_domain | The domain to be used for NTLM authentication. | String | No | |
ntm_host | The host to be used for NTLM authentication. | String | No | |
proxy_auth_type | The proxy authentication mechanism the UEC should use.0 = None1 = Basic2 = Digest3 = NTLM | Number | 0 | Yes |
proxy_host | The hostname that the proxy should use. Required if use_proxy is true. | String | Conditional | |
proxy_ntm_domain | The proxy domain to be used for NTLM authentication. | String | No | |
proxy_ntm_host | The proxy host to be used for NTLM authentication. | String | No | |
proxy_password | The proxy password to use for authentication. Required if proxy_auth_type is not None. | String | Conditional | |
proxy_port | The proxy port to use for authentication | Number | 0 | No |
proxy_user | The proxy username to use for authentication. Required if proxy_auth_type is not None. | String | Conditional | |
redirect | If set to false, test steps will not follow redirects to a different page when a 302 redirect code is received. | Boolean | TRUE | No |
status | Whether the UEC is enabled or not.0 = Enabled1 = Disabled | Number | 0 | No |
time | Number | 0 | No | |
userexpstep | A list of steps that make up this UEC. PropertyDescriptionTypeDefault ValueRequirednameUnique name to identify this step.String YesnoThe logical ordering of the steps to be processed. Set all steps to the same number if you want them to run sequentially.Number0YespostsAny post variables that need to be included for a form submission step should be included here. Use URI query format:name1=value1&name2=value2String NorequiredTo determine success of this step, you can look for specific characters or words in the web servers response to this step (e.g. the word Success will require that the server responds with a page with the word Success in it). Ignored if left blank.String Norequired_typeDetermines how to match the web servers response.0 = Plain Text1 = XSLT2 = Regular Expression |
Object[] | Yes | |
userexptestattribute | A list of attributes that get automatically created for every UEC. This field is read only and for display purposes only. PropertyDescriptionTypeDefault ValueRequiredattributeidThe attribute name.String YestypeThe type of attribute.1 = Time2 = Speed3 = Last Step4 = SizeNumber Yes |
Object[] | No | |
userexp_group | A list of existing UEC groups that this UEC should belong to. | String[] | No | |
use_proxy | Whether to use a proxy or not when connecting.0 = No Proxy1 = Use Proxy | Number | 0 | Yes |
Delete
To delete an UEC, send an HTTP DELETE request with the same query parameters as the GET request.
See the Retrieve for the URL format and query parameter descriptions.