-
Notifications
You must be signed in to change notification settings - Fork 3
UI & Basic Usage
This page shows a basic usage patterns for RESTClient APS. More detailed information about each individual feature is available from Features
section on the right.
After the installation, main UI can be accessed by pressing a corresponding button on the Firefox toolbar.
Note: It is not recommended to have more than one window/tab of RESTClient APS open at the same time, this may cause unexpected behavior (since both instances will access the same SQLite database and preferences storage, more info about them can be found here).
The main UI has several distinct areas:
[1] Left menu bar (bookmarks, authentication, headers, view), [2] right menu bar (auto updater, settings, link to official repository).
[3] Request method selector, [4] URL field, [5] main send button, [6] body text field.
[7] APS mode selector, [8] URL of OA API, [9] OA API credentials, [10] type of token to fetch, [11] latest token fetcher status message, [12] latest fetched token, [13] manual token refresh button.
[14] Response presentation selector tabs, [15] response in currently selected presentation.
This panel is only available after enabling the corresponding option in Settings
menu. It is enabled by default.
[16] cURL representation of main request (with manual refresh button), [17] ditto for token fetch request.
Some basic usage patterns are discussed below.
The main function that is added for this fork of RESTClient is an ability to retrieve APS security token automatically through OA API. This, is, of course, only possible if the said API is accessible from your own machine (more).
After clicking the button on Firefox bar, you are taken to the main extension screen (in this wiki, numbers in brackets [5] will refer to the places on the images above, they will open in new window and this window will be scrolled each time you click on such link). Say we have the simplest task as an example:
- We want to retrieve a list of resources available for a user on APSC bus
Here are the steps necessary to do that:
- First of all, we need to enter APSC URL [4]:
Operation we are trying to perform is done via GET
verb so no need to adjust anything in the field on the left. As soon as we enter the request URL [4], OA API URL [8] will be derived from it automatically:
You can adjust it manually, but it will be reset every time a host part of main URL [4] is changed.
- Then we need to make sure our OA API parameters are correct.
Here, I've specified username and password for authenticating with OA API. OA admin
account always has API access.
Token type
[10] field is set to Account[, Subscription]
. This means that with parameter 1
we will get a token for user account with ID of 1
and no subscription filtering will be performed (only 1 parameter is supplied). If I wanted to issue an API call with subscription filtering, I could specify something like 1 2
which would be user with ID 1
and subscription with ID 2
.
-
Note: If you want to simulate requests from application's JS UI, you need to choose
Account[, Subscription]
type and specify both values like1000001 1000002
. If you omit the subscription ID (the second number), you may get results different from those JS UI code gets.
- Next step is to press
Refresh Token
[13] button.
This will initiate the request to OA API and try to retrieve the token we specified. If everything is successful, the APS Token
[12] field will be filled with token:
If there's an error, you will most likely see the cause in the status text
field [9]:
- Now, we retrieved our token.
We can now press the main Send
[5] button to ask APS controller for the desired information:
The main response view [15] will be populated with the response data and you can use its tabs [14] to toggle between various representations.
This pretty much sums up basic usage scenario for RESTClient APS. Head over to features page to learn more.
You can submit issues or feature requests for this wiki using the same RESTClient APS repository issues page and attaching a wiki
label.
Getting Started
Features
- Basic RESTClient
- APS Token Fetching
- cURL Integration
- Bookmarks & History
- Keyboard Shortcuts
- Auto Updater
- Other...
Application Packaging Standard
Odin Service Automation