Get a list of assistants
get
/rest/ofscCore/v1/resources/{resourceId}/assistants
This operation retrieves all the assistants of the specified resource for specified dates. The operation can only be called for a resource which is visible for the requesting application and which can be team holder according to resource type configuration. The operation finds all assisting activities within specified dates and returns the related list of assisting resources. Only visible resources may be present in the response. Maximum amount of resources returned for one request is 100.
New API method is introduced to obtain lists of assistants for a specified team holder.
List of assistants is date specific and needs to be requested for a date. It is also possible to specify a range of dates in one call. The function searches all teamwork activities related to a specified team holder and returns the necessary information. Only teamwork activities with statuses 'pending', 'started', 'enrote' are considered to collect the list of assistants.
Request
Supported Media Types
- application/x-www-form-urlencoded
Path Parameters
-
resourceId(required): string
The unique identifier of the resource for which the list of assistants should be collected .
Query Parameters
-
dateFrom(required): string(date)
Mandatory parameter.The assisting activities will be collected starting from the specified date in YYYY-MM-DD format. Past dates are not accepted.
-
dateTo: string(date)
The assisting activities will be collected up until the specified date in YYYY-MM-DD format. If this parameter is absent then only one date specified in "dateFrom" is processed. if the parameter "dateTo" is specified it must not be smaller then the value of dateFrom, total amount of dates in the range must not exceed 14.
-
expand: string
The sub-entities that are embedded into each resource item returned in the response. Only one option is supported: workSkills. To avoid huge responses, if a sub-entity contains more than 500 items is not expanded, and it is returned as a link. The link can be used to retrieve the sub-entity in a separate call using the 'limit' and 'offset' parameters to control the response size.
-
resourceFields: string
The comma-separated names of the resource fields that are returned in the response for each assistant. The response structures for resources always contain "resourceId". If it is empty, then the "resourceInternalId" field is provided instead. In addition to those, fields specified in resourceFields request parameter if they have not empty values.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Resources
Type:
object
Title:
Resources
The collection of resources.
Show Source
-
items:
object Items
Title:
Items
List of assistants and the assisting activities.
Nested Schema : Items
Type:
object
Title:
Items
List of assistants and the assisting activities.
Show Source
Nested Schema : resourceAssist
Type:
Show Source
array
-
assistants:
array Assistants
Title:
Assistants
List of assistants. -
date:
string
The date in 'YYYY-MM-DD' format for which the assistants and the teamwork activities are returned.
Nested Schema : Assistants
Type:
array
Title:
Assistants
List of assistants.
Show Source
-
resourceDetails:
object resourceDetails
The values of resource fields related to the assistant.
-
teamWorkActivities:
array teamWorkActivities
Title:
teamWorkActivities
List of teamwork activities for the date which link the assistant to the team holder.
Nested Schema : resourceDetails
Type:
object
The values of resource fields related to the assistant.
Show Source
-
resourceId:
string
Title:
Resource ID
The resource identifier. It is not returned if it is empty string, in which case the additional identifier "resourceInternalId" is returned. -
resourceInternalId:
integer
Title:
Resource Internal ID
Internal identifier of the resource in OFS. It is returned if the resourceId is empty and absent in the response. -
workSkill:
object workSkill
Information about resource work skills actual for the date. Only directly configured work skills for the resource are returned (no shared, no all work skills if nothing is configured). Work skills are returned regardless of the company configuration (if the work skill support is enabled or not). This information is returned if the "expand" query parameter contains "workSkills" value.
Nested Schema : teamWorkActivities
Type:
array
Title:
teamWorkActivities
List of teamwork activities for the date which link the assistant to the team holder.
Show Source
-
Array of:
array items
List of teamwork activities for the date which link the assistant to the team holder.
Nested Schema : workSkill
Type:
object
Information about resource work skills actual for the date. Only directly configured work skills for the resource are returned (no shared, no all work skills if nothing is configured). Work skills are returned regardless of the company configuration (if the work skill support is enabled or not). This information is returned if the "expand" query parameter contains "workSkills" value.
Show Source
-
items:
array itemWorkSkill
The list of work sill items of the resource actual for the date. Note that this list will not be returned if the number of items is greater then 500, in which case the skills should be returned by a separate call.
-
links:
array linksAssist
The canonical link of resource work skills for the specified date. This structure is returned instead of the "items" array when totalResults is greater then 500. This object may be only provided for resources with not empty resourceId.
-
totalResults(required):
integer
The number of works skill items of the resource actual for the date.
Nested Schema : itemWorkSkill
Type:
array
The list of work sill items of the resource actual for the date. Note that this list will not be returned if the number of items is greater then 500, in which case the skills should be returned by a separate call.
Show Source
Nested Schema : linksAssist
Type:
array
The canonical link of resource work skills for the specified date. This structure is returned instead of the "items" array when totalResults is greater then 500. This object may be only provided for resources with not empty resourceId.
Show Source
Nested Schema : items
Type:
Show Source
object
-
active(required):
boolean
Title:
Work Skill
The work skill is enabled or disabled by company configuration. -
ratio(required):
integer
Title:
Ratio
Minimum Value:0
Maximum Value:100
The skill level of the resource. -
workSkill(required):
string
Title:
Work Skill
The label of the work skill.
Nested Schema : items
Type:
array
List of teamwork activities for the date which link the assistant to the team holder.
Show Source
-
activityId(required):
integer
Title:
Activity Id
The identifier of the teamwork activity. Note that this value may not be returned if the teamwork is represented using repeating activities and the repeating activity was not instantiated yet. -
activityType(required):
string
Title:
Activity Type
The Label of the teamwork activity type. -
apptNumber:
string
Title:
Appt Number
This field is not returned if the value is empty. -
duration(required):
integer
Title:
Duration
The duration of the activity in minutes. -
startTime:
string
Title:
Start time
Only for ordered activities. The time in 'YYYY-MM-DD HH:MM:SS' format, in the time zone of the resource to which the activity is assigned.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.