Version | Date | Author | Comments |
1.0.1 | 4.04.2018 | Viktor Kushnir | |
1.0.2 | 6.07.2018 | Viktor Kushnir | json changesAddProject method changed |
1.0.3 | 01.08.2024 | Andrew Sapon | Resource 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
Field | Description |
id | Unique identifier |
name | Project’s name |
manager | Project manager’s name |
resourcepool.id | Id of resource pool should be used for this project |
steps | Array of Step entities |
tags | Array of Tags |
Resource pool
Describes the resource pool
Field | Description |
id | Unique identifier |
resources | Array of Resource entities |
groups | Array of Group entities |
Step
Base entity for Task, Summary, Milestone, Start of Project, End of Project
Field | Description |
id | Unique identifier |
key | Identified which will be shown in Epicflow site |
type | Must be “task” |
parent | Id of parent summary, can be empty |
name | Name of task |
predecessors | Array of Predecessor entities, uses to describe relations between tasks |
notes | Task notes, will be visible at Epicflow site |
link | Http link to the issue in external system |
tags | Array of Tags |
Task
Step entity, describes Task.
Field | Description |
assignments | Array of Assignment, uses to describe assignments |
readytostart | Marks if task can be started, default value – false |
Summary
Step entity, describes Summary.
Field | Description |
start | Start date of summary, can be empty |
end | End date of summary, can be empty |
Milestone
Step entity, describes the Milestone.
Field | Description |
deadline | Deadline of milestone, can be empty |
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.
End of project
Milestone entity, describes the end milestone of project. If omitted – Epicflow will calculate it automatically.
Predecessor
Describes the relation between tasks
Field | Description |
id | Predecessor id, can be id of Task, Summary, Milestone, Start of Project, End of Project |
Assignment
Describes the assignment for specific task
Field | Description |
id | Unique identifier within the task |
resource.id | Unique resource id |
group.id | Unique group id |
remaining | Remaining work, in hours |
actual | Completed work, in hours |
units | Assigned units, default value 1. |
averageWorkdayHours | Integer, that defines average work day hours per assignment. Overrides availability of assigned resource. |
Resource
Describes the resource
Field | Description |
id | Unique identifier |
name | Resource name |
groups | Array of Group |
Resource’s email | |
start | The date when resource became available |
end | The date since resource become unavailable |
Group
Describes the group
Field | Description |
id | Unique identifier |
name | Resource name |
start | The date when group became available |
end | The date since group become unavailable |
ucltgroup | Marks group as uclt group, default value – 0 |
Authentication
Authentication | POST auth/1/session |
Returns session id, which must be used for all API requests as header – EpicflowSessionId.
Project
Get All projects | GET rest/api/1/external/project |
Returns all projects
Get Active projects Only | GET rest/api/1/external/project&IncludeActive=true |
Get Closed projects Only | GET rest/api/1/external/project&IncludeClosed=true |
Get Archived projects Only | GET rest/api/1/external/project&IncludeArchived=true |
Get projects of several different categories | GET rest/api/1/external/project?IncludeActive=true&IncludeClosed=true&IncludeArchived=true |
Get project | GET rest/api/1/external/project/{id} |
Returns the project.
Add project | PUT rest/api/1/external/project |
Adds project to Epicflow
Update project | POST rest/api/1/external/project/{id} |
Full update of project.
Update project | PATCH rest/api/1/external/project/{id} |
Modify specific field in project.
Delete project | DELETE rest/api/1/external/project/{id} |
Deletes the project.
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
Add resource pool | PUT rest/api/1/external/resourcepool |
Adds resource pool
Update resource pool | POST rest/api/1/external/resourcepool/{id} |
Update resource pool | PATCH rest/api/1/external/resourcepool/{id} |
Delete resource pool | DELETE rest/api/1/external/resourcepool/{id} |
Groups
Base url api/1/resourcepool/{resourcepoolid}
Get groups for specific resource pool | GET {groupurl}/group |
Add group | PUT {groupurl}/group |
Get group | GET {groupurl}/group/{id} |
Full update | POST {groupurl}/group/{id} |
Partial update | PATCH {groupurl}/group/{id} |
Delete group | DELETE {groupurl}/group/{id} |
Resource
Base url for all requests – api/1/external/resourcepool/{resourcepoolid}
Get resource | GET {resourceurl}/resource/{id} |
Add resource | PUT {resourceurl}/resource |
Full update | POST {resourceurl}/resource/{id} |
Partial update | PATCH {resourceurl}/resource/{id} |
Delete resource | DELETE {resourceurl}/resource/{id} |
Deletes specific resource.
Priority
Get all priorities per project | GET /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
Get task for specific project | GET /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}
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.
Field | Description |
resourceName | String, contains User name Mandatory. |
localPersonnelNumber | String, unique Id of user in HR system Mandatory. |
contactDetails | String, defines User Email Mandatory. |
hireDate | datetime, defines Start date for the User’s Availability Mandatory. |
holidayCalendar | String, Id of the required Calendar (Additional Calendars must be configured separately ) Default Company calendar will be used if Empty Optional. |
skills | Array of String, Ids of User’s skills (skill must be configured separately) Optional. |
contractedHours | Decimal, Total working hours per working week. Mandatory. |
availability | Integer, allowed values from 0 till 100. Used to specify availability of the User in relation to “contractedHours” contractedHours*availability/100 Mandatory. |
transferToEpicflow | Boolean, shows should Epicflow import/update user in Epicflow, if False – this record will be ignored. Mandatory. |
terminationDate | datetime, defines End date of the User’s Availability (when person retire from his position) Optional. |
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.
Additionally, method supports next none obligatory fields
Field | Description |
functionalManagerId | String, localPersonnelNumber of manager for the User |
terminationDate | nullable datetime, End date for the User’s Availability |
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
Field | Description |
personId | Can be used at further adjustments for the previously created user’s fields value. Must be the same value as localPersonnelNumber from previous method |
scheduledLeaves | Array of ScheduledLeaves, contains leaves data |
Field | Description |
quantityinHours | mandatory field of decimal, absence hours. This value taked into account only if “startDate” equal to “endDate” |
startDate | mandatory field of date type, Start of Leave |
endDate | mandatory field of date type, End of Leave |
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.
- PersonId (localPersonnelNumber) cannot be updated via the API; however, it can be done via the interface (Internal ID) or a CSV file upload (ExternallD2).
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