1. Home
  2. API & INTEGRATION

API & INTEGRATION

VersionDateAuthorComments
1.0.14.04.2018Viktor Kushnir 
1.0.26.07.2018Viktor Kushnirjson changesAddProject method changed
1.0.301.08.2024Andrew SaponResource Availability API entities
Adjusted Methods description

Prerequisite

Be aware that “Resource Availability API” by default is switched off. Please contact support department to have configured access to it for you.

Due to several security issues TLS versions 1.0 and 1.1 are set as deprecated and disallowed. TLS version 1.2 or 1.3 should be used instead.

Entities

Project

Describes the project

FieldDescription
idUnique identifier
nameProject’s name
managerProject manager’s name
resourcepool.idId of resource pool should be used for this project
stepsArray of Step entities
tagsArray of Tags

Resource pool

Describes the resource pool

FieldDescription
idUnique identifier
resourcesArray of Resource entities
groupsArray of Group entities

Step

Base entity for Task, Summary, Milestone, Start of Project, End of Project

FieldDescription
idUnique identifier
keyIdentified which will be shown in Epicflow site
typeMust be “task”
parentId of parent summary, can be empty
nameName of task
predecessorsArray of Predecessor entities, uses to describe relations between tasks
notesTask notes, will be visible at Epicflow site
linkHttp link to the issue in external system 
tagsArray of Tags

Task

Step entity, describes Task.

FieldDescription
assignmentsArray of Assignment, uses to describe assignments
readytostartMarks if task can be started, default value – false

Example:

{

   “id”: “89827837-7357-44e7-9469-98910ac314cf”,

   “key”: “visible key”,

   “type”: “task”,

   “parent”: {

       “id”:”{summaryid}” //”parent summary id”,

   },

   “name”: “name”,

   “predecessors”: [

       //array of predecessor

   ],

   “assignments”: //array of assignments

   [

   ],

   “tag”:

   [

   “tag1”, “tag2”, …

   ],

   “notes”: “”,

   “readytostart”: true,

   “link”: “http link”

}

Summary

Step entity, describes Summary.

FieldDescription
startStart date of summary, can be empty
endEnd date of summary, can be empty

Example:

{

   “id”: “ef332fa1-b315-4ee4-9370-e822f7897958”,

   “key”: “visible key”,

   “type”: “summary”,

   “parent”: {

       “id”:”{summaryid}” //”parent summary id”,

   },

   “name”: “name”,

   “predecessors”: [

       //array of predecessor

   ],

   “notes”: “”,

   “link”: “http link”,

   “tag”:

   [

   “tag1”, “tag2”, …

   ],

   “start”: “2018-01-09”,

   “end”: “2018-07-21”

}

Milestone

Step entity, describes the Milestone.

FieldDescription
deadlineDeadline of milestone, can be empty

Example:

{

   “id”: “95668aae-2dac-490d-93bf-931b87346005”,

   “key”: “visible key”,

   “type”: “milestone”,

   “parent”: {

       “id”:”{summaryid}”,

   },

   “name”: “name”,

   “predecessors”: [

       //array of predecessor

   ],

   “notes”: “”,

   “link”: “http link”,

   “tag”:

   [

   “tag1”, “tag2”, …

   ],

   “deadline”: “2019-01-20”

}

Start of project

Milestone entity, describes the Start milestone of project. Can be present just once per project. If omitted – Epicflow will calculate it automatically.

Example:

{

   “id”: “c77b6a51-19be-4646-9ccd-a30741442290”,

   “key”: “visible key”,

   “type”: “projectstart”,

   “parent”: {

       “id”:”{summaryid}”,

   },

   “name”: “name”,

   “predecessors”: [

       //array of predecessor

   ],

   “notes”: “”,

   “link”: “http link”,

   “deadline”: “2019-01-20”

}

End of project

Milestone entity, describes the end milestone of project. If omitted – Epicflow will calculate it automatically.

Example:

{

   “id”: “e83af0cd-1d13-44e4-8d21-0d00014f7c7d”,

   “key”: “visible key”,

   “type”: “projectend”,

   “parent”: {

       “id”:”{summaryid}” //”parent summary id”,

   },

   “name”: “name”,

   “predecessors”: [  //array of predecessor

   ],

   “notes”: “”,

   “link”: “http link”,

   “deadline”: “2019-01-20”

}

Predecessor

Describes the relation between tasks

FieldDescription
idPredecessor id, can be id of Task, Summary, Milestone, Start of Project, End of Project

