Introduction to the Subscribe-HR RESTful API
(→Fields) |
|||
(28 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{page.name: Integration Module: Introduction to | + | {{page.name: Integration Module: Introduction to the Subscribe-HR RESTful API - Subscribe-HR Wiki}} |
− | {{page.head: Introduction to | + | {{page.head: Introduction to the Subscribe-HR RESTful API}} |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
__TOC__ | __TOC__ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | =RESTful API= | |
− | + | ||
+ | Subscribe-HR API or SAPI for short is the primary way to get data out of, and put data into, the platform. It's an HTTP-based RESTful API that you can use to query, create, update and delete entities within Subscribe-HR. All the supported operations are outlined on apiary at the following link http://docs.subscribehr.apiary.io | ||
+ | |||
+ | ===SHaRpi Integration Module=== | ||
+ | |||
+ | The Integration Module provides a front-end configurable interface for setting up integrations using the RESTful API. Additional documentation can be found here: http://subscribehr.readthedocs.io/en/latest/sharpi.html | ||
+ | |||
+ | It contains the following two sections: | ||
+ | |||
+ | ===Processes=== | ||
− | + | The Processes page allows you to define your JSONpath configuration file. There are 2 available tabs for this: | |
− | * | + | # Configuration: This tab holds the configuration file to be edited. The configuration file process can be run from here. |
+ | #*Run Processes: This will run the process currently loaded, hoever please note, the record needs to be saved and validated before running the process. Running process before saving it will execute previous version of configuration file. | ||
+ | # Events: This tab holds the log of events that occur when running the process. | ||
− | == | + | ===Fields=== |
+ | <table border="1" width="700" id="table1" cellspacing="1"> | ||
+ | <tr> | ||
+ | <td width="150"><b><font face="Arial" size="2">Field Name</font></b></td> | ||
+ | <td width="550"><b><font face="Arial" size="2">Description</font></b></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">UUID</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Unique record ID</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Name</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">The name that will be assigned to the saved process</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Last Executed</font></td> | ||
+ | <td width="550"><font face="Arial" size="2"> The last time the process was run</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Last Successful Execution</font></td> | ||
+ | <td width="550"><font face="Arial" size="2"> The last time process has completed successfully</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Enable Scheduler</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Enable scheduler to run the process on predefined interval</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Interval</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Scheduler interval - must be a whole number e.g. 10 minutes</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Units</font></td> | ||
+ | <td width="550"><font face="Arial" size="2"> Interval units e.g. minutes, hours, days etc.</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Start Date</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Date when scheduler will become active.</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Purge Logs</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Remove logs after certain time period. This option is enabled by default.</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">After Interval</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">After what interval to purge logs (e.g. 2 weeks).</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Units</font></td> | ||
+ | <td width="550"><font face="Arial" size="2"> After interval units e.g. minutes, hours, days etc.</font></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td width="150"><font face="Arial" size="2">Belongs to App</font></td> | ||
+ | <td width="550"><font face="Arial" size="2">Select app if this authentication record is to be added to one of your apps.</font></td> | ||
+ | </tr> | ||
− | + | </table> | |
− | + | ||
− | + | ||
− | + | ||
− | == | + | ===Authentication=== |
− | + | ||
− | + | ||
− | + | The Authentication records provide a record that can be referenced in your configuration Processes record. This authentication record holds the access tokens and keys depending on the authentication type. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | The following fields are available: | |
− | * | + | * '''UUID''': Unique record ID. |
− | + | * '''Type''': Determines the type of authentication. Options are: '''OAuth2.0''' and '''Authorization Header'''. | |
− | + | * '''Name''': The name of the integration. | |
+ | * '''Grant Type''': The Authorisation grant type. | ||
+ | * '''Client ID''': A field for the string that identifies the Client to be entered. | ||
+ | * '''Client Secret''': An encrypted field for holding a key belonging to the client. | ||
+ | * '''Refresh Token''': An encrypted field for holding the refresh token response after making a call. | ||
+ | * '''Access Token Expiry''': The date and time the Access toekn expires. | ||
+ | * '''Refresh Token Expiry''': The date and time the refresh token expires. | ||
+ | * '''URL''': The initial URL that the authorisation is sent to. | ||
+ | * '''Scope''': The scope of the access for the integration. | ||
+ | * '''Access Token URL''': The inital URL the access token is sent to. | ||
+ | * '''Request Parameters''': The parameters for SHaRpi to request new tokens. | ||
+ | * '''Header Name''': The name of the Authorization Header. | ||
+ | * '''Authorisation Method''': The method of Authorisation used by the header. | ||
+ | * '''Belongs to App''': Select app if this authentication record is to be added to one of your apps. | ||
[[File:subscribehr_logo.gif]] | [[File:subscribehr_logo.gif]] |
Latest revision as of 22:43, 2 October 2019
RESTful API
Subscribe-HR API or SAPI for short is the primary way to get data out of, and put data into, the platform. It's an HTTP-based RESTful API that you can use to query, create, update and delete entities within Subscribe-HR. All the supported operations are outlined on apiary at the following link http://docs.subscribehr.apiary.io
SHaRpi Integration Module
The Integration Module provides a front-end configurable interface for setting up integrations using the RESTful API. Additional documentation can be found here: http://subscribehr.readthedocs.io/en/latest/sharpi.html
It contains the following two sections:
Processes
The Processes page allows you to define your JSONpath configuration file. There are 2 available tabs for this:
- Configuration: This tab holds the configuration file to be edited. The configuration file process can be run from here.
- Run Processes: This will run the process currently loaded, hoever please note, the record needs to be saved and validated before running the process. Running process before saving it will execute previous version of configuration file.
- Events: This tab holds the log of events that occur when running the process.
Fields
Field Name | Description |
UUID | Unique record ID |
Name | The name that will be assigned to the saved process |
Last Executed | The last time the process was run |
Last Successful Execution | The last time process has completed successfully |
Enable Scheduler | Enable scheduler to run the process on predefined interval |
Interval | Scheduler interval - must be a whole number e.g. 10 minutes |
Units | Interval units e.g. minutes, hours, days etc. |
Start Date | Date when scheduler will become active. |
Purge Logs | Remove logs after certain time period. This option is enabled by default. |
After Interval | After what interval to purge logs (e.g. 2 weeks). |
Units | After interval units e.g. minutes, hours, days etc. |
Belongs to App | Select app if this authentication record is to be added to one of your apps. |
Authentication
The Authentication records provide a record that can be referenced in your configuration Processes record. This authentication record holds the access tokens and keys depending on the authentication type.
The following fields are available:
- UUID: Unique record ID.
- Type: Determines the type of authentication. Options are: OAuth2.0 and Authorization Header.
- Name: The name of the integration.
- Grant Type: The Authorisation grant type.
- Client ID: A field for the string that identifies the Client to be entered.
- Client Secret: An encrypted field for holding a key belonging to the client.
- Refresh Token: An encrypted field for holding the refresh token response after making a call.
- Access Token Expiry: The date and time the Access toekn expires.
- Refresh Token Expiry: The date and time the refresh token expires.
- URL: The initial URL that the authorisation is sent to.
- Scope: The scope of the access for the integration.
- Access Token URL: The inital URL the access token is sent to.
- Request Parameters: The parameters for SHaRpi to request new tokens.
- Header Name: The name of the Authorization Header.
- Authorisation Method: The method of Authorisation used by the header.
- Belongs to App: Select app if this authentication record is to be added to one of your apps.