Overview
This web service retrieves a list of project role element records, based upon a list of unique project role identifiers (PwsProjectRoleRef).
Request Format
PwsGetProjectRoles
...
is provided so that developers may test that their code properly handles Rate Limit errors from Projector.
In its simplest invocation, this service will simply respond with current “at this moment in time” counts in use by the rate limiter for the current user, current session, and current installation (account), as well as the thresholds that are in use by the limiter.
The service may also be used to simulate additional “hits” to land at the server either before or after counts are applied to the limiting algorithm is brought to bear.
Note |
---|
WARNING: If you use this service to simulate hits, those hits will remain part of the algorithm for this and all other services that are invoked before the rolling window expires. |
Request Format
PwsTestRateLimiter
serviceRequest: PwsTestRateLimiterRq
RequestId: Int32
SessionTicket: String
ExcludeReadNotesFlag: Boolean
IncludeDeletedRolesFlag: Boolean
Mode: String
ProjectIdentities: PwsProjectRef [1-100]
SimulateInstallationHitsAfter: Int32
SimulateInstallationHitsBefore: Int32
SimulateSessionHitsAfter: Int32
SimulateSessionHitsBefore: Int32
SimulateUserHitsAfter: Int32
SimulateUserHitsBefore: Int32
Request Elements
Element | Data Type | Required? | Default | Description | Sample Data |
---|---|---|---|---|---|
Int32 | No | Click here for more information. |
| ||
String | Yes | Click here for more information. |
|
SimulateInstallationHitsAfter |
---|
Int32 | No |
false
If true, notes that have been marked as read by the current user are excluded from the data returned. Applies only when FullDetailFlag is true.
true
IncludeDeletedRolesFlag
Boolean
No
false
If true, roles that have been marked as deleted will be returned.
true
Mode
String
Yes
Applies if FullDetailFlag is set to true:
A to retrieve booked data for roles
R to retrieve requested data for roles
E to retrieve effective data for roles (booked data for booked roles, requested data for requested roles)
A
ProjectIdentities
PwsProjectRef [1-100]
Yes
This structure represents the unique key fields associated with identifying a project role. A role represents demand for labor. This demand is then supplied by a resource assigned to the role. For example, project X needs a social media director which will be staffed by Henry. Roles are booked hours so that the resource and you know who is working on what and when. Project roles can be identified by an ExternalSystemIdentifier or ProjectRoleUid. When specifying a PwsProjectRoleRef as an input to a web service, you may specify one or both the ExternalSystemIdentifier and ProjectRoleUid. However, if you do specify both, they must both refer to the same project role or the project role reference will not be considered valid. When a PwsProjectRoleRef is returned in the response to a web service, both the ExternalSystemIdentifier and ProjectRoleUid will be populated, and guaranteed to refer to a single project role.
Request Usage Example(s)
...
Simulate this many installation hits AFTER application of limiting algorithm. |
| ||||
SimulateInstallationHitsBefore | Int32 | No | Simulate this many installation hits BEFORE application of limiting algorithm. |
| |
---|---|---|---|---|---|
SimulateSessionHitsAfter | Int32 | No | Simulate this many session hits AFTER application of limiting algorithm. |
| |
SimulateSessionHitsBefore | Int32 | No | Simulate this many session hits BEFORE application of limiting algorithm. |
| |
SimulateUserHitsAfter | Int32 | No | Simulate this many user hits AFTER application of limiting algorithm. |
| |
SimulateUserHitsBefore | Int32 | No | Simulate this many user hits BEFORE application of limiting algorithm. |
|
Request Usage Example(s)
Code Block |
---|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:sch="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/"> <soapenv:Header/> <soapenv:Body> <pws:PwsGetProjectRoles>PwsTestRateLimiter> <pws:serviceRequest> <req:RequestId>1</req:RequestId> <req:SessionTicket>AYj3Oq2QNy7nW1zbLfuT7QSessionTicket>AYecIQSsKNpDZ6wY4k5Ilw==</req:SessionTicket> <sch<req:ExcludeReadNotesFlag>true<SimulateInstallationHitsAfter>500</schreq:ExcludeReadNotesFlag>SimulateInstallationHitsAfter> <sch<req:IncludeDeletedRolesFlag>true<SimulateInstallationHitsBefore>1500</schreq:IncludeDeletedRolesFlag>SimulateInstallationHitsBefore> <sch<req:Mode>A<SimulateSessionHitsAfter>200</schreq:Mode>SimulateSessionHitsAfter> <sch:ProjectIdentities><req:SimulateSessionHitsBefore>1000</req:SimulateSessionHitsBefore> <req:SimulateUserHitsAfter>1000</req:SimulateUserHitsAfter> <com:PwsProjectRef> <req:SimulateUserHitsBefore>1000</req:SimulateUserHitsBefore> <com:ProjectCode>P001556-002</com:ProjectCode> </com:PwsProjectRef> </sch:ProjectIdentities> <</pws:serviceRequest> </pws:PwsGetProjectRoles>PwsTestRateLimiter> </soapenv:Body> </soapenv:Envelope> |
Response Format
PwsGetProjectRolesResponsePwsTestRateLimiterResponse
PwsGetProjectRolesResultPwsTestRateLimiterResult: PwsGetProjectRolesRs PwsTestRateLimiterRs
Messages: PwsMessage[1-100]
ResponseId: Int32
Status: RequestStatus
ServerTimestampUtc: DateTimeRolesByProject
: PwsProjectProjectRoles [1-100]RateLimitSnapshot: PwsRateLimitSnapshot
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages |
] | The web service response status and message. |
Click here |
for more information. | |
Int32 |
Click here for more information |
0
| ||
Status | Click here for more information |
---|
| ||
DateTime | Click here for more information |
|
|
|
|
|
|
RolesByProject
RateLimitSnapshot | This structure |
---|
Response Usage Example(s)
...
contains a snapshot of the rate limits resulting from executing this web service. |
Response Usage Example(s)
Code Block |
---|
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsTestRateLimiterResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <PwsTestRateLimiterResult <b:EarliestAllowableEndDate i:nil="true"/xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/> <b:EffectiveCriteriaSet>A</b:EffectiveCriteriaSet> <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <b:InheritedPurchaseOrderNumber i:nil="true"/><Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2025-01-23T19:26:07.3366577Z</ServerTimestampUtc> <b<a:LatestAllowableStartDateRateLimitSnapshot ixmlns:nilb="true"/http://projectorpsa.com/DataContracts/Shared/Common/"> <b:EnabledFlag>false</b:EnabledFlag> <b:RoleStatus>D</b:RoleStatus> <b:InstallationHitCount>2001</b:InstallationHitCount> <b:TotalScheduledMinutes>0<InstallationRateLimit>2400</b:TotalScheduledMinutes>InstallationRateLimit> <b:RollingWindowSeconds>60</b:RollingWindowSeconds> <b:UnnamedCriteriaCompleteFlag>true<SessionHitCount>1201</b:UnnamedCriteriaCompleteFlag>SessionHitCount> <<b:SessionRateLimit>1200</b:PwsProjectRoleElement>SessionRateLimit> <<b:UserHitCount>2001</b:ProjectRoles>UserHitCount> <<b:UserRateLimit>1800</b:PwsProjectProjectRoles>UserRateLimit> </a:RolesByProject>RateLimitSnapshot> </PwsGetProjectRolesResult>PwsTestRateLimiterResult> </PwsGetProjectRolesResponse>PwsTestRateLimiterResponse> </s:Body> </s:Envelope> |
...
PwsTestRateLimiter - Common Errors and Warnings
For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText | |||
---|---|---|---|---|---|
5458310119 | InvalidValueForModeValueBelowMinimum | The value specified for mode is invalid. Valid values are R for Request, A for Allocate and E for Effective (for retrieval operations only). | 105 | AtLeastOneItemNotFound | At least one requested item was not found. The remaining items, if any, were returnedin the field "SimulateInstallationHitsAfter" in the class "PwsTestRateLimiterRq" is out of range. The value must not be less than 0. |