Skip to content

Commit

Permalink
Api Doc Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kanika2024 authored and enbraun committed Jul 22, 2024
1 parent 58edc37 commit ab3befc
Show file tree
Hide file tree
Showing 15 changed files with 366 additions and 111 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions source/includes/_booking.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ Name | Description
"resource_id": 1,
"project_id" : 9,
"start_time" : "2017-06-01T09:00",
"end_time": "2017-06-11T17:00",
"end_time": "2017-06-11T17:00",
"udf_progress": 70,
"effort": 100,
"unit": 1
}'
Expand All @@ -104,7 +105,7 @@ Name | Description
**start_time** <br> <span class="required">`required`</span> | Represents start date and time for booking object. This field accepts value in ISO 8601 format for date-time i.e. yyyy-mm-ddThh:mm:ss. The value must be snapped in 15 minutes interval, which effectively means that minutes values should be one of(00/15/30/45) and seconds value should always be 0. (if given).
**end_time** <br> <span class="required">`required`</span> | Represents end date and time for booking object. This field accepts value in ISO 8601 format for date-time i.e. yyyy-mm-ddThh:mm:ss. The value must be snapped in 15 minutes interval, which effectively means that minutes values should be one of(00/15/30/45) and seconds value should always be 0. (if given). `end_time` must always be ahead of `start_time` by at least 15 minutes as a booking of less than 15 minutes is not allowed.
**role_id**<br><span class="mandatoryFlag">&#9873;</span> <span class="removableFlag mln-2">&#9873;</span> | ID of role object which needs to be performed for this booking. This could be ID of a role which targeted resource performs (i.e "Performing Role") or any other role (i.e. "Non-Performing-Role").
**task_id**<br><span class="removableFlag mln-2">&#9873;</span> | ID of task object which needs to be done in this booking. This could only be ID of a task which is listed in targeted project.
**task_id**<br><span class="mandatoryFlag">&#9873;</span> <span class="removableFlag mln-2">&#9873;</span> | ID of task object which needs to be done in this booking. This could only be ID of a task which is listed in targeted project.
**effort** <br>`optional` | This defines how much effort is needed to complete the task. Effort value is a floating point number which could not be less than 0 and greater than 99999999.99. If effort value is not provided system will take default value 0.
**unit**<br>`optional` | Integer number (1-5) representing unit in which effort is being defined. Unit value could be one of the following :<br><br><li>**1** for `Capacity %` : This is default unit for booking. This represents `effort` in percentage of capacity of intended resource for defined time range. </li> <li> **2** for `Total Booking Hours` : This defines `effort` value in fixed hours which doesn't change upon changes in booking.</li> <li> ~~**3** for `Hours Per day` : This could be used where a certain no of hours per day need to be spend for a booking. For example 4 hours per day (working day).~~</li> <li> **4** for `Full Time Equivalent` : Full time equivalent is calculated using FTE calendar defined in <a href="https://app.eresourcescheduler.cloud/#!/admin/calendars/settings" target="_blank" class="api-ref">Administrator calendar settings</a>. Capacity from FTE calendar for defined time in booking, is considered as 1 FTE.</li> <li> ~~**5** for `Time Per Day` : It is useful where `effort` needs to put in on a particular time of every working day i.e. 4:15 PM to 5:30 PM daily. Time portion of `start_time` argument is considered as per day start time, and Time portion of `end_time` argument is considered per day end time for this booking.~~ </li> <br>_**Note**: <span class="warning">Booking units **Hours per day** and **Time per day** are no longer supported. </span>_
**progress** <br>`optional` | This defines percentage completion of the booking. Progress is a integer number which could not be less than 0 and greater than 100. If progress is not provided, system will take default value 0.
Expand All @@ -114,7 +115,7 @@ Name | Description
**tags**<br><span class="removableFlag mln-2">&#9873;</span> | An optional array of strings which could be attached to this booking object as labels. This can be useful for the purpose of identification or other information.
**timezone**<br>`optional` | One timezone can be defined for a booking.<br><br>_**Note**: <span class="warning">This field is only available when scheduling plus module is on</span>._
**disable_parallel**<br><span class="mandatoryFlag">&#9873;</span> <span class="removableFlag mln-2">&#9873;</span> | Defines if the resource or project or both can or cannot have multiple bookings at a time. Disable Parallel could be one of the following:<br><br><li>**1** for `On selected resource` : This represents there will be no bookings parallel to this booking with the same resource. </li> <li> **2** for `On selected project` : This represents there will be no bookings parallel to this booking with the same project.</li> <li> **3** for `On selected resource or project` : This represents there will be no bookings parallel to this booking with the same resource or project.</li>
**udf_\***<br><span class="mandatoryFlag">&#9873;</span> <span class="removableFlag mln-2">&#9873;</span> | A user with Administrator rights can add custom fields. These fields can be used to capture additional information in Bookings. Different types of bookings may have a different set of user-defined fields. The value for user defined field can be passed as shown in example request. In given example `udf_progress`</span> is a user defined field. <a href="#user-defined-fields" class="api-ref">Learn more</a><br><br>_**Note**: User with Administrator rights can make fields marked with <span class="mandatoryFlag iconInline">&#9873;</span> mandatory and remove fields marked with <span class="removableFlag iconInline">&#9873;</span>, from <a href ="#booking-profile" class="api-ref">booking profile</a> using eRS Cloud Application. If mandatory fields are not passed with a valid value or removed fields are passed while creating booking, the operation will fail with response code **400**_.
**udf_\***<br><span class="mandatoryFlag">&#9873;</span> <span class="removableFlag mln-2">&#9873;</span> | A user with Administrator rights can add custom fields. These fields can be used to capture additional information in Bookings. The value for user defined field can be passed as shown in example request. In given example `udf_progress`</span> is a user defined field. <a href="#user-defined-fields" class="api-ref">Learn more</a><br><br>_**Note**: User with Administrator rights can make fields marked with <span class="mandatoryFlag iconInline">&#9873;</span> mandatory and remove fields marked with <span class="removableFlag iconInline">&#9873;</span>, from <a href ="#booking-profile" class="api-ref">booking profile</a> using eRS Cloud Application. If mandatory fields are not passed with a valid value or removed fields are passed while creating booking, the operation will fail with response code **400**_.

