Skip to content

Features

Paul edited this page Mar 24, 2015 · 39 revisions

Basic RESTClient

So if you didn't yet notice, this thing is a HTTP REST debugger 😃. It allows one to craft arbitrary HTTP requests and send them to servers to see what the result will be.

That's the basic principle of it, any other functions (bookmarks, APS token fetcher) are sugar that is only there to enhance the experience.

RESTClient APS is a fork that is designed to be non-intrusive and therefore provides a stock RESTClient experience if user desires so (just set APS mode to disabled, instructions below).

The most basic workflow to send HTTP request would be:

  1. Select the request method in [3].
  2. Enter the request URL in [4].
  3. If you want to include request body (e.g. for POST request), enter the text in [6].
  4. Press the main request sending button [5].

The response panel [15], will fill up with data and you can use its tabs [14] to switch between representations.

Another basic RESTClient feature is the ability to add any custom headers you may want to your request. Just select Headers -> Custom Header in the menu [1].

If you are looking for additions to your HTTP debugging stack, I'd highly recommend Fiddler (for cases when you want to capture requests sent by something other than browser extensions).

APS Token Fetching

The core feature of this fork is the ability to automate fetching of APS authentication token to ease the debugging of APS-related issues.

Currently, the only way to do that is to use PA API. The catch here is that the said API has to be accessible from your machine and that is not always the case, because PA network is often complex and multi-level and having and API (that has no proper permissions model and grants highest level of access possible without SSH to anyone who uses it) available from the outside is a huge security risk.

If the API is not available from your own machine, refer to cURL Integration section below to learn of another possibility to fetch token.

There are several types of tokens that RESTClient APS is able to fetch.

All types have their corresponding POA API method and that method, in turn, has its parameters. Here's a rundown of them:

Token Type PA API method Parameters
Account[, Subscription] pem.APS.getAccountToken account_id subscription_id
Service User[, Subscription] pem.APS.getUserToken user_id subscription_id
Application Instance pem.APS.getApplicationInstanceToken application_instance_id
Subscription pem.APS.getSubscriptionToken subscription_id
Service Template pem.APS.getServiceTemplateToken service_template_id

Full description of these and other PA API methods can be found in the corresponding guide .

Token type is chosen via drop-down menu in panel [10] on the left and parameters are entered in the field on the right.

Parameters are typed into a simple text field separated by space. For example, you have selected a type and entered some parameters:

In that case, the request to PA API will contain 1000001 as account_id and 1000002 as subscription_id. If we omit the second parameter, it will be sent as 0.

  • Note: When using browser to access an APS screen in Customer CP, user is given a token that is equivalent to one that is attained by sending the request in the picture just above (both parameters need to be adjusted accordingly):

cURL Integration

Bookmarks

History

Auto Updater