Knowledge Portal

Upcoming changes: Plug-in counts in the sockets API

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 (true or false), is added to GET /v2/sockets. The default is false.

  • When the parameter is left out or set to false, plugCount is returned as null. The plugCountOffset and plugCountResetAt fields are still returned as before.

  • When the parameter is set to true, plugCount is returned exactly as it is today.

Request

plugCount in the response

GET /v2/sockets

null

GET /v2/sockets?includePlugCounts=false

null

GET /v2/sockets?includePlugCounts=true

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