### Returns

Expand Down Expand Up @@ -376,6 +377,7 @@ Below is a list of available fields, which allow filtering bookings:
**modified_by**|<li>**eq** (_default_)</li><li>neq</li><li>any</li><li>none</li>| `"modified_by:eq": 1`<br>`"modified_by:neq": 1`<br>`"modified_by:any": [1, 2]`<br>`"modified_by:none": [1, 2]`
**created_on**|<li>**eq** (_default_)</li><li>lt</li><li>gt</li><li>bt</li><li>ex</li>| `"created_on:eq": ["2021-07-08T00:00:00"]`<br>`"created_on:lt": ["2021-07-08T00:00:00"]`<br>`"created_on:gt": ["2021-07-08T59:59:59"]` <br> `"created_on:bt": ["2021-07-08T00:00:00", "2021-07-10T23:59:59"]`<br>`"created_on:bt": ["2021-07-08T00:00:00", ""]` <br>`"created_on:bt": ["", "2021-07-10T23:59:59"]` <br>`"created_on:ex": ["2021-07-08T00:00:00", "2021-07-10T23:59:59"]` <br>`"created_on:ex": ["2021-07-08T00:00:00", ""]` <br>`"created_on:ex": ["", "2021-07-10T23:59:59"]]`
**modified_on**|<li>**eq** (_default_)</li><li>lt</li><li>gt</li><li>bt</li><li>ex</li>| `"modified_on:eq": ["2021-07-08T00:00:00"]`<br>`"modified_on:lt": ["2021-07-08T00:00:00"]`<br>`"modified_on:gt": ["2021-07-08T59:59:59"]`<br>`"modified_on:bt": ["2021-07-08T00:00:00", "2021-07-10T23:59:59"]`<br>`"modified_on:bt": ["2021-07-08T00:00:00", ""]` <br>`"modified_on:bt": ["", "2021-07-10T23:59:59"]` <br>`"modified_on:ex": ["2021-07-08T00:00:00", "2021-07-10T23:59:59"]` <br>`"modified_on:ex": ["2021-07-08T00:00:00", ""]` <br>`"modified_on:ex": ["", "2021-07-10T23:59:59"]]`
|**billing_status**| N/A |`"billing_status": 2`<br>`"billing_status": 4`<br><br>_**Note**: Integer number (2/4) representing billing status of the booking. Billing status value could be one of the following :<br><br><li>**2** for `Billable` : This defines billing status as `billable` for this booking. </li> <li> **4** for `Non Billable` : This defines billing status as `non billable` for this booking.</li>_