Example:

{

   “id”:”{stepId}”

}

Assignment

Describes the assignment for specific task

FieldDescription
idUnique identifier within the task
resource.idUnique resource id
group.idUnique group id
remainingRemaining work, in hours
actualCompleted work, in hours
unitsAssigned units, default value 1.
averageWorkdayHours
Integer, that defines average work day hours per assignment.
Overrides availability of assigned resource.

Example:

{

   “id”: “1”,

   “resource”: {

       “id”: “resourceId”

   },

   “group”: {

       “id”: “groupId”

   },

   “remaining”: 25.5,

   “actual”: 74.5,

   “units”: 1,    

   “averageWorkdayHours”:13    

}

Resource

Describes the resource

FieldDescription
idUnique identifier
nameResource name
groupsArray of Group
emailResource’s email
startThe date when resource became available
endThe date since resource become unavailable

Example:

{

“id”:”196bcd63-0809-41c8-aa90-77a68449789b”,

“name”:”Craig Wells”,

       “groups”:[

        {

           “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

        },

        {

           “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

        }

       ],

“email”:”craig.wells@yahoo.com”,

“start”:”2018-01-20″,

“end”:null

}

Group

Describes the group

FieldDescription
idUnique identifier
nameResource name
startThe date when group became available
endThe date since group become unavailable
ucltgroupMarks group as uclt group, default value – 0

Example:

{

“id”:”b0ac41f8-0e5e-4a49-b3f1-5f2c967c71cb”,

“name”:”ExternalGroup”,

“start”:”2018-01-20″,

“end”:”2020-09-29″

}

Authentication

AuthenticationPOST auth/1/session

Returns session id, which must be used for all API requests as header – EpicflowSessionId.

Request

curl -i -X POST -H “Content-Type:application/json” https://epicflow.net/auth/1/session

{

   user:”{login}”,

   password:”{password}”

}

Example:

Response

{

   “sessionid”: “0804e9b3-afd4-43bc-ae9f-f9fa6faaac7c”

}

Project

Get All projectsGET rest/api/1/external/project

Returns all projects

Example:

Request:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project

Response:

[

   {

“id”:”534ad934-39ca-438b-a11a-d97ef953b2cd”,

“name”:”Example”,

“manager”:”John Smith”,

“resourcepool”:{

   “id”:”exampleResourcePoolId”

},

“steps”:

[

//Step entities

]

   }

]

Get Active projects OnlyGET rest/api/1/external/project&IncludeActive=true
Get Closed projects OnlyGET rest/api/1/external/project&IncludeClosed=true
Get Archived projects OnlyGET rest/api/1/external/project&IncludeArchived=true
Get projects of several different categoriesGET rest/api/1/external/project?IncludeActive=true&IncludeClosed=true&IncludeArchived=true

Get project

GET rest/api/1/external/project/{id}

Returns the project.

Example:

Request:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project/{projectId}

Response:

{

   “id”:”534ad934-39ca-438b-a11a-d97ef953b2cd”,

   “name”:”Example”,

   “manager”:”John Smith”,

   “resourcepool:{

“id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″

   },

   “steps”:

   [

//Step entities

   ]

}

Add project

PUT rest/api/1/external/project

Adds project to Epicflow

Example:

Request:

curl -i -X PUT -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project

{

   “id”:”534ad934-39ca-438b-a11a-d97ef953b2cd”,

   “name”:”Example”,

   “manager”:”John Smith”,

   “resourcepool:{

“id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″

   },

   “steps”:

   [

//Step entities

   ]

}

Update project

POST rest/api/1/external/project/{id}

Full update of project.

Example:

curl -i -X POST -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project/{projectId}

{

   “name”:”Example”,

   “manager”:”John Smith”,

   “resourcepool:{

“id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″

   },

   “steps”:

   [

//Step entities

   ]

}

Update project

PATCH rest/api/1/external/project/{id}

Modify specific field in project.

Example:

curl -i -X PATCH -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project/{projectId}

{

   “manager”:”Joan Smith”

}

Delete project

DELETE rest/api/1/external/project/{id}

Deletes the project.

Example:

curl -i -X DELETE -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/project/{projectId}

ResourcePool

Add or modify resources or groups.

Base url – api/1/external/resourcepool

Get resource pools

GET rest/api/1/external/resourcepool

Returns all resource pools

Example:

Request:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool

Response:

[

   {

   “id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″,

   “resources”:[

           {

               “id”:”69b26672-bb60-43df-a535-63cc5c2ab946″,

               “name”:”Maddison Hamilton”,

               “groups”:[

                   {

                       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

                   },

                   {

                       “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

                   }

               ]

               “email”:”maddison.h@mail.com”,

               “startdate”:”2006-01-20″,

               “enddate”:null

           },

           {

               “id”:”518d95c1-e5d4-413b-99a8-55bad737bb75″,

               “name”:”Chloe Holmes”,

               “groups”:[

                   {

                       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

                   },

                   {

                       “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

                   }

               ],

               “email”:”chloe@mail.com”,

               “startdate”:”2006-01-20″,

               “enddate”:”2022-05-12″

           }

       ],

   “groups”:[

           {

               “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”,

               “name”:”Main Staff”,

               “startdate”:”2003-01-01″,

               “enddate”:null

           },

           {

               “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″,

               “name”:”Temp group”,

               “startdate”:”2018-01-01″,

               “enddate”:”2018-09-29″

           },

       ]

   }

]

Add resource pool

PUT rest/api/1/external/resourcepool

Adds resource pool

Example:

Request:

curl -i -X PUT -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool

   

   “id”:”ExampleResourcePool”,

   “resources”:[

           {

               “id”:”69b26672-bb60-43df-a535-63cc5c2ab946″,

               “name”:”Maddison Hamilton”,

               “groups”:[

                   {

                       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

                   },

                   {

                       “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

                   }

               ],

               “email”:”maddison.h@mail.com”,

               “startdate”:”2006-01-20″,

               “enddate”:null

           },

           {

               “id”:”518d95c1-e5d4-413b-99a8-55bad737bb75″,

               “name”:”Chloe Holmes”,

               “groups”:[

                   {

                       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

                   },

                   {

                       “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

                   }

               ],

               “email”:”chloe@mail.com”,

               “startdate”:”2006-01-20″,

               “enddate”:”2022-05-12″

           }

       ],

   “groups”:[

           {

               “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”,

               “name”:”Main Staff”,

               “startdate”:”2003-01-01″,

               “enddate”:null

           },

           {

               “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″,

               “name”:”Temp group”,

               “startdate”:”2018-01-01″,

               “enddate”:”2018-09-29″

           }

       ]

   }

Update resource pool

POST rest/api/1/external/resourcepool/{id}

Example:

Request:

curl -i -X POST -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{id}

{

   “id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″,

   “resources”:[

           {

               “id”:”69b26672-bb60-43df-a535-63cc5c2ab946″,

               “name”:”Maddison Hamilton”,

               “groups”:[

                   {

                       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

                   }

               ],

               “email”:”maddison.h@mail.com”,

               “startdate”:”2006-01-20″,

               “enddate”:null

           }

       ],

   “groups”:[

           {

               “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”,

               “name”:”Main Staff”,

               “startdate”:”2003-01-01″,

               “enddate”:null

           }

   ]

}

Update resource pool

PATCH rest/api/1/external/resourcepool/{id}

Example:

Request:

curl -i -X PATCH -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{id}

{

   “id”:”afb43f3b-6642-4cfd-8ee4-e99d71d7ca76″,

   “resources”:[

           {

               “id”:”196bcd63-0809-41c8-aa90-77a68449789b”,

               “name”:”Craig Wells”,

               “groups”:[

                   {

                       “id”:f7b037b8-dc7c-4c44-a9de-fd1896124c3a”

                   }

               ],

               “email”:”craig.wells@yahoo.com”,

               “startdate”:”2018-01-20″,

               “enddate”:null

           }

       ]

}

Delete resource pool

DELETE rest/api/1/external/resourcepool/{id}

Example:

Request:

curl -i -X DELETE -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{id}

Groups

Base url  api/1/resourcepool/{resourcepoolid}

Get groups for specific resource pool

GET {groupurl}/group

Example:

Request:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group

[

   {

       “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”,

       “name”:”Main Staff”,

       “startdate”:”2003-01-01″,

       “enddate”:null

   },

   {

       “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″,

       “name”:”Temp group”,

       “startdate”:”2018-01-01″,

       “enddate”:”2018-09-29″

   }

]

Add group

PUT {groupurl}/group

Example:

Request:

curl -i -X PUT -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group

{

   “id”:”b0ac41f8-0e5e-4a49-b3f1-5f2c967c71cb”,

   “name”:”ExternalResource”,

   “startdate”:”2018-01-01″,

   “enddate”:”2020-09-29″

}

