Plug-in counts become optional in the sockets API
In an upcoming release, the GET /v2/sockets endpoint will only calculate plug-in counts when you ask for them. Calculating the count adds work to every request, and most integrations that list sockets don't use it. Requests that don't need the value will get lighter and faster.
What is changing?
-
A new optional query parameter,
includePlugCounts(trueorfalse), is added toGET /v2/sockets. The default isfalse. -
When the parameter is left out or set to
false,plugCountis returned asnull. TheplugCountOffsetandplugCountResetAtfields are still returned as before. -
When the parameter is set to
true,plugCountis returned exactly as it is today.
|
Request |
|
|---|---|
|
|
|
|
|
|
|
|
The plug-in count, as today |
Do I need to do anything?
If your integration reads plugCount from GET /v2/sockets, add includePlugCounts=true to those requests. You can add it now: the current API ignores the parameter, so your integration keeps working before and after the change.
If you don't use plugCount, no action is needed.
If you have any questions regarding this change, feel free to contact us at our Service Desk or at support@emabler.com