Introduction to the Subscribe-HR RESTful API

From Subscribe-HR Wiki Help
Jump to: navigation, search
(Fields)
 
(5 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
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
 
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==
+
===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
 
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
Line 16: Line 16:
 
It contains the following two sections:
 
It contains the following two sections:
  
==Processes==
+
===Processes===
  
 
The Processes page allows you to define your JSONpath configuration file. There are 2 available tabs for this:
 
The Processes page allows you to define your JSONpath configuration file. There are 2 available tabs for this:
Line 23: Line 23:
 
# Events: This tab holds the log of events that occur when running the process.
 
# Events: This tab holds the log of events that occur when running the process.
  
==Fields==
+
===Fields===
 
<table border="1" width="700" id="table1" cellspacing="1">
 
<table border="1" width="700" id="table1" cellspacing="1">
 
<tr>
 
<tr>
 
<td width="150"><b><font face="Arial" size="2">Field Name</font></b></td>
 
<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>
 
<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>
 
<tr>
 
<tr>
Line 56: Line 60:
 
<td width="150"><font face="Arial" size="2">Start Date</font></td>
 
<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>
 
<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>
 
</tr>
  
 
</table>
 
</table>
  
==Authentication==
+
===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 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:
 
The following fields are available:
 +
* '''UUID''': Unique record ID.
 
* '''Type''': Determines the type of authentication. Options are: '''OAuth2.0''' and '''Authorization Header'''.
 
* '''Type''': Determines the type of authentication. Options are: '''OAuth2.0''' and '''Authorization Header'''.
 
* '''Name''': The name of the integration.
 
* '''Name''': The name of the integration.
Line 79: Line 100:
 
* '''Header Name''': The name of the Authorization Header.
 
* '''Header Name''': The name of the Authorization Header.
 
* '''Authorisation Method''': The method of Authorisation used by the 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:

  1. 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.
  2. 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.

Subscribehr logo.gif