Get group

GET {groupurl}/group/{id}


Example:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group/{groupId}

Response:

{

   “id”:”b0ac41f8-0e5e-4a49-b3f1-5f2c967c71cb”,

   “name”:”ExternalResource”,

   “startdate”:”2018-01-01″,

   “enddate”:”2020-09-29″

}

Full update

POST {groupurl}/group/{id}

Example:

curl -i -X POST -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group/{groupId}

Request:

{

   “id”:”b0ac41f8-0e5e-4a49-b3f1-5f2c967c71cb”,

   “name”:”ExternalGroup”,

   “startdate”:”2017-01-01″,

   “enddate”:”2020-09-29″

}

Partial update

PATCH {groupurl}/group/{id}

Example:

curl -i -X PATCH -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group/{groupId}

Request:

{

   “startdate”:”2016-02-01″

}

Delete group

DELETE {groupurl}/group/{id}

Example:

curl -i -X DELETE -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/group/{groupId}

Resource

Base url for all requests – api/1/external/resourcepool/{resourcepoolid}

Get resource

GET {resourceurl}/resource/{id}

Example:

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/resource/{resourceId}

Response

{

   “id”:”518d95c1-e5d4-413b-99a8-55bad737bb75″,

   “name”:”Chloe Holmes”,

   “groups”:[

             {

                 “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

             },

             {

                 “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

             }

   ],

   “email”:”chloe@mail.com”,

   “startdate”:”2006-01-20″,

   “enddate”:”2022-05-12″

}

Add resource

PUT {resourceurl}/resource

Example:

curl -i -X PUT -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/resource

Request:

{

   “id”:”40d295ba-45ce-46c7-9a74-a61ee1dbfa5e”,

   “name”:”Sara Bradley”,

   “groups”:[

       {

            “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

       },

       {

            “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

       }

   ],

   “email”:”sara.b@mail.com”,

   “startdate”:”2006-01-20″,

   “enddate”:”2022-05-12″

}

Full update

POST {resourceurl}/resource/{id}

Example:

curl -i -X POST -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/resource/{resourceId}

Request

{

   “id”:”40d295ba-45ce-46c7-9a74-a61ee1dbfa5e”,

   “name”:”Sara Bradley”,

   “groups”:[

       {

            “id”:”d5333a04-8704-4af1-b88c-6f90bfb5ca3b”

       },

       {

            “id”:”8b658cfd-89b6-4c09-a9e1-59660846ac22″

       }

   ],

   “email”:”sara.b@mail.com”,

   “startdate”:”2006-01-20″,

   “enddate”:”2022-05-12″

}

Partial update

PATCH {resourceurl}/resource/{id}

Example:

curl -i -X PATCH -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/resource/{resourceId}

Request

{

   “name”:”Sara J. Bradley”

}

Delete resource

DELETE {resourceurl}/resource/{id}

Deletes specific resource.

Example

curl -i -X DELETE -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/external/resourcepool/{resourcepoolid}/resource/{resourceId}

Priority

Get all priorities per projectGET /priority

Returns priorities per project

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/priority

Response

[{

       “projectid”: “534ad934-39ca-438b-a11a-d97ef953b2cd”,

       “priority”: [{

               “taskpriority”: {

                   “taskid”: “8a52a186-27ae-48d6-9017-b946eaf8b4a3”,

                   “priority”:102.4

               },

               “taskpriority”: {

                   “taskid”: “5b52a146-27ae-3b03-1026-7a46eaf8b4a2”,

                   “priority”:89.1

               }

           }

       ]

   }

]

Get task for specific projectGET /priority/{projectId}

Returns priorities for specific project

curl -i -X GET -H “Content-Type:application/json” -H “EpicflowSessionId:{your id}” https://epicflow.net/rest/api/1/priority/{projectId}

Response

{

   “projectid”: “534ad934-39ca-438b-a11a-d97ef953b2cd”,

   “priority”: [{

       “taskpriority”: {

           “taskid”: “8a52a186-27ae-48d6-9017-b946eaf8b4a3”,

           “priority”:102.4

        },

        “taskpriority”: {

            “taskid”: “5b52a146-27ae-3b03-1026-7a46eaf8b4a2”,

            “priority”:89.1

         }

       }

   ]

}

Resource Availability API entities

Work with Availability API id one via next procedure

  • Initialization of API for Resource (usually one time action)
  • Availability Upload

I. INITIALIZATION

Before availability update for any of previously created resources, such should be introduced via API.

