/
PwsTestRateLimiter

PwsTestRateLimiter

Overview

 

This web service 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.

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

      • SimulateInstallationHitsAfter: Int32

      • SimulateInstallationHitsBefore: Int32

      • SimulateSessionHitsAfter: Int32

      • SimulateSessionHitsBefore: Int32

      • SimulateUserHitsAfter: Int32

      • SimulateUserHitsBefore: Int32

Request Elements

Element

Data Type

Required?

Default

Description

Sample Data

Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No

 

Click here for more information.

1

SessionTicket

String

Yes

 

Click here for more information.

AYecIQSsKNpDZ6wY4k5Ilw==

SimulateInstallationHitsAfter

Int32

No

 

Simulate this many installation hits AFTER application of limiting algorithm.

500

SimulateInstallationHitsBefore

Int32

No

 

Simulate this many installation hits BEFORE application of limiting algorithm.

1500

SimulateSessionHitsAfter

Int32

No

 

Simulate this many session hits AFTER application of limiting algorithm.

200

SimulateSessionHitsBefore

Int32

No

 

Simulate this many session hits BEFORE application of limiting algorithm.

1000

SimulateUserHitsAfter

Int32

No

 

Simulate this many user hits AFTER application of limiting algorithm.

1000

SimulateUserHitsBefore

Int32

No

 

Simulate this many user hits BEFORE application of limiting algorithm.

1000

Request Usage Example(s)

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/"> <soapenv:Header/> <soapenv:Body> <pws:PwsTestRateLimiter> <pws:serviceRequest> <req:RequestId>1</req:RequestId> <req:SessionTicket>AYecIQSsKNpDZ6wY4k5Ilw==</req:SessionTicket> <req:SimulateInstallationHitsAfter>500</req:SimulateInstallationHitsAfter> <req:SimulateInstallationHitsBefore>1500</req:SimulateInstallationHitsBefore> <req:SimulateSessionHitsAfter>200</req:SimulateSessionHitsAfter> <req:SimulateSessionHitsBefore>1000</req:SimulateSessionHitsBefore> <req:SimulateUserHitsAfter>1000</req:SimulateUserHitsAfter> <req:SimulateUserHitsBefore>1000</req:SimulateUserHitsBefore> </pws:serviceRequest> </pws:PwsTestRateLimiter> </soapenv:Body> </soapenv:Envelope>

Response Format

 

Response Elements

Element

Data Type

Description

Sample Data

Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.

 

ResponseId

Int32

Click here for more information

1

Status

RequestStatus

Click here for more information

Ok

ServerTimestampUtc

DateTime

Click here for more information

2025-01-23T19:26:07.3366577Z

RateLimitSnapshot

PwsRateLimitSnapshot

This structure contains a snapshot of the rate limits resulting from executing this web service.

 

Response Usage Example(s)

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsTestRateLimiterResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <PwsTestRateLimiterResult 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/"/> <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2025-01-23T19:26:07.3366577Z</ServerTimestampUtc> <a:RateLimitSnapshot xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"> <b:EnabledFlag>false</b:EnabledFlag> <b:InstallationHitCount>2001</b:InstallationHitCount> <b:InstallationRateLimit>2400</b:InstallationRateLimit> <b:RollingWindowSeconds>60</b:RollingWindowSeconds> <b:SessionHitCount>1201</b:SessionHitCount> <b:SessionRateLimit>1200</b:SessionRateLimit> <b:UserHitCount>2001</b:UserHitCount> <b:UserRateLimit>1800</b:UserRateLimit> </a:RateLimitSnapshot> </PwsTestRateLimiterResult> </PwsTestRateLimiterResponse> </s:Body> </s:Envelope>

PwsTestRateLimiter - Common Errors and Warnings

ErrorNumber

ErrorCode

ErrorText

ErrorNumber

ErrorCode

ErrorText

10119

ValueBelowMinimum

The value specified in the field "SimulateInstallationHitsAfter" in the class "PwsTestRateLimiterRq" is out of range. The value must not be less than 0.