SurpassLocal - ProxySettings Resource

The ProxySettings Resource on the SurpassLocal API can be used to add, update, or delete the proxy settings that are used to connect to the central instance.

ProxySettings Resource

Below we have listed the operations, http verbs and an example URL for the ProxySettings resource within the Surpass API. 

Operation

HTTP Verb

Example URL

Read

GET

https://...surpass.com/api/v1/ProxySettings/

Create

POST

https://...surpass.com/api/v1/ProxySettings/

Update

PUT

https://...surpass.com/api/v1/ProxySettings/

Delete

DELETE

https://...surpass.com/api/v1/ProxySettings/

Attributes for the ProxySettings Resource

Within the table below we have provided all of the attributes included in the ProxySettings resource. This includes the attribute name, data type, if the attribute is orderable when requesting the GET method, if the attribute is available to filter when requesting the GET method, and if the attribute is mandatory when creating a candidate. Remember that if an attribute is not mandatory it can be omitted from the body of the POST request.

Attribute Name

Type

Notes

Unique Identifier

Mandatory for Create (POST)

useProxy

Boolean

 

 

X

server

String

Could be URL or IP address. Server should be "alive" and not be longer than 200 characters. Required if useProxy is true.

 

 

port

Int

Number between 0 and 65535. Required if useProxy is true.

 

 

validationRequired

Boolean

 

 

 

username

String

Required if validationRequired is true and should be no longer than 200 characters.

 

 

password

String

Required if validationRequired is true and should be no longer than 200 characters.

 

 


GET Request and Return

The GET ProxySettings resource can be called directly by browsing to the URL, any required parameters such as $filter, $orderBy, $skip and $top would need to form part of the URL that is sent. Below we have provided examples of JSON and XML responses that would be returned from the Surpass API when requesting the GET method for the ProxySettings resource. It is important to remember that the return information will be included within the response object that forms part of the standard GET response; this is detailed in the page understanding the Surpass API.

Example GET request and response (JSON)

Example GET request and response (XML)


POST Request and Return

The POST ProxySettings method requires the attributes listed above to be submitted as part of the body of the request. This can be submitted in either JSON or XML format, the content-type used will need to be submitted as part of the header of the request. An example of the address, header and body of the request for both formats can be found below.  

Depending on how the request was submitted the response will be returned in either JSON or XML format. If the call was unsuccessful then you will receive an error message; all error messages available in the Surpass API can be found here.

Example POST request & response (JSON)

Example POST request & response (XML)

 

PUT Request and Return

The resource being updated should be included in the body of the request and can be sent in either JSON or XML format. Only the field you want to be updated needs to be included within the request all others can be omitted; these fields will retain their current values. The content-length, content-type and Authorization will also be required in the header of the request.

The body of the request should be formed in the same way as the POST request and the response also returns the same information. An example of this can be found in the “POST Request and Return” section above.

DELETE Request and Return

DELETE Requests will delete the proxy settings that are used to connect to the central instance of Surpass. Successful deletes will return a status of 200 and will return the base resource with all values set to null. An example of the DELETE ProxySettings request has been provided below:

DELETE https://...surpass.com/api/v2/ProxySettings/

Required Permissions

To successfully call the methods in the Surpass Local TestSession Resource, the user validating the requests must exist within BTL’s CMS system. If you require a password reminder or a new account to be created, send a request to the BTL Service Desk (support@btl.com).

Feedback and Knowledge Base