_Additionally, bookings can also be filtered using <a href="#search-resources" class="api-ref">resource fields</a>, <a href="#search-projects" class="api-ref">project fields</a> and <a href="#filters-for-user-defined-fields" class="api-ref">custom fields</a> of bookings. An example request for fetching only booking having `resource_id` as 2, `project_id` as 9 and `role_id` as 1 is shown._

Expand Down
61 changes: 61 additions & 0 deletions source/includes/_bookingprofile.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ curl -v \
> Example Response
```json
{
"id": 43,
"code": "rate_from",
"display_name": "Billing Rate",
"field_type": "RTFRM",
"minnum": 0,
"is_system_defined": true,
"is_required": false
},
{
"id": 42,
"code": "billing_status",
"display_name": "Billing Status",
"field_type": "BLSTS",
"minnum": 0,
"is_system_defined": true,
"is_required": false
},
{
"id": 46,
"code": "disable_parallel",
"display_name": "Disable Parallel",
"field_type": "DDSS",
"is_system_defined": true,
"is_required": false
},
{
"id": 29,
"code": "effort",
Expand Down Expand Up @@ -53,6 +79,16 @@ curl -v \
{...}
]
},
{
"id": 44,
"code": "progress",
"display_name": "Progress",
"field_type": "INT",
"minnum": 0,
"maxnum": 100,
"is_system_defined": true,
"is_required": false
},
{
"id": 3,
"code": "project_id",
Expand All @@ -61,6 +97,14 @@ curl -v \
"is_required": true,
"is_system_defined": true
},
{
"id": 75,
"code": "requirement_id",
"display_name": "Requirement",
"field_type": "REQSS",
"is_system_defined": true,
"is_required": false
},
{
"id": 2,
"code": "resource_id",
Expand Down Expand Up @@ -95,6 +139,23 @@ curl -v \
"is_required": false,
"is_system_defined": true
},
{
"id": 27,
"code": "timezone",
"display_name": "Time Zone",
"field_type": "DDSS",
"is_system_defined": true,
"is_required": false,
"options": [
{
"id": 136,
"name": "Africa/Abidjan",
"description": "Africa/Abidjan"
},
{...},
{...}
]
},
{
"id": 5,
"code": "unit",
Expand Down
10 changes: 5 additions & 5 deletions source/includes/_calendars.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Calendar is used to define working-timing of resources. An Administrator user ca
```json
{
"id": 2,
"id": 1,
"name": "New York Calendar",
"description": null,
"is_default": false,
Expand Down Expand Up @@ -60,7 +60,7 @@ Calendar is used to define working-timing of resources. An Administrator user ca
},
"modified_by": {
"id": 118,
"name": "John doe"
"name": "John Doe"
}
}
```
Expand Down Expand Up @@ -122,7 +122,7 @@ curl -v \
{
"total_count": 4,
"data": [{
"id": 2,
"id": 1,
"name": "New York Calendar",
"description": null,
"is_default": false,
Expand Down Expand Up @@ -155,7 +155,7 @@ curl -v \
},
"modified_by": {
"id": 118,
"name": "John doe"
"name": "John Doe"
}
},
{ ... },
Expand Down Expand Up @@ -247,7 +247,7 @@ curl -v \
},
"modified_by": {
"id": 118,
"name": "John doe"
"name": "John Doe"
}
}
```
Expand Down
Loading

0 comments on commit ab3befc

Please sign in to comment.