Resource entity, describes Resources.

FieldDescription
resourceNameString, contains User name
localPersonnelNumberString, unique Id of user in HR system
contactDetailsString, defines User Email
hireDatedatetime, defines Start date for the User’s Availability
holidayCalendarString, Id of the required Calendar (Additional Calendars must be configured separately )
Default Company calendar will be used if Empty
additionalSkillArray of String, Ids of User’s skills (skill must be configured separately)
contractedHoursDecimal, Total working hours per working week.
availabilityInteger, allowed values from 0 till 100. Used to specify availability of the User in relation to “contractedHours”
contractedHours*availability/100
transferToEpicflowBoolean, shows should Epicflow import/update user in Epicflow, if False – this record will be ignored.
“Resource” entity
Set info about user POST /api/user

Header

Content-Type: application/json

This POST method is used to create or update user.

It should be always executed at least once before usage of Availability upload method.

  • If required resource doesn’t exist in Epicflow, it will be created.
  • If resource present in Epicflow, then method will add required information. In this case Email is used as unique ID to define <localPersonnelNumber> for the user at first method execution.


Example

 
{
    "resource": [{
            "resourceName": "SomeTestUserName",
            "localPersonnelNumber": "2040003",
            "contactDetails": "TestName.s3@epicflow.com",
            "hireDate": "2021-01-04T00:00:00.000",
            "holidayCalendar": "",
            "additionalSkill": "1",
            "contractedHours": "40",
            "availability": "100",
            "transferToEpicflow": "true"
        },
        .....
    ]
}

Additionally, method supports next none obligatory fields

FieldDescription
functionalManagerIdString, localPersonnelNumber of manager for the User
terminationDatenullable datetime, End date for the User’s Availability
“Resource” entity – Optional fields

Method usage rules

Be aware, that

  • Before availability update for any of previously created resources, such should be introduced via API.

II. AVAILABILITY Upload

Resource entity, describes Resource’s Absence Data.

Set info about user POST /api/absence

Header

Content-Type: application/json

FieldDescription
personIdCan be used at further adjustments for the previously created user’s fields value.
Must be the same value as localPersonnelNumber from previous method
scheduledLeavesArray of ScheduledLeaves, contains leaves data
ResourceAbsenceData entity

FieldDescription
quantityinHoursmandatory field of decimal, absence hours.
This value taked into account only if “startDate” equal to “endDate”
startDatemandatory field of date type, Start of Leave
endDatemandatory field of date type, End of Leave
ScheduledLeaves entity


Example

 
{
    "resource": [{
            "resourceName": "SomeTestUserName",
            "personId": "2040003",
            "scheduledLeaves": [{
                    "startDate": "2022-02-28T00:00:00.000",
                    "endDate": "2022-02-28T00:00:00.000",
                    "quantityinHours": "5"
                },{
                    "startDate": "2022-02-29T00:00:00.000",
                    "endDate": "2022-02-29T00:00:00.000",
                    "quantityinHours": "5"
                }, { 
                    "startDate": "2022-12-30T00:00:00.000",
                    "endDate": "2023-01-200T00:00:00.000",
                    "quantityinHours": "0"
                },
		.....
            ]
        },
	....
    ]
}

Method usage rules

Be aware, that

  • when range is specified, no <quantityinHours> usage is required. System will ignore any value for <quantityinHours> if range is specified for more than one day. For such case availability will be set “0” automatically.
  • In case if partial availability it is required to be set per day, <quantityinHours> filed should be used. Availability will be calculated as 8 working hour minus <quantityinHours>. For example, if availability of 3 hours must be defined, <quantityinHours> must be set as 5.
  • In case if partial availability is required to be set for a range, then it should be defined for each day separately. Otherwise “0” will be applied automatically.
  • Any information present in json will overwrite previously provided. In case if some range won’t be present in next iteration of API method invoke, it will be erased.
  • Availability is allowed to be defined for two months in the past and no limitation for the future.

III. ERRORS handling

At this moment errors handling is maintained via system logs export.

If method composed correctly, reply Status will be 200. Still, you need to check other logs for additional error description information.

Be aware , this approach will be changed with further releases to be unified to other API errors handling notification.

HTTP response status codes

Status 200 – OK – request applied

Status 201 – Created – item created

Status 401 – Unauthorized – session id invalid or expired

Status 403 – Forbidden – request forbidden

Status 404 – Not found – requested item not found

Status 409 – Conflict, Already present – cannot add item, already present