Assignment Streaming
Using assignment streaming for better performance
Overview
With the introduction of assignment streaming, a new two phase call approach became necessary. The initial call will obtain summary information for open assignments, while details for those assignments are obtained via a secondary call to the API. One call per portfolio plus table type will be necessary to obtain the assignment details.
Deprecated API
Assignment streaming is a replacement to the previously existing calls:
All assignments
get
/v1.0/records/assignments
All assignments for one portfolio
get
/v1.0/{portfolioGuid:guid}/records/assignments
Assignment streaming API
Obtain assignment summaries for all portfolios
get
/v1.0/records/assignments/summaries
Obtain assignment summaries within a single portfolio
get
/v1.0/{portfolioGuid:guid}/records/assignments/summaries
Obtain assignment details within a given portfolio and table type
post
/v1.0/{portfolioGuid:guid}/records/assignments/details
The original endpoint that returned all information in one response was on the one hand more convenient, but on the other hand subject to poor performance. It was decided to break up the processing into separate calls.
Using Assignment Streaming
You must first make a call to obtain summaries of open assignments with either v1.0/records/assignments/summaries
or v1.0/{portfolioGuid}/records/assignments/summaries
. Summaries contain basic information, and the most important pieces are the OrganizationId
, TableType
and Guid
fields. The caller will need to use this information to build details calls.
Below are two samples of forming the calls and the responses you might get. The objects obtained from the details calls can be used as a replacement for the data received from the previously existing v1.0/records/assignments
and v1.0/{portfolioGuid}/records/assignments
calls.
Examples
Summary call response
Details calls
Two different portfolios
Parent/Child
Using Checklists
Checklists in ProjectSight rely on child records. For each checklist, there will be one or more checklist items. Each checklist item is a child of the parent checklist. The summary records returned will be one record per child record, while the records returned from the details calls will be one record per parent. Therefore there can be a different number of records returned between the two calls. The Guid returned for the items in the summary request will be for the child objects, whereas the Guid in the details object will be for the parent checklist.
In most cases the differences between the two responses will not matter, since you can use the results from the details calls as they are. The summary records only exist to give the caller a way to obtain the OrganizationId
, TableType
, and Guid
fields with which to build the details request(s) object(s).