Yan_Naroditsky | 2017-04-29 19:08:52 UTC | #1
Hi,
We have number of issues with stations API.
- Only 25 first stations(first page) have been returned by the API.
The PureCloud instance my application work with have 29 phones defined. In the response I get pageCount=1 and not pageCount=2 as expected.
"pageSize": 25, "pageNumber": 1, "total": 25, "selfUri": "/api/v2/stations?pageSize=25&pageNumber=1", "firstUri": "/api/v2/stations?pageSize=25&pageNumber=1", "lastUri": "/api/v2/stations?pageSize=25&pageNumber=1", "pageCount": 1
- No userId in the station record.
The application request list of the stations every couple of minutes. Some phones are assigned to the users. After some period of time the station record in the response being returned without userId field. I verified through Administration panel the phone is still assigned to the user. I logged off the phone and reassigned it to the user again. After couple of minutes the API started returning correct records in the responses .
Example:
Incorrect record
{ " id ": " d4a6757b - 4cf6 - 49ab - 915f - 569e86f1fe52 ", " name ": " 7035432125 ", " status ": " AVAILABLE ", " type ": " polycomspip331 ", " lineAppearanceId ": " YansPhone_1 ", " selfUri ": " / api / v2 / stations / d4a6757b - 4cf6 - 49ab - 915f - 569e86f1fe52 " }
Correct record
{ "id": "d4a6757b-4cf6-49ab-915f-569e86f1fe52", "name": "7035432125", "status": "ASSOCIATED", "userId": "eed4a675-64d1-4316-bab5-7fdec760795a", "type": "polycomspip331", "lineAppearanceId": "YansPhone_1", "selfUri": "/api/v2/stations/d4a6757b-4cf6-49ab-915f-569e86f1fe52" }
tim.smith | 2017-05-01 13:30:38 UTC | #2
For the paging issue, I've opened API-2548. To work around, ignore the paging information in the response and just request the next page of stations. If the result set is empty, then you know the previous page was the final page. You can also increase the page size up to 500 to retrieve more than 25 stations at a time.
For the issue of a lack of a user ID, I am unable to reproduce. Can you provide some additional information? I'll need:
- User ID of user that's having this issue
- Timestamp of when the user set their station (and the correlation ID for the request if you have it)
- Station ID of station used by user
- Correlation ID of the last request that showed the user as associated with the station
- Correlation ID of the first request that showed the station as unassociated
Yan_Naroditsky | 2017-05-01 19:46:58 UTC | #3
Hi Tim,
PureCloud Instance = MicroAutomation
• User ID of user that's having this issue
eed4a675-64d1-4316-bab5-7fdec760795a
• Station ID of station used by user
d4a6757b-4cf6-49ab-915f-569e86f1fe52
• Correlation ID of the last request that showed the user as associated with the station
aa6e06e2-d62a-43b1-83ed-59f07361cdba
• Correlation ID of the first request that showed the station as unassociated
Unfortunately I don't have this one. I hadn't enabled the debug mode when it happened. Then I logged in to PureCloud started getting the correct response. I have to wait now for couple of hours to reproduce this issue..
Yan_Naroditsky | 2017-05-01 20:13:32 UTC | #4
Got it!
PureCloud Instance = MicroAutomation
• User ID of user that's having this issue
eed4a675-64d1-4316-bab5-7fdec760795a
• Station ID of station used by user
d4a6757b-4cf6-49ab-915f-569e86f1fe52
• Correlation ID of the last request that showed the user as associated with the station
c0c119fb-2718-4bce-b56e-5fe424ccc108
• Correlation ID of the first request that showed the station as unassociated
d8d45d2d-1798-45e6-bf62-c1c59f4a3869
system | 2017-08-28 19:34:16 UTC | #5
This post was migrated from the old Developer Forum.
ref: 1242