# Copyright The DeviceChain Authors # SPDX-License-Identifier: Apache-2.0 # --------------------------------------------------------------------------- # DeviceChain GraphQL schema: device-management — tenant plane. # # Endpoint https:///api/device-management/graphql # Authorize tenant access token # All areas https://docs.devicechain.io/schema/index.json # # Generated from backend/services/device-management/graphql/schema.graphql. # Introspection is disabled by default on a DeviceChain instance, so this file # is how to read the API without deploying one. # --------------------------------------------------------------------------- # # Device Management GraphQL Schema # # Descriptions: a """string""" above an element is its PUBLIC description — served by # introspection, read by every GraphQL tool, published on the docs site — and may not # cite a decision record. A # comment is a maintainer note. backend/tools/docsgql/sdldesc # enforces both. # Base elements in gorm RDB model. """Fields every stored record carries: a server-assigned id and its timestamps.""" interface Model { """ Server-assigned numeric identifier, as a string. Records are normally addressed by token; the ById lookups take this value. """ id: ID! """When the record was created, as an RFC 3339 timestamp.""" createdAt: String """When the record was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted records are not returned by this API.""" deletedAt: String } """A record addressed by a token, an identifier unique within the tenant among records of its kind.""" interface TokenReference { """ Identifier of the record, unique within the tenant among records of its kind. Letters, digits, hyphens and underscores, starting with a letter or digit; at most 128 characters. """ token: String! } """A record with a human-readable name and description.""" interface NamedEntity { """Human-readable name. Null when none is set.""" name: String """Free-text description. Null when none is set.""" description: String } """ Presentation hints a user interface can use when showing the record. The server stores them as text and does not interpret them. """ interface BrandedEntity { """URL of an image representing the record.""" imageUrl: String """Name of an icon representing the record. Not checked against any icon set.""" icon: String """Background colour to display the record with, such as a CSS colour. Not validated.""" backgroundColor: String """Foreground (text) colour to display the record with, such as a CSS colour. Not validated.""" foregroundColor: String """Border colour to display the record with, such as a CSS colour. Not validated.""" borderColor: String } """A record that carries caller-defined metadata.""" interface MetadataEntity { """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } """ Where a page of search results sits in the full result set. Positions are 1-based and inclusive. """ type SearchResultsPagination { """Position of the first result on this page within the full result set (1-based).""" pageStart: Int """ Position of the last result on this page within the full result set (1-based, inclusive). Lower than pageStart when the page is past the end of the results. """ pageEnd: Int """Number of records matching the criteria across all pages.""" totalRecords: Int } # The input analogue of the pageNumber/pageSize pair the search-criteria inputs carry # inline; resolved through rdb.Pagination, so the same clamp applies. """Which page of results to return.""" input PaginationInput { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } # Represents a type or class of devices """ A kind of device: what it is (manufacturer and model), how it is displayed, and the device profile that defines what its devices measure and accept. Every device has exactly one device type, and many types may share one profile. """ type DeviceType implements Model & TokenReference & NamedEntity & BrandedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a device type by its token instead where you can.""" id: ID! """When the device type was created, as an RFC 3339 timestamp.""" createdAt: String """When the device type was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted device types are not returned.""" deletedAt: String """Identifier of the device type, unique within the tenant.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """URL of an image representing the device type, up to 512 characters.""" imageUrl: String """Name of an icon representing the device type, up to 128 characters. Not checked against any icon set.""" icon: String """Background colour to display the device type with, up to 32 characters. Not validated.""" backgroundColor: String """Foreground (text) colour to display the device type with, up to 32 characters. Not validated.""" foregroundColor: String """Border colour to display the device type with, up to 32 characters. Not validated.""" borderColor: String """ The device profile this type adopts, or null when it adopts none. Devices of a type with no profile have no declared metrics or commands. """ profile: DeviceProfile """ The maintenance window that holds this type's disruptive commands until it opens, or null when the type has none. Commands whose definition has impact DISRUPTIVE or DESTRUCTIVE wait for the window; every other command is sent whenever the device is reachable. """ maintenanceWindow: MaintenanceWindow """ How the devices of this type receive their commands. PUBLISH, or null, is the default: the command is published to the device's subject and delivered by the transport the device is connected on. HTTP_PULL holds the type's commands until the device asks for them with an authenticated GET to its commands endpoint. """ commandChannel: String """ Manufacturer of the devices of this type: free text, up to 128 characters. facetValues lists the values already in use. """ manufacturer: String """ Model of the devices of this type: free text, up to 128 characters. facetValues lists the values already in use. """ model: String """ The classes this type is, as terms of the vocabularies the tenant has enabled; empty when it is bound to none. Each carries its expanded IRI and a display CURIE. Null only when the terms could not be rendered, with an error saying why. """ semanticTypes: [SemanticTerm!] """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } # A discovery facet whose in-use values suggest completions in the # authoring UI. """A free-text classification field whose values in use facetValues can list.""" enum DeviceFacet { """The manufacturer field of device types.""" MANUFACTURER """The model field of device types.""" MODEL """The category field of device profiles.""" CATEGORY } # Represents a device profile — the reusable, tenant-scoped capability # contract a device type adopts. Distinct from the type's taxonomy/appearance; many # types may share one profile. It is the home for the metric and command # definitions and for the profile's detection rules, # which are the one alarm-authoring path since the standalone alarm-definition # model was torn down. """ The capability contract a device type adopts: the metrics its devices report, the commands they accept, the detection rules evaluated against them and whether they report their own position. What you edit is a draft; publishDeviceProfile freezes the draft into a numbered version, and devices use only the active published version. Many device types may share one profile. """ type DeviceProfile implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a profile by its token instead where you can.""" id: ID! """When the profile was created, as an RFC 3339 timestamp.""" createdAt: String """When the profile was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted profiles are not returned.""" deletedAt: String """ Identifier of the profile, unique within the tenant. It can be changed with renameDeviceProfile only while the profile has never been published and no device type currently adopts it. """ token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """ Functional class of the devices, such as thermostat or meter: free text, up to 64 characters. facetValues lists the values already in use. """ category: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String # The published version a device currently resolves through this profile # (versioning); null until the profile is first published — an # unpublished profile's definitions are inert (a device resolves nothing). """ The published version devices currently use, or null if the profile has never been published. Until then devices of this profile have no declared metrics or commands. """ activeVersion: Int # A profile is a shared contract, so editing its definitions affects every adopting # type; the authoring UI surfaces this before a publish. """Number of device types that currently adopt this profile.""" deviceTypeCount: Int! """ The metric definitions in the draft. Devices use the active published version, so a change here takes effect only when the profile is published. """ metricDefinitions: [MetricDefinition!]! """ The command definitions in the draft. Devices use the active published version, so a change here takes effect only when the profile is published. """ commandDefinitions: [CommandDefinition!]! """ The detection rules in the draft. Devices use the active published version, so a change here takes effect only when the profile is published. """ detectionRules: [DetectionRule!]! # Note this is a single nullable object and not a list — a device reports its position # once — so null is the whole display rule: no declaration means no map, no track, no # last-fix panel. """ The draft position declaration: present when devices of this profile report their own position, null when they do not. Like the other draft content, it reaches devices only when the profile is published. """ location: DeviceLocationDeclaration """ The profile's DRAFT device-visible configuration declaration: the shared attribute keys a device of this profile may see. Empty when nothing is declared, in which case a device sees an empty document. Like every draft field, it reaches devices only when the profile is published; the declaration frozen into each published version never changes. """ configurationDeclaration: [ConfigurationKey!]! """ The profile's DRAFT payload decoder: the rules that turn a binary frame or a webhook's JSON into measurements, or null when none is saved. Like every draft field, it reaches devices only when the profile is published; the decoder frozen into each published version never changes. """ decoder: PayloadDecoder """ The published version a device currently resolves through this profile, with the content frozen into it, or null until the profile is first published. Read the declaration devices actually see from here, not from the draft fields above. """ activeProfileVersion: DeviceProfileVersion """ The profile's activation log, newest first: every time a version became the one devices resolve, by publish or by rollback. Use it to find which version was active at a given time: it is the entry with the latest activatedAt not after that time. The log begins when the platform release that introduced it was installed, so a profile last activated before that has no entry for that activation; treat the absence as unknown, not as inactive. Page with first and after. Requires device:read. """ activations( """Maximum number of entries to return, at least 1. Omitted, or above 1000, it is 1000; below 1 is refused.""" first: Int """The nextCursor of the previous page. Omit it to start at the newest entry. A malformed cursor fails the request.""" after: String ): DeviceProfileActivationPage! } """One page of a profile's activation log.""" type DeviceProfileActivationPage { """The entries on this page, newest first.""" entries: [DeviceProfileActivation!]! """The cursor to pass as after for the next page; null when this is the last page.""" nextCursor: String } """One moment a profile version became the version devices resolve.""" type DeviceProfileActivation { """The version that became active.""" version: Int! """Why it became active: PUBLISH when the version was just published, ROLLBACK when an earlier version was made active again.""" kind: String! """When it became active, as an RFC 3339 timestamp in UTC. For a rollback this is when the rollback happened, not when the version was published.""" activatedAt: String! """Who did it: their username, or their email when there is no username. Null when not recorded.""" activatedBy: String } """One shared attribute key declared as device-visible configuration on a device profile.""" type ConfigurationKey { """The shared attribute key.""" key: String! """How the key's value is typed: STRING, LONG, DOUBLE, BOOLEAN or JSON.""" valueType: String! """An optional human-readable note.""" description: String } """ One key of a configuration declaration. The key must follow the attribute-key grammar (letters, digits, hyphens and underscores, starting with a letter or digit), be unique within the declaration, and carry a valid value type. """ input ConfigurationKeyInput { """The shared attribute key.""" key: String! """How the key's value is typed: STRING, LONG, DOUBLE, BOOLEAN or JSON.""" valueType: String! """An optional human-readable note.""" description: String } # Declares that devices built on a profile report THEIR OWN position, and what an # operator should expect of it. Its presence is the declaration; both fields inside # are optional refinements, so an object with neither set still means "this device # reports position" and is a different statement from a null declaration. # # It describes and displays — it never permits. A device that reports a position # before anyone declares it keeps every fix it sent; the platform stores the data and # surfaces the gap, rather than discarding data on the strength of an unedited # profile. # # The coordinate contract is fixed platform-wide and cannot be overridden per device # or per profile: WGS84 / EPSG:4326 decimal degrees, elevation in metres above the # ellipsoid, accuracy in metres, speed in metres per second, heading in degrees # clockwise from true north in [0, 360). """ A statement that devices report their own position, with what to expect of it. The object being present is the statement; both fields are optional, so an empty object still means the devices report position. It is descriptive only: location data is accepted and stored whether or not a declaration exists. """ type DeviceLocationDeclaration { """ Horizontal accuracy to expect from these devices, in metres, or null when not stated. Descriptive only: a less accurate fix is still stored unchanged. """ expectedAccuracyMeters: Float # Nothing alarms on it here — an absence rule on the profile is the mechanism for that. """ How often a position fix is expected, in seconds, or null when not stated. Descriptive only: nothing is raised when fixes arrive less often. """ expectedUpdateIntervalSeconds: Int } """ Sets a profile's position declaration. Supplying it states that the devices report their own position; an empty object makes that statement with no expectations. """ input DeviceLocationDeclarationInput { """ Horizontal accuracy to expect, in metres. Must be a positive finite number when sent; omit it or send null to state no expectation. """ expectedAccuracyMeters: Float """ How often a position fix is expected, in seconds. Must be positive when sent; omit it or send null to state no expectation. """ expectedUpdateIntervalSeconds: Int } # An immutable published snapshot of a device profile's whole capability set # (versioning): its metric, command, and detection-rule definitions # frozen together. # The snapshot blob is deliberately omitted here — the list stays light; a device # resolves the active version server-side, and rollback re-points it by version. """ An immutable, published snapshot of a profile's metric, command and detection-rule definitions and its position declaration. Versions are never deleted while the profile exists; rollbackDeviceProfile makes an earlier one active again. """ type DeviceProfileVersion { """(Preview: may change in a minor release.) The automation review this version consumed when it was published, or null when it was published without one.""" automationReviewToken: String """(Preview: may change in a minor release.) The review consumed by this version, or null when none was consumed. Requires device:read and event:read and an unscoped caller; authorization failures affect only this field.""" automationReview: AutomationReview """Version number: 1 for the first publish of the profile, increasing by one with each publish.""" version: Int! """Optional label given at publish time, such as a release name. Not interpreted.""" label: String """Optional notes given at publish time.""" description: String """When the version was published, as an RFC 3339 timestamp.""" publishedAt: String! """Who published it: their username, or their email when there is no username.""" publishedBy: String """Authenticated principal id (the token subject) of the publisher, taken from the caller's token and never supplied by a client. For a person it is their sign-in email, which cannot be changed; for a service account it is service-account: followed by the account's token. A superuser acting in a tenant through break-glass is recorded by their own sign-in email. Null for versions published before it was recorded.""" publishedById: String """Sorted set of save doors of all frozen draft rules, including disabled rules. A later save adds a door and never erases DESCRIBE. UNKNOWN includes legacy rules; an empty rule set reads UNKNOWN. Frozen at publish.""" authoredVia: [AuthoredVia!]! """ The device-visible configuration declaration frozen into this version: the shared attribute keys a device of the profile may see. Empty when the version declared nothing, including every version published before declarations existed. It never changes after publication. """ configurationDeclaration: [ConfigurationKey!]! """ The payload decoder frozen into this version, or null when it declared none, including every version published before decoders existed. It never changes after publication. """ decoder: PayloadDecoder """ This version as a W3C Web of Things Thing Model (TD 1.1), as JSON-LD text. Each metric is a read-only, observable property typed from its data type, with its unit, bounds, allowed values and descriptor (as the property's @type); each command is an action whose input is its typed parameters. A Thing Model describes every device of the profile, so it carries no device address, protocol binding or security. Detection rules, the location and configuration declarations, and metadata are not part of it. The title and description are the profile's current ones, so the text changes only when those do. A version holding a constraint a Thing Model cannot express exactly (allowed values that are not text, or that repeat once typed; bounds on a non-numeric metric) is refused with an error rather than exported without it. A descriptor is emitted as written, so it should be an absolute IRI or a prefixed term the consumer knows. """ thingModel( """ When true, each property's @type becomes a list, in this order and without repeats: the descriptor (when set), the metric's semantic property IRI and its semantic point class IRI (each when bound). When false, the default, the document is exactly what it has always been. """ includeSemanticTypes: Boolean! = false ): String! """ The metrics frozen into this version, in declaration order: what a device's measurements are validated against while this version is active. Calculated metrics are included and marked. It never changes after publication. """ metrics: [PublishedMetric!]! """ The commands frozen into this version, each with the impact it was published with. Empty when the version declares none, in which case a device accepts any command key. It never changes after publication. """ commands: [PublishedCommand!]! } # Represents a typed, unit-bearing metric declared on a device profile. """ A measurement the devices of a profile report: its key, numeric type, unit and allowed values. Inbound measurements whose key matches are validated against it; a measurement whose key is not declared is not validated. """ type MetricDefinition implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a metric definition by its token instead where you can.""" id: ID! """When the metric definition was created, as an RFC 3339 timestamp.""" createdAt: String """When the metric definition was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted metric definitions are not returned.""" deletedAt: String """Identifier of the metric definition, unique within the tenant.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The profile this metric is declared on.""" deviceProfile: DeviceProfile! """ The key a measurement uses to report this metric, unique within the profile and at most 128 characters. """ metricKey: String! """The value type: DOUBLE, INT, BOOLEAN or STRING. A BOOLEAN value is stored as 0 or 1, and a STRING value as text.""" dataType: String! """ Unit of measure, such as a UCUM code (Cel, kW). It is carried with each measurement of this metric; values are not converted. """ unit: String """ Smallest value accepted for a DOUBLE or INT metric, or null for no lower bound. A measurement below it is rejected. """ minValue: Float """ Largest value accepted for a DOUBLE or INT metric, or null for no upper bound. A measurement above it is rejected. """ maxValue: Float """ The allowed values as a JSON array of strings, or null when any value is allowed. A measurement must equal one of them exactly. A value that is not a non-empty array of strings restricts nothing. """ enum: String """ Optional semantic tag for the metric, such as a Web of Things type. Not interpreted on ingest; a published version's thingModel carries it as the property's @type. """ descriptor: String """ The quantity or property this metric observes, as a term of an enabled vocabulary, or null when unbound. Independent of descriptor. """ semanticProperty: SemanticTerm """ The Brick point class this metric's series is (a class that is a brick:Point), or null when unbound. """ semanticPointClass: SemanticTerm """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The formula a calculated metric is computed from, written over the profile's measured metrics (for example `voltage * current / 1000`), and optionally over numbers a device carries in its metadata, as `device.name` (for example `voltage * device.calibration`). Null for a measured metric, which devices report. """ expression: String """ True when the metric is calculated from its formula rather than reported by devices. Fixed when the metric is created. """ calculated: Boolean! } """Fields for a new metric definition.""" input MetricDefinitionCreateRequest { """Identifier for the new metric definition. A token already in use in the tenant is refused with CONFLICT.""" token: String! """Token of the profile to declare the metric on. An unknown token fails the request.""" deviceProfileToken: String! """ The key measurements will use for this metric, at most 128 characters. A key the profile already declares is refused with CONFLICT. """ metricKey: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """ The value type: DOUBLE, INT, BOOLEAN or STRING. DOUBLE, INT and BOOLEAN (stored as 0 or 1) are numeric readings; a STRING reading is stored as text (up to 4096 bytes) and is never aggregated. """ dataType: String! """Unit of measure, such as a UCUM code (Cel, kW).""" unit: String """Smallest value accepted for a DOUBLE or INT metric.""" minValue: Float """Largest value accepted for a DOUBLE or INT metric.""" maxValue: Float """Allowed values as a JSON array of strings. Must be valid JSON.""" enum: String """Optional semantic tag, such as a Web of Things type.""" descriptor: String """ The quantity or property the metric observes: an OBSERVABLE_PROPERTY term of an enabled vocabulary pack, as a CURIE or full IRI. Fails with INVALID_ARGUMENT naming the term when it is unknown, of another kind, deprecated or outside the enabled vocabularies. Stored as an expanded IRI. """ semanticProperty: String """ The Brick point class of the metric's series: a class of the enabled brick pack that is a brick:Point. A custom-prefix class cannot be shown to be one and is refused. """ semanticPointClass: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ A formula, which makes the new metric calculated: its value is computed from the profile's measured metrics instead of reported by devices. Omit it for a measured metric. Which of the two a metric is cannot be changed later. At most 1024 bytes and not blank. The formula is checked when the profile is published, not here; use testMetricFormula to check it sooner. It may read up to 8 numbers from the device's metadata as `device.name`; naming one is declaring it, and a device whose metadata lacks it gets no value for the reading. """ expression: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. # # dataType is validated ONLY when the caller names it: an absent field has nothing to # validate, and checking the stored value instead would refuse a rename over a type the # caller never sent. """ A partial update to a metric definition. Omit a field to leave the stored value alone, send a value to set it, or send an explicit null to clear it; the fields that cannot be cleared say so. The definition is named by the mutation's token argument, so there is no token here. Any refusal leaves the definition unchanged. """ input MetricDefinitionUpdateRequest { """ Token of another profile to move the definition to. An explicit null or a blank value is refused, and an unknown token fails the whole update. """ deviceProfileToken: String """ New key for the metric, unique within the profile the definition ends up in. An explicit null or a blank value is refused. """ metricKey: String """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """New value type: DOUBLE, INT, BOOLEAN or STRING. An explicit null is refused.""" dataType: String """New unit, or null to clear it.""" unit: String """New lower bound, or null to remove it.""" minValue: Float """New upper bound, or null to remove it.""" maxValue: Float """New allowed values as a JSON array of strings, or null to allow any value.""" enum: String """New semantic tag, or null to clear it.""" descriptor: String """New observed property, or null to clear it. Omit to leave it alone.""" semanticProperty: String """New Brick point class, or null to clear it. Omit to leave it alone.""" semanticPointClass: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ New formula for a calculated metric. Refused on a measured metric, which cannot become calculated. A null or blank value is refused on a calculated metric, which cannot become measured; delete it and create a new metric instead. """ expression: String } """One typed value for testMetricFormula: a measured input of the sample, or a device constant.""" input MetricValueInput { """The measured metric's key, or the device constant's name.""" key: String! """ The value as a device would send it, such as `230.5`, `12` or `true`; for a device constant, a number such as `1.02`. """ value: String! } """ The engine a payload decoder runs on. Only CEL is executable; a WASM document is refused with UNSUPPORTED_DECODER_KIND. """ enum PayloadDecoderKind { """Expressions in a bounded, loop-free expression language over a library of byte and bit readers.""" CEL """Reserved. Refused wherever a decoder is saved or published.""" WASM } """Which input of an uplink a decoder reads. An uplink without it fails to decode with missing_input.""" enum PayloadDecoderInput { """The raw frame: a LoRaWAN payload, or a binary webhook body.""" FRAME """A JSON item from a generic webhook.""" JSON """The object a network server already decoded.""" DECODED } """ A payload decoder: the rules that turn a binary frame, a generic webhook's JSON or a network server's decoded object into measurements. """ type PayloadDecoder { """The engine the decoder runs on.""" kind: PayloadDecoderKind! """The version of the function library the decoder was written against. It never changes meaning.""" envVersion: Int! """Which input of an uplink the decoder reads.""" input: PayloadDecoderInput! """The whole decoder document as JSON text, exactly as saved.""" document: String! """ The most readings one uplink can produce: the largest section's scalar rows plus its map rows' maxKeys. Ingest is charged this many readings per uplink. """ maxReadings: Int! """The decoder's worst-case static cost, in the units the function reference gives.""" estimatedCost: Int! } """One header of a pasted webhook request.""" input HeaderInput { """The header name.""" name: String! """The header value.""" value: String! } """One query parameter of a pasted webhook request.""" input QueryParamInput { """The parameter name.""" name: String! """The parameter value.""" value: String! } """ A decoder and one input to run it over. Name at most one of frameHex, frameBase64, json, webhookBody and sampleId; naming none runs only the saved vectors. """ input PayloadDecoderTestInput { """Token of the profile whose draft metrics the decoder is checked against.""" profileToken: String! """The decoder document as JSON text. Omit to test the profile's saved draft decoder.""" document: String """The frame as hex; whitespace is ignored. At most 4096 bytes once decoded.""" frameHex: String """The frame as base64. At most 4096 bytes once decoded.""" frameBase64: String """A JSON object, given to the decoder's JSON or DECODED input, whichever it declares.""" json: String """ A whole network-server or generic webhook body, up to 256 KiB, parsed by the same code that parses it at ingest. Needs integrationToken. """ webhookBody: String """Token of the stored integration whose type and settings parse webhookBody.""" integrationToken: String """With webhookBody: the request headers, which a generic integration may read its device id from.""" headers: [HeaderInput!] """With webhookBody: the query parameters, such as the event type of a network server.""" query: [QueryParamInput!] """With webhookBody: the message-type path segment some network servers post each message type to.""" messageType: String """With webhookBody: the request's content type. A network server integration refuses a non-JSON one.""" contentType: String """The LoRaWAN application port, for a frame given as hex or base64.""" fPort: Int """The LoRaWAN uplink frame counter, for a frame given as hex or base64.""" fCnt: Int """ Load the input from a stored failure sample of this profile instead. Running a decoder over a sample reveals its bytes, so this needs device:write, not device:read. A sample of another tenant or profile is NOT_FOUND. """ sampleId: ID } """One value a decoder produced, as it would be stored.""" type PayloadDecoderReading { """The measurement key.""" key: String! """The value, formatted by the target metric's type.""" value: String! } """A value the decode did not store, and why.""" type PayloadDecoderSkip { """The key that was skipped.""" key: String! """Why: undeclared (no such metric), collision (a scalar row writes the key), reserved, or invalid.""" reason: String! } """Why a test produced no readings.""" type PayloadDecoderError { """ The reason: compile_failed, env_unsupported, eval_error, cost_exceeded, invalid_output, no_section, no_outputs, missing_input, map_overflow, input_too_large, input_malformed, unsupported_encoding or ignored_message. """ reason: String! """The expression that failed, such as `sections[1].outputs[2].expr`, or empty when it is not one.""" path: String! """What went wrong. It names the function and offset, never platform internals.""" message: String! """The byte offset a reader refused, or null.""" offset: Int } """One saved vector's outcome.""" type PayloadDecoderVectorResult { """The vector's name.""" name: String! """Whether the decoder produced exactly the readings the vector expects.""" ok: Boolean! """Why it failed, or null.""" error: String """The cost the run spent.""" cost: Int! } """What a decoder made of one input, through the code that runs at ingest. Nothing is stored.""" type PayloadDecoderTestResult { """True when the decoder compiled and the input decoded (an ignore section counts).""" ok: Boolean! """True when an ignore section matched: the uplink would be accepted and store nothing.""" ignored: Boolean! """The name of the section that matched, or null.""" section: String """The readings that would be stored, with link metrics appended when the integration asks for them.""" readings: [PayloadDecoderReading!]! """Values the decode produced or the envelope carried that were not stored.""" skipped: [PayloadDecoderSkip!]! """Why the test failed, or null. A document that does not compile is reported here.""" error: PayloadDecoderError """The cost the decode spent.""" cost: Int! """The saved vectors, each run through the decoder.""" vectors: [PayloadDecoderVectorResult!]! """How many uplinks a webhook body held; the first one was tested. Zero when the input was not a webhook body.""" uplinks: Int! } """ How a profile's decoder has been doing over a span. Every uplink the decoder saw lands in exactly one of decoded, ignored, failed or suppressed. Counts are at least what happened: they are kept in memory and written about once a minute, so a crash loses up to a minute of them. The counts are Float, not Int: a busy decoder passes a 32-bit Int in a week. They are whole numbers, exact up to 2^53, so read them as integers. """ type PayloadDecoderHealth { """Uplinks decoded to readings. A whole number, exact up to 2^53 (Float so it cannot overflow).""" decoded: Float! """Uplinks an ignore section matched: accepted, nothing stored. A whole number, exact up to 2^53.""" ignored: Float! """Failed uplinks that have a failed-events record (filter DECODE_FAILED). A whole number, exact up to 2^53.""" failed: Float! """ Failed uplinks that were NOT given a record because the device type's record budget was spent (a burst of 20, refilled 10 a minute, on each replica). They are counted here and nowhere else. A whole number, exact up to 2^53. """ suppressed: Float! """Readings stored beyond what the route charged for, because a newer decoder produces more. A whole number, exact up to 2^53.""" chargeSkew: Float! """When the most recent failure happened, as an RFC 3339 time, or null when there was none.""" lastFailureAt: String """The text of the most recent failure, or empty when there was none.""" lastError: String! """How many replica-minutes of tallies the sums cover.""" windows: Int! """The start of the span, as an RFC 3339 time.""" since: String! } """ One failing uplink kept for replay. Its bytes are not listed: load it into the test panel with testPayloadDecoder sampleId. """ type PayloadDecoderSample { """Pass this as testPayloadDecoder sampleId.""" id: ID! """The profile version whose decoder failed on it.""" profileVersion: Int! """When it was kept, as an RFC 3339 time.""" createdAt: String! """Token of the device the uplink was for.""" deviceToken: String! """The failure's sub-reason, such as missing_input.""" reason: String! """The failure text.""" error: String! } """One function of the decoder library.""" type PayloadDecoderFunction { """The function's name, such as `i16be`.""" name: String! """Its signature.""" signature: String! """What it does, including its limits.""" description: String! } """ What a calculated-metric formula gives for a sample. A formula that does not compile has compileError and no value; one that compiles has exactly one of value or skippedReason. """ type MetricFormulaTest { """Why the formula was refused, or null when it compiles.""" compileError: String """The value the formula produces for the sample, formatted as it would be stored.""" value: String """ Why the formula produces no value for the sample: missing_input, invalid_input, non_finite, div_zero, overflow, range, unstorable (a magnitude of 1e12 or more, which measurements cannot be stored with) or eval_error. No value is ever substituted. """ skippedReason: String """ The metrics the formula reads directly: measured metrics and, since a formula may read another calculated metric, calculated ones. """ inputs: [String!]! """ The calculated metrics the formula depends on, directly or through others, in the order they are evaluated, each computed from the sample through its own formula. Empty for a formula over measured metrics only. """ chain: [String!]! """ Every measured metric the evaluation reads: the formula's own and those read through the calculated metrics in the chain. These are the values a sample supplies; equal to inputs when the chain is empty. """ measuredInputs: [String!]! """ The device constants the formula reads as `device.name`, sorted. Each comes from a device's metadata when a reading is resolved; empty when the formula reads none. """ constants: [String!]! """ Advisory findings that do not stop a publish, such as a sample value no formula can read, or a result range wider than measurements can be stored with. """ warnings: [String!]! """The formula's estimated worst-case cost; a formula above 100 is refused.""" estimatedCost: Int } """Criteria for searching metric definitions. Results are newest first.""" input MetricDefinitionSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Return only definitions on the profile with this token. An unknown token matches nothing.""" deviceProfile: String """Return only definitions with exactly this metric key.""" metricKey: String } """One page of metric definitions matching a search.""" type MetricDefinitionSearchResults { """The metric definitions on this page.""" results: [MetricDefinition!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } # the stamp a command, an update assignment or another device-derived record is # written with, so a member limited to part of the tenant sees it exactly when one of these # anchors is in its scope. Its own query, not a field on Device: a device may belong to # several customers, and a field would show one customer another's token. """ The anchors of one device: what decides which members limited to part of the tenant can see records about it. """ type DeviceScopeAnchors { """The device's token, as it was named in the request.""" deviceToken: String! """ One entry per tracked relationship from the device, written as type:token (for example customer:acme). Empty when the device has no tracked relationship. """ anchors: [String!]! } # The enqueue gate, evaluated here because this service owns the # command vocabulary. A rejection is a verdict, not a GraphQL error, so a caller can tell # an invalid command (relayable to its client) from an unavailable check (fail closed). """ Whether a command may be sent to a device. A refusal is reported here rather than as a GraphQL error; an error means the check itself could not be made. """ type CommandEnqueueVerdict { """True when the command may be sent.""" allowed: Boolean! """ Why the command was refused, as a stable code; null when allowed. One of DEVICE_NOT_FOUND (no device has the token), DEVICE_DISABLED (the device is disabled and accepts no commands), COMMAND_NOT_IN_VOCABULARY (the device's published profile declares commands and this key is not one of them) PAYLOAD_SCHEMA_VIOLATION (the payload does not satisfy the command's parameters) or COMMAND_DESTRUCTIVE_REFUSED (a raw execute of an operation that wipes the device, such as LwM2M Factory Reset). Branch on this, not on reason. """ code: String """ Why the command was refused, in words a person can act on; null when allowed. The wording may change; use code to decide what to do. """ reason: String } """One device a batch command check refused, and why.""" type BatchEnqueueRefusal { """The refused device's token, exactly as it appeared in the request.""" deviceToken: String! """ Why the command was refused, as a stable code: DEVICE_NOT_FOUND, DEVICE_DISABLED, COMMAND_NOT_IN_VOCABULARY, PAYLOAD_SCHEMA_VIOLATION or COMMAND_DESTRUCTIVE_REFUSED, with the same meanings as in validateCommandEnqueue; commandDispatchSchedule adds WINDOW_AFTER_EXPIRY (the device type's maintenance window next opens after the command expires). Branch on this, not on reason. """ code: String! """Why the command was refused, in words a person can act on. The wording may change.""" reason: String! } # A maintenance window is a recurring weekly schedule in an IANA time zone. It gates the START # of a disruptive operation: a command claimed inside the window finishes whenever it # finishes. Assigned to a device type; slots are one JSON document because they are read and # validated whole. """ A recurring weekly schedule, in an IANA time zone, during which disruptive commands may start. Assign it to a device type; commands whose definition has impact DISRUPTIVE or DESTRUCTIVE then wait for it to open. """ type MaintenanceWindow implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a window by its token instead where you can.""" id: ID! """When the window was created, as an RFC 3339 timestamp.""" createdAt: String """When the window was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted windows are not returned.""" deletedAt: String """Identifier of the window, unique within the tenant.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The IANA time zone the slots are read in, for example Europe/Berlin.""" timezone: String! """ The weekly openings as a JSON array of objects with day (MONDAY to SUNDAY), start (a 24-hour HH:MM wall-clock time in the zone) and durationMinutes (1 to 10080, elapsed time). A slot may run past midnight and past the end of the week. """ slots: String! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } """Fields for a new maintenance window.""" input MaintenanceWindowCreateRequest { """Identifier for the new window. A token already in use in the tenant is refused with CONFLICT.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """An IANA time zone name such as Europe/Berlin. Local and unknown names are refused.""" timezone: String! """ The weekly openings as a JSON array of {day, start, durationMinutes}, at least one and at most 56. Unknown keys and out-of-range values are refused. """ slots: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } # A PARTIAL update; there is deliberately no `token` field — the mutation's own argument # identifies the window. """A partial update to a maintenance window: omit a field to leave it alone.""" input MaintenanceWindowUpdateRequest { """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """New time zone. An explicit null or an unknown zone is refused.""" timezone: String """New weekly openings (validated as on create). An explicit null is refused.""" slots: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for searching maintenance windows. Results are newest first.""" input MaintenanceWindowSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of maintenance windows matching a search.""" type MaintenanceWindowSearchResults { """The windows on this page.""" results: [MaintenanceWindow!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """When an operation under a maintenance window may start.""" type MaintenanceWindowOpening { """False when no window has the token (it was deleted or never existed); the other fields are then meaningless.""" found: Boolean! """True when the window is open at the instant asked about.""" openNow: Boolean! """ The earliest instant an operation may start, as an RFC 3339 timestamp: the instant asked about when the window is open, otherwise the next opening. """ dispatchAfter: String! """When the opening dispatchAfter belongs to ends, as an RFC 3339 timestamp.""" closes: String! } """ A command bound to one opening of its device type's maintenance window: it may be sent only between dispatchAfter and dispatchUntil. When the window is open now, dispatchAfter is already past and the command may be sent at once, but only until the window closes. """ type CommandDispatchHold { """Token of the device the command is for.""" deviceToken: String! """Token of the maintenance window that gates the command.""" windowToken: String! """The earliest instant the command may be sent, as an RFC 3339 timestamp.""" dispatchAfter: String! """When the opening closes, as an RFC 3339 timestamp. The command may not be sent at or after it.""" dispatchUntil: String! } """What the HTTP command endpoints learn about a device that proved its access token.""" type CommandChannelAccess { """Token of the device the access token belongs to.""" deviceToken: String! """Token of the device's type.""" deviceTypeToken: String! """The type's command channel: PUBLISH, HTTP_PULL, or null for the default (PUBLISH).""" commandChannel: String } """ The maintenance-window part of an enqueue decision for one or many devices: which commands must wait, and which are refused because the window opens only after they expire. """ type CommandDispatchSchedule { """ Commands gated by a window, whether it is open now or not. A device not listed here and not refused may be sent to at any time. """ holds: [CommandDispatchHold!]! """ Devices refused with the stable code WINDOW_AFTER_EXPIRY: the window next opens after the command expires, so it could only lapse unsent. Branch on code, not reason. """ refusals: [BatchEnqueueRefusal!]! """ Devices that exist, are enabled, and whose device type does not gate this command: no maintenance window, or a command that is not DISRUPTIVE or DESTRUCTIVE. Asked with alreadyHeld, only a device type with no maintenance window makes a device ungated. A device in none of the four lists does not exist or is disabled, and nothing is decided about it. """ ungated: [String!]! """ Devices that exist and are enabled, but whose device type's current profile version does not define this command at all. """ undefined: [String!]! """ For every device that exists, is enabled and whose device type's current profile version defines the command, the impact (NORMAL, DISRUPTIVE or DESTRUCTIVE) it carries. It is the classification the maintenance-window gate decided on, so a transport that gates on impact reads the same answer. A device that does not exist, is disabled, or whose type does not define the command has no entry. """ impacts: [CommandDispatchImpact!]! } """One device's command impact, decided together with its dispatch schedule.""" type CommandDispatchImpact { """Token of the device.""" deviceToken: String! """NORMAL, DISRUPTIVE or DESTRUCTIVE.""" impact: String! } """One page of the devices an entity group contains, for use as the target of a command.""" type DeviceGroupTargetPage { """ True when the group cannot be a command target. code and reason then explain why, and the empty deviceTokens list does not mean the group has no members. """ rejected: Boolean! """ Why the group was refused, as a stable code; null when not rejected. One of GROUP_NOT_FOUND, GROUP_NOT_A_DEVICE_GROUP (it contains something other than devices), GROUP_NOT_PUBLISHED (a dynamic group that was never published), GROUP_VERSION_NOT_FOUND (the requested version does not exist) or GROUP_NOT_VERSIONED (a version was requested for a static group). """ code: String """Why the group was refused, in words a person can act on; null when not rejected.""" reason: String """The device tokens on this page, in ascending order of the devices' ids.""" deviceTokens: [String!]! # It is a String rather than an Int because it carries a row id, and GraphQL's Int is # a signed 32-bit value — an id beyond that would fail to marshal on the one field # whose entire job is to not lose members. """ Opaque cursor to pass as afterId for the next page. Null when this page holds fewer tokens than the limit; a full page always carries a cursor, so a walk can end with an empty page. """ nextCursor: String # Record it: it is what lets an audit answer "what did this group MEAN when the # command fired?" after someone edits the selector. """The dynamic group's published version this page was resolved from; null for a static group.""" resolvedVersion: Int } # This is a snapshot copy frozen at publish — deliberately NOT a CommandDefinition, # because it has no id or token to address: the draft row it was captured from may since # have been edited or deleted. """ One command a device accepts, as frozen in its profile's active published version. To edit commands, use the profile's command definitions and publish the profile. """ type PublishedCommand { """The key used to send this command.""" commandKey: String! """Human-readable name, or null when none was set.""" name: String """Free-text description, or null when none was set.""" description: String """The command's parameters as a JSON array of parameter descriptors, or null when it takes no structured arguments.""" parameterSchema: String """Optional declarative LoRaWAN payload encoder JSON. Null keeps the raw payload contract.""" encoder: String """NORMAL, DISRUPTIVE or DESTRUCTIVE. The last two wait for the device type's maintenance window.""" impact: String! } """The commands a device currently accepts, from its profile's active published version.""" type DeviceCommandVocabulary { """ True when the device accepts only the listed commands. False when its published profile declares no commands, or it has no published profile: any command key is then accepted, and commands is empty. """ constrained: Boolean! """The accepted commands; empty when not constrained.""" commands: [PublishedCommand!]! } # That distinction is the whole reason this type exists. A client that read the draft # would show and hide a position panel on an unpublished edit, which is the same # publish-boundary confusion deviceCommandVocabulary was added to prevent for commands. """ Whether a device reports its own position, according to the active published version of its profile (not the draft). Location data is accepted whether or not it is declared, so an undeclared device may still have stored positions. """ type DeviceLocationCapability { """ True when the published version declares that the device reports position. False when the device's type has no profile, the profile was never published, or the published version declares nothing. """ declared: Boolean! """ The declaration, or null when declared is false. An empty object is a real answer: the device reports position and no expectations are stated. """ declaration: DeviceLocationDeclaration } """ The metrics a device's measurements are validated against, from the active published version of its profile (not the draft). """ type DeviceMetricVocabulary { """ The published metrics. Empty when the device's type has no profile, the profile was never published, or the published version declares no metric. Empty does not mean the device may send nothing: a measurement whose key is not declared is accepted without validation, provided its value is a number. """ metrics: [PublishedMetric!]! } """A metric in a device's published profile version, as inbound measurements are checked against it.""" type PublishedMetric { """The key a measurement uses to report this metric.""" metricKey: String! """DOUBLE, INT, BOOLEAN or STRING; a measurement's value must parse as this type (any text is a STRING).""" dataType: String! """The unit, or null when none is declared.""" unit: String """The smallest value accepted, or null when there is no lower bound.""" minValue: Float """The largest value accepted, or null when there is no upper bound.""" maxValue: Float """The only values accepted, or null when any value of the type is accepted.""" allowedValues: [String!] """True when the platform computes this metric from a formula over the device's other readings, so a device never reports it. A dashboard offers it like any other metric.""" calculated: Boolean! } # Represents a typed command declared on a device profile. parameterSchema # is the ordered []ParameterSpec argument contract as a JSON string, which drives the # console command form and constrains an issued command's payload at enqueue (the # validateCommandEnqueue gate). """ A command the devices of a profile accept, with the parameters its payload must satisfy. Once the profile is published, a command sent to such a device must use one of the published keys, and its payload is checked against the parameters. """ type CommandDefinition implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a command definition by its token instead where you can.""" id: ID! """When the command definition was created, as an RFC 3339 timestamp.""" createdAt: String """When the command definition was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted command definitions are not returned.""" deletedAt: String """Identifier of the command definition, unique within the tenant.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The profile this command is declared on.""" deviceProfile: DeviceProfile! """ The key used to send this command, unique within the profile. Letters, digits, hyphens and underscores, starting with a letter or digit; at most 128 characters. Dots may separate namespaced segments (for example sparkplug.write): each segment follows the same rule, and a leading, trailing or doubled dot is refused. """ commandKey: String! """ The command's parameters as a JSON array of parameter descriptors, or null when the command takes no structured arguments, in which case payloads are not checked. """ parameterSchema: String """Optional declarative LoRaWAN payload encoder JSON. Null keeps the raw payload contract.""" encoder: String """ How disruptive the command is to the device's work: NORMAL (a read or a benign write), DISRUPTIVE (interrupts it, such as a reboot) or DESTRUCTIVE (erases state, such as a wipe). DISRUPTIVE and DESTRUCTIVE commands wait for the device type's maintenance window when it has one; NORMAL commands never do. """ impact: String! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } """Fields for a new command definition.""" input CommandDefinitionCreateRequest { """Identifier for the new command definition. A token already in use in the tenant is refused with CONFLICT.""" token: String! """Token of the profile to declare the command on. An unknown token fails the request.""" deviceProfileToken: String! """ The key used to send the command. Letters, digits, hyphens and underscores, starting with a letter or digit; at most 128 characters. Dots may separate namespaced segments (for example sparkplug.write): each segment follows the same rule, and a leading, trailing or doubled dot is refused. A key the profile already declares is refused with CONFLICT. """ commandKey: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """ The command's parameters: a JSON array of descriptors, each with a name and optional description, kind (SCALAR, the default, or OBJECT with nested parameters), dataType (DOUBLE, INT, BOOLEAN or STRING), unit, required, default, minValue, maxValue and enum. Unknown keys and inconsistent constraints are refused. Omit it for a command without structured arguments. """ parameterSchema: String """Optional declarative LoRaWAN payload encoder JSON. Null keeps the raw payload contract.""" encoder: String """ How disruptive the command is: NORMAL (the default), DISRUPTIVE or DESTRUCTIVE. DISRUPTIVE and DESTRUCTIVE commands wait for the device type's maintenance window. An unknown value fails the request. """ impact: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. """ A partial update to a command definition. Omit a field to leave the stored value alone, send a value to set it, or send an explicit null to clear it; the fields that cannot be cleared say so. The definition is named by the mutation's token argument, so there is no token here. Any refusal leaves the definition unchanged. """ input CommandDefinitionUpdateRequest { """ Token of another profile to move the definition to. An explicit null or a blank value is refused, and an unknown token fails the whole update. The command key must be unique in the profile the definition ends up in. """ deviceProfileToken: String """ New command key, in the same format as on create. An explicit null or a blank value is refused, and a key already declared on the profile is refused with CONFLICT. """ commandKey: String """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """ New parameters (validated as on create), or null to make the command one without structured arguments. """ parameterSchema: String """Optional declarative LoRaWAN payload encoder JSON. Null keeps the raw payload contract.""" encoder: String """ New impact (NORMAL, DISRUPTIVE or DESTRUCTIVE). An explicit null or an unknown value is refused. The change reaches devices when the profile is published. """ impact: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for searching command definitions. Results are newest first.""" input CommandDefinitionSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Return only definitions on the profile with this token. An unknown token matches nothing.""" deviceProfile: String """Return only definitions with exactly this command key.""" commandKey: String } """One page of command definitions matching a search.""" type CommandDefinitionSearchResults { """The command definitions on this page.""" results: [CommandDefinition!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } # AGENT_PROPOSAL is reserved for the later agent rule-changeset slice. Do not # expose it yet; adding it when that slice ships must remain an additive change. """The door through which a rule draft was saved. The door is declared by the client that saves the rule, so it is advisory origin metadata, not proof of how the content was produced and not proof of human review. Recorded doors are only ever added to, so a later save through another door never removes one, DESCRIBE included.""" enum AuthoredVia { """Saved from the console's rule form.""" FORM """Saved from the console's visual automation canvas.""" CANVAS """Drafted through the natural-language Describe door, which uses AI assistance, and then saved.""" DESCRIBE """Saved by dcctl product apply from a product bundle.""" PRODUCT_AS_CODE """Saved through the API by a client that declared no door. This is the default.""" API """Saved before doors were recorded, so the door is not known.""" UNKNOWN } """ A detection rule declared on a device profile. The rule body, definition, is an opaque JSON document: device-management stores it with the profile's draft but does not interpret the detection language. It is compiled and cost-checked by the detection engine when the profile is published, and a rule takes effect on devices only through a published profile version. Edge-triggered rules raise and resolve alarms; an operator acknowledges and clears the alarms through the alarm mutations. """ type DetectionRule implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a rule by its token instead where you can.""" id: ID! """When the rule was created, as an RFC 3339 timestamp.""" createdAt: String """When the rule was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted rule is removed outright and is not returned.""" deletedAt: String """Identifier of the rule, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The device profile the rule is declared on.""" deviceProfile: DeviceProfile! """ The authored rule as a JSON document in the detection engine's rule language. Stored as written once it parses as JSON; the engine validates its type and cost when the profile is published. """ definition: String! """ The visual automation canvas document the rule was authored with, as JSON, so the console can reopen it on the canvas. Null for a rule authored as a form. Authoring metadata only: it is stored verbatim, never interpreted by the platform, and not part of what a profile publish freezes. """ authoringGraph: String """Sorted set of all recorded save doors. Saves accumulate doors, so editing through FORM never hides DESCRIBE. Legacy NULLs read UNKNOWN.""" authoredVia: [AuthoredVia!]! """ Whether the rule is live. A disabled rule is kept on the profile but is left out of the rules a published version runs. """ enabled: Boolean! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ Token of the dynamic entity group that scopes the rule, or null for a rule that applies to every device of the profile. Set together with entityGroupVersion: the engine fires the rule only for events whose entity is a member of that published group version. """ entityGroupToken: String """ Published version of the entity group that scopes the rule. Null exactly when entityGroupToken is null. """ entityGroupVersion: Int } """ Data required to create a detection rule on a device profile. The definition is checked to be well- formed JSON on write; the detection engine does the authoritative validation when the profile is published. """ input DetectionRuleCreateRequest { """Identifier for the new rule, unique within the tenant. Cannot be changed later.""" token: String! """Token of the device profile to declare the rule on. An unknown token is refused.""" deviceProfileToken: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """The rule as a JSON document in the detection engine's rule language. Must be well-formed JSON.""" definition: String! """ The visual automation canvas document the rule was authored with. Omit for a rule authored as a form. When present it must be a JSON object; it is stored verbatim and not interpreted. """ authoringGraph: String """Door used for this save; omitted or null means API. Adds to the recorded set and never erases earlier doors, including DESCRIBE.""" authoredVia: AuthoredVia """Whether the rule is live. A disabled rule is kept but not run.""" enabled: Boolean! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ Token of a dynamic entity group to scope the rule to. Omit both scope fields for a rule that covers every device of the profile, or set both together. Checked on save: it must name a published dynamic group version. """ entityGroupToken: String """Published version of the entity group to scope the rule to. Set together with entityGroupToken.""" entityGroupVersion: Int } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. """ A partial update of a detection rule. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. The rule's token is not here because the mutation's token argument names the rule and an update cannot move it. The authoredVia field records this save's door instead: omitted or null means API, and previous doors are retained. """ input DetectionRuleUpdateRequest { """ Moves the rule to this device profile. Null is refused, and an unknown token refuses the whole update. """ deviceProfileToken: String """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """ The rule JSON document. Required: null is refused, because a rule with no definition detects nothing. """ definition: String """ The visual canvas document. Null drops it, which is what a form edit of a canvas-authored rule needs since the graph is then stale; omitting it keeps it. """ authoringGraph: String """Door used for this save; omitted or null means API. Adds to the recorded set and never erases earlier doors, including DESCRIBE.""" authoredVia: AuthoredVia """ Whether the rule is live. Null is refused rather than read as false, which would silently park a live rule. """ enabled: Boolean """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Entity group scope. The two scope fields are applied independently and then checked as a pair against what the rule ends up with, so naming one without the other is refused. Null on either removes the scope. """ entityGroupToken: String """Published version of the scoping entity group. See entityGroupToken for how the pair is applied.""" entityGroupVersion: Int } """Criteria for listing detection rules.""" input DetectionRuleSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only rules declared on the device profile with this token. Omit for every rule.""" deviceProfile: String } """One page of detection rules.""" type DetectionRuleSearchResults { """The rules on this page.""" results: [DetectionRule!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } # An authored geofence: a region a device's reported position can be tested against by a # DETECT rule, which names it by token. Geofencing is evaluated in Go by the detection # engine, never in SQL — geometry is an opaque GeoJSON document here, with no spatial # column, no spatial index and no PostGIS. # # The reason is replay determinism, not performance. A containment test issued at replay # time would answer against the fences that exist NOW rather than the fences that existed # when the position was reported. Instead, the tenant's active fence-set version is # stamped onto each resolved LOCATION event at resolve time (see currentFenceSetVersion), # so the fence set an event is evaluated against is frozen into the event itself. A fence # edit that moves a boundary mints a new version; it is not a rule migration, and rules # need not be republished. Renaming a fence mints nothing — the frozen shapes are the same. """ An authored geofence: a region that a detection rule can test a device's reported position against, naming the fence by its token. Containment is evaluated by the detection engine, not in the database, so the geometry is stored as an opaque document with no spatial column or index. The tenant's fence-set version is stamped on each resolved location event, which freezes the fences an event is judged against, so replaying history gives the answer it gave at the time. Changing a boundary, creating or deleting a fence mints a new version; renaming a fence does not. """ type GeoFence implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string. Address a fence by its token instead where you can.""" id: ID! """When the fence was created, as an RFC 3339 timestamp.""" createdAt: String """When the fence was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted fence is removed outright and its token can be reused.""" deletedAt: String """ Identifier of the fence, unique within the tenant. Detection rules name the fence by it, so it is immutable. """ token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String # The geometry as a self-describing JSON document: a kind discriminator plus a GeoJSON # geometry object, e.g. # {"kind":"POLYGON_2D","geometry":{"type":"Polygon","coordinates":[[[lon,lat],...]]}}. # Coordinates follow the platform-wide contract: WGS84 / EPSG:4326 decimal degrees. """ The geometry as a self-describing JSON document: a kind discriminator plus a GeoJSON geometry object, for example {"kind":"POLYGON_2D","geometry":{"type":"Polygon","coordinates":[[[lon,lat],...]]}}. Coordinates are WGS84 (EPSG:4326) decimal degrees in longitude, latitude order. Returned in a canonical form that can differ in whitespace and number formatting from what was written. """ geometry: String! # The geometry kind, derived from the document above rather than stored separately. # POLYGON_2D today; POLYGON_2_5D (polygon + altitude band) and VOXEL_3D are reserved # names that are rejected on write until the engine can evaluate them. The kind belongs # to the FENCE, not to the rule language — a rule asks whether a device is inside a # fence, and that question does not change when the fence gains a third dimension. """ The geometry kind, read from the geometry document. POLYGON_2D is the only kind that can be stored; POLYGON_2_5D and VOXEL_3D are reserved names that are refused on write. """ kind: String! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } # Data required to create a geofence. geometry is the JSON document described # above; it is validated on write (kind, GeoJSON shape, coordinate ranges, and a vertex # bound). Two limits are enforced at authoring time because nothing downstream can see # them: a fence may carry at most 512 positions, and a tenant at most 100 fences. The # publish-time rule cost gate estimates cost from the expression alone, so it cannot price # a containment call whose real cost is the fence's vertex count times the fences in scope. """ Data required to create a geofence. The geometry is validated on write: its kind, GeoJSON shape, coordinate ranges and size. Two ceilings are enforced at authoring time: the positions one fence may carry (512 by default) and the fences a tenant may hold (100 by default), both set by the tenant's tier. A stored geometry document is also limited to 32 KiB. """ input GeoFenceCreateRequest { """Identifier for the new fence, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """ The geometry document, as described on GeoFence.geometry. Must declare kind POLYGON_2D; reserved kinds are refused. """ geometry: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. # # A fence's token is IMMUTABLE — rules name fences by token, and a rename would leave # them naming nothing. Under this input a rename is unrepresentable rather than refused. # A caller who wants a different token creates the new fence FIRST and deletes the old # one after; doing it the other way round can forfeit grandfathered position headroom and # leave the fence unrecreatable. """ A partial update of a geofence. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. A fence's token is immutable, so there is no token field: create the new fence first and delete the old one if a different token is wanted. """ input GeoFenceUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """ The geometry document. Required: null is refused, because a fence with no shape is not a fence. Omitting it leaves the shape alone, so a rename or metadata edit is not held to the tenant's position ceiling, which refuses growth rather than size. """ geometry: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for listing geofences.""" input GeoFenceSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of geofences.""" type GeoFenceSearchResults { """The fences on this page.""" results: [GeoFence!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } # The FROZEN fence set of one fence-set version: the fences that were live at the instant # an event stamped with that version was resolved. It is not an entity — it has no id and # cannot be edited or deleted — it is the immutable content of a version. # # This is what makes replaying history CORRECT rather than vacuous. Evaluating last week's # events against today's fences would answer a different question; each of those events # names the version whose snapshot holds the geometry it was actually resolved against. """ The frozen fence set of one fence-set version: the fences that were live when an event stamped with that version was resolved. It is not an entity, has no id and cannot be edited or deleted. Replaying an old event reads the geometry it was resolved against rather than today's fences. """ type GeoFenceSetSnapshot { """ The version this set is the frozen state of. 0 means the tenant had never created a fence at that time: an empty fence set, known to be empty. """ version: Int! # The fences as of this version, ordered by token, one bounded page at a time. # # It is PAGINATED because a fence set at the documented authoring ceiling does not fit # in one cross-service response: the service-token client that reads this door caps a # response at 1 MiB, and a hundred fences of five hundred vertices is more than that. # Unpaginated, the read failed for exactly the tenants who had used the product as # documented, and the failure surfaced only as containment eval errors. Read pages # until pagination.pageEnd reaches pagination.totalRecords. # # Paging a SNAPSHOT is safe in a way paging a live list is not: a version's fence set # is frozen at mint and nothing ever rewrites it, so two pages of one version cannot # come from two different fence sets however long the read takes. """ The fences of this version, ordered by token, one page at a time. Paginated because a fence set at the authoring ceiling can exceed what one cross-service response carries. Read pages until pagination.pageEnd reaches pagination.totalRecords. Pages of one version always come from the same fence set, because a version is never rewritten. """ fences( """The page of fences to return.""" pagination: PaginationInput! ): GeoFenceSnapshotEntrySearchResults! } """One page of a frozen fence set's fences.""" type GeoFenceSnapshotEntrySearchResults { """The fences on this page, ordered by token.""" results: [GeoFenceSnapshotEntry!]! """Where this page sits in the full fence set.""" pagination: SearchResultsPagination! } """ One fence inside a frozen snapshot. Name and description are absent on purpose: a snapshot freezes only what changes what a rule computes, so correcting a fence's name does not change how history reads. """ type GeoFenceSnapshotEntry { """ The fence's GeoFence.id, frozen with the snapshot. Null for snapshots written before fence-set snapshots recorded row identity. A token may be reused by a later fence, so this, not the token, says which fence row the snapshot froze. """ fenceId: ID """The tenant-unique token a rule names this fence by.""" token: String! """The geometry document as it stood at this version, not the fence's current geometry.""" geometry: String! } """One enabled detection rule of a published profile version, as the detection engine receives it.""" type PublishedProfileRule { """The rule's token, unique within the profile.""" token: String! """The rule definition JSON document.""" definition: String! """ Token of the published entity group the rule is scoped to; an empty string for a rule that covers the whole profile. """ entityGroupToken: String! """Version of that entity group; 0 for a rule that covers the whole profile.""" entityGroupVersion: Int! } """A published profile's active version, as the detection engine should hold it.""" type ActiveProfileRules { """Token of the device profile.""" profileToken: String! """ The active version's token, {profileToken}@{version}: the value resolved events carry and rules are keyed on. """ versionToken: String! """When this version became active (published, or rolled back to), as an RFC 3339 timestamp.""" activeSince: String! """The version's enabled detection rules.""" rules: [PublishedProfileRule!]! } """One page of published profiles' active versions.""" type ActiveProfileRulesPage { """The profiles on this page.""" entries: [ActiveProfileRules!]! """The cursor to pass as afterId for the next page; null when the walk is complete. Treat it as opaque.""" nextCursor: String } """One device as the detection engine's roster holds it.""" type DeviceRosterEntry { """The device's token.""" deviceToken: String! """Token of the profile the device's type adopts; empty when it adopts none.""" profileToken: String! """ When the device's membership of that profile began, as an RFC 3339 timestamp: its creation, or the last re-typing of the device or re-pointing of its type. """ expectedSince: String! } """One page of the tokens of the tenant's disabled devices.""" type DisabledDevicePage { """The tokens of the disabled devices on this page.""" deviceTokens: [String!]! """The cursor to pass as afterId for the next page; null when the walk is complete.""" nextCursor: String } """One constant a device holds under a requested name.""" type DeviceConstant { """The name.""" key: String! """ The value, or null when the device's metadata holds the name but not a finite number (a string, a boolean, null, an object): present and unusable, which is not absent. """ number: Float } """The requested constants one device holds.""" type DeviceConstantsEntry { """The device's token.""" deviceToken: String! """The requested names the device's metadata holds.""" constants: [DeviceConstant!]! } """One measured metric a calculated metric's formula may read.""" type CalculatedMetricPlanInput { """The metric's key.""" key: String! """The metric's data type: DOUBLE, INT, BOOLEAN or STRING.""" dataType: String! } """One calculated metric of a published profile version.""" type CalculatedMetricPlanMetric { """The metric's key.""" key: String! """The formula source, a CEL expression over the version's other metrics.""" expression: String! """The declared result type: DOUBLE, INT or BOOLEAN.""" dataType: String! """The inclusive lower bound a computed value must meet, if the definition has one.""" minValue: Float """The inclusive upper bound a computed value must meet, if the definition has one.""" maxValue: Float """The unit stamped on computed values, if the definition has one.""" unit: String """The metric definition's id, stamped on every value of it as its classifier.""" classifier: Float! """ True when the previous published version did not calculate this key (a first calculation, or one reinstated after a version without it). """ newInVersion: Boolean! """ True when an earlier published version calculated this key under a different expression, data type or bounds, so values computed then differ from what this version's formula gives. """ changedSinceEarlier: Boolean! """ True when another device profile of the tenant declares a metric (measured or calculated) with this key in its active version. Tenant-wide readings counted by metric name then include that profile's readings, so a count under this name cannot show this formula is working. Also true when the check could not be completed: more candidate versions than its bound, or another profile's version that could not be read. """ nameSharedWithOtherProfiles: Boolean! """ The metric keys the formula reads directly, measured or calculated, as this version compiles it. Null when the metric cannot run in this version (its formula does not compile here, or no formula can produce its data type), so it computes from nothing. """ inputs: [String!] """ The measured metrics the formula's value is computed from, including those read through the calculated metrics it reads, in the order of measured. Null exactly when inputs is. """ measuredInputs: [String!] """ The device constants the formula reads, including through the calculated metrics it reads, sorted and distinct. Null exactly when inputs is. """ constants: [String!] } """The calculated metrics of one published profile version, as the live resolver runs them.""" type CalculatedMetricPlan { """The version's token, profileToken@version.""" versionToken: String! """The version number.""" version: Int! """When the version became active; null unless it is the profile's active version.""" activeSince: String """The measured metrics the formulas may read, in declaration order.""" measured: [CalculatedMetricPlanInput!]! """ The calculated metrics in the order the resolver evaluates them: a formula follows the ones it reads, and by key otherwise. A metric whose data type no formula can produce comes last, by key. """ calculated: [CalculatedMetricPlanMetric!]! """The device constants the formulas read together, sorted and distinct.""" constantKeys: [String!]! } """One device of the profile a backfill walks.""" type CalculatedBackfillRosterEntry { """The device's id, the cursor's unit.""" deviceId: String! """The device's token.""" deviceToken: String! """When the device was created, RFC 3339 in UTC.""" createdAt: String! """The requested constant names the device's metadata holds; empty when it holds none.""" constants: [DeviceConstant!]! } """One page of the devices a calculated-metric backfill walks.""" type CalculatedBackfillRosterPage { """The devices on this page, in device order.""" entries: [CalculatedBackfillRosterEntry!]! """The cursor to pass as afterId for the next page; null when the walk is complete.""" nextCursor: String """How many devices the whole walk covers; set on the first page only, null after.""" total: Float } """One page of device constants.""" type DeviceConstantsPage { """The devices on this page that hold at least one requested name.""" entries: [DeviceConstantsEntry!]! """The cursor to pass as afterId for the next page; null when the walk is complete.""" nextCursor: String } """One page of the device roster.""" type DeviceRosterPage { """The devices on this page.""" entries: [DeviceRosterEntry!]! """The cursor to pass as afterId for the next page; null when the walk is complete.""" nextCursor: String } """One numeric device attribute that a dynamic detection threshold can read.""" type DeviceThresholdAttribute { """Token of the device the attribute belongs to.""" deviceToken: String! """The attribute's scope: SHARED or SERVER.""" scope: String! """The attribute's key.""" key: String! """The attribute's numeric value.""" value: Float! """When the attribute was last written, as an RFC 3339 timestamp.""" updatedAt: String! } """ One page of numeric device attributes. A page can hold fewer entries than the limit and still have a nextCursor; only a null cursor ends the walk. """ type DeviceThresholdAttributePage { """The attributes on this page.""" entries: [DeviceThresholdAttribute!]! """The cursor to pass as afterId for the next page; null when the walk is complete.""" nextCursor: String } # The MANIFEST of one fence-set version: which fences it holds, and the content address of # each one's geometry. It carries no geometry, which is what makes its size a function of the # fence COUNT alone — so unlike geoFenceSetSnapshot it needs no pagination, at any fence count. # # This is how a holder of a version number learns what to resolve: an engine that missed the # announcement, one starting cold, or a preview replaying last week. The geometry itself comes # from geoFenceGeometry, keyed by the addresses named here. """ The manifest of one fence-set version: which fences it holds and the content address of each one's geometry. It carries no geometry, so its size depends only on the fence count and it needs no pagination. A holder of a version number uses it to learn what to resolve, then fetches the geometry with geoFenceGeometry. """ type GeoFenceSetManifest { """ The version this manifest describes. 0 means the tenant had never created a fence: an empty fence set, known to be empty. """ version: Int! """ When the change that minted this version committed, as an RFC 3339 timestamp. For diagnosing how old a held fence set is; never used by containment tests. """ mintedAt: String """The fences of this version, ordered by token.""" fences: [GeoFenceManifestEntry!]! } """ One fence inside a manifest: the token a rule names it by and the content address under which its geometry is stored. """ type GeoFenceManifestEntry { """The tenant-unique token a rule names this fence by.""" token: String! """The content address of the fence's geometry document, to pass to geoFenceGeometry.""" hash: String! } # One archived geometry document and the content address it is filed under. The address is # the SHA-256 of exactly these bytes, so a caller can — and should — re-derive it to verify # what it received rather than trusting the association. """ One archived geometry document and the content address it is filed under. The address is the SHA-256 of exactly these bytes, so a caller should re-derive it to verify what it received rather than trust the association. """ type GeoFenceGeometry { """The content address the document is filed under.""" hash: String! """The geometry document, in the same envelope as GeoFence.geometry.""" geometry: String! } """One alarm a bulk acknowledge did not act on, and why.""" type AlarmAckRefusal { """The alarm this refusal is about, exactly as the caller spelled it.""" token: String! """ Machine-readable classification of the refusal. ALARM_NOT_FOUND, meaning the token names no alarm, is the only value today; acknowledgement is idempotent and independent of ACTIVE or CLEARED, so no alarm state refuses it. Branch on this rather than on reason, and treat unknown values as a refusal. """ code: String! """Why the alarm was refused, in client-safe terms. For display only; do not parse it.""" reason: String! } """ What one bulk acknowledge did. Every distinct token the caller supplied appears in exactly one of the two lists, so a selection can be reconciled completely rather than inferred from a count. """ type BulkAcknowledgeAlarmsResult { """ The alarms that are now acknowledged, including any that already were: a repeat acknowledgement is not a failure, matching acknowledgeAlarm. In the order each token was first named. """ acknowledged: [Alarm!]! """ The tokens that named no alarm, each with its code and reason. Empty for a clean request. In the order each token was first named. """ refusals: [AlarmAckRefusal!]! } """An alarm's existence and lifecycle state for service-plane reconciliation.""" type AlarmLifecycle { """The alarm's unique token.""" token: String! """The alarm's lifecycle state: ACTIVE or CLEARED.""" state: String! } """ A raised alarm, the operational alarm object. A DETECT rule whose condition holds raises it; there is at most one live alarm per originator and alarm key, so a repeated crossing is folded into the same row and its severity escalates in place. Its lifecycle is state (ACTIVE or CLEARED) crossed with acknowledged. The originator is addressed by originatorType and originatorId, and is always a device today. Requires alarm:read; a member whose access is limited to some customers sees only the alarms of its own devices. """ type Alarm implements Model & TokenReference & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address an alarm by its token instead where you can. """ id: ID! """ When the alarm row was first created, as an RFC 3339 timestamp. A re-raise reuses the row, so this does not move; see raisedTime for the current cycle. """ createdAt: String """When the alarm row was last written, as an RFC 3339 timestamp.""" updatedAt: String """When the alarm was deleted, as an RFC 3339 timestamp; null for a live alarm.""" deletedAt: String """ Identifier of the alarm, unique within the tenant. It is stable for the alarm's whole life, across clears and re-raises. """ token: String! """Entity type of the originator, the thing the alarm is about. Always device today.""" originatorType: String! """ Numeric id of the originator within the tenant, as a string. Use originatorToken to address it by token. """ originatorId: ID! """ The originator's token, resolved on demand. Null when the originator is not a device or no longer exists. Matches AlarmEvent.originatorToken, so a live list and a reconciling query address the originator the same way. """ originatorToken: String """ The alarm key the raising rule targets. It names which alarm on the originator this is; together with the originator it is unique among live alarms. """ alarmKey: String! """Key of the measurement the raising rule watches, kept for display.""" metricKey: String! """ Lifecycle state: ACTIVE while a condition holds, CLEARED once every contributing condition has resolved or an operator cleared it. A cleared alarm that is raised again returns to ACTIVE on the same row. """ state: String! """ Whether an operator has acknowledged the alarm. Independent of state: either an ACTIVE or a CLEARED alarm may be acknowledged. Raising the alarm again starts a new cycle and resets this to false. """ acknowledged: Boolean! """ Current severity tier: CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE. It escalates in place to the highest tier among the conditions currently holding. Treat unknown values as a tier you do not recognise. """ severity: String! """ When the current cycle began, as an RFC 3339 timestamp: the first raise, or the most recent return to ACTIVE after a clear. Earlier cycles are not kept on the row. """ raisedTime: String """When the alarm was last cleared, as an RFC 3339 timestamp. Null while the alarm is ACTIVE.""" clearedTime: String """ When an operator acknowledged the alarm, as an RFC 3339 timestamp. Null until acknowledged, and reset when the alarm is raised again. """ acknowledgedTime: String """ Subject that acknowledged the alarm, taken from the authenticated caller and never from client input. Null until acknowledged. """ acknowledgedBy: String """ The reading that most recently raised a contribution to this alarm. Only a value-bearing raise moves it; a resolve, or a raise from silence with no value, leaves it unchanged. Null when no reading has been recorded. """ lastValue: Float """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The disposition of this alarm's current cycle (see setAlarmDisposition), or null when nobody has labelled it. A disposition belongs to the cycle it was written on: when the alarm is raised again, the new cycle starts unlabelled and the earlier disposition stays with the earlier cycle, where alarmDispositions still finds it. A cycle is named by its raisedTime, so two cycles of one alarm raised at the same instant share one disposition. """ disposition: AlarmDisposition """Live suppression now; null for cleared alarms, non-device originators or alarms with no matching window.""" suppression: AlarmSuppression """Window token stamped when the current cycle began, or null. "restricted" for scoped humans when the window is hidden or deleted.""" raisedDuringSuppression: String } """ An operator's verdict on one alarm cycle. New values may be added in a later release; a client should treat a value it does not know as unhandled rather than as any of these. """ enum AlarmDispositionLabel { """The condition was real and needed attention.""" TRUE_POSITIVE """ The condition was not real, for example a bad reading, a fouled sensor or a threshold set wrong. A different rule should not have raised it. """ FALSE_POSITIVE """ The condition was real but expected and needed no action, such as planned maintenance or a commissioning test. """ EXPECTED } """ An operator's verdict on one alarm cycle: was the condition real, and did it need anyone? It is ground truth for measuring a rule, not for operating one. A cycle is one raise of an alarm, named by the raisedTime the alarm had when it was labelled, so two cycles of one alarm raised at the same instant share one disposition. """ type AlarmDisposition { """The alarm the labelled cycle belongs to, by its id.""" alarmId: ID! """ The alarm the labelled cycle belongs to, by its token. Always served, even when the caller can no longer read the alarm itself (see alarm). """ alarmToken: String! """ The alarm itself, or null when the caller cannot read it any more (a member whose access is limited to some customers, after the alarm was raised again for another customer). """ alarm: Alarm """The labelled cycle: the alarm's raisedTime when the label was written.""" raisedTime: String! """ The verdict. New values may be added in a later release; treat a value you do not know as unhandled. """ label: AlarmDispositionLabel! """Why, in the labeller's words. Null when no note was given.""" note: String """The authenticated subject that last wrote the label, recorded server-side.""" recordedBy: String """When the label was last written.""" recordedTime: String! } """ Criteria for listing alarm disposition labels. Every facet is optional and they AND together. """ input AlarmDispositionSearchCriteria { """The page to return, starting at 1.""" pageNumber: Int! """How many labels a page holds.""" pageSize: Int! """Only the labelled cycles of this alarm, by its token. An unknown token finds nothing.""" alarmToken: String """ Only cycles with this label. A value that is not an AlarmDispositionLabel is refused when the request is validated, so a misspelt filter never reads as an empty answer. """ label: AlarmDispositionLabel """Only cycles raised at or after this instant (inclusive), as an RFC 3339 timestamp.""" startTime: String """Only cycles raised at or before this instant (inclusive), as an RFC 3339 timestamp.""" endTime: String } """One page of alarm disposition labels, newest cycle first.""" type AlarmDispositionSearchResults { """The labels on this page.""" results: [AlarmDisposition!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ An anchor to filter alarms by: the alarms of one customer, area or asset, as stamped when each alarm cycle began. An alarm stays under the area its device was in when the alarm was raised, even after the device moves; a device sold or moved raises its NEXT alarm under the new anchors. For a member whose access is limited to some customers the answer is also limited to the alarms of that member's own devices, so a shared area counts only the member's own. A customer outside that member's access is refused (FORBIDDEN); an area or asset none of its devices raised in answers nothing. """ input AlarmAnchor { """Entity class: customer, area or asset. Any other value is an error.""" type: String! """Token of the entity, unique within the tenant.""" token: String! } """ Criteria for searching alarms. Every facet is optional and they AND together. originatorType and originatorToken restrict to one entity. """ input AlarmSearchCriteria { """True selects current cycles raised under suppression; false selects cycles without a stamp. Omit for either.""" raisedDuringSuppression: Boolean """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Entity type of the originator, for example device. Required when originatorToken is set.""" originatorType: String """Only alarms of this originator, by its token. An unknown token finds nothing.""" originatorToken: String """Only alarms in this state: ACTIVE or CLEARED.""" state: String """Only alarms at this severity: CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE.""" severity: String """True selects acknowledged alarms and false unacknowledged ones. Omit for either.""" acknowledged: Boolean """Only alarms with this alarm key.""" alarmKey: String """ Only alarms raised on a device of this type, by the type's token. An unknown token finds nothing. A member whose access is limited to some customers matches only the devices its scope owns, so an alarm it can see on a device it no longer owns is under no type. """ deviceType: String """ Only alarms active at some point at or after this instant (inclusive), as an RFC 3339 timestamp: still active, or cleared at or after it. An alarm raised earlier that was still active then is included. Omit for no lower bound. A value that is not RFC 3339 is an error. """ startTime: String """ Only alarms raised at or before this instant (inclusive), as an RFC 3339 timestamp. With startTime, this keeps the alarms whose span overlaps the range. An alarm row holds its latest raise only, so an earlier raise of the same alarm is not found by any range. Omit for no upper bound. A value that is not RFC 3339 is an error. """ endTime: String """Only alarms stamped with this anchor (see AlarmAnchor).""" anchor: AlarmAnchor } """ Criteria for counting alarms by device type or by severity. The facets are those of AlarmSearchCriteria, without paging and without deviceType (the per-type count's grouping; the per-severity count takes it as an argument of its own), and they AND together. """ input AlarmCountCriteria { """Entity type of the originator, e.g. "device". Required when originatorToken is set.""" originatorType: String """Only alarms of this originator, by its token. An unknown token counts nothing.""" originatorToken: String """Only alarms in this state: ACTIVE or CLEARED.""" state: String """Only alarms at this severity.""" severity: String """Only acknowledged (true) or unacknowledged (false) alarms.""" acknowledged: Boolean """Only alarms with this alarm key.""" alarmKey: String """Only alarms stamped with this anchor (see AlarmAnchor).""" anchor: AlarmAnchor } """ How many matching alarms are raised on devices of one type at one severity. A type with alarms at several severities has one entry per severity. """ type AlarmDeviceTypeCount { """The device type the counted alarms' devices have.""" deviceType: DeviceType! """The severity of the counted alarms.""" severity: String! """How many matching alarms have this device type and severity.""" count: Int! } """How many matching alarms are at one severity.""" type AlarmSeverityCount { """The severity of the counted alarms.""" severity: String! """How many matching alarms have this severity.""" count: Int! } """One page of alarms.""" type AlarmSearchResults { """The alarms on this page.""" results: [Alarm!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A single current-state attribute of an entity: a key and value in one scope. Unlike an event, an attribute is a mutable row; writing the same entity, scope and key replaces the value. The value is stored as text with a type tag so consumers can coerce it. """ type EntityAttribute implements Model { """Server-assigned numeric identifier, as a string.""" id: ID! """When the attribute was first written, as an RFC 3339 timestamp.""" createdAt: String """When the attribute row was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted attribute is removed outright and is not returned.""" deletedAt: String """Entity type of the owner, for example device.""" entityType: String! """The entity the attribute belongs to.""" entity: Entity! """ Who owns the attribute: CLIENT, reported by the device; SERVER, set by the platform and hidden from the device; or SHARED, set by the platform and readable by the device, which also subscribes to it. """ scope: String! """The attribute's key, up to 128 bytes.""" attrKey: String! """How to read value: STRING, LONG, DOUBLE, BOOLEAN or JSON.""" valueType: String! """The attribute's value as text, interpreted by valueType. Null when none is set. At most 64 KiB.""" value: String """When the value was last set, as an RFC 3339 timestamp.""" lastUpdated: String } """ Data required to set, or replace, an entity attribute. The owner is resolved from its type and token, which must name an existing entity. """ input EntityAttributeSetRequest { """Entity type of the owner, for example device.""" entityType: String! """Token of the entity the attribute belongs to.""" entity: String! """CLIENT, SERVER or SHARED. See EntityAttribute.scope. Any other value is refused.""" scope: String! """The attribute's key, up to 128 bytes.""" attrKey: String! """How to read value: STRING, LONG, DOUBLE, BOOLEAN or JSON. Any other value is refused.""" valueType: String! """The attribute's value as text, up to 64 KiB. Omit or send null for none.""" value: String } """Criteria for listing entity attributes. Every facet is optional and they AND together.""" input EntityAttributeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only attributes of entities of this type, for example device.""" entityType: String """ Only attributes of the entity with this token. It takes effect only together with entityType; an entity that does not exist finds nothing. """ entity: String """Only attributes in this scope: CLIENT, SERVER or SHARED.""" scope: String """Only attributes whose key is one of these, at most 1000 keys.""" attrKeys: [String!] } """ A row of the audit journal. It is captured on every entity mutation in this service and is never changed through the API. The one other thing that writes it is deleting a tenant, which empties the fields that name a person and keeps the row as evidence of the deletion. Requires audit:read. """ type AuditEvent { """Server-assigned numeric identifier, as a string.""" id: ID! # RFC3339 time the audited statement committed. """When the audited statement committed, as an RFC 3339 timestamp.""" occurredTime: String! # "mutation" (an entity create/update/delete) or "auth" (login/refresh). """mutation for an entity create, update or delete, or auth for a login or token refresh.""" category: String! # JWT subject that performed it, "system" for a system-context operation, or # "" when neither is present. """ The authenticated subject that performed it, system for a system-context operation, or an empty string when neither is present. """ actor: String! # "create" | "update" | "delete" for a mutation. """create, update or delete for a mutation.""" operation: String! # Schema-qualified mutated table (empty for an auth event). """The schema-qualified table that was mutated. Empty for an auth event.""" tableName: String # Primary key of the affected row when the statement targets a single row; # empty for a bulk/condition mutation (rowsAffected then conveys the scope). """ Primary key of the affected row when the statement targets a single row; empty for a bulk or conditional mutation, whose scope rowsAffected conveys. """ entityPk: String # Human-facing label of the affected row (e.g. its token), captured when the # model provides one; null otherwise. It is emptied for a tenant that has been # deleted: the journal is retained as the evidence of the deletion, and it does # not keep the identifiers the deletion was of. """ A human-facing label of the affected row, such as its token, captured when the model provides one; null otherwise. Emptied for a tenant that has been deleted, because the journal is kept as evidence of the deletion without the identifiers it concerned. """ entityLabel: String # Number of rows the audited statement affected. """Number of rows the audited statement affected.""" rowsAffected: Int! } """ Criteria for querying the audit journal. Every filter is optional; a bounded startTime and endTime range is recommended. """ input AuditEventSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only entries at or after this instant, as an RFC 3339 timestamp.""" startTime: String """Only entries at or before this instant, as an RFC 3339 timestamp.""" endTime: String """Only entries of this category: mutation or auth.""" category: String """Only entries of this operation: create, update or delete.""" operation: String """Only entries whose actor contains this text. The match ignores case. At most 256 bytes; longer input is refused with LIMIT_EXCEEDED.""" actor: String """Only entries that mutated this table.""" tableName: String """Only entries that affected the row with this primary key.""" entityPk: String } """One page of audit journal rows, newest first.""" type AuditEventSearchResults { """The entries on this page.""" results: [AuditEvent!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """One page of entity attributes.""" type EntityAttributeSearchResults { """The attributes on this page.""" results: [EntityAttribute!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """Fields for a new device type.""" input DeviceTypeCreateRequest { """Identifier for the new device type. A token already in use in the tenant is refused with CONFLICT.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """URL of an image representing the device type, up to 512 characters.""" imageUrl: String """Name of an icon representing the device type, up to 128 characters.""" icon: String """Background colour, up to 32 characters.""" backgroundColor: String """Foreground (text) colour, up to 32 characters.""" foregroundColor: String """Border colour, up to 32 characters.""" borderColor: String """ Token of the device profile the type adopts. Omit it, or send an empty value, for a type with no profile. An unknown token fails the request. """ profileToken: String """ Token of the maintenance window that holds the type's disruptive commands until it opens. Omit it, or send an empty value, for a type with no window. An unknown token fails the request. """ maintenanceWindowToken: String """Manufacturer of the devices of this type, up to 128 characters.""" manufacturer: String """Model of the devices of this type, up to 128 characters.""" model: String """ Command channel of the type: PUBLISH or HTTP_PULL, or omit it (or send an empty value) for the default channel, which behaves as PUBLISH. Any other value fails the request with INVALID_VALUE. """ commandChannel: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ The classes an entity of this type is, as CURIEs (for example sdm-streetlighting:Streetlight) or full IRIs inside an enabled vocabulary. Each must be a CLASS of a pack the tenant has enabled, or a term under a custom prefix it declared; at most 8. A term outside the enabled vocabularies, of the wrong kind, deprecated, or malformed fails the request with INVALID_ARGUMENT naming it. Stored as expanded IRIs. Omit for none. """ semanticTypes: [String!] } # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update to a device type. Omit a field to leave the stored value alone, send a value to set it, or send an explicit null to clear it; sending only name renames the type and changes nothing else. The type is named by the mutation's token argument, so there is no token here and a type's token cannot be changed. """ input DeviceTypeUpdateRequest { """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """New image URL, or null to clear it.""" imageUrl: String """New icon name, or null to clear it.""" icon: String """New background colour, or null to clear it.""" backgroundColor: String """New foreground colour, or null to clear it.""" foregroundColor: String """New border colour, or null to clear it.""" borderColor: String """ Token of the profile the type should adopt; null or an empty value detaches the current profile. An unknown token fails the whole update. Changing the profile changes what every device of the type measures and accepts. """ profileToken: String """ Token of the maintenance window the type should use; null or an empty value removes the current one, after which its disruptive commands are sent whenever the device is reachable. An unknown token fails the whole update. Commands already waiting for the old window are moved to the new schedule within about a minute. """ maintenanceWindowToken: String """New manufacturer, or null to clear it.""" manufacturer: String """New model, or null to clear it.""" model: String """ New command channel: PUBLISH or HTTP_PULL, or null (or an empty value) to return the type to the default channel, which behaves as PUBLISH. Any other value fails the whole update with INVALID_VALUE. """ commandChannel: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ New classes, replacing the stored ones: null or an empty list clears them. Omit to leave them alone. Validated as on create; only a request that names this field is validated. """ semanticTypes: [String!] } """Criteria for searching device types. Results are newest first.""" input DeviceTypeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """ Return only device types whose name or token contains this text, ignoring case (a name is optional, so an unnamed type is found by its token). Blank matches all. """ nameContains: String } """One page of device types matching a search.""" type DeviceTypeSearchResults { """The device types on this page.""" results: [DeviceType!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """Fields for a new device profile. Its definitions are added afterwards, and take effect when the profile is published.""" input DeviceProfileCreateRequest { """Identifier for the new profile. A token already in use in the tenant is refused with CONFLICT.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Functional class of the devices, such as thermostat or meter, up to 64 characters.""" category: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ Whether the devices report their own position, and what to expect of it. Omit it when they do not. """ location: DeviceLocationDeclarationInput } # It carries no token. The mutation's own `token` argument names the profile, and # a profile is renamed through renameDeviceProfile — where the new token can mean # only one thing. """ A partial update to a device profile's own fields. Omit a field to leave the stored value alone, send a value to set it, or send an explicit null to clear it. The profile is named by the mutation's token argument; use renameDeviceProfile to change its token. Changes here are part of the draft. """ input DeviceProfileUpdateRequest { """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """New category, or null to clear it.""" category: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ New position declaration, replacing the stored one; null states that the devices do not report their own position. An empty object states that they do, with no expectations. """ location: DeviceLocationDeclarationInput } """Criteria for searching device profiles. Results are newest first.""" input DeviceProfileSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of device profiles matching a search.""" type DeviceProfileSearchResults { """The device profiles on this page.""" results: [DeviceProfile!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } # Represents a device instance """ A device: one connected thing the platform receives events from and sends commands to. What it measures and accepts comes from its device type's profile. """ type Device implements Model & TokenReference & NamedEntity & MetadataEntity & Entity { """Server-assigned numeric identifier, as a string. Address a device by its token instead where you can.""" id: ID! """When the device was created, as an RFC 3339 timestamp.""" createdAt: String """When the device was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted devices are not returned.""" deletedAt: String """ Identifier of the device, unique within the tenant. It cannot be changed after the device is created. """ token: String! # opaque, not a credential, unique per tenant when set. """ Optional business identifier you assign, such as a serial number or VIN, up to 256 characters. Unique within the tenant when set. It is only a lookup key: devices are not addressed or authenticated by it. """ externalId: String """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The device's type.""" deviceType: DeviceType! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ False when the device has been disabled. A disabled device's events are discarded rather than stored, it cannot open a new broker connection, and commands sent to it are refused with DEVICE_DISABLED. Its data, credentials and configuration are kept. """ enabled: Boolean! """When the device was disabled, as an RFC 3339 timestamp; null while it is enabled.""" disabledAt: String """ The gateway this device is behind, or null when it is behind none. Only that gateway's credential may publish this device's telemetry on the gateway's own topics; the device's own credential still works as before. """ gateway: Device """ The devices behind this device, one page at a time. Empty unless the device is a gateway. Requires device:read. """ children( """Which page to return.""" pagination: PaginationInput! ): DeviceSearchResults! """ The provisioning profile this device is earmarked for, or null when it is earmarked for none (or the profile was deleted). Only that profile may adopt it when it registers itself. Requires device:read, unscoped. """ expectedProvisioningProfile: ProvisioningProfile """ The names a sender other than the platform knows this device by, such as a LoRaWAN DevEUI, ordered by scheme. An inbound integration finds the device by one of these. Empty when the device has none. Null, and never an empty list, for a caller limited to part of the tenant: aliases are not shown to it. """ aliases: [DeviceAlias!] """ Where the device was installed, for a device that is fixed in place. Needs location:installed:read (location:read includes it). Null for a caller without it, and null when no position was recorded. This is installation data only: it never falls back to a position the device reported, even when the device also reports GPS. """ installedPosition: InstalledPosition """ Whether installedPosition is withheld from this caller. It concerns the INSTALLED position only, not any position the device reports. True for every device a caller without location:installed:read (or location:read) reads, whether or not the device has an installed position, and false for every device a caller with it reads. It depends on the caller alone, so it does not reveal whether a position exists. """ positionWithheld: Boolean! } """Where an installed position came from.""" enum InstalledPositionSource { """Measured on site by a survey.""" SURVEY """Read from a fleet import file.""" IMPORT """Entered by an operator.""" MANUAL """Derived from other data rather than measured.""" INFERRED } """The entity kinds a position can be installed on.""" enum PositionFamily { """A device, named by its token.""" DEVICE """An asset, named by its token.""" ASSET } """ Where a fixed asset was installed: WGS84 decimal degrees, elevation and accuracy in metres. """ type InstalledPosition { """Degrees north, -90 to 90.""" latitude: Float! """Degrees east, -180 to 180.""" longitude: Float! """Metres above the WGS84 ellipsoid, or null when not recorded.""" elevation: Float """Horizontal accuracy in metres, or null when not recorded.""" accuracy: Float """How the position was obtained.""" source: InstalledPositionSource """When the position was recorded, as an RFC 3339 timestamp.""" updatedAt: String } """The position an operator, an import or a survey tool records.""" input InstalledPositionInput { """Degrees north. Values outside -90 to 90, and values that are not numbers, are refused.""" latitude: Float! """Degrees east. Values outside -180 to 180, and values that are not numbers, are refused.""" longitude: Float! """Metres above the WGS84 ellipsoid.""" elevation: Float """Horizontal accuracy in metres. Not negative.""" accuracy: Float """How the position was obtained. MANUAL when omitted.""" source: InstalledPositionSource } """ One name a sender other than the platform knows a device by. The pair is unique within the tenant, and a device has at most one value per scheme. """ type DeviceAlias { """ Whose vocabulary the value is in: lorawan.deveui, tts.device-id, or custom. for a name you chose. """ scheme: String! """ The value in its stored spelling. A lorawan.deveui value is 16 upper-case hexadecimal digits whatever case it was written in, and a tts.device-id value is lower case. """ value: String! } """ A name for a device in a sender's vocabulary. The value is checked against the scheme and stored in one canonical spelling, so the same DevEUI written in either case is one alias. """ input DeviceAliasInput { """lorawan.deveui, tts.device-id, or custom. (lower-case letters, digits, hyphen and underscore, up to 63 characters).""" scheme: String! """ lorawan.deveui: exactly 16 hexadecimal digits. tts.device-id: 1 to 36 letters, digits and hyphens. custom.: 1 to 128 characters with no control characters, case kept. """ value: String! } """Fields for a new device.""" input DeviceCreateRequest { """Identifier for the new device. A token already in use in the tenant is refused with CONFLICT.""" token: String! """ Optional business identifier, up to 256 characters. A value another device in the tenant already has is refused with CONFLICT. """ externalId: String """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Token of the device's type. An unknown token fails the request.""" deviceTypeToken: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """False to create the device already disabled. Omitted or null creates it enabled.""" enabled: Boolean """ Token of the gateway device to create this device behind. The same rules as assignDeviceGateway apply, and a refusal fails the create. Omitted or null creates the device behind no gateway. """ gatewayToken: String """ Token of a provisioning profile to EARMARK the device for. Only that profile may later adopt this device when it registers itself; the profile must exist in the tenant and be of this device's type, otherwise the request is refused with INVALID_VALUE. Omitted or null earmarks nothing, and no profile will take the device over. """ provisioningProfileToken: String """ Names a sender other than the platform knows the device by, such as its LoRaWAN DevEUI. At most 8, one per scheme. A value another device in the tenant already holds under the scheme is refused with CONFLICT. Omitted or null creates the device with none. """ aliases: [DeviceAliasInput!] } # There is no `token` member — the mutation's own `token` argument names the row. It used # to be the payload token that named the row, with the argument ignored, so a request # whose two tokens disagreed silently updated the device in the payload and returned it as # though it were the one asked for. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update to a device. Omit a field to leave the stored value alone, send a value to set it, or send an explicit null to clear it; the fields that cannot be cleared say so. The device is named by the mutation's token argument, so there is no token here. An empty object changes nothing. """ input DeviceUpdateRequest { """New business identifier, or null to clear it. A value another device already has is refused with CONFLICT.""" externalId: String """New name, or null to clear it.""" name: String """New description, or null to clear it.""" description: String """ Token of a different device type to move the device to. An explicit null or an empty value is refused, because every device must have a type; an unknown token fails the whole update. """ deviceTypeToken: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ False to disable the device, true to enable it again. An explicit null is refused. Disabling a device that is already disabled keeps the time it was first disabled. """ enabled: Boolean """ Replaces the device's aliases with exactly this list. Null or an empty list removes them all; omit the field to leave them alone. A value another device already holds under a scheme refuses the whole update with CONFLICT. """ aliases: [DeviceAliasInput!] } """ Creates many devices of one type from templates. Device n of the batch (n running from startIndex to startIndex + count - 1) is rendered by replacing {n} with n, or {n:0Wd} with n zero-padded to width W. Each template may be at most 256 characters, with a pad width of at most 128. The whole batch is created or none of it is. """ input DeviceBulkCreateRequest { """Token of the device type for every device. An unknown token fails the request.""" deviceTypeToken: String! """Number of devices to create, from 1 to 1000.""" count: Int! """Index of the first device. Defaults to 1; values below 1 are refused.""" startIndex: Int """ Template for the device tokens. It must contain {n} or {n:0Wd} so each token is distinct, must not contain {random}, and every rendered token must be a valid token not already in use. """ tokenTemplate: String! """Template for the device names. Optional; {random} is not allowed. A rendered name may be at most 128 characters.""" nameTemplate: String """ Template for the external ids. Optional. {random} renders a fresh random value per device. When creating more than one device the template must contain {n}, {n:0Wd} or {random}, since external ids are unique within the tenant. A rendered value may be at most 256 characters. """ externalIdTemplate: String """Metadata given to every device. Must be valid JSON; an empty string means none.""" metadata: String } """How an import treats credentials. No mode generates a secret.""" enum DeviceImportMode { """Create devices only. Credential columns are refused.""" NONE """ Create each device together with the credential a factory supplied for it, in one transaction. credentialType and credentialId are required on every row. """ FACTORY_CREDENTIALS } """What happened to one row of an import.""" enum DeviceImportOutcome { """The device (and its credential, in FACTORY_CREDENTIALS mode) was created; on a dry run, would be.""" CREATED """The device already exists exactly as the row describes it. A success; nothing was written.""" EXISTS """The device, external id or credential id is taken by something different. Nothing was written.""" CONFLICT """The row is malformed or names something that does not exist.""" INVALID """The row is well-formed and was refused by a rule of the platform.""" REFUSED } """One device of an import file.""" input DeviceImportRow { """Identifier of the device, and the key a re-run matches on. Required.""" token: String! """Token of the device's type. An unknown token makes the row INVALID.""" deviceTypeToken: String! """Optional business identifier, up to 256 characters. Checked for conflicts; never the key.""" externalId: String """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ Token of a provisioning profile to earmark the device for. An unknown profile, or one of a different device type, makes the row INVALID. A device that already exists with a different earmark makes the row a CONFLICT. """ provisioningProfileToken: String """ Names a sender other than the platform knows the device by, as on a single create. A value another device holds makes the row a CONFLICT and a malformed one makes it INVALID. A device that already exists with a different alias set makes the row a CONFLICT. """ aliases: [DeviceAliasInput!] """ Degrees north where the device was installed, for a device that is fixed in place. Given together with installedLongitude or not at all. A value outside -90 to 90 makes the row INVALID. The position is stored with source IMPORT. A device that already exists makes the row a CONFLICT when its stored position differs, and always for a caller without location:installed:read, which is never told whether the position matches. """ installedLatitude: Float """Degrees east where the device was installed, -180 to 180. See installedLatitude.""" installedLongitude: Float """ Metres above the WGS84 ellipsoid. Needs installedLatitude and installedLongitude. When a device that already exists is compared, an omitted elevation compares as NONE: a row that leaves it out, against a device whose stored position has one, is a CONFLICT. """ installedElevation: Float """ Horizontal accuracy in metres, not negative. Needs installedLatitude and installedLongitude. Like installedElevation, an omitted accuracy compares as none against a device that exists. """ installedAccuracy: Float """ACCESS_TOKEN or MQTT_BASIC. FACTORY_CREDENTIALS mode only.""" credentialType: String """The id the device presents (the access token itself, or the MQTT username). FACTORY_CREDENTIALS mode only.""" credentialId: String """ The MQTT_BASIC password, at least 16 bytes. Write-only: stored as a keyed digest, never returned, logged or compared on a re-run. FACTORY_CREDENTIALS mode only. """ credentialValue: String } """The outcome of one row of an import.""" type DeviceImportRowResult { """The row's position in the request, starting at 1.""" row: Int! """The row's device token.""" token: String! """What happened to this row: created, already present unchanged, in conflict with an existing device, invalid, or refused.""" outcome: DeviceImportOutcome! """A machine-readable reason for every outcome but CREATED and EXISTS: CONFLICT, INVALID_VALUE, NOT_FOUND, LIMIT_EXCEEDED, DUPLICATE_IN_FILE or UNSUPPORTED.""" code: String """What is wrong. It never contains a credential secret, but may repeat a token the row supplied, such as a device type token.""" message: String } """The per-row outcomes of an importDevices call, with their totals.""" type DeviceImportResult { """True when nothing was written.""" dryRun: Boolean! """One outcome per request row, in request order.""" rows: [DeviceImportRowResult!]! """Rows whose device was created (on a dry run: would be created).""" created: Int! """Rows whose device already exists exactly as described, so nothing was written.""" exists: Int! """Rows that clash with an existing device or one of its unique values; nothing was written for them.""" conflict: Int! """Rows refused because a value is malformed, missing or duplicated within the file.""" invalid: Int! """Rows refused because what they ask for is not supported, such as an unsupported credential type.""" refused: Int! } """Criteria for searching devices. Results are newest first.""" input DeviceSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Return only devices of the device type with this token. An unknown token matches nothing.""" deviceType: String """ Return only devices whose name or token contains this text, ignoring case (a name is optional, so an unnamed device is found by its token). Blank matches all. """ nameContains: String """ Return only devices that hold a credential issued by the provisioning profile with this token, revoked ones included. An unknown token matches nothing. """ provisioningProfile: String """ Return only devices earmarked for the provisioning profile with this token. An unknown token matches nothing. """ expectedProvisioningProfile: String """ Return only the device this alias names. The value is matched in its stored spelling, so a DevEUI in either case finds the same device. A malformed alias is refused with INVALID_VALUE, and a caller limited to part of the tenant is refused. """ alias: DeviceAliasInput } """Which customer's devices to return, and the page.""" input CustomerDeviceSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Token of the customer.""" customer: String! """Token of the relationship type linking each device to the customer, such as "assigned".""" relationshipType: String! } """Criteria for the devices on one anchor: a customer, an area or an asset.""" input AnchorDeviceSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """The anchor's kind: "customer", "area" or "asset".""" targetType: String! """Token of the anchor.""" target: String! """ Token of the relationship type linking each device to the anchor, such as "assigned". Omit it for a device linked by any type. Refused for a member limited to part of the tenant. """ relationshipType: String } """One page of devices matching a search.""" type DeviceSearchResults { """The devices on this page.""" results: [Device!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A group of entities of one family: devices, assets, areas or customers. Membership is either static (members are added explicitly over relationships of the member type) or dynamic (a selector over the members' facet attributes, evaluated when the group is read). A dynamic group is versioned: publishing freezes the selector as an immutable version, which detection rules and access scopes then pin to. """ type EntityGroup implements Model & TokenReference & NamedEntity & BrandedEntity & MetadataEntity & Entity { """Server-assigned numeric identifier, as a string. Address a group by its token instead where you can.""" id: ID! """When the group was created, as an RFC 3339 timestamp.""" createdAt: String """When the group was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted group is removed outright and is not returned.""" deletedAt: String """Identifier of the group, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """URL of an image representing the group, up to 512 characters. Null when none is set.""" imageUrl: String """ Name of an icon representing the group, up to 128 characters. Not checked against any icon set. Null when none is set. """ icon: String """ Background colour to display the group with, up to 32 characters. Not validated. Null when none is set. """ backgroundColor: String """ Foreground (text) colour to display the group with, up to 32 characters. Not validated. Null when none is set. """ foregroundColor: String """Border colour to display the group with, up to 32 characters. Not validated. Null when none is set.""" borderColor: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String # The entity family this group collects: device | asset | area | customer. """The entity family the group collects: device, asset, area or customer. Fixed at creation.""" memberType: String! # How members are determined: static (explicit "member" edges) or dynamic # (a CEL selector over member-entity facet attributes). """ How members are determined: static, for members added explicitly, or dynamic, for members matched by selector. Fixed at creation. """ membershipMode: String! # The CEL membership predicate, present only for dynamic groups. """ The membership predicate, a CEL expression over the members' facet attributes. Present only for dynamic groups; null for a static group. This is the editable draft: the selector a published version froze is on that version. """ selector: String # The resolved members of this group — a static group's "member" edges or a # dynamic group's eval-on-read selector matches, transparently (a consumer does # not branch on mode). Always bounded + paginated. """ The resolved members of the group: a static group's explicit members, or the entities a dynamic group's selector matches now. A consumer does not need to branch on mode. Always bounded and paginated. """ members( """The page of members to return.""" pagination: PaginationInput! ): EntityGroupMemberSearchResults! # The published version whose frozen selector a rule-scoped resolve reads. # Null until a dynamic group is first published; always null for a # static group (never versioned). The live `selector` above is the mutable draft. """ The published version whose frozen selector rule-scoped resolution reads. Null until a dynamic group is first published, and always null for a static group, which is never versioned. """ activeVersion: Int # The group's published versions, newest first. Empty for a group # that has never been published (and always empty for a static group). """ The group's published versions, newest first. Empty for a group that has never been published, and always empty for a static group. """ versions: [EntityGroupVersion!]! """ Whether the group is an access scope: a group a member's access can be limited to. A member limited to it sees the devices in the group at its active version — and only while they are in it — and the history recorded while they were. Set with setEntityGroupAccessScope. """ accessScope: Boolean! } """ An immutable published snapshot of a dynamic entity group's selector. A detection rule scopes to a specific group and version, so the set of entities it covers cannot change under a later selector edit. """ type EntityGroupVersion { """Version number, increasing per group.""" version: Int! """The membership selector frozen at publish.""" selector: String! """The entity family the group collects, frozen with the version.""" memberType: String! """Optional label given at publish. It may embed a semantic version string, which is not parsed.""" label: String """Optional description of what the version changes. Null when none was given.""" description: String """When the version was published, as an RFC 3339 timestamp.""" publishedAt: String! """ The identity that published the version: its username, falling back to its email. Null when not recorded. """ publishedBy: String } """ A resolved member of an entity group: the lightweight identity of one entity, enough to look up the full record. The entity family is the group's memberType, so it is not repeated per member. """ type EntityGroupMember { """Numeric id of the member entity, as a string.""" id: ID! """Token of the member entity.""" token: String! } """One page of an entity group's resolved members.""" type EntityGroupMemberSearchResults { """The members on this page.""" results: [EntityGroupMember!]! """Where this page sits in the full member set.""" pagination: SearchResultsPagination! } """ The result of evaluating a candidate dynamic-group selector without saving it. A selector that fails the publish checks (not expressible as a query, over the cost budget, or a parse or type error) returns valid false with the error and no members, so an authoring form can show the problem inline as the user types instead of treating it as a failure. """ type SelectorPreview { """Whether the selector passed the same checks a saved dynamic group must pass.""" valid: Boolean! """Why the selector was refused, in terms fit to show the author. Null when valid.""" error: String """One page of the entities the selector matches now. Null when the selector is not valid.""" members: EntityGroupMemberSearchResults } """ Data required to create an entity group. membershipMode defaults to static; a selector is required for a dynamic group and refused for a static one. Edit a group afterwards with EntityGroupUpdateRequest. """ input EntityGroupCreateRequest { """Identifier for the new group, unique within the tenant. Cannot be changed later.""" token: String! """The entity family the group collects: device, asset, area or customer. Cannot be changed later.""" memberType: String! """static or dynamic. Omitted means static. Cannot be changed later.""" membershipMode: String """ The CEL membership selector. Required, and only allowed, when membershipMode is dynamic. It is compiled and cost-checked on create. """ selector: String """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """URL of an image representing the group, up to 512 characters.""" imageUrl: String """Name of an icon representing the group, up to 128 characters. Not checked against any icon set.""" icon: String """Background colour to display the group with, up to 32 characters. Not validated.""" backgroundColor: String """Foreground (text) colour to display the group with, up to 32 characters. Not validated.""" foregroundColor: String """Border colour to display the group with, up to 32 characters. Not validated.""" borderColor: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. # # memberType and membershipMode are absent for the same reason as token: all three are # IDENTITY. Changing the member family would leave the group collecting a family its # members do not belong to, and converting a static group to dynamic (or back) would # orphan its members. A field that can only ever be a no-op or an error does not belong # in an update input. """ A partial update of an entity group. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. The token, memberType and membershipMode are absent because they are identity: changing the family would leave members that do not belong, and converting between static and dynamic would orphan the members. """ input EntityGroupUpdateRequest { """ The membership selector of a dynamic group; refused for a static group. A provided selector is recompiled and cost-checked before it replaces the stored draft. Null is refused, because a dynamic group with no selector matches nothing. """ selector: String """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """Image URL; null clears it.""" imageUrl: String """Icon name; null clears it.""" icon: String """Background colour; null clears it.""" backgroundColor: String """Foreground colour; null clears it.""" foregroundColor: String """Border colour; null clears it.""" borderColor: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for listing entity groups. memberType and membershipMode are optional filters.""" input EntityGroupSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only groups collecting this entity family: device, asset, area or customer.""" memberType: String """Only groups with this membership mode: static or dynamic.""" membershipMode: String """ Keep only the groups that are (true) or are not (false) access scopes. Omit it for both. """ accessScope: Boolean } """One page of entity groups.""" type EntityGroupSearchResults { """The groups on this page.""" results: [EntityGroup!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A per-tenant declaration that an attribute key is a classification facet for a member family. It tells the console which keys to offer as browse and filter axes and as typeahead; it does not store facet values, which remain attributes on the member entities. Addressed by its natural key, memberType and key. Named FacetKey so it is not confused with the device and profile discovery facets read by facetValues. """ type FacetKey implements Model { """Server-assigned numeric identifier, as a string.""" id: ID! """When the facet key was declared, as an RFC 3339 timestamp.""" createdAt: String """When the facet key was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted facet key is removed outright and is not returned.""" deletedAt: String """The entity family this facet classifies: device, asset, area or customer.""" memberType: String! """The attribute key this facet declares, for example climate or country.""" key: String! """The value type of the facet's attribute values: STRING, LONG, DOUBLE, BOOLEAN or JSON.""" valueType: String! """ Where the facet's values come from: attribute, for values stored as attributes, or system, for a predefined facet over a modelled column, which cannot be deleted. """ source: String! """ An optional vocabulary of values that powers the console typeahead. Null when the facet's values are free-form. """ values: [String!] """An optional human display label for the axis. Null falls back to key.""" label: String } """ Data required to declare, or redeclare, a facet key. The natural key, memberType and key, selects the row and the remaining fields are rewritten. Only attribute-source facets can be written, so there is no source field. """ input FacetKeySetRequest { """The entity family the facet classifies: device, asset, area or customer.""" memberType: String! """The attribute key the facet declares.""" key: String! """The value type of the facet's attribute values: STRING, LONG, DOUBLE, BOOLEAN or JSON.""" valueType: String! """An optional vocabulary of values for the console typeahead. Omit for free-form values.""" values: [String!] """An optional human display label for the axis. Omit to fall back to the key.""" label: String } """Criteria for listing declared facet keys.""" input FacetKeySearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """ Only facet keys declared for this entity family: device, asset, area or customer. Omit for every family. """ memberType: String } """One page of facet keys.""" type FacetKeySearchResults { """The facet keys on this page.""" results: [FacetKey!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ Authentication material for a device, which can be rotated. A device has any number of credentials; each is one of ACCESS_TOKEN, MQTT_BASIC or X509_CERTIFICATE. Secrets are stored only as keyed digests: an access token is returned once, in the response to the write that set it, and no password or secret is ever returned on a read. Reading credentials requires device:write, because whoever could read them could impersonate the device. """ type DeviceCredential implements Model & TokenReference & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a credential by its token instead where you can. """ id: ID! """When the credential was created, as an RFC 3339 timestamp.""" createdAt: String """When the credential was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted credential is removed outright and is not returned.""" deletedAt: String """ Identifier of the credential record, unique within the tenant. It is not what a device presents; see credentialId. """ token: String! """The device this credential authenticates.""" device: Device! """The kind of credential: ACCESS_TOKEN, MQTT_BASIC or X509_CERTIFICATE.""" credentialType: String! """ What the device presents. For MQTT_BASIC, the username. For ACCESS_TOKEN, the access token itself ONLY in the response to the create, update or replacement that set it, which is the one time it can be read: the platform stores an access token as a keyed digest and cannot return it afterwards. Every later read returns a fingerprint that identifies the credential and cannot be presented as the token. If the token is lost, set a new one with updateDeviceCredential. For X509_CERTIFICATE it is the SHA-256 of the device certificate (hex), computed by the server; it is public and is not something a device presents. """ credentialId: String! """ Always null. It is accepted when a credential is written but never returned, so a stored secret such as an MQTT_BASIC password cannot be read back out through the API. """ credentialValue: String """Whether the credential can authenticate. A disabled credential is kept but refused at connect.""" enabled: Boolean! """When the credential stops authenticating, as an RFC 3339 timestamp. Null means it never expires.""" expiresAt: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The provisioning profile whose registration issued this credential, or null for a credential an operator created. Requires device:read, unscoped. """ provisioningProfile: ProvisioningProfile """ The certificate an X509_CERTIFICATE credential pins, or null for any other type. Requires device:read, unscoped. """ certificate: X509Certificate } """The pinned device certificate of an X509_CERTIFICATE credential, read back from what is stored.""" type X509Certificate { """SHA-256 of the certificate, hex. The credential's id.""" fingerprintSha256: String! """The certificate's subject common name: the device's external id when it registers itself.""" subjectCn: String! """The certificate's serial number, hex.""" serialHex: String! """When the certificate itself expires. The credential's expiresAt is the earliest expiry over its whole chain.""" notAfter: String! """The trust anchor the certificate's chain must reach at every connect.""" trustAnchor: DeviceTrustAnchor } """Data required to create a device credential.""" input DeviceCredentialCreateRequest { """Identifier for the new credential record, unique within the tenant.""" token: String! """Token of the device the credential authenticates. An unknown token is refused.""" deviceToken: String! """The kind of credential: ACCESS_TOKEN, MQTT_BASIC or X509_CERTIFICATE. Any other value is refused.""" credentialType: String! """ The MQTT username, or the access token for ACCESS_TOKEN (at most 256 bytes). The token is stored only as a keyed digest and is returned once, in this mutation's response. """ credentialId: String! """ The password for an MQTT_BASIC credential: at least 16 bytes, counted as sent, and at most 4096. A shorter one is refused with extensions.code INVALID_VALUE. Write-only; it is stored only as a keyed digest. A password set before the 16-byte minimum keeps working until it is next changed. """ credentialValue: String """Whether the credential can authenticate. A disabled credential is kept but refused at connect.""" enabled: Boolean! """When the credential stops authenticating, as an RFC 3339 timestamp. Omit for never.""" expiresAt: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ X509_CERTIFICATE only: the device certificate in PEM, optionally followed by the intermediates that link it to the trust anchor. The chain is verified when the credential is created, so one that could not authenticate is refused with INVALID_VALUE. Only the device certificate is stored. Requires trustAnchorToken. Refused for any other type. """ certificatePem: String """X509_CERTIFICATE only: the trust anchor the certificate's chain must reach, at creation and at every connect.""" trustAnchorToken: String } """ A partial update of a device credential. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. The token is not here because the mutation's token argument names the credential and an update cannot move it. """ input DeviceCredentialUpdateRequest { """ Re-points the credential at another device. Null is refused, and an unknown token refuses the whole update. """ deviceToken: String """The kind of credential. Required: null is refused. Validated against the known types when sent.""" credentialType: String """ The MQTT username, or the new access token for ACCESS_TOKEN. Setting it on an ACCESS_TOKEN credential rotates the token: the old one stops working at once and the new one is returned once, in this mutation's response. Required when this request changes the credential's type to or from ACCESS_TOKEN, and refused otherwise with extensions.code INVALID_VALUE. """ credentialId: String # The secret material, nullable — a credential type that carries no secret is a real # state. OMITTING IT LEAVES THE SECRET IN PLACE, which is what makes editing anything # else on a credential safe; the input this replaces blanked it on every such edit. """ The new password for an MQTT_BASIC credential: at least 16 bytes, counted as sent, and at most 4096. A shorter one is refused with extensions.code INVALID_VALUE. Required when this request changes the credential's type to MQTT_BASIC. Ignored for a type that has no password. Write-only; it is stored only as a keyed digest. A password set before the 16-byte minimum keeps working until it is next changed. """ credentialValue: String """ Whether the credential can authenticate. Null is refused rather than read as false, which would silently disable the credential and take the device offline at its next reconnect. """ enabled: Boolean """ When the credential stops authenticating, as an RFC 3339 timestamp. Null, or an empty string such as a cleared form field sends, means never expires. """ expiresAt: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for listing device credentials. Every facet is optional and they AND together.""" input DeviceCredentialSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only credentials of the device with this token.""" device: String """Only credentials of this type: ACCESS_TOKEN, MQTT_BASIC or X509_CERTIFICATE.""" credentialType: String """ An MQTT username, or for ACCESS_TOKEN either the access token or the fingerprint a read returns. The token is matched through its digest; it is never stored or compared as sent. """ credentialId: String """True selects enabled credentials and false disabled ones. Omit for either.""" enabled: Boolean } """One page of device credentials.""" type DeviceCredentialSearchResults { """The credentials on this page.""" results: [DeviceCredential!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ One append-only record of a physical unit swap: the failed hardware was retired and a new unit bound to the same logical device identity, so the device's events, alarms, relationships, group membership and command vocabulary carry forward unbroken. Written only by replaceDevice; it can be neither updated nor deleted and carries no token. """ type DeviceReplacement { """Server-assigned numeric identifier, as a string.""" id: ID! """When the record was written, as an RFC 3339 timestamp.""" createdAt: String # The logical identity that survived the swap - unchanged by the operation. """The logical device identity that survived the swap, unchanged by it.""" device: Device! """ When the replacement was applied, as an RFC 3339 timestamp from the server's clock. Never supplied by the caller. """ occurredTime: String! """ The authenticated subject that performed the replacement, taken from the caller's token rather than the request. """ actor: String! """The operator's free-text note, for example water ingress or an RMA number. Null when none was given.""" reason: String """ The incoming physical unit's own identifier, such as a manufacturer serial or IMEI. Recorded here and deliberately not written onto the device's external id, which is the stable business key of the logical thing and survives a swap. Null when none was given. """ unitIdentifier: String """ Tokens of the credential records this replacement disabled. Tokens rather than credential ids, because the id of an ACCESS_TOKEN credential is the device's token. """ retiredCredentialTokens: [String!]! """Token of the credential record minted for the incoming unit.""" newCredentialToken: String! """Type of the credential minted for the incoming unit.""" newCredentialType: String! } """Criteria for listing device replacement records.""" input DeviceReplacementSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only the replacements of the device with this token. Omit for every device.""" device: String } """One page of device replacement records, newest first.""" type DeviceReplacementSearchResults { """The records on this page.""" results: [DeviceReplacement!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ One immutable revision of a device's configuration document: the values of the shared attribute keys its profile's active published version declares as device-visible. Revisions are append-only; a new one is minted only when the document changes. """ type DeviceConfigurationRevision { """ The revision number: 1 for the device's first document and one higher for each later one. A number is never reused for the same device. """ revision: Int! """ "sha256:" followed by the lowercase hex SHA-256 of the document bytes. A device converges on a revision by reporting this revision number and this digest. A device hashes the bytes it receives and never re-serializes them to check the digest. """ digest: String! """ The document as canonical JSON text: an object of declared key to typed value with keys sorted. These are exactly the bytes the digest covers. """ document: String! """ When the revision was minted. """ createdAt: String """ The authenticated subject whose attribute change minted the revision; empty when none was recorded. """ actor: String! } """ The configuration state a device last reported. Written only from the device's own reports; no mutation sets it. """ type DeviceConfigurationReport { """ The revision the device reported, or null when it has not reported one. """ revision: Int """ The digest the device reported for that revision. """ digest: String """ RECEIVED, APPLIED or REJECTED. """ status: String """ The device's reasons for a REJECTED report; empty otherwise. """ errors: [String!]! """ When the device made the report. """ reportedAt: String """ When the device last asked for its configuration. """ lastSyncAt: String } """ A device's configuration: the latest revision it should hold, what it last reported, and whether the two agree. """ type DeviceConfiguration { """ The latest minted revision, or null when none has been minted for this device. """ desired: DeviceConfigurationRevision """ The device's last report, or null when it has never reported. """ reported: DeviceConfigurationReport """ True when a revision exists and the device has not reported APPLIED for that same revision with that same digest. Equal values under a different revision or digest do not count as applied. """ pending: Boolean! """ True when the document the device's current profile declaration and shared attributes would build differs from the latest revision - for example after a profile publish declared new keys. A newer revision is minted when a declared key is next written or the device next synchronizes. """ stale: Boolean! """ The device's shared attribute keys that its declaration does not name. They are never part of the document. """ undeclared: [String!]! """ Declared keys whose stored value cannot be carried as the declared value type (written with another type, or unparseable). They are left out of the document. """ invalid: [String!]! } """ A page of a device's configuration revisions, newest first. """ type DeviceConfigurationRevisionSearchResults { """ The revisions on this page, highest revision number first. """ results: [DeviceConfigurationRevision!]! """ Where this page sits in the device's whole revision history. """ pagination: SearchResultsPagination! } """ What a caller sends to swap the physical unit behind a device identity. It carries no device identity fields on purpose: there is no token, external id, device type or name, so a replacement cannot move the identity, the business key or the profile binding. Rotate credentials, not identity. """ input DeviceReplaceRequest { """Token of the surviving logical device. An unknown token is refused.""" deviceToken: String! """Type of the credential minted for the incoming unit. Defaults to ACCESS_TOKEN.""" credentialType: String """ The identifier the new unit presents at connect time. Optional only for ACCESS_TOKEN, where a random token is minted and returned once in newCredential; required for every other type, since the server cannot invent an MQTT username. """ credentialId: String # Secret material for types that carry one separately (an MQTT password). # Write-only, as on any credential. """ The password for an MQTT_BASIC credential: at least 16 bytes, counted as sent, and at most 4096. A shorter one is refused with extensions.code INVALID_VALUE. Write-only; it is stored only as a keyed digest. A password set before the 16-byte minimum keeps working until it is next changed. """ credentialValue: String """Token for the new credential record. A UUID is generated when omitted.""" credentialToken: String """When the new credential stops authenticating, as an RFC 3339 timestamp. Omit for never.""" expiresAt: String """ The operator's free-text note, for example water ingress or an RMA number. Recorded on the replacement. """ reason: String """ The incoming physical unit's own identifier, such as a manufacturer serial or IMEI. Recorded on the replacement, not on the device. """ unitIdentifier: String } """What replaceDevice returns.""" type DeviceReplaceResult { """The surviving device identity, unchanged.""" device: Device! """The append-only record this call wrote.""" replacement: DeviceReplacement! """ The credential minted for the incoming unit. This is the one moment the material the new unit must be programmed with can be read: an access token is stored only as a digest and cannot be read again, so copy it from here. """ newCredential: DeviceCredential! """ Tokens of the credential records this call disabled. Tokens only: the records themselves stay behind the credential queries. """ retiredCredentialTokens: [String!]! } """ A device provisioning profile: the shared key and secret a fleet presents to register itself at the provisioning registration endpoint, the strategy that decides whether unknown devices may be created, and the device type stamped onto auto-created devices. The provision secret is generated by the server, returned once by createProvisioningProfile and rotateProvisioningProfileSecret, and never exposed on this type: only its digest is stored. """ type ProvisioningProfile implements Model & TokenReference & NamedEntity & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a profile by its token instead where you can. """ id: ID! """When the profile was created, as an RFC 3339 timestamp.""" createdAt: String """When the profile was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted profile is removed outright and is not returned.""" deletedAt: String """Identifier of the profile, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The key a fleet presents, with the provision secret, to register itself. Unique within the tenant.""" provisionKey: String! """ Whether unknown devices may be created. ALLOW_NEW registers a device that does not exist yet and adopts an earmarked one; CHECK_PRE_PROVISIONED registers only earmarked devices that already exist. Neither adopts a device that was not earmarked for the profile. """ strategy: String! """The device type of every device the profile registers, and the only type it will adopt.""" deviceType: DeviceType! """ The type of credential the profile issues to the devices it registers: ACCESS_TOKEN for a profile that authenticates by secret, X509_CERTIFICATE for a certificate profile. """ credentialType: String! """Whether the profile accepts registrations. A disabled profile refuses them.""" enabled: Boolean! """ When the profile stops accepting registrations, as an RFC 3339 timestamp. Null means it never expires. """ expiresAt: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The most devices the profile may register, or null for no cap. Devices holding a credential the profile issued count, revoked ones included, until their provisioning is reset or they are deleted. """ maxDevices: Int """How many devices hold a credential the profile issued, counted against maxDevices.""" provisionedDeviceCount: Int! """ False for a profile whose secret was chosen by an operator (every profile created before the server generated secrets). The registration endpoint refuses such a profile with PROVISIONING_FAILED until rotateProvisioningProfileSecret issues it a secret. Always false for a certificate profile, which has no secret. """ secretIssued: Boolean! """ The trust anchor a certificate profile authenticates its devices against, or null for a profile that authenticates by secret. A certificate profile has no provision secret. """ trustAnchor: DeviceTrustAnchor } """ A provisioning profile together with the provision secret the server just generated for it. The secret is in the response to the write that issued it and nowhere else: the platform stores only a digest, so it cannot be read again. Rotate it if it is lost. """ type ProvisioningProfileSecretResult { """The profile the secret belongs to.""" profile: ProvisioningProfile! """ 43 characters, 256 bits. Show it to the operator once; devices present it, with the profile's provisionKey, to the registration endpoint. Null for a certificate profile, which has no secret. """ issuedSecret: String } """ Data required to create a provisioning profile. The provision secret is not chosen by the caller: the server generates it and returns it once in the response. """ input ProvisioningProfileCreateRequest { """Identifier for the new profile, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """ The key a fleet presents to register itself. Refused when empty or whitespace-only, and unique within the tenant. A padded value is stored exactly as sent. """ provisionKey: String! """ ALLOW_NEW registers a device that does not exist yet and adopts an earmarked one; CHECK_PRE_PROVISIONED registers only earmarked devices that already exist. Neither adopts a device that was not earmarked for the profile. """ strategy: String! """ Token of the device type of every device the profile registers, and the only type it will adopt. An unknown token is refused. """ deviceTypeToken: String! """ Type of credential to issue. When sent it must be a type provisioning can mint; for a certificate profile it must be X509_CERTIFICATE. """ credentialType: String """Whether the profile accepts registrations.""" enabled: Boolean! """When the profile stops accepting registrations, as an RFC 3339 timestamp. Omit for never.""" expiresAt: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """The most devices the profile may register; at least 1. Omit or send null for no cap.""" maxDevices: Int """ Makes this a certificate profile: its devices authenticate by a client certificate whose chain reaches this trust anchor, and it has no provision secret. credentialType, when sent, must be X509_CERTIFICATE. A tenant may hold eight certificate profiles. A device earmarked for one must have the token derived from its externalId, and takes it when the token is left empty. """ trustAnchorToken: String } """ A partial update of a provisioning profile. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. The token is not here because the mutation's token argument names the profile. The credential type cannot be edited and the secret is replaced only by rotateProvisioningProfileSecret. """ input ProvisioningProfileUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """ The key a fleet presents to register itself. Required: null is refused, because a blank key authenticates nothing. The secret is not editable here; rotateProvisioningProfileSecret replaces it. """ provisionKey: String """ ALLOW_NEW or CHECK_PRE_PROVISIONED. Required: null is refused. Validated against the known strategies when sent. """ strategy: String """ Device type stamped onto auto-created devices. Null is refused, and an unknown token refuses the whole update. """ deviceTypeToken: String # credentialType is deliberately absent. Provisioning can mint exactly one credential # type today (ACCESS_TOKEN), so every stored value is that one and an update naming # the field could only restate it or be refused — a field with no useful request does # not belong in an update input. It returns additively when a second type is mintable. """Whether the profile accepts registrations. Null is refused rather than read as false.""" enabled: Boolean """ When the profile stops accepting registrations, as an RFC 3339 timestamp. Null, or an empty string, means never expires. """ expiresAt: String """ The most devices the profile may register; at least 1. Null removes the cap. Lowering it below the number already registered only refuses further registrations. """ maxDevices: Int """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Re-points a certificate profile at another trust anchor. Null is refused, and so is naming an anchor on a profile that authenticates by secret. """ trustAnchorToken: String } """Criteria for listing provisioning profiles. Every facet is optional and they AND together.""" input ProvisioningProfileSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only profiles that register devices of the device type with this token.""" deviceType: String """Only profiles with this strategy: ALLOW_NEW or CHECK_PRE_PROVISIONED.""" strategy: String """True selects enabled profiles and false disabled ones. Omit for either.""" enabled: Boolean } """One page of provisioning profiles.""" type ProvisioningProfileSearchResults { """The profiles on this page.""" results: [ProvisioningProfile!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A CA certificate a tenant trusts to vouch for its devices' client certificates. It is public material. An X509_CERTIFICATE credential, and a certificate provisioning profile, name the anchor their chain must reach, and it is checked at EVERY connect: disabling the anchor withdraws the CA at once and ends the live sessions of the devices that rely on it. A root or an intermediate may be an anchor; anchor at the narrowest intermediate to trust one sub-CA of a manufacturer's PKI. Name constraints on an anchor or on any CA below it are not supported and are refused: identity is the certificate's subject common name, which name constraints do not cover. """ type DeviceTrustAnchor implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string.""" id: ID! """When the anchor was created, as an RFC 3339 timestamp.""" createdAt: String """When the anchor was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted anchors are not returned by this API.""" deletedAt: String """Identifier of the anchor, unique within the tenant.""" token: String! """Human-readable name. Null when none is set.""" name: String """Free-text description. Null when none is set.""" description: String """Free-form JSON the platform stores and does not interpret. Null when none is set.""" metadata: String """The CA certificate, PEM.""" certificatePem: String! """SHA-256 of the certificate, hex. Unique within the tenant.""" fingerprintSha256: String! """The certificate's subject distinguished name.""" subject: String! """The certificate's issuer distinguished name; equal to the subject for a root.""" issuer: String! """When the certificate becomes valid, as an RFC 3339 timestamp.""" notBefore: String! """When the certificate expires, as an RFC 3339 timestamp. Chains to it stop authenticating then.""" notAfter: String! """False withdraws the CA: no chain to it authenticates, and the devices relying on it are disconnected.""" enabled: Boolean! """How many credentials rely on the anchor, soft-deleted ones included (they hold the delete refusal too).""" credentialCount: Int! """How many provisioning profiles authenticate against the anchor.""" profileCount: Int! """ How the anchor treats the completeness of its revocation lists. ENTRIES (the default) refuses every certificate a stored list or manual entry names and admits the rest, however old the lists are; REQUIRE_CURRENT also refuses a certificate whose issuer has no current list. """ revocationMode: CertificateRevocationMode! """ How long past a list's nextUpdate it still counts as current under REQUIRE_CURRENT, as a Go duration (for example "24h0m0s"). The instance default when the anchor sets none. """ revocationStaleGrace: String! """The current CRL of each issuer the anchor holds one for.""" revocationLists: [DeviceRevocationList!]! """ The worst freshness over the anchor's lists: NONE when it holds no list, otherwise the most stale of them. """ revocationStatus: RevocationStatus! """ Whether, and how strictly, a certificate's status is also asked of its issuer's online OCSP responder when a device connects. OFF (the default) asks nothing and sends no request. """ ocspMode: CertificateOcspMode! """ The responder every OCSP request for this anchor goes to, in place of each certificate's own Authority Information Access entry. Null when the certificates' own entries are used. """ ocspResponderUrl: String } """Data required to create a trust anchor.""" input DeviceTrustAnchorCreateRequest { """Identifier of the anchor, unique within the tenant.""" token: String! """Human-readable name.""" name: String """Free-text description.""" description: String """ Exactly one CA certificate in PEM: it must be a CA that may sign certificates, unexpired, use an RSA (2048 to 8192 bits), P-256, P-384 or Ed25519 key, be signed with a modern hash, and carry no name constraints. A private key anywhere in the text is refused. A tenant may hold 32 anchors. """ certificatePem: String! """Defaults to true.""" enabled: Boolean """Free-form JSON the platform stores and does not interpret.""" metadata: String } """ A PARTIAL update: omit a field to leave it, send null to clear a nullable one. The certificate cannot be changed (another CA is another anchor). """ input DeviceTrustAnchorUpdateRequest { """Human-readable name. Null clears it.""" name: String """Free-text description. Null clears it.""" description: String """ Required and unclearable. Setting it false ends the live sessions of the devices that rely on the anchor; if that cannot be confirmed the change is saved and the call answers that the sessions were not confirmed ended, and repeating it asks again. """ enabled: Boolean """Free-form JSON the platform stores and does not interpret. Null clears it.""" metadata: String """ Required and unclearable. Switching to REQUIRE_CURRENT is refused while the anchor holds no current revocation list, or a registered certificate under it was issued by a CA that has none: the switch would refuse every such device. """ revocationMode: CertificateRevocationMode """ A Go duration of whole seconds, 0s to 168h. Null restores the instance default. While the anchor is in REQUIRE_CURRENT, a change is refused if it would leave an issuer without a current list. """ revocationStaleGrace: String """ Required and unclearable. OFF asks no responder. ENFORCE_KNOWN and REQUIRE_CURRENT are refused while the instance's OCSP switch is off; REQUIRE_CURRENT is refused unless the instance allows it, and needs ocspResponderUrl. """ ocspMode: CertificateOcspMode """ An http or https URL, without credentials, that replaces each certificate's own responder. Null clears it. The address it resolves to must be one the instance's egress policy allows. """ ocspResponderUrl: String } """How an anchor treats the completeness of its revocation lists.""" enum CertificateRevocationMode { """A listed certificate is refused; an issuer with no list, or a stale one, is allowed.""" ENTRIES """A listed certificate is refused, and so is one whose issuer has no current list.""" REQUIRE_CURRENT } """ How an anchor uses its issuers' OCSP responders at connect. A certificate a responder says is revoked is always refused (a verified revoked answer for any certificate on any verified path wins); the modes differ in what an answer that could not be had means. """ enum CertificateOcspMode { """No responder is asked. The default for every anchor.""" OFF """ A revoked answer refuses; a status that could not be learned (a timeout, an unreachable or refused responder, an unusable answer) is ADMITTED and counted. Availability over completeness. """ ENFORCE_KNOWN """ A revoked answer refuses, and so does a certificate whose status could not be confirmed current. A responder outage refuses new connects once cached answers expire. """ REQUIRE_CURRENT } """How fresh a stored revocation list is.""" enum RevocationStatus { """No list is stored.""" NONE """Less than three quarters of the list's validity has passed.""" FRESH """Three quarters of its validity have passed, or nextUpdate has passed within the grace: push the next list.""" EXPIRING """nextUpdate and the grace have both passed: REQUIRE_CURRENT no longer counts the list as current.""" STALE } """ The current CRL of one issuer under a trust anchor. Its entries are listed through deviceRevokedCertificates. """ type DeviceRevocationList { """The CRL signer's subject, for display.""" issuerSubject: String! """SHA-256 of the signer's public key, hex. With issuerName, identifies the issuer.""" issuerKey: String! """SHA-256 of the signer's subject, hex.""" issuerName: String! """The CRL number, as a decimal string (up to 20 octets).""" crlNumber: String! """The CRL's thisUpdate, as an RFC 3339 timestamp.""" thisUpdate: String! """The CRL's nextUpdate, as an RFC 3339 timestamp.""" nextUpdate: String! """How many certificates the list revokes.""" entryCount: Int! """SHA-256 of the CRL's DER, hex.""" crlSha256: String! """UPLOAD.""" source: String! """The list's freshness now.""" status: RevocationStatus! } """The outcome of storing a revocation list.""" type DeviceRevocationListResult { """The list now in force for the issuer.""" list: DeviceRevocationList! """How many certificates the list revokes that the issuer's previous list did not.""" newlyRevoked: Int! """True when this very CRL was already the current list and nothing was written.""" unchanged: Boolean! """ True when the live broker sessions of the devices the list newly revokes were confirmed ended. False when the list is stored and new connects are refused, but a session already open could not be confirmed ended: the retry (automatic, and on repeating the upload, which is idempotent) ends it, or its token expires. """ sessionsEnded: Boolean! } """ Why a certificate was revoked (RFC 5280 section 5.3.1). A manual revocation that names none is UNSPECIFIED. """ enum CertificateRevocationReason { """No reason given.""" UNSPECIFIED """The certificate's private key is known or suspected to be compromised.""" KEY_COMPROMISE """The key of the CA that issued the certificate is known or suspected to be compromised.""" CA_COMPROMISE """The subject changed affiliation; the certificate no longer applies, and its key is not compromised.""" AFFILIATION_CHANGED """The certificate was replaced by another.""" SUPERSEDED """The certificate is no longer needed because its subject ceased operating.""" CESSATION_OF_OPERATION """The certificate is suspended, not permanently revoked.""" CERTIFICATE_HOLD """A privilege the certificate granted was withdrawn.""" PRIVILEGE_WITHDRAWN """The key of an attribute authority is known or suspected to be compromised.""" AA_COMPROMISE } """ One revoked certificate in a trust anchor's revocation store. A MANUAL entry names a certificate by fingerprint and refuses it wherever it appears on a verified path (a leaf or an intermediate), registered or not, whatever later becomes of its credential or its device. """ type DeviceRevokedCertificate { """MANUAL (revoked here, by fingerprint) or CRL (from a stored CA revocation list).""" kind: String! """SHA-256 of the certificate, hex. Set on a MANUAL entry.""" fingerprintSha256: String """SHA-256 of the issuing CA's public key, hex. Set on a CRL entry.""" issuerKey: String """The certificate's serial number, hex. Set on a CRL entry.""" serial: String """Why it was revoked.""" reason: CertificateRevocationReason! """When it was revoked, as an RFC 3339 timestamp.""" revokedAt: String! """ Set only on the result of revokeDeviceCertificate, null everywhere else. True when the live broker sessions of the devices the revocation affects were confirmed ended. False when the revocation is saved and new connects are refused, but a session already open could not be confirmed ended: it may still be publishing until the retry (automatic, and on repeating the mutation, which is idempotent) ends it, or its token expires. """ sessionsEnded: Boolean } """Criteria used when listing the revoked certificates of a trust anchor.""" input DeviceRevokedCertificateSearchCriteria { """1-based page number.""" pageNumber: Int! """Entries per page.""" pageSize: Int! """Only MANUAL or only CRL entries.""" kind: String } """A page of revoked certificates.""" type DeviceRevokedCertificateSearchResults { """The entries on this page.""" results: [DeviceRevokedCertificate!]! """Where this page sits in the whole result.""" pagination: SearchResultsPagination! } """Criteria used when searching for trust anchors.""" input DeviceTrustAnchorSearchCriteria { """1-based page number.""" pageNumber: Int! """Anchors per page.""" pageSize: Int! """Only anchors that are (or are not) enabled.""" enabled: Boolean } """A page of trust anchors.""" type DeviceTrustAnchorSearchResults { """The anchors on this page.""" results: [DeviceTrustAnchor!]! """Where this page sits in the whole result.""" pagination: SearchResultsPagination! } """ An inbound integration: a tenant's authenticated sender of device data over HTTP, such as a LoRaWAN network server or a webhook. It holds the bearer token the sender presents, the kind of body it sends, and the device types it may resolve devices of. The token is generated by the server, returned once by createIntegration and rotateIntegrationToken, and never exposed on this type: only a keyed digest of it is stored. """ type Integration implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier, as a string.""" id: ID! """When the integration was created, as an RFC 3339 timestamp.""" createdAt: String """When the integration was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted integrations are not returned by this API.""" deletedAt: String """ Identifier of the integration, unique within the tenant. It is part of the URL the sender posts to. """ token: String! """Human-readable name. Null when none is set.""" name: String """Free-text description. Null when none is set.""" description: String """Free-form JSON the platform stores and does not interpret. Null when none is set.""" metadata: String """ The kind of sender, which fixes the body format its route parses: CHIRPSTACK_V4, TTS_V3, GENERIC_JSON or GENERIC_BINARY. It cannot be changed after creation. """ type: String! """False while an operator has switched the integration off: its token authenticates, and nothing resolves through it.""" enabled: Boolean! """ How the sender names a device: DEV_EUI, DEVICE_ID, or ALIAS:custom.name for a generic sender. """ identity: String! """ A generic sender's settings as a JSON object: where the device identifier is (idFrom), and optionally an array of items (itemsPointer), the sender's own time (timePointer) and an encoded raw frame (framePointer, frameEncoding). Null for the other types. """ generic: String """Whether the receive-link readings (signal strength, signal-to-noise ratio, gateway count) are stored beside the decoded values.""" linkMetrics: Boolean! """ The device types the integration may resolve devices of. A device of any other type is refused, whatever the sender claims. """ deviceTypes: [DeviceType!]! """When the bearer token was last generated: at creation and at every rotation.""" tokenIssuedAt: String! """How many uplinks arrived with nothing to read readings from.""" undecodedCount: Int! """When the last such uplink arrived.""" lastUndecodedAt: String """Up to 512 bytes of the last such frame, hex encoded.""" lastUndecodedSample: String """When a request for this integration last failed authentication.""" lastAuthFailureAt: String } """ An integration together with the bearer token the server just generated for it. The token is in the response to the write that issued it and nowhere else: the platform stores only a digest, so it cannot be read again. Rotate it if it is lost. """ type IntegrationSecretResult { """The integration the token belongs to.""" integration: Integration! """ 43 characters, 256 bits. Show it to the operator once; the sender presents it as Authorization: Bearer. """ issuedToken: String! } """Data required to create an integration.""" input IntegrationCreateRequest { """Identifier of the integration, unique within the tenant. It is part of the sender's URL.""" token: String! """Human-readable name.""" name: String """Free-text description.""" description: String """CHIRPSTACK_V4, TTS_V3, GENERIC_JSON or GENERIC_BINARY.""" type: String! """Whether the integration accepts traffic. A disabled integration can be enabled later.""" enabled: Boolean! """Tokens of the device types the integration may resolve devices of; at least one, at most 50.""" deviceTypeTokens: [String!]! """ DEV_EUI (the default) for CHIRPSTACK_V4; DEV_EUI (the default) or DEVICE_ID for TTS_V3; required, as ALIAS:custom.name, for the generic types. """ identity: String """ The generic settings as a JSON object. Required for the generic types and refused for the others. idFrom is pointer:/path, header:Name or query:name; a binary body can only name a header or a query value. """ generic: String """Store the receive-link readings beside the decoded values. Defaults to false.""" linkMetrics: Boolean """Free-form JSON the platform stores and does not interpret.""" metadata: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field and no `type` field: the record is identified by the # mutation's `token` argument, and the sender kind is fixed at creation. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. """A partial update of an integration. Omitted fields keep their stored value.""" input IntegrationUpdateRequest { """Human-readable name. Null clears it.""" name: String """Free-text description. Null clears it.""" description: String """Required and unclearable.""" enabled: Boolean """Replaces the scope. At least one device type; null is refused.""" deviceTypeTokens: [String!] """Required and unclearable; validated against the integration's type.""" identity: String """Replaces the generic settings; refused for the network-server types, and null is refused for the generic ones.""" generic: String """Required and unclearable.""" linkMetrics: Boolean """Free-form JSON the platform stores and does not interpret. Null clears it.""" metadata: String } """Criteria used when searching for integrations.""" input IntegrationSearchCriteria { """1-based page number.""" pageNumber: Int! """Rows per page.""" pageSize: Int! """Return only integrations of this type.""" type: String """Return only integrations that are enabled (true) or disabled (false).""" enabled: Boolean """Return only integrations whose scope includes the device type with this token.""" deviceType: String } """A page of integrations.""" type IntegrationSearchResults { """The integrations on this page.""" results: [Integration!]! """Where this page sits in the whole result.""" pagination: SearchResultsPagination! } """What resolveIntegrationDevice concluded.""" enum IntegrationDeviceOutcome { """The alias names a device whose type is in the integration's scope.""" RESOLVED """ No device in scope carries the alias. The sighting was recorded, unless a device outside the integration's scope holds the alias, in which case it reads the same but nothing is recorded: that value is not an unregistered device, and creating a device with it would be refused. """ UNREGISTERED """ The token matched an integration that an operator has switched off. This is not a failed credential: nothing is resolved or recorded. """ DISABLED """No such integration, or the token did not match. One answer to both.""" UNAUTHENTICATED } """What the ingest path needs to know about the payload decoder of a device type.""" type IntegrationDecoderPlan { """ Whether the active published version declares a decoder. True also when this build cannot run it: such an uplink must still reach the resolver, which records the failure. """ present: Boolean! """The input an uplink must carry for the decoder to run; null when there is no decoder.""" input: PayloadDecoderInput """The most readings one decode produces; 0 when there is no decoder this build can run.""" maxReadings: Int! """The decoder's static worst-case cost; 0 when there is no decoder this build can run.""" estimatedCost: Int! """ The part of estimatedCost that does not depend on the size of the uplink: the decoder's expressions alone. The ingest charge adds the parse of the inputs the decoder reads at their actual sizes. 0 when there is no decoder this build can run. """ composedCost: Int! """Whether the decoder reads the generic item's JSON, which is parsed and priced by size.""" parsesJson: Boolean! """Whether the decoder reads the network server's decoded object, parsed and priced by size.""" parsesDecoded: Boolean! """The profile version the answer is for, as "{profile}@{version}"; empty when there is no decoder.""" profileVersionToken: String! } """What the ingest path needs to know about the payload decoder of a device's type.""" type DeviceDecoderPlan { """Whether the active published version declares a decoder, usable or not.""" present: Boolean! """The input an uplink must carry for the decoder to run; null when there is no decoder.""" input: PayloadDecoderInput """The most readings one decode produces; 0 when there is no decoder this build can run.""" maxReadings: Int! """The part of the static worst-case cost that does not depend on the size of the uplink.""" composedCost: Int! """Whether the decoder reads the JSON body, parsed and priced by size.""" parsesJson: Boolean! """The profile version the answer is for, as "{profile}@{version}"; empty when there is no decoder.""" profileVersionToken: String! } """The answer to resolveIntegrationDevice.""" type IntegrationDeviceResolution { """What happened.""" outcome: IntegrationDeviceOutcome! """Token of the device the alias names. Set only when the outcome is RESOLVED.""" deviceToken: String """Token of that device's type. Set only when the outcome is RESOLVED.""" deviceTypeToken: String """ True when the outcome is UNREGISTERED and the sighting was not stored because the integration already records 1000 distinct unregistered devices. """ overflow: Boolean! } """ A device a sender named that no device of the tenant carries an alias for, as an integration saw it. Create a device of a type in the integration's scope with this alias to start resolving it; the sighting then disappears. Values some device already holds are never listed, and clearUnregisteredIntegrationDevices empties the list. """ type UnregisteredIntegrationDevice { """Server-assigned numeric identifier, as a string.""" id: ID! """Token of the integration that saw it.""" integration: String! """The alias scheme the sender's identifier is in.""" scheme: String! """The sender's identifier in its stored spelling.""" value: String! """When it was first seen, as an RFC 3339 timestamp.""" firstSeen: String! """When it was last seen, as an RFC 3339 timestamp.""" lastSeen: String! """How many times it has been seen.""" count: Int! } """Which integration's unregistered devices to return, and the page. Most recently seen first.""" input UnregisteredIntegrationDeviceSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Token of the integration. An unknown token matches nothing.""" integration: String! } """A page of unregistered devices.""" type UnregisteredIntegrationDeviceSearchResults { """The unregistered devices on this page.""" results: [UnregisteredIntegrationDevice!]! """Where this page sits in the whole result.""" pagination: SearchResultsPagination! } """ A device's possession claim: a one-time, optionally expiring secret that an eventual owner presents to assign the device to a customer. The claim secret is write-only and is never exposed on this type; only a keyed digest is stored. """ type DeviceClaim implements Model { """Server-assigned numeric identifier, as a string.""" id: ID! """When the claim was first opened, as an RFC 3339 timestamp.""" createdAt: String """When the claim was last written, as an RFC 3339 timestamp.""" updatedAt: String """When the claim was deleted, as an RFC 3339 timestamp; null for a live claim.""" deletedAt: String """The device the claim is on. A device has a single claim, which initiating again reopens.""" device: Device! """ OPEN while the claim can be redeemed, CLAIMED once it has been redeemed, CANCELED once it was closed without assigning the device. """ status: String! """ When the claim stops being redeemable, as an RFC 3339 timestamp. Null means it does not expire. Redeeming an expired claim is refused. """ expiresAt: String """When the claim was redeemed, as an RFC 3339 timestamp. Null unless the claim has been redeemed.""" claimedTime: String """ The customer the device was assigned to when the claim was redeemed. Null unless the claim has been redeemed. """ claimedByCustomer: Customer } """ Data required to open, or reopen, a device claim. Reopening a claimed or canceled device, for example after resale, clears the earlier redemption record. """ input DeviceClaimInitiateRequest { """Token of the device to open a claim on. An unknown token is refused.""" deviceToken: String! """ The secret an eventual owner must present to redeem the claim. Refused when empty or whitespace- only; at most 256 bytes, taken exactly as sent. Stored only as a keyed digest and never returned. """ claimSecret: String! """When the claim stops being redeemable, as an RFC 3339 timestamp. Omit for no expiry.""" expiresAt: String } """ Data required to redeem a device claim: the device, the claim secret as proof of possession, the customer to assign the device to, and the relationship type of the resulting device-to-customer edge. Redeeming is one-time: a concurrent or repeated redemption of the same claim fails. """ input DeviceClaimRequest { """Token of the device being claimed.""" deviceToken: String! """The claim secret that proves possession. It must match the secret the claim was opened with.""" claimSecret: String! """Token of the customer to assign the device to. An unknown token is refused.""" customerToken: String! """ The relationship type of the edge the claim writes. Omit it to use the built-in tracked "assigned" type, which is what makes the device belong to the customer: only a tracked relationship counts as ownership, so a device claimed with an untracked type is not visible to members limited to that customer. """ relationshipType: String } """ A type, or class, of assets: configuration shared by every asset that references it. An asset type may declare a property contract: a typed schema its assets' property documents are validated against. The contract is drafted on the type and takes effect only when published as a version. """ type AssetType implements Model & TokenReference & NamedEntity & BrandedEntity & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a asset type by its token instead where you can. """ id: ID! """When the asset type was created, as an RFC 3339 timestamp.""" createdAt: String """When the asset type was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted asset types are not returned.""" deletedAt: String """Identifier of the asset type, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """URL of an image representing the asset type, up to 512 characters. Null when none is set.""" imageUrl: String """ Name of an icon representing the asset type, up to 128 characters. Not checked against any icon set. Null when none is set. """ icon: String """ Background colour to display the asset type with, up to 32 characters. Not validated. Null when none is set. """ backgroundColor: String """ Foreground (text) colour to display the asset type with, up to 32 characters. Not validated. Null when none is set. """ foregroundColor: String """ Border colour to display the asset type with, up to 32 characters. Not validated. Null when none is set. """ borderColor: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The draft property contract for assets of this type: a JSON array of typed field descriptors in declaration order, in the same descriptor shape a command definition uses for its parameters. Null when the type declares none. Editing it changes nothing an asset is validated against until the type is published. """ propertySchema: String """ The published version that assets of this type are validated against. Null when the type has never been published, in which case an asset of the type may carry no properties at all. """ activeVersion: Int """ The classes this type's draft is, as terms of the vocabularies the tenant has enabled (a published version freezes its own copy); empty when it is bound to none. Each carries its expanded IRI and a display CURIE. Null only when the terms could not be rendered, with an error saying why. """ semanticTypes: [SemanticTerm!] } """ An immutable published snapshot of an asset type's property contract. Assets are validated against the type's active version, never its draft, so publishing is what makes a contract binding. History is append-only: a rollback re-points the active version and deletes nothing. """ type AssetTypeVersion { """Version number, increasing per type.""" version: Int! """Optional label given at publish. It may embed a semantic version string, which is not parsed.""" label: String """Optional description of what the version changes. Null when none was given.""" description: String """When the version was published, as an RFC 3339 timestamp.""" publishedAt: String! """The identity that published the version. Null when not recorded.""" publishedBy: String """ The property contract this version froze, in the same JSON form as AssetType.propertySchema. Exposed so an author can see what a version froze before deciding to roll back to it. """ propertySchema: String! """ The classes the type was bound to when this version was published; empty when it was bound to none, and for every version published before the semantic layer existed. Rolling back to this version restores them onto the type. Null only when the terms could not be rendered, with an error saying why. """ semanticTypes: [SemanticTerm!] """ The vocabulary versions the frozen classes were validated against; empty when none were bound. Null only when the stored record could not be read, with an error saying why. """ semanticPackVersions: [SemanticPackVersion!] } """Data required to create an asset type.""" input AssetTypeCreateRequest { """Identifier for the new asset type, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """URL of an image representing the asset type, up to 512 characters.""" imageUrl: String """Name of an icon representing the asset type, up to 128 characters. Not checked against any icon set.""" icon: String """Background colour to display the asset type with, up to 32 characters. Not validated.""" backgroundColor: String """Foreground (text) colour to display the asset type with, up to 32 characters. Not validated.""" foregroundColor: String """Border colour to display the asset type with, up to 32 characters. Not validated.""" borderColor: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ The draft property contract, as on AssetType.propertySchema. Refused if it is not a JSON array of descriptors, if it carries a key no descriptor declares (so a mistyped key is refused rather than dropped), or if it declares a contract nothing could satisfy, such as a duplicate name, an unknown data type or a default outside its own enum. """ propertySchema: String """ The classes an entity of this type is, as CURIEs (for example sdm-streetlighting:Streetlight) or full IRIs inside an enabled vocabulary. Each must be a CLASS of a pack the tenant has enabled, or a term under a custom prefix it declared; at most 8. A term outside the enabled vocabularies, of the wrong kind, deprecated, or malformed fails the request with INVALID_ARGUMENT naming it. Stored as expanded IRIs. Omit for none. """ semanticTypes: [String!] } # A PARTIAL update to an asset type: omit a field to leave it alone, send null to # clear it, send a value to set it. There is no `token` member — the mutation's own # `token` argument names the row, so a token move is unrepresentable. It used to be # the payload token that named the row, with the argument ignored, so a request # whose two tokens disagreed silently updated the one in the payload. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of an asset type. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input AssetTypeUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """Image URL; null clears it.""" imageUrl: String """Icon name; null clears it.""" icon: String """Background colour; null clears it.""" backgroundColor: String """Foreground colour; null clears it.""" foregroundColor: String """Border colour; null clears it.""" borderColor: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Replaces the draft property contract wholesale; null withdraws it. Omit to keep the stored draft. Validated as on create, and a refusal writes nothing. """ propertySchema: String """ New classes, replacing the stored ones: null or an empty list clears them. Omit to leave them alone. Validated as on create; only a request that names this field is validated. """ semanticTypes: [String!] } """Criteria for listing asset types.""" input AssetTypeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of asset types.""" type AssetTypeSearchResults { """The asset types on this page.""" results: [AssetType!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ An asset: a physical or logical thing that devices can be assigned to, such as a pump, a vehicle or a building system, optionally carrying a property document validated against its type's published contract. Assets can be arranged in a hierarchy. """ type Asset implements Model & TokenReference & NamedEntity & MetadataEntity & Entity { """ Server-assigned numeric identifier, as a string. Address an asset by its token instead where you can. """ id: ID! """When the asset was created, as an RFC 3339 timestamp.""" createdAt: String """When the asset was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted assets are not returned.""" deletedAt: String """Identifier of the asset, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The asset type this asset is an instance of.""" assetType: AssetType! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The asset's property document: a JSON object whose keys are the properties its type's published contract declares. Null when the asset carries none. """ properties: String """ Where the asset was installed. Needs location:installed:read (location:read includes it). Null for a caller without it, and null when no position was recorded. """ installedPosition: InstalledPosition """ Whether installedPosition is withheld from this caller; it concerns the installed position only. True for every asset a caller without location:installed:read (or location:read) reads, whether or not the asset has an installed position. It depends on the caller alone. """ positionWithheld: Boolean! } """Data required to create an asset.""" input AssetCreateRequest { """Identifier for the new asset, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Token of the asset type to create it under. An unknown token is refused.""" assetTypeToken: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ The asset's property document, validated against the asset type's active published contract before anything is written. Refused when the type has no published contract, when a key is not declared, when a value does not fit its declared type, bounds or allowed values, or when a required property is missing; a refusal is total, so no asset is created. """ properties: String } # A PARTIAL update to an asset: omit a field to leave it alone, send null to clear # it, send a value to set it. There is no `token` member — see AssetTypeUpdateRequest. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of an asset. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input AssetUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String # Re-points the asset at a different asset type. Omit to keep the current one. # Unlike DeviceTypeUpdateRequest.profileToken, NULL IS REFUSED here: every asset # must reference a type, so "no type" is not a state it can be in. An unknown # token is refused too, and the refusal is total — nothing is written. """ Re-points the asset at a different asset type. Omit to keep the current one. Null is refused, because every asset must reference a type, and so is an unknown token; a refusal writes nothing. """ assetTypeToken: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Replaces the asset's property document wholesale; null clears it. Omit to keep what is stored. Omitting it does not skip the check: moving to another asset type re-validates the properties the asset already carries against that type's contract. """ properties: String } """Criteria for listing assets.""" input AssetSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only assets of the asset type with this token. Omit for every asset.""" assetTypeToken: String } """One page of assets.""" type AssetSearchResults { """The assets on this page.""" results: [Asset!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """A type, or class, of customers: configuration shared by every customer that references it.""" type CustomerType implements Model & TokenReference & NamedEntity & BrandedEntity & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a customer type by its token instead where you can. """ id: ID! """When the customer type was created, as an RFC 3339 timestamp.""" createdAt: String """When the customer type was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted customer types are not returned.""" deletedAt: String """Identifier of the customer type, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """URL of an image representing the customer type, up to 512 characters. Null when none is set.""" imageUrl: String """ Name of an icon representing the customer type, up to 128 characters. Not checked against any icon set. Null when none is set. """ icon: String """ Background colour to display the customer type with, up to 32 characters. Not validated. Null when none is set. """ backgroundColor: String """ Foreground (text) colour to display the customer type with, up to 32 characters. Not validated. Null when none is set. """ foregroundColor: String """ Border colour to display the customer type with, up to 32 characters. Not validated. Null when none is set. """ borderColor: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The classes this type is, as terms of the vocabularies the tenant has enabled; empty when it is bound to none. Each carries its expanded IRI and a display CURIE. Null only when the terms could not be rendered, with an error saying why. """ semanticTypes: [SemanticTerm!] } """Data required to create a customer type.""" input CustomerTypeCreateRequest { """Identifier for the new customer type, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """URL of an image representing the customer type, up to 512 characters.""" imageUrl: String """ Name of an icon representing the customer type, up to 128 characters. Not checked against any icon set. """ icon: String """Background colour to display the customer type with, up to 32 characters. Not validated.""" backgroundColor: String """Foreground (text) colour to display the customer type with, up to 32 characters. Not validated.""" foregroundColor: String """Border colour to display the customer type with, up to 32 characters. Not validated.""" borderColor: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ The classes an entity of this type is, as CURIEs (for example sdm-streetlighting:Streetlight) or full IRIs inside an enabled vocabulary. Each must be a CLASS of a pack the tenant has enabled, or a term under a custom prefix it declared; at most 8. A term outside the enabled vocabularies, of the wrong kind, deprecated, or malformed fails the request with INVALID_ARGUMENT naming it. Stored as expanded IRIs. Omit for none. """ semanticTypes: [String!] } # A PARTIAL update to a customer type: omit a field to leave it alone, send null to # clear it, send a value to set it. There is no `token` member — the mutation's own # `token` argument names the row, so a token move is unrepresentable. It used to be # the payload token that named the row, with the argument ignored, so a request # whose two tokens disagreed silently updated the one in the payload. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of a customer type. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input CustomerTypeUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """Image URL; null clears it.""" imageUrl: String """Icon name; null clears it.""" icon: String """Background colour; null clears it.""" backgroundColor: String """Foreground colour; null clears it.""" foregroundColor: String """Border colour; null clears it.""" borderColor: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ New classes, replacing the stored ones: null or an empty list clears them. Omit to leave them alone. Validated as on create; only a request that names this field is validated. """ semanticTypes: [String!] } """Criteria for listing customer types.""" input CustomerTypeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of customer types.""" type CustomerTypeSearchResults { """The customer types on this page.""" results: [CustomerType!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A customer: an organisation or person that devices are assigned to. A member's access can be limited to the devices of particular customers. """ type Customer implements Model & TokenReference & NamedEntity & MetadataEntity & Entity { """ Server-assigned numeric identifier, as a string. Address a customer by its token instead where you can. """ id: ID! """When the customer was created, as an RFC 3339 timestamp.""" createdAt: String """When the customer was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted customers are not returned.""" deletedAt: String """Identifier of the customer, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The customer type this customer is an instance of.""" customerType: CustomerType! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } """Data required to create a customer.""" input CustomerCreateRequest { """Identifier for the new customer, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Token of the customer type to create it under. An unknown token is refused.""" customerTypeToken: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } # A PARTIAL update to a customer: omit a field to leave it alone, send null to clear # it, send a value to set it. There is no `token` member — see CustomerTypeUpdateRequest. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of a customer. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input CustomerUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String # Re-points the customer at a different customer type. Omit to keep the current one. # Unlike DeviceTypeUpdateRequest.profileToken, NULL IS REFUSED here: every customer # must reference a type, so "no type" is not a state it can be in. An unknown # token is refused too, and the refusal is total — nothing is written. """ Re-points the customer at a different customer type. Omit to keep the current one. Null is refused, because every customer must reference a type, and so is an unknown token; a refusal writes nothing. """ customerTypeToken: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String } """Criteria for listing customers.""" input CustomerSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only customers of the customer type with this token. Omit for every customer.""" customerTypeToken: String } """One page of customers.""" type CustomerSearchResults { """The customers on this page.""" results: [Customer!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """A type, or class, of areas: configuration shared by every area that references it.""" type AreaType implements Model & TokenReference & NamedEntity & BrandedEntity & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a area type by its token instead where you can. """ id: ID! """When the area type was created, as an RFC 3339 timestamp.""" createdAt: String """When the area type was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted area types are not returned.""" deletedAt: String """Identifier of the area type, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """URL of an image representing the area type, up to 512 characters. Null when none is set.""" imageUrl: String """ Name of an icon representing the area type, up to 128 characters. Not checked against any icon set. Null when none is set. """ icon: String """ Background colour to display the area type with, up to 32 characters. Not validated. Null when none is set. """ backgroundColor: String """ Foreground (text) colour to display the area type with, up to 32 characters. Not validated. Null when none is set. """ foregroundColor: String """ Border colour to display the area type with, up to 32 characters. Not validated. Null when none is set. """ borderColor: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The classes this type is, as terms of the vocabularies the tenant has enabled; empty when it is bound to none. Each carries its expanded IRI and a display CURIE. Null only when the terms could not be rendered, with an error saying why. """ semanticTypes: [SemanticTerm!] } """Data required to create an area type.""" input AreaTypeCreateRequest { """Identifier for the new area type, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """URL of an image representing the area type, up to 512 characters.""" imageUrl: String """Name of an icon representing the area type, up to 128 characters. Not checked against any icon set.""" icon: String """Background colour to display the area type with, up to 32 characters. Not validated.""" backgroundColor: String """Foreground (text) colour to display the area type with, up to 32 characters. Not validated.""" foregroundColor: String """Border colour to display the area type with, up to 32 characters. Not validated.""" borderColor: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ The classes an entity of this type is, as CURIEs (for example sdm-streetlighting:Streetlight) or full IRIs inside an enabled vocabulary. Each must be a CLASS of a pack the tenant has enabled, or a term under a custom prefix it declared; at most 8. A term outside the enabled vocabularies, of the wrong kind, deprecated, or malformed fails the request with INVALID_ARGUMENT naming it. Stored as expanded IRIs. Omit for none. """ semanticTypes: [String!] } # A PARTIAL update to an area type: omit a field to leave it alone, send null to # clear it, send a value to set it. There is no `token` member — the mutation's own # `token` argument names the row, so a token move is unrepresentable. It used to be # the payload token that named the row, with the argument ignored, so a request # whose two tokens disagreed silently updated the one in the payload. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of an area type. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input AreaTypeUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """Image URL; null clears it.""" imageUrl: String """Icon name; null clears it.""" icon: String """Background colour; null clears it.""" backgroundColor: String """Foreground colour; null clears it.""" foregroundColor: String """Border colour; null clears it.""" borderColor: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ New classes, replacing the stored ones: null or an empty list clears them. Omit to leave them alone. Validated as on create; only a request that names this field is validated. """ semanticTypes: [String!] } """Criteria for listing area types.""" input AreaTypeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of area types.""" type AreaTypeSearchResults { """The area types on this page.""" results: [AreaType!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """An area: a place that devices can be located in, optionally bounded by a geofence.""" type Area implements Model & TokenReference & NamedEntity & MetadataEntity & Entity { """Server-assigned numeric identifier, as a string. Address an area by its token instead where you can.""" id: ID! """When the area was created, as an RFC 3339 timestamp.""" createdAt: String """When the area was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: deleted areas are not returned.""" deletedAt: String """Identifier of the area, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """The area type this area is an instance of.""" areaType: AreaType! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ The geofence that bounds the area, or null when none does. Null for a caller limited to part of the tenant. Answers an error, not null, when the linked fence has been deleted. """ boundaryFence: GeoFence } """Data required to create an area.""" input AreaCreateRequest { """Identifier for the new area, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Token of the area type to create it under. An unknown token is refused.""" areaTypeToken: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """The token of the geofence that bounds the area. It must name an existing fence.""" boundaryFenceToken: String } # A PARTIAL update to an area: omit a field to leave it alone, send null to clear # it, send a value to set it. There is no `token` member — see AreaTypeUpdateRequest. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the # field arrive already-populated for a caller who never sent it, which collapses # "omitted" back into "sent", and turns this input back into the full replace it # replaces. """ A partial update of an area. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. There is no token field: the mutation's token argument names the record, so a token cannot be moved. """ input AreaUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String # Re-points the area at a different area type. Omit to keep the current one. # Unlike DeviceTypeUpdateRequest.profileToken, NULL IS REFUSED here: every area # must reference a type, so "no type" is not a state it can be in. An unknown # token is refused too, and the refusal is total — nothing is written. """ Re-points the area at a different area type. Omit to keep the current one. Null is refused, because every area must reference a type, and so is an unknown token; a refusal writes nothing. """ areaTypeToken: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Links the area to the geofence that bounds it: omit to keep the link, send null to remove it, send a token to set it. The token must name an existing fence. """ boundaryFenceToken: String } """Criteria for listing areas.""" input AreaSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only areas of the area type with this token. Omit for every area.""" areaTypeToken: String } """One page of areas.""" type AreaSearchResults { """The areas on this page.""" results: [Area!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ Interface implemented by every entity object type: anything that can be addressed by an entity type and a token. """ interface Entity { """Server-assigned numeric identifier, as a string.""" id: ID! """Identifier of the entity, unique within its type and tenant.""" token: String! } """A reference to an entity by its type and token.""" input EntityRefInput { """Entity type, for example device, asset, area, customer or group.""" type: String! """Token of the entity.""" token: String! } """A reference to an entity by its type and token, returned from a query.""" type EntityRef { """Entity type, for example device, asset, area, customer or group.""" type: String! """Token of the entity.""" token: String! } """ A kind of relationship between entities, such as assigned or contains. One table of types serves every entity family. A tracked type marks relationships whose edges are denormalized onto events for indexing, and only tracked relationships count as ownership for members whose access is limited to part of the tenant. """ type EntityRelationshipType implements Model & TokenReference & NamedEntity & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a relationship type by its token instead where you can. """ id: ID! """When the relationship type was created, as an RFC 3339 timestamp.""" createdAt: String """When the relationship type was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a deleted relationship type is removed outright and is not returned.""" deletedAt: String """Identifier of the relationship type, unique within the tenant. It cannot be changed after creation.""" token: String! """Human-readable name, up to 128 characters. Null when none is set.""" name: String """Free-text description, up to 1024 characters. Null when none is set.""" description: String """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String """ Whether relationships of this type are tracked: denormalized onto events so they can be indexed and filtered by, and counted as ownership for scoped access. """ tracked: Boolean! """ The vocabulary predicate this relationship is (for example brick:feeds), or null when it is bound to none. """ semanticPredicate: SemanticTerm """The predicate's inverse (for example brick:isFedBy), or null when there is none.""" semanticInverse: SemanticTerm } """Data required to create an entity relationship type.""" input EntityRelationshipTypeCreateRequest { """Identifier for the new relationship type, unique within the tenant. Cannot be changed later.""" token: String! """Human-readable name, up to 128 characters.""" name: String """Free-text description, up to 1024 characters.""" description: String """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String """ Whether relationships of this type are tracked: denormalized onto events and counted as ownership for scoped access. A device may carry only a bounded number of tracked relationships. """ tracked: Boolean! """ A PREDICATE of an enabled vocabulary pack, as a CURIE or full IRI. A term of the wrong kind, deprecated, or outside the enabled vocabularies fails the request with INVALID_ARGUMENT naming it. Stored as an expanded IRI. """ semanticPredicate: String """ The predicate's inverse. Omitted, it is the inverse the vocabulary declares for the predicate (none when it declares none), and the stored value is that resolved term. An inverse without a predicate is refused. """ semanticInverse: String } # A PARTIAL update. Every field is optional in three senses, not two: omit it to leave # the stored value untouched, send null to clear it, send a value to set it. # # There is deliberately no `token` field — the record is identified by the mutation's # `token` argument, and an update cannot move it. # # 🔴 Do NOT give any field in this input an SDL default value. A default makes the field # arrive already-populated for a caller who never sent it, which collapses "omitted" back # into "sent", and turns this input back into the full replace it replaces. """ A partial update of an entity relationship type. Each field has three states: omit it to keep the stored value, send null to clear it, or send a value to set it. """ input EntityRelationshipTypeUpdateRequest { """Human-readable name; null clears it.""" name: String """Free-text description; null clears it.""" description: String """New metadata (valid JSON, replacing the stored document), or null to clear it.""" metadata: String """ Whether relationships of this type are tracked. Null is refused rather than read as false, which would stop denormalizing the type's relationships onto events and report success. """ tracked: Boolean """ New predicate: null clears it, and the inverse with it. Omit to leave it alone. Validated as on create. """ semanticPredicate: String """ New inverse: null clears it. Omitted while the predicate changes, it becomes the inverse the vocabulary declares for the new predicate. An inverse is refused while no predicate is bound. """ semanticInverse: String } """Criteria for listing entity relationship types.""" input EntityRelationshipTypeSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! } """One page of entity relationship types.""" type EntityRelationshipTypeSearchResults { """The relationship types on this page.""" results: [EntityRelationshipType!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """ A directed relationship edge between two entities, of a given relationship type. The source and target are each addressed by entity type and token. """ type EntityRelationship implements Model & TokenReference & MetadataEntity { """ Server-assigned numeric identifier, as a string. Address a relationship by its token instead where you can. """ id: ID! """When the relationship was created, as an RFC 3339 timestamp.""" createdAt: String """When the relationship was last written, as an RFC 3339 timestamp.""" updatedAt: String """Always null: a removed relationship is deleted outright and is not returned.""" deletedAt: String """Identifier of the relationship, unique within the tenant.""" token: String! """Entity type of the source entity.""" sourceType: String! """The entity the edge points from.""" source: Entity! """Entity type of the target entity.""" targetType: String! """The entity the edge points to.""" target: Entity! """The kind of relationship the edge is.""" relationshipType: EntityRelationshipType! """Caller-defined metadata as a JSON document, or null when none is set.""" metadata: String } """ Data required to create an entity relationship. The source and target are resolved from their types and tokens, which must name existing entities. """ input EntityRelationshipCreateRequest { """Identifier for the new relationship, unique within the tenant.""" token: String! """Entity type of the source entity, for example device.""" sourceType: String! """Token of the source entity.""" source: String! """Entity type of the target entity, for example customer.""" targetType: String! """Token of the target entity.""" target: String! """Token of the relationship type. An unknown token is refused.""" relationshipType: String! """Caller-defined metadata. Must be valid JSON; an empty string means none.""" metadata: String } """Criteria for listing entity relationships. Every facet is optional and they AND together.""" input EntityRelationshipSearchCriteria { """Page to return, starting at 1. Values below 1 are read as 1.""" pageNumber: Int! """Results per page. Below 1 means the default of 100; above 1000 is capped at 1000.""" pageSize: Int! """Only relationships whose source is of this entity type.""" sourceType: String """Only relationships whose source has this token. It takes effect only together with sourceType.""" source: String """Only relationships whose target is of this entity type.""" targetType: String """Only relationships whose target has this token. It takes effect only together with targetType.""" target: String """Only relationships of the relationship type with this token.""" relationshipType: String """True selects relationships of tracked types and false those of untracked types. Omit for either.""" tracked: Boolean } """One page of entity relationships.""" type EntityRelationshipSearchResults { """The relationships on this page.""" results: [EntityRelationship!]! """Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """A term of a vocabulary the tenant has enabled, as it is stored and as it is displayed.""" type SemanticTerm { """The expanded IRI. This is what is stored; it does not change when a prefix is remapped.""" iri: String! """A display form, prefix:local, using the vocabulary's prefix or the tenant's custom prefix. It is the IRI itself when no prefix explains it.""" curie: String! } """ A vocabulary pack this build ships. New packs may be added in a minor release, so a client should tolerate a value it does not know. """ enum SemanticPack { """Brick (pack id brick): buildings, equipment and points.""" BRICK """The NGSI-LD core vocabulary (pack id ngsi-ld).""" NGSI_LD """SAREF for buildings (pack id s4bldg).""" S4BLDG """SAREF for smart cities (pack id s4city).""" S4CITY """SAREF core (pack id saref): devices, properties and measurements.""" SAREF """Smart Data Models, environment domain (pack id sdm-environment).""" SDM_ENVIRONMENT """Smart Data Models, parking domain (pack id sdm-parking).""" SDM_PARKING """Smart Data Models, street lighting domain (pack id sdm-streetlighting).""" SDM_STREETLIGHTING } """A tenant's semantic configuration.""" type SemanticContext { """ The vocabulary packs the tenant has enabled, sorted by pack id. Null only when the stored record could not be read, with an error saying why. """ enabledPacks: [SemanticPack!] """ The custom prefixes the tenant declared for its own terms, sorted by prefix. Null only when the stored record could not be read, with an error saying why. """ customPrefixes: [CustomPrefix!] """ The version of each enabled pack as this build shipped it when the context was last set, sorted by pack. Null only when the stored record could not be read, with an error saying why. """ packVersions: [SemanticPackVersion!] """When the context was last set, as an RFC 3339 timestamp; null when it never was.""" updatedAt: String } """A custom prefix and the namespace it stands for.""" type CustomPrefix { """The prefix, as written before the colon in a CURIE (city in city:SmartBin).""" prefix: String! """The namespace IRI the prefix expands to.""" namespace: String! } """The version of one vocabulary pack.""" type SemanticPackVersion { """The pack.""" pack: SemanticPack! """The pack's version, as this build shipped it (for example the upstream release it was generated from).""" version: String! } """The semantic context to set. It replaces the stored one whole.""" input SemanticContextRequest { """The packs to enable. An empty list enables none.""" enabledPacks: [SemanticPack!]! """ Custom prefixes for the tenant's own terms; at most 32. An empty list declares none. A prefix may not shadow a pack's, and namespaces may not overlap. """ customPrefixes: [CustomPrefixInput!]! } """One custom prefix declaration.""" input CustomPrefixInput { """The prefix, as it will be written before the colon in a CURIE. It may not be a pack's prefix.""" prefix: String! """The namespace IRI the prefix expands to. It may not overlap a pack's or another prefix's namespace.""" namespace: String! } # Contains queries executed against model. """ (Preview: may change in a minor release.) What an AI agent asks to be done to alarms: ACK acknowledges them, CLEAR clears them. """ enum AgentAlarmAction { """(Preview: may change in a minor release.) Acknowledge the alarms.""" ACK """(Preview: may change in a minor release.) Clear the alarms. Clearing an alarm whose condition is still active hides a live condition.""" CLEAR } """(Preview: may change in a minor release.) The kind of action an agent proposal asks for.""" enum AgentProposalKind { """(Preview: may change in a minor release.) Acknowledge alarms.""" ALARM_ACK """(Preview: may change in a minor release.) Clear alarms.""" ALARM_CLEAR } """(Preview: may change in a minor release.) Where an agent proposal is in its life.""" enum AgentProposalState { """(Preview: may change in a minor release.) Waiting for people to approve it. The only state that changes.""" PROPOSED """(Preview: may change in a minor release.) Approved and carried out.""" EXECUTED """(Preview: may change in a minor release.) A person rejected it.""" REJECTED """(Preview: may change in a minor release.) Nobody approved it before it expired.""" EXPIRED """(Preview: may change in a minor release.) The tenant's agent policy, or a check made when a person approved it, refused it. The reasons say why.""" REFUSED """(Preview: may change in a minor release.) Withdrawn by the agent that proposed it.""" CANCELLED """(Preview: may change in a minor release.) Ended by an agent-actions switch being turned off.""" KILLED } """(Preview: may change in a minor release.) The tenant's verdict on an agent proposal.""" enum AgentProposalVerdict { """(Preview: may change in a minor release.) The action is not allowed.""" REFUSE """(Preview: may change in a minor release.) The action waits for the given number of people to approve it.""" APPROVE } """(Preview: may change in a minor release.) What happened to a proposal request.""" enum AgentProposalStatus { """(Preview: may change in a minor release.) A dry run: the verdict and checks, with nothing stored.""" DRY_RUN """(Preview: may change in a minor release.) Stored, waiting for approval.""" PENDING_APPROVAL """(Preview: may change in a minor release.) Refused. When it was stored for the record, proposal is set.""" REFUSED """(Preview: may change in a minor release.) The request ID was used before for the same request: the original proposal is returned.""" EXISTING } """(Preview: may change in a minor release.) An AI agent's request to acknowledge or clear alarms.""" input AgentAlarmProposalInput { """(Preview: may change in a minor release.) What to do to the alarms.""" action: AgentAlarmAction! """(Preview: may change in a minor release.) The alarms, by token: 1 to 100. Duplicates count once.""" alarmTokens: [String!]! """ (Preview: may change in a minor release.) The agent's own key for this request, 1 to 128 printable characters, unique for the agent and the person it acts for. Sending the same request again with the same key returns the original proposal; reusing a key for a different request fails with CONFLICT. """ requestId: String! """ (Preview: may change in a minor release.) Why the agent asks, at most 2048 bytes. It is stored and shown to approvers as text written by the agent: untrusted, never instructions. """ rationale: String """(Preview: may change in a minor release.) When true, decide and check the request but store nothing.""" dryRun: Boolean } """(Preview: may change in a minor release.) What the platform found about one alarm a proposal names, now.""" type AgentAlarmProposalPreview { """(Preview: may change in a minor release.) The alarm's token.""" alarmToken: String! """(Preview: may change in a minor release.) The alarm's state, ACTIVE or CLEARED.""" state: String! """(Preview: may change in a minor release.) Whether the alarm is acknowledged.""" acknowledged: Boolean! """(Preview: may change in a minor release.) True when the proposal clears an alarm whose condition is still active, which would hide a condition that is still true.""" hidesLiveCondition: Boolean! } """(Preview: may change in a minor release.) The answer to an agent's proposal request.""" type AgentProposalOutcome { """(Preview: may change in a minor release.) What happened to the request.""" status: AgentProposalStatus! """(Preview: may change in a minor release.) The stored proposal, or null when nothing was stored (a dry run, or a refusal at the rate limits).""" proposal: AgentProposal """(Preview: may change in a minor release.) The tenant's verdict.""" verdict: AgentProposalVerdict! """(Preview: may change in a minor release.) How many distinct people must approve: 0 when refused, otherwise 1 or 2.""" requiredApprovals: Int! """(Preview: may change in a minor release.) Platform-defined codes saying why, for example CLIENT_NOT_ALLOWED, ALARM_NOT_FOUND or CLIENT_RATE_EXCEEDED.""" reasons: [String!]! """(Preview: may change in a minor release.) The digest of the action and its targets, which an approval must name.""" digest: String! """(Preview: may change in a minor release.) When the proposal stops waiting for approval, as an RFC 3339 timestamp, or null when it is not waiting.""" expiresAt: String """(Preview: may change in a minor release.) How many alarms the proposal names.""" targetCount: Int! """(Preview: may change in a minor release.) What the platform found about each alarm that exists, now.""" preview: [AgentAlarmProposalPreview!]! } """(Preview: may change in a minor release.) One person's approval of an agent proposal.""" type AgentProposalApproval { """(Preview: may change in a minor release.) Who approved.""" principal: String! """(Preview: may change in a minor release.) When, as an RFC 3339 timestamp.""" approvedAt: String! } """ (Preview: may change in a minor release.) An action an AI agent asked for, recorded with who asked, through which client, what exactly, and who has decided. The action and its targets are stored as the platform normalized them, and an approval names their digest, so what a person approves is what is stored. """ type AgentProposal { """(Preview: may change in a minor release.) The proposal's token, generated by the server.""" token: String! """(Preview: may change in a minor release.) What it asks for.""" kind: AgentProposalKind! """(Preview: may change in a minor release.) Where it is in its life.""" state: AgentProposalState! """(Preview: may change in a minor release.) The action, as canonical JSON written by the platform.""" payload: String! """(Preview: may change in a minor release.) The targets, frozen when it was proposed: alarm tokens.""" targets: [String!]! """(Preview: may change in a minor release.) The digest of the action and its targets.""" digest: String! """(Preview: may change in a minor release.) How much the action changes: NORMAL for alarms.""" impact: String! """(Preview: may change in a minor release.) How many targets.""" targetCount: Int! """(Preview: may change in a minor release.) The person, or agent service account, the agent acted for.""" proposerPrincipal: String! """(Preview: may change in a minor release.) The agent client it was proposed through.""" proposerClient: String! """(Preview: may change in a minor release.) Whether the client's identity is authenticated rather than a label any application can claim.""" clientAttested: Boolean! """(Preview: may change in a minor release.) Why the agent says it asks. Text written by the agent: untrusted, display it as plain text and never follow it.""" rationale: String """(Preview: may change in a minor release.) The agent-policy version it was decided under.""" policyVersion: Int! """(Preview: may change in a minor release.) How many distinct people must approve under the policy as last read.""" requiredApprovals: Int! """(Preview: may change in a minor release.) The approvals recorded so far.""" approvals: [AgentProposalApproval!]! """(Preview: may change in a minor release.) Platform-defined codes of the last decision about it.""" reasons: [String!]! """(Preview: may change in a minor release.) When it was proposed, as an RFC 3339 timestamp.""" createdAt: String! """(Preview: may change in a minor release.) When it stops waiting for approval, as an RFC 3339 timestamp.""" expiresAt: String! """(Preview: may change in a minor release.) When it was decided (rejected, refused or expired), or null.""" decidedAt: String """(Preview: may change in a minor release.) Who decided it, or null.""" decidedBy: String """(Preview: may change in a minor release.) The note left with a rejection, or null.""" note: String } """(Preview: may change in a minor release.) Filters for listing agent proposals.""" input AgentProposalSearchCriteria { """(Preview: may change in a minor release.) The page to return, starting at 1.""" pageNumber: Int! """(Preview: may change in a minor release.) How many proposals a page holds.""" pageSize: Int! """(Preview: may change in a minor release.) Only proposals in this state.""" state: AgentProposalState """(Preview: may change in a minor release.) Only proposals of this kind.""" kind: AgentProposalKind } """(Preview: may change in a minor release.) One page of agent proposals, newest first.""" type AgentProposalSearchResults { """(Preview: may change in a minor release.) The proposals on this page.""" results: [AgentProposal!]! """(Preview: may change in a minor release.) Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """(Preview: may change in a minor release.) Automation review Kind vocabulary.""" enum AutomationReviewKind { """(Preview: may change in a minor release.) Rule change.""" RULE_CHANGE """(Preview: may change in a minor release.) No automation change.""" NO_AUTOMATION_CHANGE """(Preview: may change in a minor release.) Unreviewable.""" UNREVIEWABLE } """(Preview: may change in a minor release.) Automation review Outcome vocabulary.""" enum AutomationReviewOutcome { """(Preview: may change in a minor release.) Passed.""" PASSED """(Preview: may change in a minor release.) Failed.""" FAILED """(Preview: may change in a minor release.) Inconclusive.""" INCONCLUSIVE """(Preview: may change in a minor release.) No automation change.""" NO_AUTOMATION_CHANGE } """(Preview: may change in a minor release.) Automation review State vocabulary.""" enum AutomationReviewState { """(Preview: may change in a minor release.) Ran.""" RAN """(Preview: may change in a minor release.) Approved.""" APPROVED """(Preview: may change in a minor release.) Rejected.""" REJECTED """(Preview: may change in a minor release.) Consumed.""" CONSUMED """(Preview: may change in a minor release.) Expired.""" EXPIRED } """(Preview: may change in a minor release.) Automation review WindowRole vocabulary.""" enum AutomationReviewWindowRole { """(Preview: may change in a minor release.) Incident.""" INCIDENT """(Preview: may change in a minor release.) Normal.""" NORMAL } """(Preview: may change in a minor release.) Automation review Verdict vocabulary.""" enum AutomationReviewVerdict { """(Preview: may change in a minor release.) Pass.""" PASS """(Preview: may change in a minor release.) Fail.""" FAIL """(Preview: may change in a minor release.) Inconclusive.""" INCONCLUSIVE } """(Preview: may change in a minor release.) Automation review ChangeKind vocabulary.""" enum AutomationReviewChangeKind { """(Preview: may change in a minor release.) An intent exists only in the draft.""" ADDED """(Preview: may change in a minor release.) An intent exists only in the baseline.""" REMOVED """(Preview: may change in a minor release.) A paired intent occurs at a different time.""" SHIFTED """(Preview: may change in a minor release.) Content changed.""" CONTENT_CHANGED } """(Preview: may change in a minor release.) Automation review StartState vocabulary.""" enum AutomationReviewStartState { """(Preview: may change in a minor release.) Unknown.""" UNKNOWN """(Preview: may change in a minor release.) Clear.""" CLEAR """(Preview: may change in a minor release.) Raised.""" RAISED } """(Preview: may change in a minor release.) Automation review ProfileChangeArea vocabulary.""" enum AutomationReviewProfileChangeArea { """(Preview: may change in a minor release.) Rule.""" RULE """(Preview: may change in a minor release.) Metric.""" METRIC """(Preview: may change in a minor release.) Command.""" COMMAND """(Preview: may change in a minor release.) Decoder.""" DECODER """(Preview: may change in a minor release.) Location.""" LOCATION """(Preview: may change in a minor release.) Configuration.""" CONFIGURATION """(Preview: may change in a minor release.) Semantics.""" SEMANTICS } """(Preview: may change in a minor release.) Automation review ProfileChangeType vocabulary.""" enum AutomationReviewProfileChangeType { """(Preview: may change in a minor release.) A profile element was added.""" ADDED """(Preview: may change in a minor release.) A profile element was removed.""" REMOVED """(Preview: may change in a minor release.) Modified.""" MODIFIED } """(Preview: may change in a minor release.) Frozen evidence and approval history for a profile draft.""" type AutomationReview { """(Preview: may change in a minor release.) The version this review was consumed by, or null while it has not been.""" consumedVersion: Int """(Preview: may change in a minor release.) The stable token identifying this review.""" token: String! """(Preview: may change in a minor release.) The profile token, resolved from its stored id; lookup failures return null and an error.""" profileToken: String """(Preview: may change in a minor release.) How the draft changes automation.""" kind: AutomationReviewKind! """(Preview: may change in a minor release.) The changed rule token, when one rule is compared.""" ruleToken: String """(Preview: may change in a minor release.) The current review lifecycle state.""" state: AutomationReviewState! """(Preview: may change in a minor release.) The frozen comparison outcome.""" outcome: AutomationReviewOutcome! """(Preview: may change in a minor release.) The frozen evidence digest the approver must be shown.""" reviewDigest: String! """(Preview: may change in a minor release.) The digest of the reviewed draft snapshot.""" draftDigest: String! """(Preview: may change in a minor release.) The digest of the published baseline snapshot.""" baselineDigest: String! """(Preview: may change in a minor release.) The published baseline version.""" baselineVersion: Int! """(Preview: may change in a minor release.) The person who ran the review.""" createdBy: String! """(Preview: may change in a minor release.) When the review was created, in RFC3339 format.""" createdAt: String! """(Preview: may change in a minor release.) The number of independent approvals required.""" requiredApprovals: Int! """(Preview: may change in a minor release.) Approvals. Parsed from stored JSON; parse failures return null and an error.""" approvals: [AutomationReviewApproval!] """(Preview: may change in a minor release.) When the approval threshold was reached, in RFC3339 format.""" approvedAt: String """(Preview: may change in a minor release.) When approval expires, in RFC3339 format.""" expiresAt: String """(Preview: may change in a minor release.) The person who rejected the review.""" decidedBy: String """(Preview: may change in a minor release.) When the review was rejected, in RFC3339 format.""" decidedAt: String """(Preview: may change in a minor release.) The optional rejection note.""" note: String """(Preview: may change in a minor release.) People whose edits contributed after the baseline publication. Parsed from stored JSON; parse failures return null and an error.""" draftAuthors: [String!] """(Preview: may change in a minor release.) The differences between the baseline and reviewed draft. Parsed from stored JSON; parse failures return null and an error.""" profileChanges: [AutomationReviewProfileChange!] """(Preview: may change in a minor release.) Stored UNREVIEWABLE reasons; an empty list otherwise. Invalid stored JSON returns null and an error.""" reasons: [String!] """(Preview: may change in a minor release.) The device tokens selected for replay. Parsed from stored JSON; parse failures return null and an error.""" deviceTokens: [String!] """(Preview: may change in a minor release.) The incident and normal replay windows. Parsed from stored JSON; parse failures return null and an error.""" windows: [AutomationReviewWindowSpec!] """(Preview: may change in a minor release.) The maximum pairing shift, in seconds; null uses the engine default. Parsed from stored JSON; parse failures return null and an error.""" shiftWindowSeconds: Int """(Preview: may change in a minor release.) The expectations supplied when the review ran. Parsed from stored JSON; parse failures return null and an error.""" expectationInputs: [AutomationReviewExpectationInput!] """(Preview: may change in a minor release.) The recorded-input fidelity assessment. Parsed from stored JSON; parse failures return null and an error.""" fidelity: AutomationReviewFidelity """(Preview: may change in a minor release.) The verdicts for the supplied expectations. Parsed from stored JSON; parse failures return null and an error.""" expectations: [AutomationReviewExpectationResult!] """(Preview: may change in a minor release.) The recorded comparison evidence for each window. Parsed from stored JSON; parse failures return null and an error.""" windowResults: [AutomationReviewWindowResult!] """(Preview: may change in a minor release.) The digest of the recorded comparison inputs.""" inputDigest: String """(Preview: may change in a minor release.) The digest of the stored result bytes.""" resultDigest: String """(Preview: may change in a minor release.) The comparison engine build identifier.""" engineBuild: String """(Preview: may change in a minor release.) The stored canonical comparison JSON, preserved byte for byte.""" result: String """(Preview: may change in a minor release.) Whether the current draft digest matches this review; computation failures return null and an error.""" matchesCurrentDraft: Boolean } """(Preview: may change in a minor release.) AutomationReviewApproval evidence.""" type AutomationReviewApproval { """(Preview: may change in a minor release.) The approving person.""" principal: String! """(Preview: may change in a minor release.) When this approval was recorded, in RFC3339 format.""" approvedAt: String! """(Preview: may change in a minor release.) The policy revision recorded with this approval.""" policyRevision: Int! } """(Preview: may change in a minor release.) AutomationReviewProfileChange evidence.""" type AutomationReviewProfileChange { """(Preview: may change in a minor release.) The part of the profile that changed.""" area: AutomationReviewProfileChangeArea! """(Preview: may change in a minor release.) The stable key of the changed profile element.""" key: String! """(Preview: may change in a minor release.) Whether the profile element was added, removed or modified.""" change: AutomationReviewProfileChangeType! """(Preview: may change in a minor release.) Whether this change affects automation behavior.""" automation: Boolean! } """(Preview: may change in a minor release.) AutomationReviewWindowSpec evidence.""" type AutomationReviewWindowSpec { """(Preview: may change in a minor release.) Whether this is the incident or normal window.""" role: AutomationReviewWindowRole! """(Preview: may change in a minor release.) The start of the window, in RFC3339 format.""" start: String! """(Preview: may change in a minor release.) The end of the window, in RFC3339 format.""" end: String! } """(Preview: may change in a minor release.) AutomationReviewExpectationInput evidence.""" type AutomationReviewExpectationInput { """(Preview: may change in a minor release.) The window to which this expectation applies.""" window: AutomationReviewWindowRole! """(Preview: may change in a minor release.) The expectation name.""" name: String """(Preview: may change in a minor release.) The stored rule-test expectation as JSON.""" expect: String! } """(Preview: may change in a minor release.) AutomationReviewFidelity evidence.""" type AutomationReviewFidelity { """(Preview: may change in a minor release.) The engine fidelity status.""" status: String! """(Preview: may change in a minor release.) The reasons supporting the fidelity assessment.""" reasons: [String!]! """(Preview: may change in a minor release.) The human-readable fidelity label.""" label: String! } """(Preview: may change in a minor release.) AutomationReviewExpectationResult evidence.""" type AutomationReviewExpectationResult { """(Preview: may change in a minor release.) The zero-based expectation index.""" index: Int! """(Preview: may change in a minor release.) The expectation name.""" name: String! """(Preview: may change in a minor release.) The window to which this expectation applies.""" window: AutomationReviewWindowRole! """(Preview: may change in a minor release.) The draft verdict for this expectation.""" verdict: AutomationReviewVerdict! """(Preview: may change in a minor release.) The baseline verdict for this expectation.""" baseline: AutomationReviewVerdict! """(Preview: may change in a minor release.) The reason for the draft verdict.""" reason: String! """(Preview: may change in a minor release.) The reason for the baseline verdict.""" baselineReason: String! """(Preview: may change in a minor release.) The readings supporting this verdict.""" evidence: [AutomationReviewReading!]! } """(Preview: may change in a minor release.) AutomationReviewReading evidence.""" type AutomationReviewReading { """(Preview: may change in a minor release.) The device token.""" device: String! """(Preview: may change in a minor release.) The reading time, in RFC3339 format.""" at: String! """(Preview: may change in a minor release.) The recorded value, or null when the reading has no value.""" value: Float """(Preview: may change in a minor release.) The reading span converted from nanoseconds to seconds.""" spanSeconds: Float! } """(Preview: may change in a minor release.) AutomationReviewWindowResult evidence.""" type AutomationReviewWindowResult { """(Preview: may change in a minor release.) Whether this is the incident or normal window.""" role: AutomationReviewWindowRole! """(Preview: may change in a minor release.) The start of the window, in RFC3339 format.""" start: String! """(Preview: may change in a minor release.) The end of the window, in RFC3339 format.""" end: String! """(Preview: may change in a minor release.) The replay lead-in start, in RFC3339 format.""" leadInStart: String! """(Preview: may change in a minor release.) The recorded input stream.""" stream: String! """(Preview: may change in a minor release.) The first stream sequence as a decimal string, without numeric narrowing.""" firstSeq: String! """(Preview: may change in a minor release.) The last stream sequence as a decimal string, without numeric narrowing.""" lastSeq: String! """(Preview: may change in a minor release.) The digest of the recorded comparison inputs.""" inputDigest: String! """(Preview: may change in a minor release.) The window degradation reasons.""" degraded: [String!]! """(Preview: may change in a minor release.) The total change counts before truncation.""" counts: AutomationReviewChangeCounts! """(Preview: may change in a minor release.) Whether the engine limited the listed changes.""" changesTruncated: Boolean! """(Preview: may change in a minor release.) The replay coverage for each selected device.""" devices: [AutomationReviewDeviceCoverage!]! """(Preview: may change in a minor release.) The listed automation intent differences.""" changes: [AutomationReviewChange!]! } """(Preview: may change in a minor release.) Total intent change counts for one window.""" type AutomationReviewChangeCounts { """(Preview: may change in a minor release.) The number of unchanged paired intents.""" unchanged: Int! """(Preview: may change in a minor release.) The number of added intents.""" added: Int! """(Preview: may change in a minor release.) The number of removed intents.""" removed: Int! """(Preview: may change in a minor release.) The number of shifted paired intents.""" shifted: Int! """(Preview: may change in a minor release.) The number of paired intents whose content changed.""" contentChanged: Int! } """(Preview: may change in a minor release.) AutomationReviewDeviceCoverage evidence.""" type AutomationReviewDeviceCoverage { """(Preview: may change in a minor release.) The device token.""" device: String! """(Preview: may change in a minor release.) Reading counts by metric key, sorted by key.""" readings: [AutomationReviewMetricCount!]! """(Preview: may change in a minor release.) Reading counts by profile version token, sorted by key.""" versions: [AutomationReviewMetricCount!]! """(Preview: may change in a minor release.) The baseline starting state.""" stateBase: AutomationReviewStartState! """(Preview: may change in a minor release.) The draft starting state.""" stateDraft: AutomationReviewStartState! """(Preview: may change in a minor release.) When replay first diverged, in RFC3339 format, if it diverged.""" divergence: String """(Preview: may change in a minor release.) The number of late baseline readings.""" lateBase: Int! """(Preview: may change in a minor release.) The number of late draft readings.""" lateDraft: Int! """(Preview: may change in a minor release.) The first covered reading time, or null if none.""" first: String """(Preview: may change in a minor release.) The last covered reading time, or null if none.""" last: String } """(Preview: may change in a minor release.) AutomationReviewMetricCount evidence.""" type AutomationReviewMetricCount { """(Preview: may change in a minor release.) The metric key, or profile version token for version counts. Entries are sorted by key.""" key: String! """(Preview: may change in a minor release.) The number of recorded occurrences.""" count: Int! } """(Preview: may change in a minor release.) AutomationReviewChange evidence.""" type AutomationReviewChange { """(Preview: may change in a minor release.) How the draft changes automation.""" kind: AutomationReviewChangeKind! """(Preview: may change in a minor release.) The device token.""" device: String! """(Preview: may change in a minor release.) The automation intent subject.""" subject: String! """(Preview: may change in a minor release.) The intent discriminator used for pairing.""" discriminator: String! """(Preview: may change in a minor release.) The baseline intent time, in RFC3339 format, if present.""" baseAt: String """(Preview: may change in a minor release.) The draft intent time, in RFC3339 format, if present.""" draftAt: String """(Preview: may change in a minor release.) The signed paired-intent shift converted from nanoseconds to seconds.""" shiftSeconds: Float! """(Preview: may change in a minor release.) The baseline intent content, if present.""" baseContent: AutomationReviewIntentContent """(Preview: may change in a minor release.) The draft intent content, if present.""" draftContent: AutomationReviewIntentContent """(Preview: may change in a minor release.) Whether paired intent content changed.""" contentChanged: Boolean! """(Preview: may change in a minor release.) The reading that caused this intent difference.""" reading: AutomationReviewReading! """(Preview: may change in a minor release.) Whether this difference follows the first state divergence.""" afterDivergence: Boolean! } """(Preview: may change in a minor release.) AutomationReviewIntentContent evidence.""" type AutomationReviewIntentContent { """(Preview: may change in a minor release.) The alarm severity, when applicable.""" severity: String """(Preview: may change in a minor release.) The command payload, when applicable.""" payload: String """(Preview: may change in a minor release.) The relative expiry converted from nanoseconds to seconds, if present.""" relativeExpirySeconds: Float """(Preview: may change in a minor release.) The expiry label, when applicable.""" expiryLabel: String """(Preview: may change in a minor release.) The configuration digest, when applicable.""" configDigest: String """(Preview: may change in a minor release.) The request body digest, when applicable.""" bodyDigest: String """(Preview: may change in a minor release.) The request method, when applicable.""" method: String } """(Preview: may change in a minor release.) RunAutomationReviewInput parameters.""" input RunAutomationReviewInput { """(Preview: may change in a minor release.) The profile whose draft is reviewed.""" profileToken: String! """(Preview: may change in a minor release.) The changed rule token, when one rule is compared.""" ruleToken: String """(Preview: may change in a minor release.) The device tokens selected for replay.""" deviceTokens: [String!]! """(Preview: may change in a minor release.) The incident and normal replay windows.""" windows: [AutomationReviewWindowInput!]! """(Preview: may change in a minor release.) The expectations to evaluate against the comparison.""" expectations: [AutomationReviewExpectationInputValue!] """(Preview: may change in a minor release.) The maximum pairing shift, in seconds; null uses the engine default.""" shiftWindowSeconds: Int """(Preview: may change in a minor release.) A caller-generated idempotency key for this review request.""" requestId: String! } """(Preview: may change in a minor release.) AutomationReviewWindowInput parameters.""" input AutomationReviewWindowInput { """(Preview: may change in a minor release.) Whether this is the incident or normal window.""" role: AutomationReviewWindowRole! """(Preview: may change in a minor release.) RFC3339 timestamp; invalid timestamps are invalid arguments.""" start: String! """(Preview: may change in a minor release.) RFC3339 timestamp; invalid timestamps are invalid arguments.""" end: String! } """(Preview: may change in a minor release.) AutomationReviewExpectationInputValue parameters.""" input AutomationReviewExpectationInputValue { """(Preview: may change in a minor release.) The window to which this expectation applies.""" window: AutomationReviewWindowRole! """(Preview: may change in a minor release.) The expectation name.""" name: String """(Preview: may change in a minor release.) One rule-test expectation as JSON, using the event-processing expectation vocabulary.""" expect: String! } """(Preview: may change in a minor release.) Profile, lifecycle, draft matching and paging filters.""" input AutomationReviewSearchCriteria { """(Preview: may change in a minor release.) The profile whose draft is reviewed.""" profileToken: String! """(Preview: may change in a minor release.) The current review lifecycle state.""" state: AutomationReviewState """(Preview: may change in a minor release.) Only reviews whose draft digest matches, or does not match, the current draft.""" matchingCurrentDraft: Boolean """(Preview: may change in a minor release.) The page to return, starting at 1.""" pageNumber: Int! """(Preview: may change in a minor release.) The number of reviews per page.""" pageSize: Int! } """(Preview: may change in a minor release.) One page of automation reviews.""" type AutomationReviewSearchResults { """(Preview: may change in a minor release.) The reviews on this page, newest first.""" results: [AutomationReview!]! """(Preview: may change in a minor release.) Where this page sits in the full result set.""" pagination: SearchResultsPagination! } """(Preview: may change in a minor release.) Effective automation publish protection settings.""" type AutomationReviewPolicySettings { """(Preview: may change in a minor release.) Whether publishing requires an approved review.""" required: Boolean! """(Preview: may change in a minor release.) Number of distinct approvals required.""" requiredApprovals: Int! """(Preview: may change in a minor release.) Whether review creators and draft authors may approve.""" allowSelfApproval: Boolean! """(Preview: may change in a minor release.) Approval lifetime in seconds.""" approvalTtlSeconds: Int! """(Preview: may change in a minor release.) Maximum age of the second factor in seconds.""" stepUpMaxAgeSeconds: Int! } """(Preview: may change in a minor release.) The lifecycle of a proposed policy change.""" enum AutomationReviewPolicyChangeState { """(Preview: may change in a minor release.) Waiting for approval or a permitted delay.""" PENDING """(Preview: may change in a minor release.) The proposal has taken effect.""" APPLIED """(Preview: may change in a minor release.) The proposal was cancelled.""" CANCELLED """(Preview: may change in a minor release.) A later policy change replaced this proposal.""" SUPERSEDED } """(Preview: may change in a minor release.) A proposed loosening of automation protection.""" type AutomationReviewPolicyChange { """(Preview: may change in a minor release.) The policy change token.""" token: String! """(Preview: may change in a minor release.) The proposed settings; unreadable stored JSON returns null and an error.""" proposed: AutomationReviewPolicySettings """(Preview: may change in a minor release.) The person proposing the change.""" proposedBy: String! """(Preview: may change in a minor release.) When proposed, as an RFC 3339 timestamp.""" proposedAt: String! """(Preview: may change in a minor release.) When the change may take effect without a second person, as an RFC 3339 timestamp.""" effectiveAt: String """(Preview: may change in a minor release.) The proposal lifecycle state.""" state: AutomationReviewPolicyChangeState! """(Preview: may change in a minor release.) Who decided the proposal, when decided.""" decidedBy: String """(Preview: may change in a minor release.) When decided, as an RFC 3339 timestamp.""" decidedAt: String } """(Preview: may change in a minor release.) Automation publish protection for a profile.""" type AutomationReviewPolicy { """(Preview: may change in a minor release.) The protected profile token.""" profileToken: String! """(Preview: may change in a minor release.) The settings currently enforced; defaults apply when no policy is stored.""" effective: AutomationReviewPolicySettings! """(Preview: may change in a minor release.) The stored revision, or zero when no policy is stored.""" revision: Int! """(Preview: may change in a minor release.) Who last updated the stored policy, or null when none is stored.""" updatedBy: String """(Preview: may change in a minor release.) When the stored policy was updated, as an RFC 3339 timestamp, or null when none is stored.""" updatedAt: String """(Preview: may change in a minor release.) The pending loosening proposal, if any.""" pendingChange: AutomationReviewPolicyChange } """(Preview: may change in a minor release.) Requested automation protection settings; omitted optional fields use their defaults.""" input AutomationReviewPolicyInput { """(Preview: may change in a minor release.) Whether publishing requires review.""" required: Boolean! """(Preview: may change in a minor release.) Required approvals; defaults to 1.""" requiredApprovals: Int """(Preview: may change in a minor release.) Whether creators and authors may approve; defaults to false.""" allowSelfApproval: Boolean """(Preview: may change in a minor release.) Approval lifetime in seconds; defaults to 86400.""" approvalTtlSeconds: Int """(Preview: may change in a minor release.) Maximum second-factor age in seconds; defaults to 900.""" stepUpMaxAgeSeconds: Int } """(Preview: may change in a minor release.) Whether the policy was applied immediately and its resulting view.""" type SetAutomationReviewPolicyResult { """(Preview: may change in a minor release.) True when applied immediately; false when approval or a delay is pending.""" applied: Boolean! """(Preview: may change in a minor release.) The resulting policy.""" policy: AutomationReviewPolicy } """(Preview: may change in a minor release.) An activation change made outside review.""" enum AutomationReviewBreakGlassAction { """(Preview: may change in a minor release.) Changing the active profile version.""" ROLLBACK """(Preview: may change in a minor release.) Changing the profile bound to a type.""" REPOINT_TYPE """(Preview: may change in a minor release.) Moving a device out of a protected type.""" MOVE_DEVICE } """(Preview: may change in a minor release.) The recorded reason and person for a protected activation change.""" type AutomationReviewBreakGlass { """(Preview: may change in a minor release.) The activation change action.""" action: AutomationReviewBreakGlassAction! """(Preview: may change in a minor release.) The affected target token.""" target: String! """(Preview: may change in a minor release.) Why the change was necessary.""" reason: String! """(Preview: may change in a minor release.) The person making the change.""" actor: String! """(Preview: may change in a minor release.) When recorded, as an RFC 3339 timestamp.""" at: String! } """ The reads of the tenant data plane: devices, device types and profiles, the relationship graph, alarms, entity groups, geofences and the rest of device management. A field's description names the authority it needs. """ type Query { """Preview. Report this build's bulk change capabilities and fresh database enforcement and tenant orphan facts. Requires fleet:operate; scoped members are refused. An expensive diagnostic (it counts rows): query it when you need the answer, do not poll it.""" bulkChangeReadiness: BulkChangeReadiness! """Preview. Report this build's bulk change capabilities and fresh database enforcement and tenant orphan facts. Requires fleet:operate; scoped members are refused. An expensive diagnostic (it counts rows): query it when you need the answer, do not poll it.""" fleetOperationReadiness: FleetOperationReadiness! @deprecated(reason: "Use bulkChangeReadiness.") """Preview. One bulk change by token. Null when the tenant has none. Needs device:read.""" bulkChange( """Preview. The bulk change's token.""" token: String! ): BulkChange """Preview. Bulk changes, newest first. Needs device:read.""" bulkChanges( """Preview. Paging and filters.""" criteria: BulkChangeSearchCriteria! ): BulkChangeSearchResults! """Preview. The lines of one operation in input order. Needs device:read.""" bulkChangeLines( """Preview. The bulk change's token.""" token: String! """Preview. Paging and filters for the lines.""" criteria: BulkChangeLineSearchCriteria! ): BulkChangeLineSearchResults! """Preview. What an operation would do, without writing anything. Needs device:write and fleet:operate.""" planBulkChange( """Preview. The bulk change to plan. Nothing is written.""" request: BulkChangeCreateRequest! ): BulkChangePlan! """Preview. What resuming a paused operation with this change would do, without writing anything. Needs device:write and fleet:operate.""" previewBulkChangeResume( """Preview. The paused bulk change's token.""" token: String! """Preview. New limits to preview; an omitted limit keeps its current value.""" safety: BulkChangeSafetyInput ): BulkChangeResumePreview! """Preview. What reversing a bulk change would do, without writing anything. Needs device:write and fleet:operate.""" previewBulkChangeReversal( """Preview. The reversal to preview. Nothing is written.""" request: BulkChangeReversalRequest! ): BulkChangeReversalPreview! """(Preview: may change in a minor release.) Read automation protection settings. Requires device:read and an unscoped caller; an unknown profile returns NOT_FOUND.""" automationReviewPolicy( """(Preview: may change in a minor release.) The profile token.""" profileToken: String! ): AutomationReviewPolicy """(Preview: may change in a minor release.) Read at most 200 activation changes made outside review, newest first. Requires device:read and an unscoped caller; an unknown profile returns NOT_FOUND.""" automationReviewBreakGlass( """(Preview: may change in a minor release.) The profile token.""" profileToken: String! ): [AutomationReviewBreakGlass!] """(Preview: may change in a minor release.) Read frozen automation evidence. Requires device:read and event:read and an unscoped caller.""" automationReview( """(Preview: may change in a minor release.) The review token.""" token: String! ): AutomationReview """(Preview: may change in a minor release.) List automation reviews. Requires device:read and event:read and an unscoped caller.""" automationReviews( """(Preview: may change in a minor release.) Profile, state, draft matching and paging filters.""" criteria: AutomationReviewSearchCriteria! ): AutomationReviewSearchResults """ Returns the device types with the given ids. Ids that match no device type are omitted, an id that is not a number fails the request, and more than 1000 ids are refused with LIMIT_EXCEEDED. Requires device:read. """ deviceTypesById( """Ids of the device types to return.""" ids: [ID!]! ): [DeviceType!]! """ Returns the device types with the given tokens. Tokens that match no device type are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Requires device:read. """ deviceTypesByToken( """Tokens of the device types to return.""" tokens: [String!]! ): [DeviceType!]! """Lists the tenant's device types, newest first, one page at a time. Requires device:read.""" deviceTypes( """The page to return.""" criteria: DeviceTypeSearchCriteria! ): DeviceTypeSearchResults! """ Returns the device profiles with the given ids. Ids that match no profile are omitted, an id that is not a number fails the request, and more than 1000 ids are refused with LIMIT_EXCEEDED. Requires device:read. """ deviceProfilesById( """Ids of the profiles to return.""" ids: [ID!]! ): [DeviceProfile!]! """ Returns the device profiles with the given tokens. Tokens that match no profile are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Requires device:read. """ deviceProfilesByToken( """Tokens of the profiles to return.""" tokens: [String!]! ): [DeviceProfile!]! """Lists the tenant's device profiles, newest first, one page at a time. Requires device:read.""" deviceProfiles( """The page to return.""" criteria: DeviceProfileSearchCriteria! ): DeviceProfileSearchResults! """ Lists the published versions of a device profile, newest first, at most 1000 per call; use limit and offset to page. Empty when the profile has never been published or offset is past the last version. Fails if no profile has the token. Requires device:read. """ deviceProfileVersions( """Token of the profile.""" token: String! """Maximum number of versions to return, at least 1. Omitted, or above 1000, it is 1000; below 1 is refused.""" limit: Int """Number of newest versions to skip before the first one returned. Omitted, it is 0; negative is refused.""" offset: Int ): [DeviceProfileVersion!]! """ Lists the distinct values currently in use for a free-text classification field across the tenant's device types or profiles, sorted, without empty values. An authoring form can offer them as suggestions. More than 1000 distinct values are refused with LIMIT_EXCEEDED rather than listed in part. Requires device:read. """ facetValues( """The field whose values to list.""" facet: DeviceFacet! ): [String!]! """ Lists the tenant's declared facet keys, optionally for one member family, one page at a time. Powers the console's browse and filter axis picker and typeahead. Requires device:read. """ facetKeys( """The facets the listed facet keys must match, and the page to return.""" criteria: FacetKeySearchCriteria! ): FacetKeySearchResults! """ Returns the metric definitions with the given ids. Ids that match nothing are omitted, an id that is not a number fails the request, and more than 1000 ids are refused with LIMIT_EXCEEDED. Requires device:read. """ metricDefinitionsById( """Ids of the metric definitions to return.""" ids: [ID!]! ): [MetricDefinition!]! """ Returns the metric definitions with the given tokens. Tokens that match nothing are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Requires device:read. """ metricDefinitionsByToken( """Tokens of the metric definitions to return.""" tokens: [String!]! ): [MetricDefinition!]! """ Searches the tenant's metric definitions, newest first, one page at a time. These are the draft definitions, not a published version. Requires device:read. """ metricDefinitions( """Filters and the page to return.""" criteria: MetricDefinitionSearchCriteria! ): MetricDefinitionSearchResults! """ Checks a calculated-metric formula against a profile's draft measured metrics and evaluates it for a sample you type, with the same evaluator that computes a published calculated metric from each reading. Nothing is stored. A sample of more than 256 values is refused with LIMIT_EXCEEDED, and naming a key twice with INVALID_VALUE. Requires device:read. """ testMetricFormula( """Token of the profile whose draft measured metrics the formula reads.""" profileToken: String! """The formula.""" expression: String! """The result type: DOUBLE, INT or BOOLEAN.""" dataType: String! """The calculated metric's key, when the formula belongs to one.""" metricKey: String """Smallest value the metric accepts; a result below it is skipped.""" minValue: Float """Largest value the metric accepts; a result above it is skipped.""" maxValue: Float """The input values, at most 256.""" sample: [MetricValueInput!]! """ The values of the device constants the formula reads as `device.name`, as the device's metadata would hold them, at most 32. A constant the formula reads and this omits is absent, and the formula is skipped as missing_input, as it would be for a device without it. Omit this when the formula reads none. """ constants: [MetricValueInput!] ): MetricFormulaTest! """ Runs a payload decoder over one input and reports the readings it would store, what it skipped, the error with its expression path and the cost, then runs the profile's saved vectors. The decoder is checked against the profile's DRAFT metrics with the same compiler and the same output validation that run at ingest, and a webhook body is parsed by the same code as ingest. Nothing is stored. A document that does not compile is reported in error, not as a request error. Limited to 10 requests per second per tenant (RATE_LIMITED). Requires device:read, except that sampleId requires device:write. A caller limited to part of the tenant is refused. """ testPayloadDecoder( """The decoder and the input.""" input: PayloadDecoderTestInput! ): PayloadDecoderTestResult! """ The decoder function library, in a stable order: every function a decoder expression may call, with its signature and limits. It drives the editor's help. Requires device:read. """ payloadDecoderFunctions: [PayloadDecoderFunction!]! """ How the decoder of the profile has been doing over the last `minutes` (default 60, at most 10080, one week), summed over replicas. Rows are kept 7 days. Requires device:write. """ payloadDecoderHealth( """Token of the profile.""" profileToken: String! """The span in minutes.""" minutes: Int ): PayloadDecoderHealth! """ The failing uplinks kept for the profile, newest first: at most 20 are kept, and a new one is kept at most every 10 seconds per replica. Requires device:write. """ payloadDecoderSamples( """Token of the profile.""" profileToken: String! """How many to list (default and at most 20 kept).""" limit: Int ): [PayloadDecoderSample!]! """ Returns the command definitions with the given ids. Ids that match nothing are omitted, an id that is not a number fails the request, and more than 1000 ids are refused with LIMIT_EXCEEDED. Requires device:read. """ commandDefinitionsById( """Ids of the command definitions to return.""" ids: [ID!]! ): [CommandDefinition!]! """ Returns the command definitions with the given tokens. Tokens that match nothing are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Requires device:read. """ commandDefinitionsByToken( """Tokens of the command definitions to return.""" tokens: [String!]! ): [CommandDefinition!]! """ Searches the tenant's command definitions, newest first, one page at a time. These are the draft definitions, not a published version. Requires device:read. """ commandDefinitions( """Filters and the page to return.""" criteria: CommandDefinitionSearchCriteria! ): CommandDefinitionSearchResults! # The enqueue gate; a profile declaring no vocabulary allows # free-form payloads. """ Checks whether a command may be sent to a device, using the active published version of the device's profile. If that version declares commands, the key must be one of them and the payload must satisfy its parameters; if it declares none, or the device has no published profile, any command is allowed. Refusals are returned as a verdict, not as an error. Requires device:read. """ validateCommandEnqueue( """Token of the target device.""" deviceToken: String! """Key of the command to send.""" commandKey: String! """ The command's arguments as a JSON object. Omit it or send null to check a command sent with no arguments, which passes only if no parameter is required. """ payload: String ): CommandEnqueueVerdict! # One command key and one payload apply to every device, so the verdict depends only on # each device's TYPE: the devices resolve in one lookup and each distinct type's # published vocabulary is resolved once, rather than once per device. """ Checks one command against many devices at once, with the same rules as validateCommandEnqueue. Only refusals are returned: a device that may receive the command produces no entry, so an empty list means every listed device may receive it. Duplicate tokens are collapsed, and refusals come back in the order each device was first named. More than 2000 tokens fails the request. Requires device:read. """ validateCommandEnqueueBatch( """Tokens of the target devices, at most 2000.""" deviceTokens: [String!]! """Key of the command to send.""" commandKey: String! """The command's arguments as a JSON object, applied to every device. Omit it to check a command with no arguments.""" payload: String ): [BatchEnqueueRefusal!]! # It is a KEYSET walk rather than page-number paging, and that is a correctness # difference: with offset paging, a device leaving the group between two pages shifts # every later row down a slot, so a device that was a member throughout is never # visited. What a walk can still miss is a device that JOINS below the cursor after it # has passed. """ Returns one page of the devices an entity group contains, for use as the target of a command. Pass each page's nextCursor as afterId to get the next one. A device that stays in the group throughout a walk is visited exactly once. A dynamic group is resolved from a published version, never from its editable draft. A group that cannot be a target is answered with rejected set and a code, not with an error. Requires device:read. """ resolveDeviceGroupTargets( """Token of the entity group.""" groupToken: String! """ Published version of a dynamic group to resolve. Omit it for the active version. Must be omitted for a static group. """ version: Int """The nextCursor of the previous page. Omit it to start from the beginning. A malformed cursor fails the request.""" afterId: String """Maximum number of devices on the page, from 1 to 1000.""" limit: Int! ): DeviceGroupTargetPage! """ Returns the anchors of each named device: one type:token entry per tracked relationship from the device, such as customer:acme for a device assigned to that customer. Other services stamp a record about a device with these when they write it, which decides which members limited to part of the tenant can see the record. Devices that do not exist are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Not available to a member limited to part of the tenant. Requires device:read. """ deviceScopeAnchors( """Tokens of the devices, at most 1000.""" deviceTokens: [String!]! ): [DeviceScopeAnchors!]! """ Lists the commands a device currently accepts, from the active published version of its profile. It reads the same data validateCommandEnqueue checks against. Returns null when no device has the token. Requires device:read. """ deviceCommandVocabulary( """Token of the device.""" deviceToken: String! ): DeviceCommandVocabulary """ Tells whether a device reports its own position, from the active published version of its profile rather than the draft. Returns null when no device has the token; a device that declares nothing answers with declared false. Requires device:read. """ deviceLocationDeclaration( """Token of the device.""" deviceToken: String! ): DeviceLocationCapability """ Lists the metrics a device's measurements are validated against, from the active published version of its profile: the same reading ingest validates and stores each measurement by. Returns null when no device has the token. Requires device:read. """ deviceMetricVocabulary( """Token of the device.""" deviceToken: String! ): DeviceMetricVocabulary """Reads detection rules by numeric id. Ids naming no rule are omitted. Requires device:read.""" detectionRulesById( """Numeric ids of the detection rules to read.""" ids: [ID!]! ): [DetectionRule!]! """Reads detection rules by token. Tokens naming no rule are omitted. Requires device:read.""" detectionRulesByToken( """Tokens of the detection rules to read.""" tokens: [String!]! ): [DetectionRule!]! """Lists the detection rules that match the criteria, one page at a time. Requires device:read.""" detectionRules( """The facets the listed detection rules must match, and the page to return.""" criteria: DetectionRuleSearchCriteria! ): DetectionRuleSearchResults! """Reads geofences by numeric id. Ids naming no fence are omitted. Requires device:read.""" geoFencesById( """Numeric ids of the geofences to read.""" ids: [ID!]! ): [GeoFence!]! """Reads geofences by token. Tokens naming no fence are omitted. Requires device:read.""" geoFencesByToken( """Tokens of the geofences to read.""" tokens: [String!]! ): [GeoFence!]! """Lists the tenant's geofences, one page at a time. Requires device:read.""" geoFences( """The facets the listed geofences must match, and the page to return.""" criteria: GeoFenceSearchCriteria! ): GeoFenceSearchResults! # The tenant's active fence-set version — the number stamped onto resolved location # events, naming the frozen snapshot of the fences live at that moment. A change to the # fence SET mints the next one — a fence created, a boundary edited, a fence deleted. # Renaming a fence, or editing its description or metadata, does not: none of them appear # in the frozen snapshot, so a new version would name shapes identical to the current one. # 0 means the tenant has never had a fence, which is distinct from a minted version whose # fence set happens to be empty. """ The tenant's active fence-set version: the number stamped onto resolved location events, naming the frozen snapshot of the fences live at that moment. Creating a fence, editing a boundary or deleting a fence mints the next one; renaming a fence or editing its description or metadata does not. 0 means the tenant has never had a fence, which differs from a minted version whose fence set happens to be empty. Requires device:read. """ currentFenceSetVersion: Int! # The FROZEN fence set of one fence-set version — the fences that were live when an # event stamped with that version was resolved. This is how a consumer resolves a # version it no longer holds in memory: an authoring preview replaying last week, a # late redelivery, a cold start. An unknown non-zero version is an error, because a # stamp naming a version that is not on record means the history was truncated and # answering "empty" would read as "no fences" rather than "cannot know". """ The frozen fence set of one version: the fences that were live when an event stamped with that version was resolved. Used to resolve a version a consumer no longer holds, such as a preview replaying last week, a late redelivery or a cold start. An unknown non-zero version is an error, because a stamp naming a version that is not on record means history was truncated and answering empty would read as no fences rather than cannot know. Requires device:read. """ geoFenceSetSnapshot( """The fence-set version to read the frozen fence set of.""" version: Int! ): GeoFenceSetSnapshot! # The frozen fence set of the tenant's CURRENT version — the version and its fences # read together, so the two cannot disagree across a concurrent fence edit. # # That guarantee holds WITHIN one response. A caller reading a multi-page fence set # must take page 1 from here and every later page from geoFenceSetSnapshot at the # version this one reported: asking here twice is two questions about a moving target, # and a fence edit between them yields two pages of two different sets stitched # together under one version number. """ The frozen fence set of the tenant's current version, with the version and its fences read together so they cannot disagree across a concurrent fence edit. That holds only within one response: to read a multi-page fence set, take page 1 from here and every later page from geoFenceSetSnapshot at the version reported here. Requires device:read. """ currentGeoFenceSet: GeoFenceSetSnapshot! # The manifest of one fence-set version: which fences it held and the content address # of each one's geometry. Unlike geoFenceSetSnapshot this reads no geometry at all, so # it is a fixed cost per fence and needs no pagination. # # An unknown POSITIVE version is an error, for the same reason geoFenceSetSnapshot gives: # a stamp naming a version that is not on record means the history was truncated, and # answering "empty" would read as "no fences" rather than "cannot know". A negative # version is refused outright rather than sharing version 0's known-empty answer. """ The manifest of one fence-set version: which fences it held and the content address of each one's geometry. It reads no geometry, so it costs the same per fence and needs no pagination. An unknown positive version is an error, for the reason given on geoFenceSetSnapshot, and a negative version is refused. Requires device:read. """ geoFenceSetManifest( """The fence-set version to read the manifest of.""" version: Int! ): GeoFenceSetManifest! # ---- Detection-engine reconcile reads ------------------------------------------------ # What the detection engine's copy of this tenant's rules, devices and thresholds is # checked against. event-processing reads them over a service token when it takes the # DETECT partition and every five minutes after, and corrects whatever differs — which # is how a rule, device or attribute change whose notification was lost still reaches # detection. Each is a keyset page: pass the previous page's nextCursor as afterId, and # stop when it is null. A limit outside 1..the door's maximum is refused. # # One page of the tenant's PUBLISHED profiles, each with its active version, the # instant that version became active and the version's enabled detection rules. A # profile whose frozen snapshot cannot be read fails the whole page rather than # answering with no rules. """ Detection-engine reconcile read. One page of the tenant's published profiles, each with its active version, when that version became active and its enabled detection rules. The engine reads the reconcile queries when it takes the detection partition and every five minutes after, and corrects whatever differs, so a rule, device or attribute change whose notification was lost still reaches detection. A keyset page: pass the previous page's nextCursor as afterId, and stop when it is null. A limit outside 1 to the maximum is refused. A profile whose frozen snapshot cannot be read fails the whole page rather than answering with no rules. Requires device:read. """ activeProfileRules( """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, from 1 to the maximum the query allows; a value outside that range is refused.""" limit: Int! ): ActiveProfileRulesPage! """ Detection-engine reconcile read. One page of the device roster: every device, the profile its type adopts (empty when none) and when that membership began. Pass the previous page's nextCursor as afterId and stop when it is null. Requires device:read. """ deviceRosterPage( """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, from 1 to the maximum the query allows; a value outside that range is refused.""" limit: Int! ): DeviceRosterPage! """ One page of the numbers the devices of a profile (those whose type adopts it) hold in their metadata under the given names, which a draft calculated-metric formula reads as `device.name`. Only devices holding at least one of the names are listed. This is the rule preview's source for recalculating history with the devices' CURRENT constants. Pass the previous page's nextCursor as afterId and stop when it is null. A limit outside 1..500, or no key or more than 32, is refused with INVALID_VALUE. Requires device:read. """ deviceConstantsPage( """The token of the profile whose devices are read.""" profileToken: String! """The constant names to read, 1 to 32 of them, each 1 to 64 bytes.""" keys: [String!]! """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, 1 to 500.""" limit: Int! ): DeviceConstantsPage! """ Describes the calculated metrics of one PUBLISHED version of a profile: the measured metrics its formulas may read, each calculated metric with its formula, type, bounds and unit in the order the live resolver evaluates them, and the device constants they read. It is read out of the same compiled plan the resolver runs, so a caller that compiles it gets that plan. A draft is not a version: an unknown profile, a profile never published and a version never published are NOT_FOUND. A plan that cannot be built is an error, never an empty answer. Requires device:read; customer-scoped callers are refused. """ calculatedMetricPlan( """The token of the profile.""" profileToken: String! """The published version number; omit for the active version.""" version: Int ): CalculatedMetricPlan! """ One page of EVERY device whose type adopts the profile, in device order, each with when it was created and the numbers its metadata holds under the requested names (a device holding none is still listed). Pass the previous page's nextCursor as afterId and stop when it is null. deviceTokens narrows the walk to those devices, and a token that is not a device of the profile is refused with INVALID_VALUE, naming it. A limit outside 1..500, more than 32 constant names or more than 1000 device tokens is refused with INVALID_VALUE. Requires device:read; customer-scoped callers are refused. """ calculatedBackfillRoster( """The token of the profile whose devices are walked.""" profileToken: String! """The constant names to read, at most 32, each 1 to 64 bytes.""" constantKeys: [String!]! """Only these devices, at most 1000; omit for every device of the profile.""" deviceTokens: [String!] """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, 1 to 500.""" limit: Int! ): CalculatedBackfillRosterPage! """ One page of the tokens of the devices an operator has disabled, in device order. Pass the previous page's nextCursor as afterId and stop when it is null; a limit outside 1..1000 is refused. command-delivery walks it at startup and every few minutes to correct its record of which devices are disabled, because commands already queued for a disabled device are held rather than sent. Requires device:read. """ disabledDevicePage( """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, 1 to 1000.""" limit: Int! ): DisabledDevicePage! """ Detection-engine reconcile read. One page of the numeric SHARED and SERVER device attributes that a dynamic detection threshold can read. A page can hold fewer entries than its limit and still have a nextCursor; only a null cursor ends the walk. Requires device:read. """ deviceThresholdAttributePage( """The nextCursor of the previous page; omit for the first page.""" afterId: String """Page size, from 1 to the maximum the query allows; a value outside that range is refused.""" limit: Int! ): DeviceThresholdAttributePage! """ The manifest of the tenant's current version, with the version and its fences read from one row so they cannot disagree across a concurrent fence edit. Requires device:read. """ currentGeoFenceSetManifest: GeoFenceSetManifest! # The archived geometry documents stored under the given content addresses. # # An address this tenant does not hold is ABSENT from the result rather than an error: # the question is "which of these do you have?", and the set of answers is the answer. # Incompleteness is the caller's to interpret — a caller resolving a manifest must turn # a missing body into a fence that reports an ERROR, never one that is silently absent, # because an absent fence reads downstream as "this fence does not exist" and makes # containment answer "outside" for a device that is inside. # # Asking for more addresses than the per-request limit is an error rather than a partial # answer: a caller that asked for forty and silently received twenty-four could not tell # that from a tenant holding only twenty-four of them. """ The archived geometry documents stored under the given content addresses. An address the tenant does not hold is absent from the result rather than an error, so incompleteness is the caller's to interpret: a missing body must become a fence that reports an error, never one that is silently absent, since an absent fence reads as outside for a device that is inside. Asking for more addresses than the per-request limit is an error, not a partial answer. Requires device:read. """ geoFenceGeometry( """ Content addresses of the geometry documents to fetch, taken from a manifest. More than the per-request limit is an error. """ hashes: [String!]! ): [GeoFenceGeometry!]! """ Reads alarms by numeric id. Ids naming no alarm, or an alarm the caller may not see, are omitted. Requires alarm:read. """ alarmsById( """Numeric ids of the alarms to read.""" ids: [ID!]! ): [Alarm!]! """ Reads alarms by token. Tokens naming no alarm, or an alarm the caller may not see, are omitted. Requires alarm:read. """ alarmsByToken( """Tokens of the alarms to read.""" tokens: [String!]! ): [Alarm!]! """ Service plane. Returns existence and lifecycle state only, including alarms derived from position and alarms whose position classification is pending. Omits unknown tokens. Requires a service token with alarm:read; tenant access tokens are refused. """ alarmLifecycles( """The alarm tokens to reconcile, bounded by the batch lookup limit.""" tokens: [String!]! ): [AlarmLifecycle!]! """ Lists the alarms that match the criteria, one page at a time. Requires alarm:read; a member whose access is limited to some customers sees only the alarms of its own devices. """ alarms( """The facets the listed alarms must match, and the page to return.""" criteria: AlarmSearchCriteria! ): AlarmSearchResults! """ Lists alarm disposition labels, newest labelled cycle first: every labelled cycle, including those before an alarm's current one. It is the read a backtest scores a rule against. Requires alarm:read; a member whose access is limited to some customers reads the labels of the cycles raised under its customers. """ alarmDispositions( """The facets the listed labels must match, and the page to return.""" criteria: AlarmDispositionSearchCriteria! ): AlarmDispositionSearchResults! """ Counts the alarms matching the criteria per originating device type and severity, in one read, for a view that groups alarms by type. Only alarms on devices the caller can read are counted, so a type's count equals the total of alarms(criteria) filtered to that type. Requires alarm:read. """ alarmCountsByDeviceType( """The facets the counted alarms must match.""" criteria: AlarmCountCriteria! ): [AlarmDeviceTypeCount!]! """ Counts the alarms matching the criteria per severity, in one read. With no deviceType every alarm alarms(criteria) would return is counted, whatever its originator (a device, an asset, an area, a customer or a group), so the counts sum to its total. With a deviceType only the alarms on devices of that type are counted, as alarms(criteria) filtered to that type returns them; an unknown type counts nothing. A severity with no alarm is absent. Requires alarm:read. """ alarmCountsBySeverity( """The facets the counted alarms must match.""" criteria: AlarmCountCriteria! """Only alarms on devices of this type, by its token.""" deviceType: String ): [AlarmSeverityCount!]! """Lists the entity attributes that match the criteria, one page at a time. Requires device:read.""" entityAttributes( """The facets the listed attributes must match, and the page to return.""" criteria: EntityAttributeSearchCriteria! ): EntityAttributeSearchResults! """Queries the audit journal, newest first, one page at a time. Requires audit:read.""" auditEvents( """The facets the listed audit events must match, and the page to return.""" criteria: AuditEventSearchCriteria! ): AuditEventSearchResults! """ Returns the devices with the given ids. Ids that match no device are omitted, an id that is not a number fails the request, and more than 1000 ids are refused with LIMIT_EXCEEDED. Requires device:read. """ devicesById( """Ids of the devices to return.""" ids: [ID!]! ): [Device!]! """ Returns the devices with the given tokens. Tokens that match no device are omitted, and more than 1000 tokens are refused with LIMIT_EXCEEDED. Requires device:read. """ devicesByToken( """Tokens of the devices to return.""" tokens: [String!]! ): [Device!]! """ Returns the devices whose business identifier is one of the given values. Values that match no device are omitted. Requires device:read. """ devicesByExternalId( """Business identifiers to look up, matched exactly.""" externalIds: [String!]! ): [Device!]! """Searches the tenant's devices, newest first, one page at a time. Requires device:read.""" devices( """Filters and the page to return.""" criteria: DeviceSearchCriteria! ): DeviceSearchResults! """ Searches the devices linked to one customer by one relationship type, newest first, one page at a time: the members of a dashboard widget bound to that customer. A customer or relationship type that does not exist matches nothing. For a member limited to part of the tenant, the customer must be one that member's access names, or the request is refused with FORBIDDEN, and only an ownership relationship (a tracked type, such as the default "assigned") matches. Requires device:read. """ customerDevices( """The customer, the relationship type and the page to return.""" criteria: CustomerDeviceSearchCriteria! ): DeviceSearchResults! """ Searches the devices on one anchor (a customer, an area or an asset), newest first, one page at a time: the members of a dashboard widget bound to that anchor, as the caller may read them. Every answer, and pagination.totalRecords, counts only the devices the caller can see, never the whole anchor. An anchor that does not exist matches nothing. For a member limited to part of the tenant, a customer anchor must be one that member's access names, or the request is refused with FORBIDDEN; an area or asset that none of the member's devices is on matches nothing; only ownership (tracked) relationships match, so naming a relationshipType is refused as unsupported for scoped access; and any other anchor kind is refused as unsupported for scoped access (FORBIDDEN, reason SCOPE_UNSUPPORTED). Requires device:read. """ anchorDevices( """The anchor, an optional relationship type and the page to return.""" criteria: AnchorDeviceSearchCriteria! ): DeviceSearchResults! """Reads entity groups by numeric id. Ids naming no group are omitted. Requires device:read.""" entityGroupsById( """Numeric ids of the entity groups to read.""" ids: [ID!]! ): [EntityGroup!]! """ Reads entity groups by token. Tokens naming no group are omitted. Also answered to a member whose access is limited to part of the tenant, with only the groups its scope names, of which it reads the token and name: description, metadata, selector, members and versions are refused. """ entityGroupsByToken( """Tokens of the entity groups to read.""" tokens: [String!]! ): [EntityGroup!]! """ Lists the entity groups that match the criteria, optionally by member family and mode, one page at a time. Requires device:read. """ entityGroups( """The facets the listed entity groups must match, and the page to return.""" criteria: EntityGroupSearchCriteria! ): EntityGroupSearchResults! """ Evaluates a candidate dynamic-group selector for a member family without saving it, for a live matches-N authoring preview. It applies the same checks, translation and bounded query as a saved dynamic group, so the preview is what the group would resolve. A selector that is not expressible, over budget or malformed returns valid false with an inline error rather than failing. Requires device:read. """ previewSelector( """The entity family to evaluate the selector against: device, asset, area or customer.""" memberType: String! """The candidate CEL membership selector. It is evaluated but not saved.""" selector: String! """The page of matching members to return.""" pagination: PaginationInput! ): SelectorPreview! """ Lists a dynamic entity group's published versions, newest first. At most 1000 per call; limit (at least 1) narrows that and offset (not negative) pages further. Requires device:read. """ entityGroupVersions( """Token of the dynamic entity group.""" token: String! """Most versions to return, at least 1 and at most 1000. Omit for 1000.""" limit: Int """Number of versions to skip, not negative. Use with limit to page further.""" offset: Int ): [EntityGroupVersion!]! """ Reads device credentials by numeric id. Ids naming no credential are omitted. Requires device:write rather than device:read: whoever could read credentials could impersonate the device. An access token is never returned by a read, only a fingerprint. """ deviceCredentialsById( """Numeric ids of the device credentials to read.""" ids: [ID!]! ): [DeviceCredential!]! """ Reads device credentials by token. Tokens naming no credential are omitted. Requires device:write, as deviceCredentialsById does. """ deviceCredentialsByToken( """Tokens of the device credentials to read.""" tokens: [String!]! ): [DeviceCredential!]! """ Lists the device credentials that match the criteria, one page at a time. Requires device:write, as deviceCredentialsById does. """ deviceCredentials( """The facets the listed device credentials must match, and the page to return.""" criteria: DeviceCredentialSearchCriteria! ): DeviceCredentialSearchResults! """ Lists device replacement records, newest first, optionally narrowed to one device. There is no by-id or by-token query: a replacement is never addressed on its own, only read as part of a device's history. Requires device:read. """ deviceReplacements( """The facets the listed device replacements must match, and the page to return.""" criteria: DeviceReplacementSearchCriteria! ): DeviceReplacementSearchResults! """ A device's configuration: its latest revision, its last report and whether they agree. Null when no device has this token. Reading mints nothing. """ deviceConfiguration( """ The token of the device to read. """ deviceToken: String! ): DeviceConfiguration """ A page of a device's configuration revisions, newest first. Empty when no device has this token. """ deviceConfigurationRevisions( """ The token of the device whose revisions to list. """ deviceToken: String! """ Which page of revisions to return, bounded by the platform page-size ceiling. """ pagination: PaginationInput! ): DeviceConfigurationRevisionSearchResults! """ The asset directly above this one in the hierarchy, or null when it is a root. A root is a normal state, not an error. Requires device:read. """ assetParent( """Token of the asset whose parent to read.""" token: String! ): Asset """ The path from an asset to its root, nearest ancestor first, which is the order a breadcrumb is built from. Requires device:read. """ assetAncestors( """Token of the asset whose ancestors to read.""" token: String! ): [Asset!]! """ One page of the assets directly below a parent. Omit parentToken to page the roots of the tree, so a tree browser asks the same question at every level. Requires device:read. """ assetChildren( """Token of the parent asset. Omit to page the roots of the tree.""" parentToken: String """The page of children to return.""" pagination: PaginationInput! ): AssetSearchResults! """ Reads provisioning profiles by numeric id. Ids naming no profile are omitted. Requires device:read. The provision secret is never returned. """ provisioningProfilesById( """Numeric ids of the provisioning profiles to read.""" ids: [ID!]! ): [ProvisioningProfile!]! """ Reads provisioning profiles by token. Tokens naming no profile are omitted. Requires device:read. The provision secret is never returned. """ provisioningProfilesByToken( """Tokens of the provisioning profiles to read.""" tokens: [String!]! ): [ProvisioningProfile!]! """Find one integration by token, or null when there is none.""" integration( """Token of the integration.""" token: String! ): Integration """List integrations that meet the criteria.""" integrations( """Paging and filters.""" criteria: IntegrationSearchCriteria! ): IntegrationSearchResults! """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. What the ingest path needs to know about the payload decoder of a device type, as seen by one integration: whether the active published version of the type's profile declares one, which input an uplink must carry for it, and the figures the ingest charge is built from. Returns null for every failure to authenticate (no such integration, a wrong token and a switched-off integration are indistinguishable), and present: false for a device type that does not exist or lies outside the integration's scope. """ integrationDecoder( """Token of the integration, as it appears in the sender's URL.""" integration: String! """The bearer token the sender presented.""" secret: String! """Token of the device type the uplink's device belongs to.""" deviceTypeToken: String! ): IntegrationDecoderPlan """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. What the ingest path needs to know about the payload decoder of the device with this token, for a device that publishes its own payload: whether the active published version of its type's profile declares one, which input it reads, and the figures the ingest charge is built from. The credential the device presented is authenticated first, and the answer is null for every failure to do so (nothing presented, an unknown, disabled or expired credential, a wrong secret, a credential that belongs to another device, a device that does not exist): those are indistinguishable from one another and say nothing about whether a decoder is attached. A device that authenticates and whose type has no decoder is present: false. """ deviceDecoder( """Token of the device the uplink is addressed to.""" deviceToken: String! """Type of the credential the device presented (ACCESS_TOKEN, MQTT_BASIC).""" credentialType: String! """The credential id the device presented (for an access token, the token).""" credentialId: String! """The secret the device presented, for a credential type that carries one.""" credentialSecret: String ): DeviceDecoderPlan """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. The same question as deviceDecoder, for a device that published its own payload on its raw-payload MQTT topic: the platform's broker authenticated the device at connect and confined it to its own topic, so no credential is presented. Null when no device has this token; present: false for a device whose type has no decoder. """ brokerAssertedDeviceDecoder( """Token of the device the broker confined the publish to.""" deviceToken: String! ): DeviceDecoderPlan """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. Proves a bearer token belongs to the integration with this token. Returns the integration when it does, and null for every failure: no such integration and a wrong token are indistinguishable. A switched-off integration whose token matches is returned with enabled false, so callers MUST check enabled before accepting traffic. Used by the ingest path to authenticate a sender. """ integrationAuth( """Token of the integration, as it appears in the sender's URL.""" token: String! """The bearer token the sender presented.""" secret: String! ): Integration """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. The ingest door's one question about an event's credential: would the credential its body carries authenticate under the device authentication policy the event resolver applies? True when it would (or when the policy asks for none); false only for an authentication failure, with no word on which: an unknown credential, an expired one, a wrong secret, another device's credential and a missing one the policy requires are one answer. A database failure is an error, never false. The caller MUST throttle failures per credential: unlike the resolver's, this verdict reaches the sender. """ checkDeviceCredential( """The device token the event names, or empty.""" device: String! """The credential type the event presents (for example MQTT_BASIC), or empty.""" credentialType: String! """The credential id the event presents, or empty.""" credentialId: String! """The credential secret the event presents, or null.""" secret: String ): Boolean! """ The sender-named devices an integration has seen that the tenant has no device in scope for, most recently seen first. Requires device:read. """ unregisteredIntegrationDevices( """The integration and the page.""" criteria: UnregisteredIntegrationDeviceSearchCriteria! ): UnregisteredIntegrationDeviceSearchResults! """ Lists the provisioning profiles that match the criteria, one page at a time. Requires device:read. The provision secret is never returned. """ provisioningProfiles( """The facets the listed provisioning profiles must match, and the page to return.""" criteria: ProvisioningProfileSearchCriteria! ): ProvisioningProfileSearchResults! """Find trust anchors by unique id.""" deviceTrustAnchorsById( """Ids of the anchors.""" ids: [ID!]! ): [DeviceTrustAnchor!]! """Find trust anchors by unique token.""" deviceTrustAnchorsByToken( """Tokens of the anchors.""" tokens: [String!]! ): [DeviceTrustAnchor!]! """List trust anchors that meet the criteria.""" deviceTrustAnchors( """Paging and filters.""" criteria: DeviceTrustAnchorSearchCriteria! ): DeviceTrustAnchorSearchResults! """List the revoked certificates of a trust anchor, newest first.""" deviceRevokedCertificates( """Token of the anchor.""" anchorToken: String! """Paging and filters.""" criteria: DeviceRevokedCertificateSearchCriteria! ): DeviceRevokedCertificateSearchResults! """ Reads a device's current possession claim, or null when it has none. The claim secret is never returned. Requires device:read. """ deviceClaim( """Token of the device.""" deviceToken: String! ): DeviceClaim """Reads relationship types by numeric id. Ids naming no type are omitted. Requires device:read.""" entityRelationshipTypesById( """Numeric ids of the entity relationship types to read.""" ids: [String!]! ): [EntityRelationshipType!]! """Reads relationship types by token. Tokens naming no type are omitted. Requires device:read.""" entityRelationshipTypesByToken( """Tokens of the entity relationship types to read.""" tokens: [String!]! ): [EntityRelationshipType!]! """Lists the relationship types that match the criteria, one page at a time. Requires device:read.""" entityRelationshipTypes( """The facets the listed entity relationship types must match, and the page to return.""" criteria: EntityRelationshipTypeSearchCriteria! ): EntityRelationshipTypeSearchResults! """ The tenant's semantic context: the vocabulary packs it has enabled and the custom prefixes it declared. A tenant that never set one has an empty context, which enables nothing, so no binding is accepted. Requires device:read; a member limited to part of the tenant may read it. Null only on an error, which says why. """ semanticContext: SemanticContext """Reads relationships by numeric id. Ids naming no relationship are omitted. Requires device:read.""" entityRelationshipsById( """Numeric ids of the entity relationships to read.""" ids: [String!]! ): [EntityRelationship!]! """Reads relationships by token. Tokens naming no relationship are omitted. Requires device:read.""" entityRelationshipsByToken( """Tokens of the entity relationships to read.""" tokens: [String!]! ): [EntityRelationship!]! """Lists the relationships that match the criteria, one page at a time. Requires device:read.""" entityRelationships( """The facets the listed entity relationships must match, and the page to return.""" criteria: EntityRelationshipSearchCriteria! ): EntityRelationshipSearchResults! """ Returns the subset of the given references that resolve to an existing entity in the caller's tenant, so a caller can find the references whose entity has been deleted. The event-management reconciliation sweep uses it to find orphaned anchors. Requires device:read. """ existingEntityRefs( """The (type, id) references to check.""" refs: [EntityRefInput!]! ): [EntityRef!]! """ Reads asset types by numeric id. Ids naming no asset type are omitted. Answered to a member limited to part of the tenant too, since a type is configuration rather than device data. Requires device:read. """ assetTypesById( """Numeric ids of the asset types to read.""" ids: [ID!]! ): [AssetType!]! """ Reads asset types by token. Tokens naming no asset type are omitted. Answered to a member limited to part of the tenant too. Requires device:read. """ assetTypesByToken( """Tokens of the asset types to read.""" tokens: [String!]! ): [AssetType!]! """ Lists the asset types that match the criteria, one page at a time. Answered to a member limited to part of the tenant too. Requires device:read. """ assetTypes( """The facets the listed asset types must match, and the page to return.""" criteria: AssetTypeSearchCriteria! ): AssetTypeSearchResults! """ Reads assets by numeric id. A member limited to part of the tenant is answered with only the assets one of its visible devices is assigned to (over a tracked relationship), their metadata and properties are null for it, and any other id is omitted as if it did not exist. Requires device:read. """ assetsById( """Numeric ids of the assets to read.""" ids: [ID!]! ): [Asset!]! """ Reads assets by token. Scoped as assetsById: an asset outside the caller's reach is omitted, never refused. Requires device:read. """ assetsByToken( """Tokens of the assets to read.""" tokens: [String!]! ): [Asset!]! """ Lists the assets that match the criteria, one page at a time. Scoped as assetsById; pagination counts only the assets the caller reaches. Requires device:read. """ assets( """The facets the listed assets must match, and the page to return.""" criteria: AssetSearchCriteria! ): AssetSearchResults! """ Lists an asset type's published property-contract versions, newest first. At most 1000 per call; limit (at least 1) narrows that and offset (not negative) pages further. Requires device:read. """ assetTypeVersions( """Token of the asset type.""" token: String! """Most versions to return, at least 1 and at most 1000. Omit for 1000.""" limit: Int """Number of versions to skip, not negative. Use with limit to page further.""" offset: Int ): [AssetTypeVersion!]! """ The version that assets of this type are currently validated against, or null when the type has never been published. Requires device:read. """ activeAssetTypeVersion( """Token of the asset type.""" token: String! ): AssetTypeVersion """Find maintenance windows by unique id. Ids that match nothing are omitted. Requires device:read.""" maintenanceWindowsById( """Ids of the windows to find.""" ids: [ID!]! ): [MaintenanceWindow!]! """Find maintenance windows by unique token. Tokens that match nothing are omitted. Requires device:read.""" maintenanceWindowsByToken( """Tokens of the windows to find.""" tokens: [String!]! ): [MaintenanceWindow!]! """List the tenant's maintenance windows, one page at a time. Requires device:read.""" maintenanceWindows( """Which page to return.""" criteria: MaintenanceWindowSearchCriteria! ): MaintenanceWindowSearchResults! """ When an operation under the maintenance window with this token may start at the given instant. The answer for a deleted window is found=false, not an error. Requires device:read. """ maintenanceWindowOpening( """Token of the window.""" token: String! """The instant to evaluate at, as an RFC 3339 timestamp. Omit it for now.""" at: String ): MaintenanceWindowOpening! """ Decides, for a command about to be enqueued, which devices must wait for their device type's maintenance window and which are refused because the window opens after the command expires. Only commands whose definition has impact DISRUPTIVE or DESTRUCTIVE, on a type that has a window, are ever held. Devices that do not exist or are disabled are skipped; validateCommandEnqueue decides those. Requires device:read. """ commandDispatchSchedule( """Tokens of the target devices, at most 2000.""" deviceTokens: [String!]! """Key of the command to send.""" commandKey: String! """When the command expires, as an RFC 3339 timestamp. Omit it for a command that never expires.""" expiresAt: String """ True when asking about a command that is already waiting for a maintenance window. The answer then follows the device type's window alone: a profile version that now marks the command NORMAL does not make it ungated, so it keeps waiting. Defaults to false. """ alreadyHeld: Boolean ): CommandDispatchSchedule! """ Which of the named devices take their commands over HTTP_PULL: the ones that exist, are enabled, and whose device type has commandChannel HTTP_PULL. A device that does not exist or is disabled is simply absent from the answer. Requires device:read. """ commandPullDevices( """Tokens of the devices to ask about, at most 2000.""" deviceTokens: [String!]! ): [String!]! """ Service plane. Proves a device's access token for the HTTP command endpoints and says which device it belongs to. Null when the token is unknown, revoked or expired, or the device is disabled: one answer for all of them. Reads the database on every call, so a revocation takes effect on the next request. Requires a service token with device:read. """ authenticateCommandChannel( """The device's access token.""" credentialId: String! ): CommandChannelAccess """ Reads customer types by numeric id. Ids naming no customer type are omitted. Answered to a member limited to part of the tenant too, since a type is configuration rather than device data. Requires device:read. """ customerTypesById( """Numeric ids of the customer types to read.""" ids: [ID!]! ): [CustomerType!]! """ Reads customer types by token. Tokens naming no customer type are omitted. Answered to a member limited to part of the tenant too. Requires device:read. """ customerTypesByToken( """Tokens of the customer types to read.""" tokens: [String!]! ): [CustomerType!]! """ Lists the customer types that match the criteria, one page at a time. Answered to a member limited to part of the tenant too. Requires device:read. """ customerTypes( """The facets the listed customer types must match, and the page to return.""" criteria: CustomerTypeSearchCriteria! ): CustomerTypeSearchResults! """Reads customers by numeric id. Ids naming no customer are omitted. Requires device:read.""" customersById( """Numeric ids of the customers to read.""" ids: [ID!]! ): [Customer!]! """Reads customers by token. Tokens naming no customer are omitted. Requires device:read.""" customersByToken( """Tokens of the customers to read.""" tokens: [String!]! ): [Customer!]! """Lists the customers that match the criteria, one page at a time. Requires device:read.""" customers( """The facets the listed customers must match, and the page to return.""" criteria: CustomerSearchCriteria! ): CustomerSearchResults! """ Reads area types by numeric id. Ids naming no area type are omitted. Answered to a member limited to part of the tenant too, since a type is configuration rather than device data. Requires device:read. """ areaTypesById( """Numeric ids of the area types to read.""" ids: [ID!]! ): [AreaType!]! """ Reads area types by token. Tokens naming no area type are omitted. Answered to a member limited to part of the tenant too. Requires device:read. """ areaTypesByToken( """Tokens of the area types to read.""" tokens: [String!]! ): [AreaType!]! """ Lists the area types that match the criteria, one page at a time. Answered to a member limited to part of the tenant too. Requires device:read. """ areaTypes( """The facets the listed area types must match, and the page to return.""" criteria: AreaTypeSearchCriteria! ): AreaTypeSearchResults! """ Reads areas by numeric id. A member limited to part of the tenant is answered with only the areas one of its visible devices is placed in (over a tracked relationship), their metadata is null for it, and any other id is omitted as if it did not exist. Requires device:read. """ areasById( """Numeric ids of the areas to read.""" ids: [ID!]! ): [Area!]! """ Reads areas by token. Scoped as areasById: an area outside the caller's reach is omitted, never refused. Requires device:read. """ areasByToken( """Tokens of the areas to read.""" tokens: [String!]! ): [Area!]! """ Lists the areas that match the criteria, one page at a time. Scoped as areasById; pagination counts only the areas the caller reaches. Requires device:read. """ areas( """The facets the listed areas must match, and the page to return.""" criteria: AreaSearchCriteria! ): AreaSearchResults! """ (Preview: may change in a minor release.) The tenant's agent proposals, newest first. A person needs alarm:read; an AI agent's token (one holding alarm:propose) sees only its own client's proposals for the person it acts for. A member limited to part of the tenant is refused. """ agentProposals( """(Preview: may change in a minor release.) The filters, and the page to return.""" criteria: AgentProposalSearchCriteria! ): AgentProposalSearchResults! """ (Preview: may change in a minor release.) One agent proposal by token, under the same rules as agentProposals. A token that names no proposal the caller may see fails with NOT_FOUND. """ agentProposal( """(Preview: may change in a minor release.) The proposal's token.""" token: String! ): AgentProposal! """List whole visible windows with computed status and target filters. Requires alarm:read.""" alarmSuppressionWindows( """Filters and pagination.""" criteria: AlarmSuppressionWindowSearchCriteria! ): AlarmSuppressionWindowSearchResults! """Read up to one hundred visible windows by token; unknown or hidden tokens are omitted.""" alarmSuppressionWindowsByToken( """Window tokens.""" tokens: [String!]! ): [AlarmSuppressionWindow!]! """Preview visible windows matching current device facts and time, ignoring alarm keys and bypass severity.""" alarmSuppressionsForDevice( """Visible device token.""" deviceToken: String! """RFC 3339 instant; omit for now.""" at: String ): [AlarmSuppressionWindow!]! """Live suppression for up to two hundred alarm tokens. Requires alarm:read; unknown and hidden alarms are omitted.""" alarmSuppressionStatus( """Alarm tokens, at most two hundred.""" tokens: [String!]! ): [AlarmSuppressionStatus!]! } """One facet value on an existing device, asset, area or customer, addressed by token. The server uses SHARED scope and the facet declaration's value type. Text is trimmed as on a single attribute write; blank values are INVALID. This operation does not clear attributes or create entities.""" input FacetValueImportRow { """The member family: device, asset, area or customer.""" memberType: String! """The existing entity's token in the caller's tenant.""" token: String! """A facet key declared for this member family.""" key: String! """Text to validate and normalize under the facet's declared type.""" value: String! } """The outcome of one facet value import row; never includes its value.""" type FacetValueImportRowResult { """One-based position within this call.""" row: Int! """The supplied member family.""" memberType: String! """The supplied entity token.""" token: String! """The supplied facet key.""" key: String! """SET (would set on a dry run), EXISTS (unchanged), INVALID or REFUSED.""" outcome: String! """Machine-readable reason for INVALID or REFUSED.""" code: String """Reason for INVALID or REFUSED, without echoing the supplied value.""" message: String } # Contains mutations executed against model. """ The writes of the tenant data plane. A field's description names the authority it needs; a write applies to the caller's tenant only. """ type Mutation { """Import 1-1000 facet values with one result per row in input order. Requires device:write, like setEntityAttribute. Each changed row commits independently with membership and configuration reconciliation; failures report REFUSED. Re-running identical normalized values reports EXISTS without another write. Different values replace the existing SHARED value. Later duplicate (memberType, token, key) rows in this call are INVALID. Does not create entities.""" importFacetValues( """Values on existing entities, addressed by token.""" rows: [FacetValueImportRow!]! """Validate and predict outcomes without writing; concurrent changes or write failures may change actual outcomes.""" dryRun: Boolean! ): [FacetValueImportRowResult!]! """(Preview: may change in a minor release.) Set automation protection. Protecting requires every enabled rule of the active version to read only recorded telemetry: no device attributes, no calculated metric reading device constants, no group scope, no relationship anchors (anchors[...], anchorType) and no geofence position (geo / inFence). Tightening applies at once. Loosening (removing protection, fewer approvals, allowing self-approval, a longer approval lifetime or step-up age) waits for a second person's approval, or for 24 hours when self-approval is allowed. Requires device:write and a person's own unscoped session.""" setAutomationReviewPolicy( """(Preview: may change in a minor release.) The profile token.""" profileToken: String! """(Preview: may change in a minor release.) The protection settings to request.""" settings: AutomationReviewPolicyInput! ): SetAutomationReviewPolicyResult """(Preview: may change in a minor release.) Approve a pending policy change. Requires device:write, a second person's own unscoped session and a recently verified second factor; the proposer is refused.""" approveAutomationReviewPolicyChange( """(Preview: may change in a minor release.) The policy change token.""" token: String! ): AutomationReviewPolicy """(Preview: may change in a minor release.) Cancel a pending policy change. Requires device:write and a person's own unscoped session.""" cancelAutomationReviewPolicyChange( """(Preview: may change in a minor release.) The policy change token.""" token: String! ): AutomationReviewPolicy """(Preview: may change in a minor release.) Compare a profile draft with its published baseline. Requires an unscoped person with device:write and event:read.""" runAutomationReview( """(Preview: may change in a minor release.) The draft, devices, windows and expectations to review.""" input: RunAutomationReviewInput! ): AutomationReview """(Preview: may change in a minor release.) Approve frozen evidence. Requires an unscoped person with device:write and event:read and a recent second factor; refuses the review creator and draft authors.""" approveAutomationReview( """(Preview: may change in a minor release.) The review token.""" token: String! """(Preview: may change in a minor release.) The reviewDigest the approver was shown.""" digest: String! ): AutomationReview """(Preview: may change in a minor release.) Reject a review. Requires an unscoped person with device:write and event:read.""" rejectAutomationReview( """(Preview: may change in a minor release.) The review token.""" token: String! """(Preview: may change in a minor release.) An optional decision note.""" note: String ): AutomationReview """ (Preview: may change in a minor release.) An AI agent asks for alarms to be acknowledged or cleared. Only an agent's token holding alarm:propose may call it; a person's own session is refused with AGENT_ONLY and acts through acknowledgeAlarm and clearAlarm instead. The tenant's agent policy decides, and a request it allows waits for people to approve it. In this preview, off by default, the final approval carries out the action as the approving person in one transaction after asking the policy again. If an alarm was raised again or policy now refuses, it ends REFUSED without effects. Execution is never automatic. A member limited to part of the tenant is refused. """ proposeAlarmAction( """(Preview: may change in a minor release.) The request.""" input: AgentAlarmProposalInput! ): AgentProposalOutcome! """ (Preview: may change in a minor release.) A person approves an agent proposal. The digest must be the one shown for the proposal. The approver must be a person (never an agent), hold the write the action needs, be in an approver role of the agent policy, and have verified a second factor recently enough (STEP_UP_REQUIRED otherwise). The final approval carries out the action as that person, in one transaction after asking the policy again. If an alarm was raised again or policy now refuses, the proposal ends REFUSED and nothing is done. Earlier approvals are recorded. This preview is off by default and never automatic. """ approveAgentProposal( """(Preview: may change in a minor release.) The proposal's token.""" token: String! """(Preview: may change in a minor release.) The digest shown for the proposal.""" digest: String! ): AgentProposal! """ (Preview: may change in a minor release.) A person rejects an agent proposal that is still waiting. Needs the write the action needs; an agent is refused. """ rejectAgentProposal( """(Preview: may change in a minor release.) The proposal's token.""" token: String! """(Preview: may change in a minor release.) Why, at most 512 bytes.""" note: String ): AgentProposal! """ Replaces the tenant's semantic context and returns it. Enabling a pack or declaring a custom prefix makes its terms bindable; a pack this build does not ship, a custom prefix that shadows a pack's, or overlapping namespaces fail with INVALID_ARGUMENT. A context that would leave any stored binding unexplained (it stops enabling a pack, or declaring a custom namespace, that a binding uses) is refused with SEMANTIC_CONTEXT_IN_USE and extensions.references, the number of such bindings; keep the vocabulary or unbind them first. Two first sets for one tenant at once: the loser fails with CONFLICT, and may read the context and retry. Requires device:write, and a member limited to part of the tenant is refused. Null only on an error, which says why. """ setSemanticContext( """The context to store. It replaces the stored one whole.""" request: SemanticContextRequest! ): SemanticContext """Creates a device type and returns it. Requires device:write.""" createDeviceType( """The new device type's fields. Although the schema lets it be omitted, a call without it fails.""" request: DeviceTypeCreateRequest ): DeviceType! """ Partially updates a device type and returns it. Fails if no device type has the token. Requires device:write. """ updateDeviceType( """Token of the device type to update.""" token: String! """The fields to change.""" request: DeviceTypeUpdateRequest! """(Preview: may change in a minor release.) Why the device type is being re-pointed outside review. Required (with a second factor verified recently) on a profile re-point to or from a protected profile, where it is recorded with the person; ignored otherwise.""" breakGlassReason: String ): DeviceType! """ Deletes a device type. Returns true when it was deleted and false when no device type has the token. Refused with REFERENCE_VIOLATION while any device has this type. The profile it adopted is not affected. Requires device:write. """ deleteDeviceType( """Token of the device type to delete.""" token: String! ): Boolean! """Creates a device profile, with no definitions and no published version, and returns it. Requires device:write.""" createDeviceProfile( """The new profile's fields. Although the schema lets it be omitted, a call without it fails.""" request: DeviceProfileCreateRequest ): DeviceProfile! """ Partially updates a device profile's draft and returns it. Fails if no profile has the token. Requires device:write. """ updateDeviceProfile( """Token of the profile to update.""" token: String! """The fields to change.""" request: DeviceProfileUpdateRequest! ): DeviceProfile! # REFUSED outright once the profile has been published or adopted by a device type — # from that point the token is the key published rules are filed under and rostered # devices are tracked by, so a rename would silently stop detections and orphan # dead-man entries. """ Changes a device profile's token and returns the profile. Allowed only while the profile has never been published and no device type currently adopts it; once it has been published, its token is permanent. Renaming to the current token succeeds without change. Fails if no profile has the token. Requires device:write. """ renameDeviceProfile( """Current token of the profile.""" token: String! """ The new token, in the usual token format. A blank value is refused, and a token another profile in the tenant holds is refused with CONFLICT. """ newToken: String! ): DeviceProfile! """ Replaces a profile's draft device-visible configuration declaration with the given keys; an empty list withdraws it. At most 256 keys; each key must follow the attribute-key grammar, be unique, and carry a valid value type. The whole call is refused if any key is invalid. Published versions are immutable: this changes only what the next publish freezes. Returns the updated profile. Requires device:write. """ setDeviceProfileConfigurationDeclaration( """Token of the profile.""" token: String! """The complete new declaration, replacing the current one.""" keys: [ConfigurationKeyInput!]! ): DeviceProfile! """ Saves a profile's DRAFT payload decoder, replacing any earlier one. The document is parsed strictly (an unknown key is refused) and compiled in full against the profile's draft metrics: every scalar output key must be a declared, measured metric of the profile (a calculated metric cannot be one, and `lorawan.` keys are reserved for link metrics), a key may be written once per section, and every expression must type-check and fit its cost ceiling. The refusal is INVALID_DECODER and names the failing expression. A WASM document is refused with UNSUPPORTED_DECODER_KIND. Saved vectors need not pass here; they gate the publish. Published versions keep their decoder: this changes only what the next publish freezes. Returns the updated profile. Requires device:write. """ setDeviceProfileDecoder( """Token of the profile.""" profileToken: String! """The decoder document as JSON text, at most 32 KiB.""" document: String! ): DeviceProfile! """ Withdraws a profile's DRAFT payload decoder. Published versions keep theirs. Returns the updated profile. Requires device:write. """ clearDeviceProfileDecoder( """Token of the profile.""" profileToken: String! ): DeviceProfile! """ Makes a device's desired configuration equal to the content of one of its own earlier revisions. The device's shared attributes for its declared keys are set to that revision's values (declared keys the revision does not carry are removed) and a NEW revision is minted and delivered; earlier revisions are never changed. Nothing is minted when the device already holds that content. The whole call is refused, writing nothing, with CONFIGURATION_KEY_UNDECLARED when the device's current profile version no longer declares a key the revision carries, CONFIGURATION_VALUE_TYPE_MISMATCH when a value cannot be carried as the type now declared, CONFIGURATION_TOO_LARGE over the document size limit, and CONFIGURATION_CONFLICT when another write to the device's configuration committed while this one ran (retrying is safe). An unknown device or revision is NOT_FOUND. Requires device:write. """ restoreDeviceConfiguration( """Token of the device to restore.""" deviceToken: String! """The revision number whose content to restore.""" revision: Int! ): DeviceConfiguration! """ Makes one device's desired configuration equal to another device's latest revision (or the revision fromRevision names), by setting the target's shared attributes for its declared keys and minting a new revision on the target; the source is not changed. Both devices must be in the caller's tenant (another tenant's device is NOT_FOUND), and the target's profile must declare every key the source's document carries. Refused, writing nothing, with the same codes as restoreDeviceConfiguration; a source with no revision, or without fromRevision, is NOT_FOUND. Requires device:write. """ copyDeviceConfiguration( """Token of the device whose configuration to copy.""" fromDeviceToken: String! """Token of the device to copy it to.""" toDeviceToken: String! """ The source revision to copy; omitted or null copies the source's latest. Pass the revision you previewed, so a source that changes in between cannot make the copy apply something you were not shown. """ fromRevision: Int ): DeviceConfiguration! """ Deletes a device profile together with its metric, command and detection-rule definitions and all its published versions. Returns true when it was deleted and false when no profile has the token. Refused with REFERENCE_VIOLATION while any device type adopts it. Requires device:write. """ deleteDeviceProfile( """Token of the profile to delete.""" token: String! ): Boolean! # versioning; the detection-rule check is the sync gate against # event-processing. """ Freezes the profile's current draft (its metric, command and detection-rule definitions, its position declaration and its configuration declaration) into a new version and makes that version the one devices use. The draft's enabled detection rules are checked first; a rejected rule, or a check that cannot be completed, fails the publish and nothing is stored. Fails if no profile has the token. Returns the new version. Requires device:write. On a protected profile the approved review must still match the draft, the active version, the policy and its approvers' standing. """ publishDeviceProfile( """Token of the profile to publish.""" token: String! """Optional label for the version, up to 128 characters, such as a release name.""" label: String """Optional notes for the version, up to 1024 characters.""" description: String """(Preview: may change in a minor release.) The approved automation review this publish consumes. Required when the profile is protected by an automation review policy, where a publish without one is refused with REVIEW_REQUIRED; ignored otherwise.""" automationReviewToken: String ): DeviceProfileVersion! """ Makes an existing published version the one devices use again. The draft and the version history are untouched, so a later version can be made active the same way. Fails if the profile or the version does not exist, and is refused with LIMIT_EXCEEDED when the version carries more calculated metrics than the tenant's tier allows (a version without any is never refused for this). Returns the updated profile. Requires device:write. """ rollbackDeviceProfile( """Token of the profile.""" token: String! """Number of the published version to make active.""" version: Int! """(Preview: may change in a minor release.) Why the active version of a protected profile is being changed outside review. Required (with a second factor verified recently) on a protected profile, where it is recorded with the person; ignored otherwise.""" breakGlassReason: String ): DeviceProfile! """ Adds a metric definition to a profile's draft and returns it. It reaches devices when the profile is next published. Requires device:write. """ createMetricDefinition( """The new metric definition's fields. Although the schema lets it be omitted, a call without it fails.""" request: MetricDefinitionCreateRequest ): MetricDefinition! """ Partially updates a draft metric definition and returns it. Fails if no metric definition has the token. Requires device:write. """ updateMetricDefinition( """Token of the metric definition to update.""" token: String! """The fields to change.""" request: MetricDefinitionUpdateRequest! ): MetricDefinition! """ Removes a metric definition from a profile's draft. Published versions keep their copy. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteMetricDefinition( """Token of the metric definition to delete.""" token: String! ): Boolean! """ Adds a command definition to a profile's draft and returns it. It reaches devices when the profile is next published. Requires device:write. """ createCommandDefinition( """The new command definition's fields. Although the schema lets it be omitted, a call without it fails.""" request: CommandDefinitionCreateRequest ): CommandDefinition! """ Partially updates a draft command definition and returns it. Fails if no command definition has the token. Requires device:write. """ updateCommandDefinition( """Token of the command definition to update.""" token: String! """The fields to change.""" request: CommandDefinitionUpdateRequest! ): CommandDefinition! """ Removes a command definition from a profile's draft. Published versions keep their copy. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteCommandDefinition( """Token of the command definition to delete.""" token: String! ): Boolean! """ Creates a detection rule on a device profile's draft. Requires device:write, plus the authority each action in the rule's definition needs. The profile must exist, the token must be new, and the profile's ceiling on rules applies. It takes effect on devices when a profile version containing it is published. """ createDetectionRule( """The detection rule to create.""" request: DetectionRuleCreateRequest! ): DetectionRule! """ Applies a partial update to a detection rule, identified by token. Omitted fields are kept, null clears a clearable field, and the required fields (deviceProfileToken, definition, enabled) refuse null. Requires device:write, plus the authority each action in the rule's definition needs. """ updateDetectionRule( """Token of the detection rule to update.""" token: String! """The fields to change.""" request: DetectionRuleUpdateRequest! ): DetectionRule! """ Deletes a detection rule outright. A published profile version keeps the copy it froze. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteDetectionRule( """Token of the detection rule to delete.""" token: String! ): Boolean! # Create a new geofence. Takes device:write AND location:read: a fence is a question about # where a device is, and whoever can shape the question can extract the answer — a caller able # to mint fences can narrow one until a containment rule's raise/resolve edge reveals a # device's actual coordinates. Reading fences stays on device:read, since a fence's geometry # is a region someone drew, not a device's position. """ Creates a geofence and mints a new fence-set version. Requires device:write and location:read: whoever can shape a fence can narrow it until a containment rule's raise and resolve reveals a device's actual coordinates, so authoring is held to the same authority as reading positions. Reading fences needs only device:read. """ createGeoFence( """The geofence to create.""" request: GeoFenceCreateRequest! ): GeoFence! # Update an existing geofence. Same authorities as creation, for the same reason: reshaping a # fence is the same question-shaping primitive as minting one. The request's `token` must # equal the `token` argument: a fence's token is immutable, because rules name fences by # token and this service cannot rewrite the rules that would be left naming nothing. """ Applies a partial update to a geofence, identified by token, which is immutable. Needs the same authorities as creation, for the same reason. Changing the geometry mints a new fence-set version; changing only name, description or metadata does not. """ updateGeoFence( """Token of the geofence to update.""" token: String! """The fields to change.""" request: GeoFenceUpdateRequest! ): GeoFence! # Delete a single geofence. device:write alone — removing a fence constructs no question and # answers none, and delete-then-recreate is no way around the gate on creation. """ Deletes a geofence outright and mints a new fence-set version, after which its token can be reused. Refused while an area names the fence as its boundary. Returns true when it was deleted and false when nothing has the token. Requires device:write only. """ deleteGeoFence( """Token of the geofence to delete.""" token: String! ): Boolean! """ Acknowledges an alarm: an operator asserts the alarm has been seen. It does not change state or severity and is independent of ACTIVE or CLEARED. Idempotent: acknowledging an acknowledged alarm returns it unchanged. The acknowledging identity is the authenticated subject, recorded server-side. Refused when the token names no alarm. Requires alarm:write. """ acknowledgeAlarm( """Token of the alarm to acknowledge.""" token: String! ): Alarm! """ Acknowledges many alarms at once, the bulk counterpart of acknowledgeAlarm with the same authority, transition and recorded identity. It is partial: a token naming no alarm is refused and listed in refusals, and every other alarm is still acknowledged. An empty list acknowledges nothing. At most 2000 tokens per request; more is an error rather than a per-alarm refusal. Duplicate tokens are collapsed. Requires alarm:write. """ acknowledgeAlarms( """Tokens of the alarms to acknowledge, at most 2000. An empty list acknowledges nothing.""" tokens: [String!]! ): BulkAcknowledgeAlarmsResult! """ Clears an alarm by hand, moving it to CLEARED. A manual override: the detection engine also clears an alarm when its conditions resolve. Idempotent on an alarm that is already CLEARED. It does not acknowledge the alarm. Refused when the token names no alarm. Requires alarm:write. """ clearAlarm( """Token of the alarm to clear.""" token: String! ): Alarm! """ Labels the CURRENT cycle of an alarm with an operator's verdict (see AlarmDisposition) and returns the alarm. Only the current cycle can be labelled: once the alarm is raised again, the earlier cycle's disposition can be read but no longer written. Labelling changes nothing else about the alarm and emits no alarm event; labelling a cleared alarm is the ordinary case. Labelling a cycle again replaces its disposition. The labelling identity is the authenticated subject, recorded server-side. An alarm deleted while the label is being written answers NOT_FOUND, as an unknown token does. Requires alarm:write. A member whose access is limited to some customers cannot label (FORBIDDEN): labels are ground truth for the tenant's rules. """ setAlarmDisposition( """The alarm, by its token.""" token: String! """ The verdict. A value that is not an AlarmDispositionLabel is refused when the request is validated. """ label: AlarmDispositionLabel! """Why, at most 1000 characters. Empty or omitted is no note.""" note: String """ The cycle being labelled, as the alarm's raisedTime was served. When given, the label is refused if the alarm has been raised again since ("alarm was modified by another writer; reload and try again"), so a verdict on one cycle never lands on the next. Omitted labels the alarm's current cycle. """ raisedTime: String ): Alarm! """ Sets an entity attribute, replacing the value when the same entity, scope and key already has one. Requires device:write. """ setEntityAttribute( """The attribute to set.""" request: EntityAttributeSetRequest! ): EntityAttribute! """ Deletes one entity attribute, identified by its entity, scope and key. Removing a SHARED attribute can take an entity out of a group whose selector reads it. Returns true when an attribute was deleted and false when there was none. Requires device:write. """ deleteEntityAttribute( """Entity type the attribute belongs to, for example device.""" entityType: String! """Token of the entity the attribute belongs to.""" entity: String! """Scope of the attribute: SHARED, SERVER or CLIENT.""" scope: String! """Key of the attribute to delete.""" attrKey: String! ): Boolean! """Creates a device and returns it. Requires device:write.""" createDevice( """The new device's fields. Although the schema lets it be omitted, a call without it fails.""" request: DeviceCreateRequest ): Device! """ Creates up to 1000 devices of one type from templates, in one transaction: every device is created, or none is (an invalid template, a rendered token that repeats or is already in use, or an unknown device type fails them all). Returns the created devices in index order. Requires device:write. """ createDevices( """The type, count and templates of the devices to create.""" request: DeviceBulkCreateRequest! ): [Device!]! """ Imports up to 1000 devices from rows, each in its own transaction, and reports what happened to every row; one bad row never affects another. Create-only and idempotent on the device token: a row whose device already exists exactly as described is EXISTS, one that exists differently is CONFLICT, and nothing is ever updated, so re-running a file is safe. A device's credential is created with it in the same transaction in FACTORY_CREDENTIALS mode; the same device and credential id re-run as EXISTS without the secret being compared. dryRun decides every row by the same code and writes nothing. More than 1000 rows fails the whole call. Requires device:write. """ importDevices( """The rows to import, at most 1000.""" rows: [DeviceImportRow!]! """How credentials are treated.""" mode: DeviceImportMode! """True to decide every row without writing anything.""" dryRun: Boolean! ): DeviceImportResult! """ Puts a device behind a gateway device, so that gateway's credential may publish the device's telemetry on the gateway's own topics, and returns the device. Assigning a device to the gateway it already has changes nothing; a device with another gateway is moved. Refused with INVALID_VALUE when the two are the same device, when the gateway is itself behind a gateway, or when the device is itself the gateway of other devices (gateways are one level deep). Fails if either token names no device. This grants the gateway the same standing over the device as issuing the device a credential, so it requires device:write and is refused for a member limited to part of the tenant. """ assignDeviceGateway( """Token of the device to put behind the gateway.""" deviceToken: String! """Token of the gateway device.""" gatewayToken: String! ): Device! """ Takes a device out from behind its gateway and returns it: the gateway's next publish for the device is refused and recorded in failed events. Clearing a device that has no gateway changes nothing. Fails if no device has the token. Requires device:write. """ clearDeviceGateway( """Token of the device.""" deviceToken: String! ): Device! """ Partially updates a device and returns it. Fails if no device has the token. Requires device:write. """ updateDevice( """Token of the device to update.""" token: String! """The fields to change.""" request: DeviceUpdateRequest! """(Preview: may change in a minor release.) Why the device is being moved outside review. Required (with a second factor verified recently) on moving a device out of a type bound to a protected profile, where it is recorded with the person; ignored otherwise.""" breakGlassReason: String ): Device! """ Deletes a device together with its credentials, replacement history, relationships, attributes, alarms and group memberships. Returns true when it was deleted and false when no device has the token. Requires device:write. """ deleteDevice( """Token of the device to delete.""" token: String! ): Boolean! """ Creates an entity group. A static group's members are managed with relationships of the member type; a dynamic group carries a CEL selector, validated and cost-checked on create, and resolves its members when read. Requires device:write. """ createEntityGroup( """The entity group to create.""" request: EntityGroupCreateRequest ): EntityGroup! """ Applies a partial update to an entity group, identified by token. Member family and membership mode cannot change. Pass expectedUpdatedAt to refuse the write if the group changed since it was read. Requires device:write. """ updateEntityGroup( """Token of the entity group to update.""" token: String! """The fields to change.""" request: EntityGroupUpdateRequest! """Apply only if updatedAt still equals this value; returns STALE_WRITE if the record changed. Reload before retrying. Omit for last-write-wins.""" expectedUpdatedAt: String ): EntityGroup! """ Deletes an entity group together with its member relationships and its frozen versions. Refused while a detection rule scopes to the group. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteEntityGroup( """Token of the entity group to delete.""" token: String! ): Boolean! """ Publishes a dynamic entity group's current draft selector as a new immutable version and makes it the active version a rule-scoped resolve reads. Rejected for a static group. Requires device:write. """ publishEntityGroup( """Token of the group to publish.""" token: String! """Optional short label for the new version.""" label: String """Optional longer description of what the new version changes.""" description: String """ The active version the caller saw: 0 for a group never published. When the group's active version has since moved, because someone else published or rolled back, nothing is published and the request fails as modified by another writer. Omit to publish unconditionally. """ expectedActiveVersion: Int ): EntityGroupVersion! """ Points a dynamic group's active version back at an existing version and returns the group. Non- destructive: no version is removed and the draft selector is untouched. Requires device:write. """ rollbackEntityGroup( """Token of the dynamic group to roll back.""" token: String! """The published version to make active again.""" version: Int! ): EntityGroup! """ Make a group an access scope, or stop it being one, and return the group. A member whose access is limited to the group sees the devices in it at its active version, so publishing or rolling the group back changes what they see, and a device whose attributes move it into or out of the group appears or disappears for them without anyone editing the member. Records written about a device while it is in the group (events, alarms, commands, update assignments) stay visible to them afterwards. Only a published dynamic group of devices can be one (INVALID_VALUE otherwise), and a tenant may have at most 32 (LIMIT_EXCEEDED). Setting what is already set changes nothing. A deleted group's token is never reused, so a member limited to it is never handed a new group's devices. Requires device:write. """ setEntityGroupAccessScope( """Token of the group.""" token: String!, """True to make it an access scope, false to stop it being one.""" enabled: Boolean! ): EntityGroup! """ Declares a facet key by its natural key, memberType and key, creating it or rewriting the existing declaration. Requires device:write. """ setFacetKey( """The facet key declaration to upsert.""" request: FacetKeySetRequest ): FacetKey! """ Deletes a facet key declaration by its natural key; the attribute values on the entities are untouched. A system facet cannot be deleted and its removal is refused. Returns true when a declaration was removed. Requires device:write. """ deleteFacetKey( """The member family the key is declared for: device, asset, area or customer.""" memberType: String! """The facet key to delete.""" key: String! ): Boolean! """ Creates a credential for a device. For ACCESS_TOKEN the token is returned once, in this response, and only a keyed digest is stored. For MQTT_BASIC the password is write-only. For X509_CERTIFICATE the certificate chain is verified against the named trust anchor when created. Requires device:write. """ createDeviceCredential( """The device credential to create.""" request: DeviceCredentialCreateRequest ): DeviceCredential! """ Applies a partial update to a device credential, identified by token. Setting credentialId on an ACCESS_TOKEN credential rotates the token: the old one stops working at once and the new one is returned once, in this response. Omitting credentialValue leaves the stored secret in place. Requires device:write. """ updateDeviceCredential( """Token of the device credential to update.""" token: String! """The fields to change.""" request: DeviceCredentialUpdateRequest! ): DeviceCredential! """ Deletes a device credential outright; it stops authenticating at once. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteDeviceCredential( """Token of the device credential to delete.""" token: String! ): Boolean! """ Binds a new physical unit to an existing logical device identity: it retires every credential the outgoing unit could authenticate with, mints one for the incoming unit and writes an append- only replacement record, all in one transaction. The device's history, alarms, relationships, group membership and command vocabulary carry forward because none of them are touched. The new credential's secret material is readable only in this response. Requires device:write. """ replaceDevice( """The surviving device and the credential for the incoming unit.""" request: DeviceReplaceRequest! ): DeviceReplaceResult! """ Places an asset under a parent, replacing whatever parent it had, and returns the relationship edge. Refused when it would make an asset its own ancestor, give it a second parent, or push the tree past its depth limit of 64. The asset's own children travel with it. Requires device:write. """ setAssetParent( """Token of the asset to place under the parent.""" childToken: String! """Token of the asset to become its parent.""" parentToken: String! ): EntityRelationship! """ Detaches an asset from its parent, making it a root; its children travel with it. Returns true when an edge was removed and false when the asset was already a root. Requires device:write. """ clearAssetParent( """Token of the asset to detach from its parent.""" childToken: String! ): Boolean! """ Creates a provisioning profile. The response carries the provision secret the server generated, once; it cannot be read again, so rotate it if it is lost. A certificate profile, made by naming a trust anchor, has no secret. Requires device:write. """ createProvisioningProfile( """The provisioning profile to create.""" request: ProvisioningProfileCreateRequest ): ProvisioningProfileSecretResult! """ Replace a profile's provision secret with a new one, returned once. The old secret stops working at once and there is no overlap (overlap is a second profile with its own key). Devices already registered are unaffected. This is also what brings a profile created before the server generated secrets into service. """ rotateProvisioningProfileSecret( """Token of the profile.""" token: String! ): ProvisioningProfileSecretResult! """ Disable every credential the profile issued, and end those devices' live sessions. Returns how many credentials it disabled. The profile still accepts new registrations; pair it with rotateProvisioningProfileSecret after a leak. A revoked device stays refused until resetDeviceProvisioning. """ revokeProvisionedDevices( """Token of the profile.""" profileToken: String! ): Int! """ Delete the credentials self-registration issued to the device and end its sessions. Returns how many it removed. The device keeps its earmark, so it can register again; this is the way back from a revoke. """ resetDeviceProvisioning( """Token of the device.""" deviceToken: String! ): Int! """ Applies a partial update to a provisioning profile, identified by token. It cannot change the credential type or the secret. Requires device:write. """ updateProvisioningProfile( """Token of the provisioning profile to update.""" token: String! """The fields to change.""" request: ProvisioningProfileUpdateRequest! ): ProvisioningProfile! """ Deletes a provisioning profile outright. Refused while any credential it issued still exists, revoked and expired ones included; remove them by resetting the devices' provisioning or deleting the devices. Devices earmarked for the profile fall back to no earmark. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteProvisioningProfile( """Token of the provisioning profile to delete.""" token: String! ): Boolean! """Create a trust anchor from a CA certificate. Refused when the tenant already holds 32.""" createDeviceTrustAnchor( """The anchor to create.""" request: DeviceTrustAnchorCreateRequest! ): DeviceTrustAnchor! """Update a trust anchor. Disabling one ends the live sessions of the devices that rely on it.""" updateDeviceTrustAnchor( """Token of the anchor.""" token: String! """The fields to change.""" request: DeviceTrustAnchorUpdateRequest! ): DeviceTrustAnchor! """ Delete a trust anchor nothing relies on. Refused with extensions.code REFERENCE_VIOLATION while a credential or a provisioning profile still names it, and while it holds manual revocations (un-revoke them first). Revocation lists uploaded for it, their entries and the highest CRL number accepted for each issuer are discarded with it: an anchor re-created from the same CA starts again, and accepts a CRL whose number the deleted anchor had already passed. """ deleteDeviceTrustAnchor( """Token of the anchor.""" token: String! ): Boolean! """ Revoke a certificate under a trust anchor, on the platform's own authority: the certificate is refused from the next connect on every replica, whether or not it is registered, and deleting its credential or its device does not let it register again. It applies to any certificate on a verified path, a leaf or an intermediate. Name it with exactly one of certificatePem and fingerprintSha256. Revoking one already revoked returns the existing entry. The anchor's own certificate is refused (disable the anchor instead). The live broker sessions of the devices the certificate affects are ended: those whose credential is this leaf, or every device under the anchor when the certificate is a CA that a registered credential's chain was seen to use. The result's sessionsEnded says whether that was confirmed. """ revokeDeviceCertificate( """Token of the trust anchor.""" anchorToken: String! """The certificate, PEM. Exactly one of this and fingerprintSha256.""" certificatePem: String """SHA-256 of the certificate, hex. Exactly one of this and certificatePem.""" fingerprintSha256: String """Defaults to UNSPECIFIED.""" reason: CertificateRevocationReason ): DeviceRevokedCertificate! """ Remove a manual revocation. True if there was one. The certificate is admitted again from the next connect unless something else refuses it; nothing is kicked, and the device reconnects on its own. """ unrevokeDeviceCertificate( """Token of the trust anchor.""" anchorToken: String! """SHA-256 of the certificate, hex.""" fingerprintSha256: String! ): Boolean! """ Store a CRL as the current list of its issuer under a trust anchor, replacing the issuer's previous list. Its signature is verified against the anchor (or the issuer chain that links the signer to it) and it is refused unless its CRL number is above every number accepted before for that issuer, including after the list was deleted. The certificates it names are refused from the next connect on every replica. Uploading the very CRL already in force changes nothing. The text is limited (the instance's callout.revocation.maxGraphqlCrlBytes, 2 MiB of DER at most); larger lists go over the streaming REST upload, PUT /trust-anchors/{token}/crl on this service. The live sessions of the devices the list newly revokes are ended; sessionsEnded on the result says whether that was confirmed. """ putDeviceRevocationList( """Token of the trust anchor.""" anchorToken: String! """The CRL, PEM (exactly one X509 CRL block).""" crlPem: String! """ The CRL signer's certificate first, then the CAs that link it to the anchor, PEM. Omit it when the anchor itself signed the CRL. """ issuerChainPem: String ): DeviceRevocationListResult! """ Delete the current list of an issuer and every entry it carried; those certificates are no longer refused for it. The issuer's highest CRL number is kept, so an older list still cannot be uploaded afterwards. True if there was a list. Under REQUIRE_CURRENT the anchor's certificates from that issuer are then refused until a new list is uploaded. """ deleteDeviceRevocationList( """Token of the trust anchor.""" anchorToken: String! """SHA-256 of the signer's public key, hex.""" issuerKey: String! """SHA-256 of the signer's subject, hex.""" issuerName: String! ): Boolean! """ Create an inbound integration. The response carries the bearer token the server generated for it, once. Refused when the tenant already holds as many integrations as its tier allows. """ createIntegration( """The integration to create.""" request: IntegrationCreateRequest! ): IntegrationSecretResult! """Update an integration. Neither its token nor its type can be changed.""" updateIntegration( """Token of the integration.""" token: String! """The fields to change.""" request: IntegrationUpdateRequest! ): Integration! """ Replace an integration's bearer token with a new one, returned once. The old token stops working at once and there is no overlap. """ rotateIntegrationToken( """Token of the integration.""" token: String! ): IntegrationSecretResult! """ Remove every unregistered device an integration has recorded, returning how many rows went. They are observations; ones the sender is still sending are recorded again. An unknown integration clears nothing. """ clearUnregisteredIntegrationDevices( """Token of the integration.""" integration: String! ): Int! """Delete an integration. Returns false when there was none.""" deleteIntegration( """Token of the integration.""" token: String! ): Boolean! """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. The ingest path's one call for turning a sender's identifier into a device: it authenticates the integration with its bearer token, finds the device the alias names, checks that device's type is in the integration's scope, and, when no device in scope carries the alias, records the sighting (see unregisteredIntegrationDevices). Every outcome a sender can cause is an answer, not an error; a scheme other than the one the integration resolves by, or a value the scheme refuses, is refused with INVALID_VALUE. A switched-off integration is reported as DISABLED and is not a failed credential. """ resolveIntegrationDevice( """Token of the integration, as it appears in the sender's URL.""" integration: String! """The bearer token the sender presented.""" secret: String! """The alias scheme; it must be the one the integration's identity names.""" scheme: String! """The sender's identifier for the device.""" value: String! ): IntegrationDeviceResolution! """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. Adds count uplinks to the integration's undecoded tally and keeps the latest frame sample (hex, at most 1024 characters). It authenticates the integration with its bearer token, so a service token alone cannot write another sender's markers; a wrong token or a switched-off integration is refused and nothing is written. The ingest path batches these. """ recordIntegrationUndecoded( """Token of the integration, as it appears in the sender's URL.""" integration: String! """The bearer token the sender presented.""" secret: String! """How many uplinks to add; at least 1.""" count: Int! """Hex encoding of the latest frame, if the uplink carried one.""" sample: String ): Boolean! """ Service-only: callable with a service token that holds device:read, and refused for any user's access token. Stamps the time a request for the integration last failed authentication, at most once a minute. A token that names no integration is not an error and writes nothing. """ recordIntegrationAuthFailure( """Token of the integration, as it appears in the sender's URL.""" integration: String! ): Boolean! """ Opens, or reopens, a possession claim on a device with a secret that an eventual owner will present. A device has a single claim; reopening a claimed or canceled one clears its earlier redemption. The secret is stored only as a keyed digest. Requires device:write. """ initiateDeviceClaim( """The device and the secret an eventual owner must present.""" request: DeviceClaimInitiateRequest! ): DeviceClaim! """ Redeems a device's claim by presenting its secret, assigning the device to a customer over a relationship of the given type, and returns the created edge. The claim is consumed in the same transaction, so one secret can never produce two ownership edges. Refused when the claim is expired, not open, or the secret does not match. Requires device:write. """ claimDevice( """The device, claim secret and customer to assign it to.""" request: DeviceClaimRequest! ): EntityRelationship! """ Cancels a device's open claim without assigning the device. Returns true when an open claim was closed and false when there was none. Requires device:write. """ cancelDeviceClaim( """Token of the device whose open claim to cancel.""" deviceToken: String! ): Boolean! """Creates a relationship type. Requires device:write.""" createEntityRelationshipType( """The entity relationship type to create.""" request: EntityRelationshipTypeCreateRequest! ): EntityRelationshipType! """Applies a partial update to a relationship type, identified by token. Requires device:write.""" updateEntityRelationshipType( """Token of the entity relationship type to update.""" token: String! """The fields to change.""" request: EntityRelationshipTypeUpdateRequest! ): EntityRelationshipType! """ Deletes a relationship type. Refused while any relationship uses it. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteEntityRelationshipType( """Token of the entity relationship type to delete.""" token: String! ): Boolean! """Creates a relationship edge between two existing entities. Requires device:write.""" createEntityRelationship( """The entity relationship to create.""" request: EntityRelationshipCreateRequest! ): EntityRelationship! """ Removes a single relationship edge: the explicit unassign. Returns true when it was removed and false when nothing has the token. Requires device:write. """ removeEntityRelationship( """Token of the relationship edge to remove.""" token: String! ): Boolean! """ Creates many relationship edges in one transaction, for bulk add-members and assign. The reserved member relationship type is created on first use. Requires device:write. """ createEntityRelationships( """The relationship edges to create, all in one transaction.""" requests: [EntityRelationshipCreateRequest!]! ): [EntityRelationship!]! """ Removes many relationship edges by token, for bulk remove-members and unassign. Requires device:write. """ removeEntityRelationships( """Tokens of the relationship edges to remove.""" tokens: [String!]! ): Boolean! """ Creates an asset type with a draft property contract, which is not binding until published. Requires device:write. """ createAssetType( """The asset type to create.""" request: AssetTypeCreateRequest ): AssetType! """ Applies a partial update to an asset type, identified by token. Editing the draft property contract changes nothing assets are validated against until the type is published. Requires device:write. """ updateAssetType( """Token of the asset type to update.""" token: String! """The fields to change.""" request: AssetTypeUpdateRequest! ): AssetType! """ Deletes an asset type together with its published version history. Refused while any asset references the type. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteAssetType( """Token of the asset type to delete.""" token: String! ): Boolean! """ Freezes an asset type's draft property contract into a new immutable version and makes it the version its assets are validated against. Refused when the type has no draft contract to freeze; a draft that is an empty array publishes, and says that assets of the type carry nothing. label and description annotate the version. Requires device:write. """ publishAssetType( """Token of the asset type to publish.""" token: String! """Optional label for the new version. It may embed a semantic version string, which is not parsed.""" label: String """Optional longer description of what the new version changes.""" description: String ): AssetTypeVersion! """ Re-points an asset type's active version at an earlier published one and returns the type. The draft is untouched and nothing is deleted, so the type can be rolled forward again. Assets already stored are not rechecked or rewritten; the contract applies when a property document is next written. Requires device:write. """ rollbackAssetType( """Token of the asset type to roll back.""" token: String! """The published version to make active again.""" version: Int! ): AssetType! """ Creates an asset of an asset type. Its property document, if any, is validated against the type's active published contract. Requires device:write. """ createAsset( """The asset to create.""" request: AssetCreateRequest ): Asset! """ Applies a partial update to an asset, identified by token. Pass expectedUpdatedAt to refuse the write if the asset changed since it was read. Requires device:write. """ updateAsset( """Token of the asset to update.""" token: String! """The fields to change.""" request: AssetUpdateRequest! """Apply only if updatedAt still equals this value; returns STALE_WRITE if the record changed. Reload before retrying. Omit for last-write-wins.""" expectedUpdatedAt: String ): Asset! """ Deletes an asset together with its relationship edges. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteAsset( """Token of the asset to delete.""" token: String! ): Boolean! """Creates a customer type. Requires device:write.""" createCustomerType( """The customer type to create.""" request: CustomerTypeCreateRequest ): CustomerType! """ Applies a partial update to a customer type, identified by token. Pass expectedUpdatedAt to refuse the write if the type changed since it was read. Requires device:write. """ updateCustomerType( """Token of the customer type to update.""" token: String! """The fields to change.""" request: CustomerTypeUpdateRequest! """Apply only if updatedAt still equals this value; reload after a stale-write error. Omit for last-write-wins.""" expectedUpdatedAt: String ): CustomerType! """ Deletes a customer type. Refused while any customer references it. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteCustomerType( """Token of the customer type to delete.""" token: String! ): Boolean! """ Create a maintenance window. The time zone and slots are validated together, and the slots are stored in canonical form. Requires device:write. """ createMaintenanceWindow( """The window to create.""" request: MaintenanceWindowCreateRequest! ): MaintenanceWindow! """ Update a maintenance window. A partial update: an omitted field is left alone. Commands already waiting on the window follow the new schedule within about a minute. Requires device:write. """ updateMaintenanceWindow( """Token of the window to update.""" token: String! """The fields to change.""" request: MaintenanceWindowUpdateRequest! ): MaintenanceWindow! """ Delete a maintenance window. Refused while any device type uses it, because deleting it would stop holding those types' disruptive commands. Requires device:write. """ deleteMaintenanceWindow( """Token of the window to delete.""" token: String! ): Boolean! """ Creates a customer of a customer type. A token that a deleted customer held is retired and is refused with INVALID_VALUE; a token a live customer holds is refused with CONFLICT. Requires device:write. """ createCustomer( """The customer to create.""" request: CustomerCreateRequest ): Customer! """ Applies a partial update to a customer, identified by token. Pass expectedUpdatedAt to refuse the write if the customer changed since it was read. Requires device:write. """ updateCustomer( """Token of the customer to update.""" token: String! """The fields to change.""" request: CustomerUpdateRequest! """Apply only if updatedAt still equals this value; returns STALE_WRITE if the record changed. Reload before retrying. Omit for last-write-wins.""" expectedUpdatedAt: String ): Customer! """ Deletes a customer together with its relationship edges. Its token is retired: no other customer in the tenant can be created with it. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteCustomer( """Token of the customer to delete.""" token: String! ): Boolean! """Creates an area type. Requires device:write.""" createAreaType( """The area type to create.""" request: AreaTypeCreateRequest ): AreaType! """Applies a partial update to an area type, identified by token. Requires device:write.""" updateAreaType( """Token of the area type to update.""" token: String! """The fields to change.""" request: AreaTypeUpdateRequest! ): AreaType! """ Deletes an area type. Refused while any area references it. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteAreaType( """Token of the area type to delete.""" token: String! ): Boolean! """Creates an area of an area type, optionally bounded by an existing geofence. Requires device:write.""" createArea( """The area to create.""" request: AreaCreateRequest ): Area! """ Applies a partial update to an area, identified by token. Pass expectedUpdatedAt to refuse the write if the area changed since it was read. Requires device:write. """ updateArea( """Token of the area to update.""" token: String! """The fields to change.""" request: AreaUpdateRequest! """Apply only if updatedAt still equals this value; returns STALE_WRITE if the record changed. Reload before retrying. Omit for last-write-wins.""" expectedUpdatedAt: String ): Area! """ Deletes an area together with its relationship edges. Returns true when it was deleted and false when nothing has the token. Requires device:write. """ deleteArea( """Token of the area to delete.""" token: String! ): Boolean! """ Records where a device or an asset was installed. Needs device:write. The position is refused, before anything is stored, when it is not a finite WGS84 coordinate. An entity outside the caller's scope is NOT_FOUND. """ setInstalledPosition( """Whether token names a device or an asset.""" family: PositionFamily! """The token of the device or asset.""" token: String! """The position to record.""" position: InstalledPositionInput! ): InstalledPosition! """ Removes the installed position of a device or an asset. Needs device:write. Clearing an entity that has none succeeds. """ clearInstalledPosition( """Whether token names a device or an asset.""" family: PositionFamily! """The token of the device or asset.""" token: String! ): Boolean! """Create a window. Requires alarm:write; broad reach additionally requires notification:write.""" createAlarmSuppressionWindow( """Window declaration.""" request: AlarmSuppressionWindowCreateRequest! ): AlarmSuppressionWindow! """Edit a whole visible window, authorizing both existing and resulting reach.""" updateAlarmSuppressionWindow( """Token of the window to edit.""" token: String! """Partial edit with omitted, null and value states.""" request: AlarmSuppressionWindowUpdateRequest! ): AlarmSuppressionWindow! """End a whole visible window now, recording the caller's subject. Requires alarm:write and visibility of the window.""" endAlarmSuppressionWindow( """Token of the window to end.""" token: String! ): AlarmSuppressionWindow! """Delete a whole visible window without removing cycle history. Requires the authorities that creating it needed.""" deleteAlarmSuppressionWindow( """Token of the window to delete.""" token: String! ): Boolean! """ Preview. Creates a bulk change in READY. Creating again with the same token and the same request returns the original and writes nothing; a different request under the token is a CONFLICT. Needs device:write and fleet:operate. """ createBulkChange( """Preview. The bulk change to create.""" request: BulkChangeCreateRequest! ): BulkChange! """ Preview. Starts a READY operation. The caller presents the contract digest they reviewed; a different one is CONTRACT_DIGEST_MISMATCH. The caller approves the contract and the operation runs on their behalf. Refused with BULK_CHANGES_NOT_ACTIVATED when the database does not enforce the device attribute writer protocol. Needs device:write and fleet:operate. """ startBulkChange( """Preview. The READY bulk change's token.""" token: String! """Preview. The contract digest the caller reviewed.""" contractDigest: String! ): BulkChange! """ Preview. Pauses a RUNNING operation. When it returns, no line is applied under the old state. A wait that times out is FENCE_PENDING and changes nothing. Needs device:write only, so someone who has lost fleet:operate can still stop it. """ pauseBulkChange( """Preview. The RUNNING bulk change's token.""" token: String! ): BulkChange! """ Preview. Resumes a PAUSED operation on the caller's behalf. The digest must be the current contract's. A change to the limits is applied only if it stays within the approved contract (CONTRACT_WIDENED otherwise); a limit that is still reached is THRESHOLD_STILL_EXCEEDED. Needs device:write and fleet:operate. """ resumeBulkChange( """Preview. The PAUSED bulk change's token.""" token: String! """Preview. The current contract's digest.""" contractDigest: String! """Preview. New limits, within the approved contract; an omitted limit keeps its current value.""" safety: BulkChangeSafetyInput ): BulkChange! """ Preview. Aborts a READY, RUNNING or PAUSED operation: lines not yet applied are cancelled and applied lines keep settling. Needs device:write only. """ abortBulkChange( """Preview. The bulk change's token.""" token: String! ): BulkChange! """ Preview. Resolves ambiguous lines as confirmed or failed. Other lines are unchanged. Needs device:write and fleet:operate, a person's access token, a second factor verified within five minutes, and a note of 1 to 1000 characters. Refused with SECOND_FACTOR_REQUIRED, STEP_UP_REQUIRED or NOTE_REQUIRED otherwise. """ resolveAmbiguousBulkChangeLines( """Preview. The lines to resolve, the verdict and the note.""" request: BulkChangeAmbiguityResolution! ): BulkChange! """ Preview. Creates, in READY, a bulk change that reverses a DISPATCHED or ABORTED one: each selected line puts back the value its device held before the original. It is started like any other. Refused with ORIGINAL_STILL_DISPATCHING while the original can still apply lines, REVERSAL_NOT_REVERSIBLE for a reversal, EVIDENCE_EXPIRED once the original's lines are past retention, and NOTHING_TO_REVERSE when no selected line can be reversed. When applied, a line whose value changed after the original is refused with CHANGED_SINCE unless it is overridden; an override needs a second factor verified within five minutes (STEP_UP_REQUIRED, SECOND_FACTOR_REQUIRED). Creating again with the same token and the same request returns the first reversal. Needs device:write and fleet:operate. """ reverseBulkChange( """Preview. The reversal to create.""" request: BulkChangeReversalRequest! ): BulkChange! } """Why an alarm ended, when it was cleared for a lifecycle reason.""" enum AlarmClearReason { """The alarm's originator was deleted, so the alarm was cleared with it.""" ORIGINATOR_DELETED } """ A single alarm state change, pushed live to a subscriber. It is the transition envelope emitted by the alarm engine and the operator actions, not the stored Alarm row: it carries the kind of transition and, for a severity move, the prior severity, alongside a snapshot of the alarm after the change. Address the alarm by alarmToken to re-query it. """ type AlarmEvent { """The lifecycle reason for clearing the alarm; absent for ordinary clears.""" clearReason: AlarmClearReason """ The transition: RAISED, ESCALATED, DEESCALATED, CLEARED or ACKNOWLEDGED. Treat an unknown value as a change you do not handle. """ eventType: String! """Token of the alarm this event is about. Stable across the alarm's life.""" alarmToken: String! """Entity type of the originator. Always device today.""" originatorType: String! """Numeric id of the originator within the tenant, as a string.""" originatorId: ID! """ The originator's token, resolved on demand. Null when the originator is not a device or no longer exists. """ originatorToken: String """The alarm key of the alarm, as on Alarm.alarmKey.""" alarmKey: String! """Key of the measurement the raising rule watches, as on Alarm.metricKey.""" metricKey: String! """The alarm's state after the transition: ACTIVE or CLEARED.""" state: String! """The alarm's severity after the transition.""" severity: String! """The severity held before an in-place change. Set only for ESCALATED and DEESCALATED; null otherwise.""" previousSeverity: String """Whether the alarm is acknowledged after the transition.""" acknowledged: Boolean! """Subject that acknowledged the alarm, or null when it is not acknowledged.""" acknowledgedBy: String """The alarm's last recorded reading after the transition, as on Alarm.lastValue. Null when none.""" lastValue: Float """ When the alarm's current cycle began, as an RFC 3339 timestamp. Pair it with occurredTime to show how long the alarm has been active. """ raisedTime: String """ The event time that drove the transition, as an RFC 3339 timestamp: the measurement time, or the time of the operator's acknowledge or clear. """ occurredTime: String! """Live suppression deadline carried by the event, as RFC 3339; null when absent.""" suppressedUntil: String """Live window token carried by the event; null when absent, "restricted" for scoped humans when hidden or deleted.""" suppressionWindowToken: String """Window token stamped at this cycle's raise; null when absent, "restricted" for scoped humans when hidden or deleted.""" raisedDuringSuppression: String } """Live feeds. Delivery is best-effort and at most once.""" type Subscription { """ Streams alarm state changes for the subscriber's tenant, from subscribe time onward with no backfill; use the alarm queries for current state. Delivery is best-effort: an event can be dropped (a transient publish failure or a slow consumer), and the stored alarm is the source of truth. A client merging this stream into a live list must re-run the alarm queries on reconnect and periodically, so a dropped event cannot leave a ghost row, such as a missed CLEARED showing an active alarm. The optional filters narrow the feed to one originator, state, severity or alarm key. When originatorToken is given, originatorType is required, and the token is resolved to its id once at subscribe time. """ alarmStream( """ Entity type of the originator to follow, for example device. Required when originatorToken is set. """ originatorType: String """Only events of the originator with this token. Requires originatorType.""" originatorToken: String """Only events whose alarm is in this state after the change: ACTIVE or CLEARED.""" state: String """Only events whose alarm is at this severity after the change.""" severity: String """Only events of alarms with this alarm key.""" alarmKey: String """ Only events of alarms stamped with this anchor (see AlarmAnchor), judged on every pushed event, with the same limit to the subscriber's own devices as the queries. A customer outside the subscriber's access is refused when subscribing. """ anchor: AlarmAnchor ): AlarmEvent! } """How a suppression window opens.""" enum AlarmSuppressionKind { """A single bounded interval.""" ONE_SHOT """Weekly openings in an IANA time zone.""" RECURRING } """One population of devices covered by a window.""" type AlarmSuppressionTarget { """DEVICE, DEVICE_TYPE, ENTITY_GROUP, AREA, ASSET, CUSTOMER or TENANT.""" type: String! """Target token; null only for TENANT.""" token: String } """One population of devices to cover.""" input AlarmSuppressionTargetInput { """DEVICE, DEVICE_TYPE, ENTITY_GROUP, AREA, ASSET, CUSTOMER or TENANT.""" type: String! """Target token; omit for TENANT.""" token: String } """A half-open interval in which a window suppresses paging.""" type AlarmSuppressionInterval { """Inclusive opening instant, as an RFC 3339 timestamp.""" start: String! """Exclusive closing instant, as an RFC 3339 timestamp.""" end: String! } """An operator-declared window that holds paging while alarms continue to track conditions.""" type AlarmSuppressionWindow implements Model & TokenReference & NamedEntity & MetadataEntity { """Server-assigned numeric identifier.""" id: ID! """Stable identifier within the tenant.""" token: String! """Human-readable name, or null.""" name: String """Free-text description, or null.""" description: String """Caller-defined metadata as JSON, or null.""" metadata: String """Creation instant, as an RFC 3339 timestamp.""" createdAt: String """Last write instant, as an RFC 3339 timestamp.""" updatedAt: String """Deletion instant, as an RFC 3339 timestamp; null for live records.""" deletedAt: String """Required explanation for holding pages.""" reason: String! """Whole target list; windows are visible only when every target is visible.""" targets: [AlarmSuppressionTarget!]! """Alarm keys to suppress; an empty list matches every key.""" alarmKeys: [String!]! """Alarms at or above this severity bypass the window; null disables bypass.""" bypassSeverity: String """Single interval or recurring weekly schedule.""" kind: AlarmSuppressionKind! """Inclusive ONE_SHOT start, as an RFC 3339 timestamp.""" startTime: String """Exclusive ONE_SHOT end, as an RFC 3339 timestamp.""" endTime: String """IANA time zone for RECURRING openings.""" timezone: String """Weekly slots as a JSON array of day, start and durationMinutes.""" slots: String """Optional inclusive recurrence bound, as an RFC 3339 timestamp.""" validFrom: String """Optional exclusive recurrence bound, as an RFC 3339 timestamp.""" validUntil: String """Server-recorded early end, as an RFC 3339 timestamp.""" endedAt: String """Subject that ended the window, or null.""" endedBy: String """Subject that created the window, or null.""" createdBy: String """SCHEDULED, ACTIVE or ENDED, computed now. Clients must tolerate new values.""" status: String! """Upcoming openings, including the current opening; at most twenty.""" openings( """Positive number of intervals to return, capped at twenty.""" limit: Int = 5 ): [AlarmSuppressionInterval!]! } """The live window currently holding an alarm's pages.""" type AlarmSuppression { """The window, or null when it is deleted or outside the caller's whole-window visibility.""" window: AlarmSuppressionWindow """Window token; "restricted" for scoped humans when the window is hidden or deleted. Service tokens receive the real token.""" windowToken: String! """Exclusive live deadline, as an RFC 3339 timestamp.""" until: String! } """Live suppression for one visible alarm.""" type AlarmSuppressionStatus { """The alarm's current severity tier.""" severity: String! """The alarm's current state: ACTIVE or CLEARED.""" state: String! """Token of the visible alarm.""" alarmToken: String! """Current suppression, or null when paging is not held.""" suppression: AlarmSuppression } """Declare a paging hold. Creator identity and early-end fields are server-owned.""" input AlarmSuppressionWindowCreateRequest { """Stable identifier for the new window.""" token: String! """Human-readable name.""" name: String """Free-text description.""" description: String """Caller-defined metadata as JSON.""" metadata: String """Required explanation for holding pages.""" reason: String! """One to twenty target populations.""" targets: [AlarmSuppressionTargetInput!]! """Up to twenty alarm keys; empty or omitted matches every key.""" alarmKeys: [String!] """Severity at or above which alarms bypass this window.""" bypassSeverity: String """Single interval or recurring schedule.""" kind: AlarmSuppressionKind! """Inclusive ONE_SHOT start, as an RFC 3339 timestamp.""" startTime: String """Exclusive ONE_SHOT end, as an RFC 3339 timestamp; at most thirty-one days after start.""" endTime: String """IANA time zone for RECURRING openings.""" timezone: String """RECURRING weekly slots as a JSON array of day, start and durationMinutes.""" slots: String """Inclusive recurrence bound, as an RFC 3339 timestamp.""" validFrom: String """Exclusive recurrence bound, as an RFC 3339 timestamp.""" validUntil: String } """Partial edit: omit to keep, null to clear nullable fields, value to replace. Required fields refuse null.""" input AlarmSuppressionWindowUpdateRequest { """Human-readable name; null clears.""" name: String """Free-text description; null clears.""" description: String """Metadata JSON; null clears.""" metadata: String """Required explanation; null is refused.""" reason: String """Replace all targets; null and empty lists are refused.""" targets: [AlarmSuppressionTargetInput!] """Replace all keys; null or an empty list matches every key.""" alarmKeys: [String!] """Bypass severity; null disables bypass.""" bypassSeverity: String """Schedule kind; null is refused. Change schedule fields together when switching kinds.""" kind: AlarmSuppressionKind """ONE_SHOT start as RFC 3339; null clears only when the merged kind permits it.""" startTime: String """ONE_SHOT end as RFC 3339; null clears only when the merged kind permits it.""" endTime: String """RECURRING IANA time zone; null clears only when the merged kind permits it.""" timezone: String """RECURRING slots JSON; null clears only when the merged kind permits it.""" slots: String """Inclusive recurrence bound as RFC 3339; null clears.""" validFrom: String """Exclusive recurrence bound as RFC 3339; null clears.""" validUntil: String } """Search visible whole windows before computing pagination totals.""" input AlarmSuppressionWindowSearchCriteria { """One-based page number.""" pageNumber: Int! """Maximum records per page.""" pageSize: Int! """SCHEDULED, ACTIVE or ENDED; omit for every status.""" status: String """Match any target naming this token.""" targetToken: String } """A page of visible suppression windows.""" type AlarmSuppressionWindowSearchResults { """Windows on this page.""" results: [AlarmSuppressionWindow!]! """Page bounds and total visible matching records. For scoped callers, totalRecords counts whole-window-visible matches among the first 10,000 storage-visible candidates; pages remain available beyond that count bound.""" pagination: SearchResultsPagination! } schema { query: Query mutation: Mutation subscription: Subscription } # Fleet operation readiness (Preview) """Preview. Deprecated; use BulkChangeReadiness via bulkChangeReadiness. Whether this instance can run bulk changes. May change in a minor release while in preview.""" type FleetOperationReadiness { """Preview. Highest bulk-change protocol version the answering service build follows.""" protocolVersion: Int! """Preview. Whether the database enforces the device attribute writer protocol.""" enforcement: FleetOperationEnforcement! """Preview. Operation kinds the caller can run now: the kinds the answering service build executes, while enforcement is ENFORCED and orphanedAttributeRows is 0. Empty otherwise.""" executableKinds: [String!]! """Preview. Device attribute and generation rows in the caller's tenant whose device no longer exists, counted fresh for this request, including soft-deleted attributes. Bulk changes are not activated while this is above zero. Null when the count could not be read; the error names why, and the other facts are still answered.""" orphanedAttributeRows: Int } """Preview. Deprecated; use BulkChangeEnforcement via bulkChangeReadiness. Database enforcement of the device attribute writer protocol.""" enum FleetOperationEnforcement { """Preview. The expected enforcing trigger and function are not installed on the device attribute table.""" NOT_INSTALLED """Preview. The expected enforcing trigger exists but is disabled or enabled without ALWAYS.""" DISABLED """Preview. The expected enforcing trigger covers INSERT, UPDATE and DELETE, has no WHEN condition and is enabled ALWAYS.""" ENFORCED """Preview. The database catalog could not be read. Enforcement cannot be confirmed.""" UNREADABLE } # Bulk change readiness (Preview) """Preview. Whether this instance can run bulk changes. May change in a minor release while in preview.""" type BulkChangeReadiness { """Preview. Highest bulk-change protocol version the answering service build follows.""" protocolVersion: Int! """Preview. Whether the database enforces the device attribute writer protocol.""" enforcement: BulkChangeEnforcement! """Preview. Operation kinds the caller can run now: the kinds the answering service build executes, while enforcement is ENFORCED and orphanedAttributeRows is 0. Empty otherwise.""" executableKinds: [String!]! """Preview. Device attribute and generation rows in the caller's tenant whose device no longer exists, counted fresh for this request, including soft-deleted attributes. Bulk changes are not activated while this is above zero. Null when the count could not be read; the error names why, and the other facts are still answered.""" orphanedAttributeRows: Int } """Preview. Database enforcement of the device attribute writer protocol.""" enum BulkChangeEnforcement { """Preview. The expected enforcing trigger and function are not installed on the device attribute table.""" NOT_INSTALLED """Preview. The expected enforcing trigger exists but is disabled or enabled without ALWAYS.""" DISABLED """Preview. The expected enforcing trigger covers INSERT, UPDATE and DELETE, has no WHEN condition and is enabled ALWAYS.""" ENFORCED """Preview. The database catalog could not be read. Enforcement cannot be confirmed.""" UNREADABLE } # Bulk changes (Preview) """Preview. Where an operation is in dispatching its lines. A paused or dispatched operation is a resting state, not a failure.""" enum BulkChangeDispatch { """Preview. Reserved for a later release.""" DRAFT """Preview. The lines are being written.""" PLANNING """Preview. Planned and waiting for a person to start it.""" READY """Preview. Lines are being applied.""" RUNNING """Preview. No line is applied until it is resumed.""" PAUSED """Preview. Every line has been applied or refused; evidence may still be outstanding.""" DISPATCHED """Preview. Stopped for good: lines not yet applied were cancelled.""" ABORTED } """Preview. Whether the devices have yet answered for the lines that were applied.""" enum BulkChangeEvidence { """Preview. At least one applied line has no verdict, or is ambiguous.""" OPEN """Preview. Every applied line has a verdict.""" CLOSED } """Preview. What happened to a line when it was applied.""" enum BulkChangeLinePosting { """Preview. Not applied yet.""" PLANNED """Preview. Reserved for a later release.""" DISPATCHING """Preview. Applied; the device's own answer decides the settlement.""" POSTED """Preview. Not applied: the line was refused, with a code.""" REFUSED """Preview. Not applied: the target no longer qualified.""" SKIPPED """Preview. Not applied: the operation was aborted first.""" CANCELLED """Preview. Reserved for a later release.""" POSTING_UNKNOWN } """Preview. The device's answer for an applied line.""" enum BulkChangeLineSettlement { """Preview. The device reported it applied the value.""" CONFIRMED """Preview. The device reported it rejected the value.""" FAILED """Preview. The device was given a newer configuration before it answered for this one.""" SUPERSEDED """Preview. No answer arrived in time; a person decides.""" AMBIGUOUS """Preview. A person resolved an ambiguous line as confirmed.""" RESOLVED_CONFIRMED """Preview. A person resolved an ambiguous line as failed.""" RESOLVED_FAILED } """Preview. A person's verdict on an ambiguous line.""" enum BulkChangeVerdict { """Preview. The person confirmed the change.""" CONFIRMED """Preview. The person judged the change failed.""" FAILED } """Preview. Resolve selected ambiguous lines with a fresh second factor and a note.""" input BulkChangeAmbiguityResolution { """Preview. Token of the bulk change.""" token: String! """Preview. Positions to resolve, starting at 1. Select this or allAmbiguous.""" ordinals: [Int!] """Preview. Resolve every ambiguous line instead of selecting ordinals.""" allAmbiguous: Boolean """Preview. The person's verdict.""" verdict: BulkChangeVerdict! """Preview. Reason for the verdict, from 1 to 1000 characters.""" note: String! } """Preview. Whether the engine that applies the operation is making progress.""" enum BulkChangeExecutorState { """Preview. Not running, so there is nothing to apply.""" IDLE """Preview. Running and making progress.""" WORKING """Preview. Running and waiting on a hold reported in the last minute; holdCode names it.""" HELD """Preview. Running with lines left to apply, no hold, and nothing applied for five minutes.""" STALLED """Preview. Running, but no replica has reported on it in the last minute.""" UNKNOWN } """Preview. What kind of report decided a line's settlement.""" enum BulkChangeEvidenceBasis { """Preview. The full log of accepted reports covers the line.""" REPORT_LOG """Preview. Only the device's latest reported state was available.""" LATEST_STATE } """Preview. The limits an operation was approved to run under, and the values currently in force.""" type BulkChangeSafety { """Preview. The most lines applied per second that was approved.""" maxPostsPerSecond: Int! """Preview. The rate currently in force, never above the approved one.""" effectivePostsPerSecond: Int! """Preview. Failed lines that pause the operation. Null for no limit.""" failureThreshold: Int """Preview. The failure limit currently in force.""" effectiveFailureThreshold: Int """Preview. Ambiguous lines that pause the operation. Null for no limit.""" ambiguityThreshold: Int """Preview. The ambiguity limit currently in force.""" effectiveAmbiguityThreshold: Int """Preview. Seconds a device has to answer before its line becomes ambiguous.""" settleDeadlineSeconds: Int! } """Preview. What the operation can and cannot claim about the devices' answers.""" type BulkChangeEvidenceCapability { """Preview. Whether the broker was configured to refuse rather than drop when the operation started.""" brokerFailClosed: Boolean! """Preview. Whether the history of accepted reports is kept.""" reportLog: Boolean! """Preview. In words, what a verdict does and does not prove.""" note: String! } """Preview. Line counts of one operation, grouped by state, as of this read.""" type BulkChangeProgress { """Preview. Lines not applied yet.""" planned: Int! """Preview. Lines applied.""" posted: Int! """Preview. Lines refused.""" refused: Int! """Preview. Lines skipped.""" skipped: Int! """Preview. Lines cancelled by an abort.""" cancelled: Int! """Preview. Applied lines the device confirmed.""" confirmed: Int! """Preview. Applied lines the device rejected.""" failed: Int! """Preview. Applied lines overtaken by a newer configuration.""" superseded: Int! """Preview. Applied lines with no answer in time.""" ambiguous: Int! """Preview. Ambiguous lines a person has resolved.""" resolved: Int! """Preview. Applied lines still waiting for the device's answer.""" awaitingEvidence: Int! } """Preview. One change applied to many devices, as one reviewed decision.""" type BulkChange implements Model & TokenReference { """Preview. Server-assigned numeric identifier, as a string.""" id: ID! """Preview. When the operation was created.""" createdAt: String """Preview. When the operation was last written.""" updatedAt: String """Preview. Always null: operations are not soft-deleted.""" deletedAt: String """Preview. Identifier chosen by the creator, unique within the tenant. Creating again with the same token and the same request returns the original.""" token: String! """Preview. Name shown to people.""" name: String! """Preview. What the operation does, for example config.set.""" kind: String! """Preview. Where the operation is in dispatching its lines.""" dispatch: BulkChangeDispatch! """Preview. Whether the devices have answered for every applied line.""" evidence: BulkChangeEvidence! """Preview. Why a paused operation is paused. Null when it is not.""" pauseReason: String """Preview. Why a running operation is waiting. Null when it is not.""" holdCode: String """Preview. Since when it has been waiting.""" holdSince: String """Preview. Whether the engine applying the operation is making progress.""" executor: BulkChangeExecutorState! """Preview. When a line was last applied.""" lastProgressAt: String """Preview. The code of the last error the engine met.""" lastErrorCode: String """Preview. Counts every pause, resume and handover; a pause is final for lines applied before it.""" executionEpoch: Int! """Preview. Digest of the request that created the operation.""" requestDigest: String! """Preview. Digest of the plan: the ordered targets and what was admitted or refused.""" planDigest: String! """Preview. Version of the contract in force.""" contractVersion: Int! """Preview. Digest of the contract a person approves by presenting it at start.""" contractDigest: String! """Preview. The contract in force, as canonical JSON.""" contract: String! """Preview. What the operation does, as canonical JSON.""" intent: String! """Preview. How the targets were named, for example DEVICE_LIST.""" targetKind: String! """Preview. Number of lines, refused ones included.""" targetCount: Int! """Preview. The limits it was approved to run under.""" safety: BulkChangeSafety! """Preview. What its verdicts can and cannot prove.""" evidenceCapability: BulkChangeEvidenceCapability! """Preview. Line counts by state, as of this read.""" progress: BulkChangeProgress! """Preview. Sign-in name of the person the operation currently runs on behalf of. Null until it is started.""" grantee: String """Preview. Sign-in name of the person who created the operation.""" initiator: String! """Preview. When the operation was started.""" startedAt: String """Preview. When its last line was applied.""" dispatchedAt: String """Preview. When the last verdict arrived.""" closedAt: String """Preview. When a READY operation that is never started is aborted.""" expiresAt: String """Preview. The bulk change this one reverses. Null when it is not a reversal.""" reversalOf: BulkChange """Preview. The reversals created for this bulk change, oldest first.""" reversals: [BulkChange!]! } """Preview. One device and one change within an operation.""" type BulkChangeLine { """Preview. Position in the creator's own input, starting at 1.""" ordinal: Int! """Preview. Token of the target device. Null for an input that named no device and once the device has been deleted.""" targetToken: String """Preview. Whether the line's identifiers were erased.""" redacted: Boolean! """Preview. What happened when the line was applied.""" posting: BulkChangeLinePosting! """Preview. The device's answer, once there is one.""" settlement: BulkChangeLineSettlement """Preview. Why the line was refused or skipped.""" code: String """Preview. Detail for the code.""" detail: String """Preview. The value the device held before, as JSON. Null until the line is applied.""" prior: String """Preview. The value that was applied, as JSON.""" postedValue: String """Preview. The configuration revision the application produced.""" postedRevision: Int """Preview. When the line was applied.""" postedAt: String """Preview. When the device must have answered.""" settleBy: String """Preview. When the line was settled.""" settledAt: String """Preview. What decided the settlement.""" evidenceBasis: BulkChangeEvidenceBasis """Preview. The revision of the report that decided it.""" evidenceRevision: Int """Preview. Set when a later report contradicts a person's verdict.""" evidenceFlag: String """Preview. How many times applying the line was tried.""" attempts: Int! """Preview. The code of the last retryable error.""" lastErrorCode: String """Preview. Whether the line was applied over a change made since the original.""" overrideChanged: Boolean! """Preview. Sign-in name of the person who resolved the line.""" resolvedBy: String """Preview. The resolution's shared note. Null once redacted.""" resolutionNote: String """Preview. When it was resolved.""" resolvedAt: String """Preview. The applied line of a reversal that restored this line's earlier value. Null while nothing has.""" reversedBy: BulkChangeLine } """Preview. One page of an operation's lines.""" type BulkChangeLineSearchResults { """Preview. The lines on this page, in ordinal order.""" results: [BulkChangeLine!]! """Preview. Where this page sits in the full result.""" pagination: SearchResultsPagination! } """Preview. One page of operations.""" type BulkChangeSearchResults { """Preview. The operations on this page, newest first.""" results: [BulkChange!]! """Preview. Where this page sits in the full result.""" pagination: SearchResultsPagination! } """Preview. An input a plan refused.""" type BulkChangePlanRefusal { """Preview. Position in the creator's input.""" ordinal: Int! """Preview. The token as supplied.""" token: String! """Preview. Why: TARGET_NOT_FOUND or DUPLICATE_TARGET.""" code: String! } """Preview. How many inputs a plan refused for one code.""" type BulkChangePlanRefusalCount { """Preview. The refusal code.""" code: String! """Preview. How many inputs were refused for it, in full.""" count: Int! } """Preview. What an operation would do, computed without writing anything.""" type BulkChangePlan { """Preview. Lines that would be applied.""" admittedCount: Int! """Preview. Lines that were refused at plan time.""" refusedCount: Int! """Preview. Refusals by code, counted in full.""" refusalCounts: [BulkChangePlanRefusalCount!]! """Preview. The first 100 refusals of each code, each with the token supplied.""" refusals: [BulkChangePlanRefusal!]! """Preview. Digest of the request.""" requestDigest: String! """Preview. Digest of the plan.""" planDigest: String! """Preview. Digest to present to start the operation.""" contractDigest: String! } """Preview. The change a config.set operation makes: one declared SHARED configuration key, set or unset.""" input BulkChangeConfigSetInput { """Preview. The configuration key.""" key: String! """Preview. The value, as text. Omit when unsetting.""" value: String """Preview. STRING, LONG, DOUBLE, BOOLEAN or JSON. Omit when unsetting.""" valueType: String """Preview. Remove the key instead of setting it.""" unset: Boolean } """Preview. The limits an operation asks to run under.""" input BulkChangeCreateSafety { """Preview. The most lines applied per second. Default 10; at most 50.""" maxPostsPerSecond: Int """Preview. Failed lines that pause the operation. Omit for no limit.""" failureThreshold: Int """Preview. Ambiguous lines that pause the operation. Omit for no limit.""" ambiguityThreshold: Int """Preview. Seconds a device has to answer before its line becomes ambiguous. Default 86400.""" settleDeadlineSeconds: Int } """Preview. A request to plan or create a bulk change.""" input BulkChangeCreateRequest { """Preview. Identifier for the operation, unique within the tenant.""" token: String! """Preview. Name shown to people.""" name: String! """Preview. The kind of operation. This release knows config.set.""" kind: String! """Preview. The change, for kind config.set.""" configSet: BulkChangeConfigSetInput """Preview. Tokens of the devices to change, at most 10000. A token that names no device in this tenant becomes a refused line.""" deviceTokens: [String!]! """Preview. The limits to run under.""" safety: BulkChangeCreateSafety } """Preview. Criteria for listing operations.""" input BulkChangeSearchCriteria { """Preview. 1-based page number.""" pageNumber: Int! """Preview. Rows per page.""" pageSize: Int! """Preview. Only operations in this dispatch state.""" dispatch: String """Preview. Only operations in this evidence state.""" evidence: String """Preview. Only operations of this kind.""" kind: String } """Preview. Criteria for listing one operation's lines.""" input BulkChangeLineSearchCriteria { """Preview. 1-based page number.""" pageNumber: Int! """Preview. Rows per page.""" pageSize: Int! """Preview. Only lines in this posting state.""" posting: String """Preview. Only lines with this settlement.""" settlement: String """Preview. Only lines with this code.""" code: String } """Preview. A change to the limits an operation runs under when it is resumed. Anything looser than the approved contract is refused.""" input BulkChangeSafetyInput { """Preview. The most lines applied per second. At most the approved rate.""" maxPostsPerSecond: Int """Preview. Failed lines that pause the operation. At most the approved limit.""" failureThreshold: Int """Preview. Ambiguous lines that pause the operation. At most the approved limit.""" ambiguityThreshold: Int """Preview. Remove the failure limit. Only where the contract has none.""" clearFailureThreshold: Boolean """Preview. Remove the ambiguity limit. Only where the contract has none.""" clearAmbiguityThreshold: Boolean } """Preview. What resuming an operation with a given change would do, computed without writing anything.""" type BulkChangeResumePreview { """Preview. Whether the change stays within what was approved.""" withinContract: Boolean! """Preview. Version of the contract in force.""" contractVersion: Int! """Preview. Digest to present to resume.""" contractDigest: String! """Preview. The contract in force, as canonical JSON.""" contract: String! """Preview. Whether the change needs a fresh second factor. Always false in this release.""" stepUpRequired: Boolean! """Preview. Whether the failure or ambiguity limit is still reached, which refuses a resume.""" thresholdStillExceeded: Boolean! } """Preview. A request to reverse a DISPATCHED or ABORTED bulk change: a new bulk change that puts back, line by line, the value each device held before.""" input BulkChangeReversalRequest { """Preview. Token of the bulk change to reverse.""" original: String! """Preview. Identifier for the reversal, unique within the tenant. Reversing again with the same token and the same request returns the first reversal.""" token: String! """Preview. Name shown to people.""" name: String! """Preview. Positions of the original's lines to reverse, starting at 1. Omit to reverse every applied line.""" ordinals: [Int!] """Preview. Apply every selected line even where the value changed after the original was applied. Needs a second factor verified within five minutes.""" overrideChanged: Boolean """Preview. Apply only these lines even where the value changed since. Needs a second factor verified within five minutes.""" overrideOrdinals: [Int!] """Preview. The limits to run under.""" safety: BulkChangeCreateSafety } """Preview. What a reversal would do, computed without writing anything.""" type BulkChangeReversalPreview { """Preview. Lines that would be applied.""" reversibleCount: Int! """Preview. Of those, lines whose value changed after the original was applied, as of this read. Each is refused with CHANGED_SINCE unless overridden.""" changedSinceCount: Int! """Preview. Lines whose earlier value was erased with their device.""" redactedCount: Int! """Preview. Lines another reversal already restored.""" alreadyReversedCount: Int! """Preview. Selected lines that were never applied.""" notPostedCount: Int! """Preview. Digest of the request.""" requestDigest: String! """Preview. Digest of the plan.""" planDigest: String! """Preview. Digest to present to start the reversal.""" contractDigest: String! }