Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleTerminology

Click here for an overview of Terminology

Introduction

HRMTS provides a set of RESTFul Web Service to retrieve various information through Third Party Systems. The function of this Web Service is restricted to read-only.

Requirements

Following configuration in the System is required before the Web Service can be used:

  1. Enable the web service in Customer’s account.
  2. Configure an API key.
  3. Configure IP address filter.
  4. Use HTTPS.

HRMTS Support can assist the Customer in this configuration

Formats

The Web Service methods return various data stored in the System as XML or JSON. The delivery format is specified by adding /xml/ or /json/ to the URLs as shown in the document. Specifying neither of these parameters will always return the data in XML.


Info

Read about the common setup of RESTFul apis

URL Format

All the Web Service methods use a common convention in their URLs. The URLs consist of parts for customer alias, API key and method name. E.g.:

...

When calling an API method, simply replace these parts with proper values.

Success Response Format

Successful responses from all Web Service methods follow a common convention. The HTTP status code for all successful responses is 200.

...

The root element describes the type of data being returned. In the example above, the candidate list is being returned.

Execution Time

The node for execution time indicated the time used on the server to deliver this data. This data is included for the benefit of both Customer and HRMTS. The customer can keep a log of average delivery time for their typical method calls and report in case of inconsistencies. Also, they can see which method calls are expensive so that they can call the methods in a more optimized way. HRMTS can benefit from these values when debugging or extending the Web Service and during releases.

Customer

The node for customer repeats the basic customer information that is supplied in the call to Web Service method.  

Counts

The node for counts provide information on various counts on the data that is delivered. This information is useful in implementing paging support.

Node

Description

Search Count

Number of elements that match the criteria. May be more than what is delivered in the current call.

Skip Count

Number of elements that match the criteria and are skipped or jumped.

Take Count

Number of elements that match the criteria and are included in the results.

Total Count

Total number of elements available on the server. In the example above, the value indicates 106 candidates in the Customer account.

 

Sort

The node for sort indicates the sorting criteria used in the results.

Node

Description

Field

The field on which the results are sorted by.

Direction

The direction of sort – ascending or descending.

Items

The node for items include the list of department data objects.

Code Block
{
	"Id": 0,
	"ThirdPartyId": "",
	"Name": "",
	"Details": {
		"InternalName": "",
		"IsRootDepartment": true,
		"IsVirtualRootDepartment": false,
		"IsSynchronized": false,
		"IsProjectCreationAllowed": true,
		"IsDeletable": false,
		"ContactPerson": "",
		"Address": "",
		"POBox": "",
		"Zip": "",
		"City": "",
		"County": "",
		"Country": "",
		"Phone": "",
		"PhoneFax": "",
		"Email": "",
		"WebSite": "",
		"ParentDepartmentCsv": "",
		"SynchronizationId": "",
		"ParentSynchronizationId": "",
		"CreatedDateTimeUtc": "/Date(1517573863000)/",
		"LastUpdatedDateTimeUtc": "/Date(1517573863000)/",
		"SubDepartments": {
			"Immediate": {
				"Count": 2,
				"Csv": "100,101",
				"DepartmentList": [
					{
						"Id": 100,
						"ThirdPartyId": "",
						"Name": "",
						"Details": null
					},
					{
						"Id": 101,
						"ThirdPartyId": "",
						"Name": "",
						"Details": null
					}
				]
			},
			"Recursive": {
				"Count": 2,
				"Csv": "100,101",
				"DepartmentList": []
			}
		},
		"PropertyBag": []
	}
}

Error Response Format

Failed responses from all Web Service methods follow a common convention. The HTTP status code for all successful responses is according to the error that has occurred, e.g. 500.

Root Element

The root element describes the transaction status.

Status Code

Represents the HTTP status code.

Status Description

Describes the actual error that occurred on the server.

Important to Know

Depending on the query string parameters, the Web Service methods may return one or more data objects. Each data object is divided into two parts. The first part consists of basic properties such as id, name etc., while the second part consists of all other detailed properties.

When more than one data objects are returned by a Web Service method, only the basic properties are included in the results. The detailed properties are not included to make the delivery lightweight. Only when a single data object is returned, then the detailed properties are also included.

Common Query String Parameters

All Web Service methods accept query string parameters to know type and amount of data to return. Each method has its dedicated parameters, while following parameters are common for all methods.

Skip

...

Default value

...

Take

...

Send this paging parameter to define how many data objects to include in the returned list once the search and filter criteria are applied.

...

Default value

...

Sort By

...

Send this parameter to sort the list with a specific property of the data object.

...

Default value

...

Sort Ascending

...

Send this parameter to sort the list in the ascending order with value defined in “sortby”

...

Default value

...

UI Culture

...

Send this parameter to get the localized text for the values of dropdown lists, e.g. education etc. The available languages are:

  • da – Danish
  • de – German
  • en – English
  • es – Spanish
  • et – Estonian
  • fr – French
  • fi – Finnish
  • lt – Lithuanian
  • lv – Latvian
  • nl – Dutch
  • no – Norwegian Bokmål
  • nn-no – Norwegian Nynorsk
  • pl – Polish
  • ru – Russian
  • sv – Swedish

...

Default value

...

 

Department Id

...

Send this parameter to filter the list with a single department id.

...

Default value

...

Include Sub Departments

...

Send this parameter to include the sub departments in filtering of data objects.

...

Default value

...