Rest Api
The latest documentation is available here.
Currently icehrm expose employee details and attendance data via the REST api.
Full Api Documentation can be found here: https://icehrm.docs.apiary.io/#
Setting up IceHrm Open Source and Pro REST Api - Nginx
IceHrm includes a REST api but it needs to be configured via web server configurations.
Basically all the requests coming to icehrm.url/app/api/ should be redirected to icehrm.url/app/index.php
For an example if you are using Nginx web server you need to add following location block inside your sever block in Nginx config file for your site
If IceHrm is not loaded from web root, for an example if your icehrm url is your-icehrm-url.com/icehrm
instead of your-icehrm-url.com
you should add any directory in relative path to location block as in following example
Setting up IceHrm Open Source and Pro REST Api - Apache (XAMPP, WAMPP)
For apache web server we have already included a .htaccess file under icehrm/app/api. This will redirect api request properly
Testing Rest Api
First you should enable REST api via Settings -> Other -> Enable REST Api setting
Visit
your-icehrm-url.com/app/api/echo
This should output an echo with a random number
Using REST Api with Open Source and IceHrmPro
Your api url base will be http://your-icehrm-url.com/app/api
.
If you want to call employees/me, you should send a request to http://your-icehrm-url.com/app/api/employees/me
.
Using REST Api with Cloud installations
First you should enable REST api via Settings -> Other -> Enable REST Api setting.
IceHrm uses OAuth 2.0 bearer authentication. So you have to send the bearer token with every request. Each icehrm user can find their auth token by opening Basic Information -> Personal Information -> Api Access (tab).
Making First Api call - Cloud
If your icehrm instance name is test1 (https://test1.icehrm.com), your Api url will be
Then according to https://icehrm.docs.apiary.io/# you can view own data by sending a GET request to
You can use following request by changing api url and auth token
For creating a employee you can use
Last updated