Count the devices a scope or each workflow environment covers

A read (sent as POST because a proposed scope can hold 3 x 1000 values). Counts use the selection rule of the environment routing, one SQL statement per scope: a device of the company (its own devices only; a child company's devices are not routed by its parent's scopes) that is a member of one of the fleet_ids (static or dynamic membership rows, whatever company owns the fleet), carries one of the tags, or is listed in device_ids, counted once. Scope tags match device tags ignoring case: the proposed scope's tags are trimmed and lower-cased as on save, and a tag matches a string element of the device's tags array whose lower case equals it ("lab" selects a device tagged "Lab" or "LAB"; device tags are not trimmed). Without workflow_id the production environment counts every device of the company, the most it can cover; with workflow_id it counts the devices that run that workflow's production pin: every device of the company that no non-production pin of the workflow in live mode with a version (paused or not) selects. All counts of one answer read one database snapshot. The caller needs the workflow_graph read ability on the company; a company or workflow the caller cannot read is a 404.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

At least one of scope and environments.

string

The company; default the caller's own company, or the workflow's when workflow_id is set.

scope
object

The devices an environment selects: members of the listed fleets, devices carrying one of the tags, and the listed devices, among the devices of the environment's company. Scope tags match device tags ignoring case: tags are saved trimmed, lower-cased and once (" Pilot " and "PILOT" are saved as "pilot"), and "pilot" selects a device tagged "Pilot", "PILOT" or "pilot". Fleet and device ids are trimmed and keep their case. Each list holds at most 1000 entries as sent. A repeated fleet or device id, or an empty entry, is a 400. The production environment takes no scope.

boolean

Also count every environment of the company.

uuid

With environments, count production for this workflow's pins.

Responses

400

The request was malformed or contained invalid parameters.

401

You are not authorized

404

The item you were looking for does not exist

500

An unexpected error was encountered.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json