openapi: 3.0.1
servers:
  - description: Cloud hosted Brain API endpoint.
    url: "{protocol}://{customer}.intellifi.{tld}/api"
    variables:
      customer:
        default: brain
        description: Customer sub-domain assigned by Intellifi
      protocol:
        default: https
        enum:
          - https
          - http
      tld:
        default: cloud
        enum:
          - nl
          - cloud
info:
  contact:
    email: support@intellifi.nl
    name: Support
    url: https://intellifi.zendesk.com
  description: |
    This document describes the [Intellifi Brain](https://intellifi.zendesk.com/hc/en-us/categories/360000685454)
    Web API specification using the [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification).

    The Brain Web API is a RESTful API that allows you to interact with the
    [Intellifi devices](https://intellifi.zendesk.com/hc/en-us/categories/360000685434) and
    services in a powerful and simple way. Our end-to-end solution allows you to
    localize your items/assets based on technologies such as RFID and Bluetooth.

    # Try it out!

    The API can be tried out and tested using the ['api-doc/tryitout' endpoint on this site](./tryitout/).
    This UI allows anyone to visualize and interact with the API’s resources without having any of the implementation logic in place.
    It’s automatically generated from this Specification, with the visual documentation making it easy for back end implementation and client side consumption.

    # Authentication

    Applications are required to provide some form of authentication to the API
    for every secured endpoint. The Brain offers two forms of authentication.

    - API key (Via an HTTP request header or URL parameter)
    - Session cookie

    <!-- ReDoc-Inject: <security-definitions> -->

    # See also

    - About Intellifi and what we do: [intellifi.nl](https://intellifi.nl)
    - Technical and background information: [intellifi.zendesk.com](https://intellifi.zendesk.com)
  license:
    name: MIT
    url: ./LICENSE
  title: Brain Web API
  version: 2.23.4+0.gb463b49.dirty
  x-apisguru-categories:
    - iot
  x-logo:
    altText: Intellifi logo
    backgroundColor: "#FFFFFF"
    url: https://avatars1.githubusercontent.com/u/9928538?s=200&v=4
  x-origin:
    - format: openapi
      url: https://intellifi-nl.github.io/brain-rest-api-spec/openapi.yml
      version: "3.0"
  x-providerName: intellifi.nl
externalDocs:
  description: Find out more
  url: https://intellifi.zendesk.com
security:
  - CookieSid: []
  - HeaderApiKey: []
  - QueryApiKey: []
tags:
  - description: |
      Read-only route providing information about how the requesting client is authenticated on the API, as well as corresponding permissions.
    name: authinfo
  - description: |
      The `blobs` resource provides a service for storing binary objects on the Brain, e.g. images.
      Intended for applications that interact with the Brain but do not or cannot have their own (centralized) persistent storage.

      See also the `kvpairs` resource.
    name: blobs
  - description: |
      The `events` resource temporarily holds Brain events that match an event subscription in the `subscriptions` resource.
      The subscription determines how long the events are held.

      See also the `subscriptions` resource.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/sections/360001588534
    name: events
  - description: |
      The `items` resource contains data about things that can be tracked using the Brain.
      When an item is detected for the first time by a device connected to the Brain, it will be added to this resource.
      It will then be updated with information about where the item currently is, or where it has been seen for the last time.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/articles/360007502554
    name: items
  - description: |
      The `keys` resource contains the access keys used to authenticate requests to this API.

      Note that this resource is only accessible for administrator users logged into the Brain Management Console.
      It is not possible to access this resource using API key authentication.
      This resource is therefore irrelevant to most applications.
    name: keys
  - description: |
      The `kvpairs` resource provides a service for storing generic JSON key/value pairs on the Brain.
      Intended for applications that interact with the Brain but do not or cannot have their own (centralized) persistent storage.

      See also the `blobs` resource.
    name: kvpairs
  - description: |
      The `locations` resource is an abstraction for the area around a physical location that items can be localized at.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/articles/360007502554
    name: locations
  - description: |
      Location rules are directives for the localization engine that may be useful for certain solutions.
    name: locationrules
  - description: |
      The `presences` resource is an abstraction for the detection of an item (from the `items` resource) at a location (from the `locations` resource).
      Presences are always kept current by the Brain, i.e. if the hold time of a presence expires it is simply removed from the resource.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/articles/360008309313
    name: presences
  - description: |
      The Brain consists of several software components with their own responsibilities, referred to as "services".
      Some of these services have status information and/or configuration that can be managed using the `services` resource.
    name: services
  - description: |
      It can be useful to group items or Smartspots in a list. The `sets` resource can be used to create and manage such list sets.
      Sets can be utilized in various Brain Management Console utilities and can also be useful in custom Brain applications.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/articles/360007824993
    name: sets
  - description: |
      The `spots` resource contains representations of Smartspot devices that have connected to this Brain at least once.
      It is possible to configure Smartspots through this resource.

      Smartspots also have their own locally stored sets, referred to as "spotsets".
      Spotsets can be created and managed within a single spot instance or by using `spotsets` resource.
      Created or updated spotsets are automatically synced between Smartspot and server.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/categories/360000685434
    name: spots
  - description: |
      The `spotsets` resource contains a collection of set definitons for each Smartspot and allows for remote mananagement.
      Spotsets are stored and used on the Smartspot locally and synced between Smartspot and server.
      Spotsets primarly are used as an input for Sense&Control.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/articles/360009282834
    name: spotsets
  - description: |
      The `subscriptions` resource contains rules to store and/or deliver events from the Brain event system.

      See also the `events` resource.
    externalDocs:
      url: https://intellifi.zendesk.com/hc/en-us/sections/360001588534
    name: subscriptions
  - description: |
      The `users` resource contains the user accounts that can log into the Brain Management Console.

      Note that this resource is only accessible for administrator users logged into the Brain Management Console.
      It is not possible to access this resource using API key authentication.
      This resource is therefore irrelevant to most applications.
    name: users
paths:
  /authinfo:
    get:
      operationId: getAuthinfo
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  api_key_id:
                    description: Reference to the static API key (/api/keys) used to authenticate this request (when auth_method=static_api_key)
                    example: 5b7d6cbd7503c445552a1664
                    type: string
                  auth_method:
                    description: What kind of authentication was used
                    enum:
                      - user_session
                      - internal
                      - static_api_key
                    type: string
                  authenticated:
                    description: Whether or not you are authenticated
                    type: boolean
                  permissions:
                    properties:
                      mutate:
                        description: Whether or not this session can mutate resources
                        type: boolean
                    type: object
                  url:
                    $ref: "#/components/schemas/Url"
                  user_id:
                    description: Reference to the user account (/api/users) used to authenticate this request (when auth_method=user_session)
                    example: 5b7d6cbd7503c445552a1664
                    type: string
                type: object
          description: A JSON object containing the authentication information
      summary: Authentication information
      tags:
        - authinfo
  /blobs:
    get:
      operationId: getBlobs
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - description: Filter based on the hash of the blob.
          in: query
          name: hash
          schema:
            type: string
        - description: Filter based on the unique blob_key
          in: query
          name: blob_key
          schema:
            type: string
        - description: Filter based on the content type of the blob.
          in: query
          name: content_type
          schema:
            type: string
        - description: Filter based on the filename of the blob.
          in: query
          name: filename
          schema:
            type: string
        - description: Filter based on the last time the blob was accessed
          in: query
          name: time_last_accessed
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Blob"
                        type: array
                    type: object
          description: A JSON object containing a list of blobs
      summary: Get all binary large objects (blob)
      tags:
        - blobs
    post:
      operationId: addBlob
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Blob"
        description: A JSON object containing blob information
        required: true
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create binary large object (blob) metadata
      tags:
        - blobs
  "/blobs/{id}":
    delete:
      operationId: deleteBlob
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete binary large object (blob)
      tags:
        - blobs
    get:
      operationId: getBlobMetadataById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Blob"
          description: A JSON object containing the blob
      summary: Get binary large object (blob)
      tags:
        - blobs
  "/blobs/{id}/download/{filename}":
    get:
      operationId: getBlobById
      parameters:
        - $ref: "#/components/parameters/PathId"
        - description: Filename of the blob.
          in: path
          name: filename
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            image/*:
              schema:
                format: binary
                type: string
          description: The stored binary blob
      summary: Download a binary large object (blob)
      tags:
        - blobs
  "/blobs/{id}/upload":
    post:
      operationId: uploadBlobById
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
      responses:
        "200":
          description: Upload was successful
      summary: Create binary large object (blob)
      tags:
        - blobs
  /events:
    get:
      operationId: getEvents
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TopicResourceType"
        - $ref: "#/components/parameters/TopicAction"
        - $ref: "#/components/parameters/TopicResource"
        - $ref: "#/components/parameters/TimeEvent"
        - $ref: "#/components/parameters/TimeExpire"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Event"
                        type: array
                    type: object
          description: A JSON object containing a list of events
      summary: Get all events
      tags:
        - events
  "/events/{id}":
    get:
      operationId: getEventById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Event"
          description: A JSON object containing the event
      summary: Get event
      tags:
        - events
  /items:
    get:
      operationId: getItems
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/AfterCode"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/BeforeCode"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/FromCode"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/UntilCode"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/CodeHex"
        - $ref: "#/components/parameters/IsPresent"
        - $ref: "#/components/parameters/Label"
        - $ref: "#/components/parameters/Location"
        - $ref: "#/components/parameters/Metadata"
        - $ref: "#/components/parameters/MoveCount"
        - $ref: "#/components/parameters/Protocol"
        - $ref: "#/components/parameters/Sets"
        - $ref: "#/components/parameters/Technology"
        - $ref: "#/components/parameters/Text"
        - $ref: "#/components/parameters/TimeLastPresent"
        - $ref: "#/components/parameters/TimeMoved"
        - $ref: "#/components/parameters/Type"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Item"
                        type: array
                    type: object
          description: A JSON object containing a list of items
      summary: Get all items
      tags:
        - items
    post:
      operationId: addItem
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Item"
        description: A JSON object containing item information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/OkPost"
      summary: Create item
      tags:
        - items
  "/items/{id}":
    delete:
      operationId: deleteItem
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete item
      tags:
        - items
    get:
      operationId: getItemById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Item"
          description: A JSON object containing the items
      summary: Get item
      tags:
        - items
    put:
      operationId: updateItem
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ItemUpdate"
        description: A JSON object containing item information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing item
      tags:
        - items
  /keys:
    get:
      description: Can only be used by an **administrative** user.
      operationId: getKeys
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - description: Filter on the secret token.
          in: query
          name: secret
          schema:
            type: string
        - description: Filter on the label.
          in: query
          name: label
          schema:
            type: string
        - description: Filter on read only status.
          in: query
          name: is_read_only
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Key"
                        type: array
                    type: object
          description: A JSON object containing a list of keys
      security:
        - CookieSid: []
      summary: Get all keys
      tags:
        - keys
    post:
      description: Can only be used by an **administrative** user.
      operationId: addKey
      requestBody:
        $ref: "#/components/requestBodies/Key"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      security:
        - CookieSid: []
      summary: Create key
      tags:
        - keys
  "/keys/{id}":
    delete:
      description: Can only be used by an **administrative** user.
      operationId: deleteKey
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      security:
        - CookieSid: []
      summary: Delete key
      tags:
        - keys
    get:
      description: Can only be used by an **administrative** user.
      operationId: getKeyById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Key"
          description: A JSON object containing the key
      security:
        - CookieSid: []
      summary: Get key
      tags:
        - keys
    put:
      description: Can only be used by an **administrative** user.
      operationId: updateKey
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/Key"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      security:
        - CookieSid: []
      summary: Update existing key
      tags:
        - keys
  /kvpairs:
    get:
      operationId: getKvPairs
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - description: Filter on the key-value pair key value.
          in: query
          name: kv_key
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/KeyValuePair"
                        type: array
                    type: object
          description: A JSON object containing a list of key-value pairs
      summary: Get all key-value pairs
      tags:
        - kvpairs
    post:
      operationId: addKvPairs
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/KeyValuePair"
        description: A JSON object containing Key-value information
        required: true
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create key-value pair
      tags:
        - kvpairs
  "/kvpairs/{id}":
    delete:
      operationId: deleteKvPair
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete key-value pair
      tags:
        - kvpairs
    get:
      operationId: getKvPairsById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/KeyValuePair"
          description: A JSON object containing the subscription
      summary: Get key-value pair
      tags:
        - kvpairs
    put:
      operationId: updateKvPair
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/KeyValuePairUpdate"
        description: A JSON object containing Key-value information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing Key-value pair
      tags:
        - kvpairs
  /locationrules:
    get:
      operationId: getLocationRules
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Label"
        - $ref: "#/components/parameters/LocationRuleType"
        - $ref: "#/components/parameters/RuleEnabled"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/LocationRule"
                        type: array
                    type: object
          description: A JSON object containing a list of location rules
      summary: Get all location rules
      tags:
        - locationrules
    post:
      operationId: addLocationRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LocationRuleUpdate"
        description: A JSON object containing the location rule
        required: true
      responses:
        "200":
          $ref: "#/components/responses/OkPost"
      summary: Create location rule
      tags:
        - locationrules
  "/locationrules/{id}":
    delete:
      operationId: deleteLocationRule
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete location rule
      tags:
        - locationrules
    get:
      operationId: getLocationRuleById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LocationRule"
          description: A JSON object containing the location rule
      summary: Get location rule
      tags:
        - locationrules
    put:
      operationId: updateLocationRule
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LocationRuleUpdate"
        description: A JSON object containing new properties
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing location rule
      tags:
        - locationrules
  /locations:
    get:
      operationId: getLocations
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Label"
        - $ref: "#/components/parameters/Metadata"
        - $ref: "#/components/parameters/Text"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Location"
                        type: array
                    type: object
          description: A JSON object containing a list of locations
      summary: Get all locations
      tags:
        - locations
    post:
      operationId: addLocation
      requestBody:
        $ref: "#/components/requestBodies/Location"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create location
      tags:
        - locations
  "/locations/{id}":
    delete:
      operationId: deleteLocation
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete location
      tags:
        - locations
    get:
      operationId: getLocationById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Location"
          description: A JSON object containing the location
      summary: Get location
      tags:
        - locations
    put:
      operationId: updateLocation
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/Location"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing location
      tags:
        - locations
  /presences:
    get:
      operationId: getPresences
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Item"
        - $ref: "#/components/parameters/Location"
        - $ref: "#/components/parameters/Proximity"
        - $ref: "#/components/parameters/Technology"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Presence"
                        type: array
                    type: object
          description: A JSON object containing a list of presences
      summary: Get all presences
      tags:
        - presences
  "/presences/{id}":
    get:
      operationId: getPresenceById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Presence"
          description: A JSON object containing the presence
      summary: Get presence
      tags:
        - presences
  /services:
    get:
      operationId: getServices
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Name"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Service"
                        type: array
                    type: object
          description: A JSON object containing a list of services
      summary: Get all services
      tags:
        - services
  "/services/{id}":
    get:
      operationId: getServiceById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Service"
          description: A JSON object containing the service
      summary: Get service
      tags:
        - services
    put:
      operationId: updateService
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Service"
        description: A JSON object containing service information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing service
      tags:
        - services
  /sets/itemlists:
    get:
      operationId: getItemLists
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Label"
        - $ref: "#/components/parameters/Metadata"
        - $ref: "#/components/parameters/Text"
        - description: Filter based on the total amount of items in the list
          example: 2
          in: query
          name: total
          schema:
            type: integer
        - description: The sha1 checksum of the list. This will change when the list is mutated.
          example: 92cfceb39d57d914ed8b14d0e37643de0797ae56
          in: query
          name: sha1
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/ItemList"
                        type: array
                    type: object
          description: A JSON object containing a list of item lists
      summary: Get all item lists
      tags:
        - sets
    post:
      operationId: addItemList
      requestBody:
        $ref: "#/components/requestBodies/ItemList"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create item list
      tags:
        - sets
  "/sets/itemlists/{id}":
    delete:
      operationId: deleteItemSet
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete item list
      tags:
        - sets
    get:
      operationId: getItemListById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ItemList"
          description: A JSON object containing the item list
      summary: Get item list
      tags:
        - sets
    put:
      operationId: updateItemList
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/ItemList"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing item list
      tags:
        - sets
  "/sets/itemlists/{id}/ids":
    get:
      operationId: getItemListIdsById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListOfItemIds"
          description: An array object containing the item ids for this list
      summary: Get item ids for this list
      tags:
        - sets
    post:
      operationId: addItemIdsList
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ListOfItemIds"
        description: A JSON array containing item ids
        required: true
      responses:
        "200":
          $ref: "#/components/responses/OkPostList"
      summary: Add items to an existing list
      tags:
        - sets
  "/sets/itemlists/{id}/ids/{itemId}":
    delete:
      operationId: deleteItemIdFromItemList
      parameters:
        - $ref: "#/components/parameters/PathId"
        - description: Item ID.
          in: path
          name: itemId
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/200OkDeleteList"
      summary: Delete item from list
      tags:
        - sets
  /sets/spotlists:
    get:
      operationId: getSpotLists
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/Label"
        - $ref: "#/components/parameters/Metadata"
        - $ref: "#/components/parameters/Text"
        - description: Filter based on the total amount of spots in the list
          example: 2
          in: query
          name: total
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/SpotList"
                        type: array
                    type: object
          description: A JSON object containing a list of spot lists
      summary: Get all spot lists
      tags:
        - sets
    post:
      operationId: addSpotList
      requestBody:
        $ref: "#/components/requestBodies/ItemList"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create spot list
      tags:
        - sets
  "/sets/spotlists/{id}":
    delete:
      operationId: deleteSpotList
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete spot list
      tags:
        - sets
    get:
      operationId: getSpotListById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotList"
          description: A JSON object containing the spot list
      summary: Info for a specific spot list
      tags:
        - sets
    put:
      operationId: updateSpotList
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/SpotList"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing spot list
      tags:
        - sets
  "/sets/spotlists/{id}/ids":
    get:
      operationId: getSpotListIdsById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListOfItemIds"
          description: An array object containing the item ids for this list
      summary: Get spot ids for this list
      tags:
        - sets
    post:
      operationId: addItemIdsSpotList
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ListOfItemIds"
        description: A JSON array containing spot ids
        required: true
      responses:
        "200":
          $ref: "#/components/responses/OkPostList"
      summary: Add spots to an existing list
      tags:
        - sets
  "/sets/spotlists/{id}/ids/{itemId}":
    delete:
      operationId: deleteItemIdFromSpotList
      parameters:
        - $ref: "#/components/parameters/PathId"
        - description: Item ID.
          in: path
          name: itemId
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/200OkDeleteList"
      summary: Delete spot from list
      tags:
        - sets
  /spots:
    get:
      operationId: getSpots
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - $ref: "#/components/parameters/IsOnline"
        - $ref: "#/components/parameters/RequestCounter"
        - $ref: "#/components/parameters/SerialNumber"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/SpotGet"
                        type: array
                    type: object
          description: A JSON object containing a list of spots
      summary: Get all spots
      tags:
        - spots
  "/spots/{id}":
    get:
      operationId: getSpotById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotGet"
          description: A JSON object containing the spot
      summary: Get spot
      tags:
        - spots
    put:
      operationId: updateSpot
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpotUpdate"
        description: A JSON object containing spot information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing spot
      tags:
        - spots
  "/spots/{id}/sets":
    get:
      operationId: getSpotSetsById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotSet"
          description: A JSON object containing the spotset
      summary: Get spotsets
      tags:
        - spots
    post:
      operationId: addSpotSet
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/SpotSet"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create spotset
      tags:
        - spots
  "/spots/{id}/sets/{setId}":
    get:
      operationId: getSpotSetById
      parameters:
        - $ref: "#/components/parameters/PathId"
        - description: Unique spot set identifier
          example: 5b8d0b717503c445552a1865
          in: path
          name: setId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotSet"
          description: A JSON object containing the spotset
      summary: Get spotset
      tags:
        - spots
    put:
      operationId: updateSpotSet
      parameters:
        - $ref: "#/components/parameters/PathId"
        - description: Unique spot set identifier
          example: 5b8d0b717503c445552a1865
          in: path
          name: setId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpotSetUpdate"
        description: A JSON object containing spotset information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing spotset
      tags:
        - spots
  /spotsets:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotSet"
          description: A JSON object containing the spotset
      summary: Get spotsets
      tags:
        - spotsets
    post:
      requestBody:
        $ref: "#/components/requestBodies/SpotSet"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create spotset
      tags:
        - spotsets
  "/spotsets/{id}":
    get:
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpotSet"
          description: A JSON object containing the spotset
      summary: Get spotset
      tags:
        - spotsets
    put:
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpotSetUpdate"
        description: A JSON object containing spotset information
        required: true
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing spotset
      tags:
        - spotsets
  /subscriptions:
    get:
      operationId: getSubscriptions
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - description: Filter on the topic filter. Make sure to use [percent-encoding](https://en.wikipedia.org/wiki/Percent-encoding) in the query parameter.
          in: query
          name: topic_filter
          schema:
            type: string
        - description: Filter based on the description.
          in: query
          name: description
          schema:
            type: string
        - description: Filter based on the number of hours events are retained in the database.
          in: query
          name: database_hold_time_h
          schema:
            type: integer
        - description: Filter based on subscriptions that populate the events
          in: query
          name: populate_events
          schema:
            type: boolean
        - description: Filter on the verification of the target certificate.
          in: query
          name: verify_target_certificate
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Subscription"
                        type: array
                    type: object
          description: A JSON object containing a list of subscriptions
      summary: Get all subscriptions
      tags:
        - subscriptions
    post:
      operationId: addSubscription
      requestBody:
        $ref: "#/components/requestBodies/Subscription"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      summary: Create subscription
      tags:
        - subscriptions
  "/subscriptions/{id}":
    delete:
      operationId: deleteSubscription
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      summary: Delete subscription
      tags:
        - subscriptions
    get:
      operationId: getSubscriptionById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Subscription"
          description: A JSON object containing the subscription
      summary: Get subscription
      tags:
        - subscriptions
    put:
      operationId: updateSubscription
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/Subscription"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      summary: Update existing subscription
      tags:
        - subscriptions
  "/subscriptions/{id}/events":
    get:
      operationId: getEventsForSubscriptionById
      parameters:
        - $ref: "#/components/parameters/PathId"
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TopicResourceType"
        - $ref: "#/components/parameters/TopicAction"
        - $ref: "#/components/parameters/TopicResource"
        - $ref: "#/components/parameters/TimeEvent"
        - $ref: "#/components/parameters/TimeExpire"
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/Event"
                        type: array
                    type: object
          description: A JSON object containing the events for a specific subscription
      summary: Get subscription events
      tags:
        - subscriptions
  /users:
    get:
      description: Can only be used by an **administrative** user.
      operationId: getUsers
      parameters:
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/AfterId"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/BeforeId"
        - $ref: "#/components/parameters/From"
        - $ref: "#/components/parameters/FromId"
        - $ref: "#/components/parameters/IdOnly"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Populate"
        - $ref: "#/components/parameters/ResultsOnly"
        - $ref: "#/components/parameters/Select"
        - $ref: "#/components/parameters/Sort"
        - $ref: "#/components/parameters/Until"
        - $ref: "#/components/parameters/UntilId"
        - $ref: "#/components/parameters/TimeoutS"
        - $ref: "#/components/parameters/Id"
        - $ref: "#/components/parameters/TimeCreated"
        - $ref: "#/components/parameters/TimeUpdated"
        - description: Filter on the email address.
          in: query
          name: email
          schema:
            type: string
        - description: Filter on the first name.
          in: query
          name: first_name
          schema:
            type: string
        - description: Filter on the last name.
          in: query
          name: last_name
          schema:
            type: string
        - description: Filter on the administrator status.
          in: query
          name: is_admin
          schema:
            type: boolean
        - description: Filter on the locked status.
          in: query
          name: is_locked
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ResponseEnvelope"
                  - properties:
                      results:
                        items:
                          $ref: "#/components/schemas/User"
                        type: array
                    type: object
          description: A JSON object containing a list of users
      security:
        - CookieSid: []
      summary: Get all users
      tags:
        - users
    post:
      description: Can only be used by an **administrative** user.
      operationId: addUser
      requestBody:
        $ref: "#/components/requestBodies/User"
      responses:
        "201":
          $ref: "#/components/responses/OkPost"
      security:
        - CookieSid: []
      summary: Create user
      tags:
        - users
  "/users/{id}":
    delete:
      description: Can only be used by an **administrative** user.
      operationId: deleteUser
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          $ref: "#/components/responses/200OkDelete"
      security:
        - CookieSid: []
      summary: Delete user
      tags:
        - users
    get:
      description: Can only be used by an **administrative** user.
      operationId: getUserById
      parameters:
        - $ref: "#/components/parameters/PathId"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
          description: A JSON object containing the user
      security:
        - CookieSid: []
      summary: Get user
      tags:
        - users
    put:
      description: Can only be used by an **administrative** user.
      operationId: updateUser
      parameters:
        - $ref: "#/components/parameters/PathId"
      requestBody:
        $ref: "#/components/requestBodies/User"
      responses:
        "200":
          $ref: "#/components/responses/200OkPut"
      security:
        - CookieSid: []
      summary: Update existing user
      tags:
        - users
components:
  parameters:
    After:
      description: Limits on `time_created`, Marks the start of a range, optionally use `before` to set the end. Result output excludes the given timestamp.
      example: 2016-01-27T08:38:55.255Z
      in: query
      name: after
      schema:
        format: date-time
        type: string
    AfterCode:
      description: Limits directly on `code_hex`. Marks the start of a range, optionally use `before_code` to set the end. Result output excludes the given `code_hex` value.
      example: e20000000000000000000000
      in: query
      name: after_code
      schema:
        type: string
    AfterId:
      description: Limits directly on `id`. Marks the start of a range, optionally use `before_id` to set the end. Result output excludes the given `id` value. Please note that `id` is in chronological order.
      example: 56a88364e783152127d15340
      in: query
      name: after_id
      schema:
        type: string
    Before:
      description: Limits on `time_created`. Marks the end of a range, optionally use `after` to set the start. Result output excludes the given timestamp.
      example: 2016-01-27T08:38:55.255Z
      in: query
      name: before
      schema:
        format: dateTime
        type: string
    BeforeCode:
      description: Limits directly on `code_hex`. Marks the end of a range, optionally use `after_code` to set the start. Result output excludes the given `code_hex` value.
      example: e20000000000000000001fff
      in: query
      name: before_code
      schema:
        type: string
    BeforeId:
      description: Limits directly on `id`. Marks the end of a range, optionally use `after_id` to set the start. Result output excludes the given `id` value. Please note that `id` is in chronological order.
      example: 56a88364e783152127d15340
      in: query
      name: before_id
      schema:
        type: string
    CodeHex:
      description: "Filter based on the hexadecimal string representation of the item. Supports wildcards: `*`."
      examples:
        $:
          value: "*42*"
        multi-wildcard:
          summary: Returns resources whose `code_hex` contains value like `e20055550000000000001fff`.
          value: "*5555*"
        simple:
          summary: Returns resources whose `code_hex` is equal to value.
          value: e20000000000000000001fff
        wildcard:
          summary: Returns resources whose `code_hex` ends in value like `e20000000000000000004444`.
          value: "*4444"
      in: query
      name: code_hex
      schema:
        $ref: "#/components/schemas/CodeHex"
    From:
      description: Limits on `time_created`. Marks the start of a range, optionally use `until` to set the end. Result output includes the given timestamp.
      example: 2016-01-27T08:38:55.255Z
      in: query
      name: from
      schema:
        format: dateTime
        type: string
    FromCode:
      description: Limits on `code_hex`. Marks the start of a range, optionally use `until_code` to set the end. Result output includes the given `code_hex` value.
      example: e20000000000000000000000
      in: query
      name: from_code
      schema:
        type: string
    FromId:
      description: Limits on `id`. Marks the start of a range, optionally use `until_id` to set the end. Result output includes the given `id` value. Please note that `id` is in chronological order.
      example: 56a88364e783152127d15340
      in: query
      name: from_id
      schema:
        type: string
    Id:
      description: Unique identifier
      example: 5b8d0b717503c445552a1865
      in: query
      name: id
      schema:
        $ref: "#/components/schemas/IdReadOnly"
    IdOnly:
      allowEmptyValue: true
      description: Removes `url` fields from output and shows `_id` instead of `_url` in references.
      in: query
      name: id_only
      schema:
        default: false
        type: boolean
    IsOnline:
      description: Filter based on the online status.
      example: true
      in: query
      name: is_online
      schema:
        $ref: "#/components/schemas/IsOnline"
    IsPresent:
      description: Only show items which are present of not.
      example: true
      in: query
      name: is_present
      schema:
        type: boolean
    Item:
      description: Filter based on the item
      in: query
      name: item
      schema:
        $ref: "#/components/schemas/IdReadOnly"
    Label:
      description: "Filter based on the label value. Supports wildcards: `*`"
      example: "*foo*"
      in: query
      name: label
      schema:
        $ref: "#/components/schemas/Label"
    Limit:
      description: Sets the maximum number of returned resources. You may increase this number to large values, keep in mind that query times could become large. We advise you to use the pagination feature whenever you can.
      example: 5
      in: query
      name: limit
      schema:
        default: 100
        type: integer
    Location:
      description: Filter based on the location
      in: query
      name: location
      schema:
        $ref: "#/components/schemas/IdReadOnly"
    LocationRuleType:
      description: Filter based on the type of location rule.
      in: query
      name: type
      schema:
        $ref: "#/components/schemas/LocationRuleType"
    Metadata:
      description: Filter based on metadata. Does a partial match on any value in the metadata object. It is also possible to do an exact/wildcard match on specific properties, e.g. `metadata.foo=bar`
      in: query
      name: metadata
      schema:
        type: string
    MoveCount:
      description: Filter based on move count
      example: 5342
      in: query
      name: move_count
      schema:
        $ref: "#/components/schemas/MoveCount"
    Name:
      description: "Filter based on the name of the resource. Supports wildcards: `*`"
      examples:
        multi-wildcard:
          summary: Returns resources whose `name` contains `foo` like `barfoobar`.
          value: "*foo*"
        simple:
          summary: Returns resources whose `name` is equal to `foo`.
          value: foo
        wildcard:
          summary: Returns resources whose `name` ends in `foo` like `barfoo`.
          value: "*foo"
      in: query
      name: name
      schema:
        $ref: "#/components/schemas/Name"
    PathId:
      description: Unique identifier
      example: 5b8d0b717503c445552a1865
      in: path
      name: id
      required: true
      schema:
        type: string
    Populate:
      description: Expand a reference into the actual resource (lookup). You may add multiple fields by giving a comma separated value.
      example: location,item
      in: query
      name: populate
      schema:
        type: string
    Protocol:
      description: Filter based on the detected protocol of an item.
      example: epcgen2
      in: query
      name: protocol
      schema:
        $ref: "#/components/schemas/ItemProtocol"
    Proximity:
      description: Filter based on the proximity.
      example: immediate
      in: query
      name: proximity
      schema:
        $ref: "#/components/schemas/Proximity"
    RequestCounter:
      description: Filter based on the amount of request made
      example: 1234
      in: query
      name: request_counter
      schema:
        $ref: "#/components/schemas/RequestCounter"
    ResultsOnly:
      allowEmptyValue: true
      description: Removes response envelope with information about query, only sends back a JSON array with the applicable resources.
      in: query
      name: results_only
      schema:
        default: false
        type: boolean
    RuleEnabled:
      description: Filter based on the `enabled` property.
      in: query
      name: enabled
      schema:
        $ref: "#/components/schemas/RuleEnabled"
    Select:
      description: "Select which properties should be returned. You may add multiple fields by giving a comma separated value. Select can also be used together with populate: Specify the resource first, then a period(.) followed by the field."
      examples:
        mix:
          summary: Select `type`, and `label` from the populated resource `location`. Note use together with `populate=location` to expand a `location` reference into an actual resource, and allows the query to work on populated resources.
          value: type,location.label
        populated:
          summary: Select `label` and `metadata` from the populated resource `location`. Note use together with `populate=location` to expand a `location` reference into an actual resource, and allows the query to work on populated resources.
          value: location.label,location.metadata
        simple:
          summary: Select `type` and `technology`.
          value: type,technology
      in: query
      name: select
      schema:
        type: string
    SerialNumber:
      description: Filter based on the serial number.
      example: 1337
      in: query
      name: serial_number
      schema:
        $ref: "#/components/schemas/SerialNumber"
    Sets:
      description: Filter based on the set the resource is in.
      example: 5b8d0b717503c445552a1865
      in: query
      name: sets
      schema:
        $ref: "#/components/schemas/IdReadOnly"
    Sort:
      description: Allows you to sort on on or more fields in the resource. You may append a minus sign (`-`) to request reverse order (new to old).
      example: -move_count,technology
      in: query
      name: sort
      schema:
        default: -id
        type: string
    Technology:
      description: Filter based on the detected technology of an item.
      example: rfid
      in: query
      name: technology
      schema:
        $ref: "#/components/schemas/Technology"
    Text:
      description: Filter based on a full text search. Searched properties depend on the resource type. Matches on any of the given words. Supports quote (exact words) and minus (exclude) operators.
      example: penguin
      in: query
      name: text
      schema:
        type: string
    TimeCreated:
      description: Filter on the time the resource was created.
      example: 2018-08-30T09:51:59.737Z
      in: query
      name: time_created
      schema:
        $ref: "#/components/schemas/TimeCreated"
    TimeEvent:
      description: Filter on the time the event was generated on the device.
      example: 2018-08-30T09:51:59.737Z
      in: query
      name: time_event
      schema:
        $ref: "#/components/schemas/TimeExpire"
    TimeExpire:
      description: Filter on the time the event will expire.
      example: 2018-08-30T09:51:59.737Z
      in: query
      name: time_expire
      schema:
        $ref: "#/components/schemas/TimeExpire"
    TimeLastPresent:
      description: Filter based on the time last present
      example: 2018-09-03T10:23:46.596Z
      in: query
      name: time_last_present
      schema:
        type: string
    TimeMoved:
      description: Filter based on time last moved
      example: 2018-08-30T09:51:59.737Z
      in: query
      name: time_moved
      schema:
        $ref: "#/components/schemas/TimeMoved"
    TimeUpdated:
      description: Filter on the time the resource was last updated
      example: 2018-08-30T09:51:59.737Z
      in: query
      name: time_updated
      schema:
        $ref: "#/components/schemas/TimeUpdated"
    TimeoutS:
      description: "Overrides the default query timeout (in seconds). A value of 0 means unlimited. IMPORTANT: using high timeouts in production code is strongly discouraged as it may lead to stability issues."
      example: 60
      in: query
      name: timeout_s
      schema:
        type: number
    TopicAction:
      description: Filter on the topic action
      example: created
      in: query
      name: topic.action
      schema:
        $ref: "#/components/schemas/EventTopicAction"
    TopicResource:
      description: Filter on the topic resource id
      example: 5b7d6cbd7503c445552a1664
      in: query
      name: topic.resource
      schema:
        $ref: "#/components/schemas/IdReadOnly"
    TopicResourceType:
      description: Filter on the topic resource type
      example: items
      in: query
      name: topic.resource_type
      schema:
        $ref: "#/components/schemas/EventTopicResourceType"
    Type:
      description: Filter based on the type of an item.
      example: tag
      in: query
      name: type
      schema:
        $ref: "#/components/schemas/ItemType"
    Until:
      description: Limits on `time_created`. Marks the end of a range, optionally use `from` to set the start. Result output includes the given timestamp.
      example: 2016-01-27T08:38:55.255Z
      in: query
      name: until
      schema:
        format: dateTime
        type: string
    UntilCode:
      description: Limits on `code_hex`. Marks the end of a range, optionally use `from_code` to set the start. Result output includes the given `code_hex` value.
      example: e20000000000000000001ffff
      in: query
      name: until_code
      schema:
        type: string
    UntilId:
      description: Limits on `id`. Marks the end of a range, optionally use `from_id` to set the start. Result output includes the given `id` value. Please note that `id` is in chronological order.
      example: 56a88364e783152127d15340
      in: query
      name: until_id
      schema:
        type: string
  requestBodies:
    ItemList:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ItemList"
      description: A JSON object containing item list information
      required: true
    Key:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Key"
      description: A JSON object containing key information
      required: true
    Location:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Location"
      description: A JSON object containing location information
      required: true
    SpotList:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SpotList"
      description: A JSON object containing spot list information
      required: true
    SpotSet:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SpotSetCreate"
      description: A JSON object containing spot set information
      required: true
    Subscription:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Subscription"
      description: A JSON object containing sibscription information
      required: true
    User:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/User"
      description: A JSON object containing user information
      required: true
  responses:
    200OkDelete:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseDefaultResource"
      description: A JSON object containing the deleted resource
    200OkDeleteList:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseListResource"
      description: A JSON object containing the status and the total amount of items in the list
    200OkPut:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseDefaultResource"
      description: A JSON object containing the modified resource
    OkPost:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseDefaultResource"
      description: A JSON object containing the newly added resource
    OkPostList:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseListResource"
      description: A JSON object containing the status and the total amount of items in the newly added list
  schemas:
    Blob:
      properties:
        blob_key:
          description: Unique key to the blob
          example: foobar
          type: string
        content_type:
          description: Media type of the resource. Automatically detected when not given in a POST.
          example: image/png
          type: string
        download_url:
          $ref: "#/components/schemas/Url"
        filename:
          description: Filename of the blob
          example: Foo bar
          type: string
        hash:
          description: Hash of the blob
          example: 50df961c6c099f778fa50647572ef21f4ef416d52f7e00e311d7dbca1a735f6a
          readOnly: true
          type: string
        id:
          $ref: "#/components/schemas/IdReadOnly"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_last_accessed:
          $ref: "#/components/schemas/TimeLastAccessed"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        upload_url:
          $ref: "#/components/schemas/Url"
        url:
          $ref: "#/components/schemas/Url"
      required:
        - key
      type: object
    BootCount:
      description: Is increased with 1 when the service starts. Is never cleared (unless the database is adjusted).
      example: 22
      readOnly: true
      type: integer
    CodeHex:
      description: String representation of the unique code that this item transmits. By default this is a hexadecimal representation. This number could be so long (> 40 bytes!) that a decimal representation would be useless to generate.
      example: deadbeef
      type: string
    Config:
      description: JSON object with possible settings. Refer to individual service documentation for a good overview.
      example:
        foo: bar
      readOnly: true
      type: object
    ConfigRequest:
      description: Object containing the new configuration. This will be applied automatically when the values are valid.
      example:
        foo: bar
      type: object
    Custom:
      description: "The `custom` value is only for your custom references, you may use it to save additional attributes. The custom value is not used in any other place. This field may contain any datatype that you like: null (default), string, integer, boolean, object etc..."
      example:
        foo: bar
      nullable: true
    Event:
      properties:
        id:
          $ref: "#/components/schemas/IdReadOnly"
        payload:
          description: An object containing the payload, if any, of the event.
          example:
            foo: bar
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_event:
          $ref: "#/components/schemas/TimeEvent"
        time_expire:
          $ref: "#/components/schemas/TimeExpire"
        topic:
          properties:
            action:
              $ref: "#/components/schemas/EventTopicAction"
            arguments:
              $ref: "#/components/schemas/EventTopicArgument"
            resource_id:
              $ref: "#/components/schemas/IdReadOnly"
            resource_type:
              $ref: "#/components/schemas/EventTopicResourceType"
            resource_url:
              $ref: "#/components/schemas/Url"
          type: object
        url:
          $ref: "#/components/schemas/Url"
      type: object
    EventTopicAction:
      description: Indicates the kind of event that was executed. In most cases it's a verb. I.e. 'connected', 'created' etc...
      enum:
        - created
        - updated
        - deleted
        - disappeared
        - connection-rssi-changed
      example: created
      type: string
    EventTopicArgument:
      description: Extra arguments may be added to a topic string, it depends on the `resource_type` and the `action` what extra arguments are added.
      example:
        foo: bar
    EventTopicResourceType:
      description: The The available event topic resources types on the API. Is written in its plural form.
      enum:
        - blobs
        - items
        - keys
        - kvpairs
        - locations
        - presences
        - services
        - spots
        - subscriptions
        - users
      example: items
      type: string
    GeoCoords:
      description: Last known geolocation estimate of this object. Not guaranteed to be included in response.
      properties:
        lat:
          description: Latitude angle in degrees
          type: number
        lng:
          description: Longitude angle in degrees
          type: number
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
      type: object
    GeoCoordsReadOnly:
      description: Last known geolocation estimate of this object. Not guaranteed to be included in response.
      properties:
        lat:
          description: Latitude angle in degrees
          readOnly: true
          type: number
        lng:
          description: Longitude angle in degrees
          readOnly: true
          type: number
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
      readOnly: true
      type: object
    Id:
      description: Unique identifier for resource.
      example: 5b7d6cbd7503c445552a1664
      type: string
    IdReadOnly:
      description: Unique identifier for resource.
      example: 5b7d6cbd7503c445552a1664
      readOnly: true
      type: string
    IsOnline:
      description: Whether or not this resource is actively connected to the Brain.
      example: true
      readOnly: true
      type: boolean
    Item:
      allOf:
        - $ref: "#/components/schemas/ItemUpdate"
        - properties:
            code_hex:
              $ref: "#/components/schemas/CodeHex"
            geo_coords:
              $ref: "#/components/schemas/GeoCoordsReadOnly"
            id:
              $ref: "#/components/schemas/IdReadOnly"
            is_present:
              description: Is this item actively detected in one of the zones at this moment? True when it is, false if it's not.
              example: true
              readOnly: true
              type: boolean
            move_count:
              $ref: "#/components/schemas/MoveCount"
            protocol:
              $ref: "#/components/schemas/ItemProtocol"
            sets:
              $ref: "#/components/schemas/ListOfSetIds"
            technology:
              $ref: "#/components/schemas/Technology"
            time_created:
              $ref: "#/components/schemas/TimeCreated"
            time_last_present:
              description: Last time the item was present.
              example: 2018-08-30T09:51:59.737Z
              format: dateTime
              readOnly: true
              type: string
            time_moved:
              $ref: "#/components/schemas/TimeMoved"
            time_updated:
              $ref: "#/components/schemas/TimeUpdated"
            type:
              $ref: "#/components/schemas/ItemType"
            url:
              $ref: "#/components/schemas/Url"
          type: object
        - oneOf:
            - properties:
                location:
                  $ref: "#/components/schemas/Location"
                  description: Reference to the location resource where the item is located. Or, if the item is out of reach, the last known location. Only returned when populate is set to 'location'
              type: object
            - properties:
                location_id:
                  $ref: "#/components/schemas/IdReadOnly"
              type: object
            - properties:
                location_url:
                  $ref: "#/components/schemas/Url"
              type: object
    ItemList:
      properties:
        custom:
          $ref: "#/components/schemas/Custom"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        label:
          $ref: "#/components/schemas/Label"
        list:
          $ref: "#/components/schemas/Url"
        metadata:
          $ref: "#/components/schemas/Metadata"
        sha1:
          description: The sha1 checksum of the list. This will change when the list is mutated.
          readOnly: true
          type: string
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        total:
          description: Total amount of items in this set
          example: 2
          readOnly: true
          type: integer
      type: object
    ItemProtocol:
      description: Type of protocol that was used to decode this item.
      enum:
        - altbeacon
        - uniwear
        - nfc
        - generic
        - eddystone
        - epcgen2
        - ibeacon
        - nanoble
      example: epcgen2
      type: string
    ItemType:
      description: Type of item.
      enum:
        - barcode
        - bluetitan
        - gbtag
        - relay
        - smarttag
        - tag
      example: tag
      type: string
    ItemUpdate:
      properties:
        config_request:
          $ref: "#/components/schemas/ConfigRequest"
        custom:
          $ref: "#/components/schemas/Custom"
        label:
          $ref: "#/components/schemas/Label"
        location_request:
          $ref: "#/components/schemas/LocationRequest"
        metadata:
          $ref: "#/components/schemas/Metadata"
      type: object
    Key:
      properties:
        id:
          $ref: "#/components/schemas/IdReadOnly"
        is_read_only:
          description: Whether or not this key can only read and not write.
          type: boolean
        label:
          description: Custom label for this API key.
          type: string
        secret:
          description: The secret token for authentication.
          example: 59cb1e86-a08d-44c9-9b37-c27f4ccd97f4
          readOnly: true
          type: string
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        url:
          $ref: "#/components/schemas/Url"
      type: object
    KeyValuePair:
      allOf:
        - $ref: "#/components/schemas/KeyValuePairUpdate"
        - properties:
            id:
              $ref: "#/components/schemas/IdReadOnly"
            kv_key:
              description: Unique identifier for the value.
              example: foo
              type: string
            kv_value:
              description: The value of the key value pair.
              example: all the bars
              nullable: true
            time_created:
              $ref: "#/components/schemas/TimeCreated"
            time_updated:
              $ref: "#/components/schemas/TimeUpdated"
            url:
              $ref: "#/components/schemas/Url"
          type: object
    KeyValuePairUpdate:
      properties:
        kv_value:
          description: The value of the key value pair.
          example: all the bars
          nullable: true
      type: object
    Label:
      description: A name or a label for this resource. This is used in the user interface, may be empty.
      example: Foo Bar
      type: string
    ListOfItemIds:
      description: List of item ids
      items:
        $ref: "#/components/schemas/IdReadOnly"
      type: array
    ListOfSetIds:
      description: List of set ids
      items:
        $ref: "#/components/schemas/IdReadOnly"
      readOnly: true
      type: array
    Location:
      properties:
        custom:
          $ref: "#/components/schemas/Custom"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        label:
          $ref: "#/components/schemas/Label"
        metadata:
          $ref: "#/components/schemas/Metadata"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        url:
          $ref: "#/components/schemas/Url"
      readOnly: true
      type: object
    LocationRequest:
      description: Instruction for the location engine to forcibly localize the item at the specified location id as soon as possible. Cleared automatically.
      example: 5b7d6cbd7503c445552a1664
      type: string
    LocationRule:
      properties:
        conditions:
          anyOf:
            - oneOf:
                - properties:
                    from_location:
                      $ref: "#/components/schemas/Location"
                      description: Rule applies to moves at or away from this location.
                  type: object
                - properties:
                    from_location_id:
                      $ref: "#/components/schemas/IdReadOnly"
                  type: object
                - properties:
                    from_location_url:
                      $ref: "#/components/schemas/Url"
                  type: object
            - oneOf:
                - properties:
                    to_location:
                      $ref: "#/components/schemas/Location"
                      description: Rule applies to moves towards this location.
                  type: object
                - properties:
                    to_location_id:
                      $ref: "#/components/schemas/IdReadOnly"
                  type: object
                - properties:
                    to_location_url:
                      $ref: "#/components/schemas/Url"
                  type: object
          description: Scope of this rule, e.g. moves at or away from a specific location or towards a specific location.
        enabled:
          $ref: "#/components/schemas/RuleEnabled"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        label:
          $ref: "#/components/schemas/Label"
        parameters:
          $ref: "#/components/schemas/LocationRuleParameters"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        type:
          $ref: "#/components/schemas/LocationRuleType"
        url:
          $ref: "#/components/schemas/Url"
      type: object
    LocationRuleParameters:
      description: Parameters for this rule; depends on the rule type. Refer to the rule type specification for details.
      type: object
    LocationRuleType:
      description: |
        The type of location rule to be applied.
        Allow: items at `conditions.from_location` can only move to `conditions.to_location` and locations allowed in other `allow` rules (destination whitelist).
        Disallow: items at `conditions.from_location` cannot be moved to `conditions.to_location` and locations disallowed in other `disallow` rules (destination blacklist).
        Disappeared: items disappearing at `conditions.from_location` will be moved to `parameters.location` after `parameters.time_s` seconds.
        Debounce: items moves from `conditions.from_location` (and optionally to `conditions.to_location`) will be debounced with a period of `parameters.time_s` seconds, for a maximum of `parameters.max_periods` periods.
      enum:
        - allow
        - disallow
        - disappeared
        - debounce
      type: string
    LocationRuleUpdate:
      properties:
        conditions:
          description: Scope of this rule, e.g. moves at or away from a specific location or towards a specific location. The `from_location` is mandatory. The `to_location` is either mandatory, optional or not allowed depending on rule type.
          properties:
            from_location:
              $ref: "#/components/schemas/Id"
            to_location:
              $ref: "#/components/schemas/Id"
          type: object
        enabled:
          $ref: "#/components/schemas/RuleEnabled"
        label:
          $ref: "#/components/schemas/Label"
        parameters:
          $ref: "#/components/schemas/LocationRuleParameters"
        type:
          $ref: "#/components/schemas/LocationRuleType"
      type: object
    Metadata:
      description: Object of searchable metadata for this resource. Can be freely used to store metadata properties.
      example:
        foo: bar
      nullable: false
      type: object
    MoveCount:
      description: How many times this item moved since it's created on this server. Note that it is likely that not all moved events are available in the events (they are deleted after a configurable number of time). This field is never decreases. It gives a good indication of the usage of this item.
      example: 4523
      readOnly: true
      type: integer
    Name:
      description: Human readable name for the resource.
      example: Foo Bar
      readOnly: true
      type: string
    Presence:
      properties:
        id:
          $ref: "#/components/schemas/IdReadOnly"
        item:
          $ref: "#/components/schemas/Item"
        item_id:
          $ref: "#/components/schemas/IdReadOnly"
        item_url:
          $ref: "#/components/schemas/Url"
        location:
          $ref: "#/components/schemas/Location"
        location_id:
          $ref: "#/components/schemas/IdReadOnly"
        location_url:
          $ref: "#/components/schemas/Url"
        proximity:
          $ref: "#/components/schemas/Proximity"
        technology:
          $ref: "#/components/schemas/Technology"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        url:
          $ref: "#/components/schemas/Url"
      type: object
    Proximity:
      description: Strongest proximity of all 'child' presences. This is a rough estimate on the distance from the item to the receiver.
      enum:
        - far
        - near
        - immediate
      example: immediate
      type: string
    RequestCounter:
      description: The total number of HTTP requests that this resource has done.
      example: 73807
      readOnly: true
      type: integer
    ResponseDefaultResource:
      properties:
        resource:
          properties:
            id:
              $ref: "#/components/schemas/IdReadOnly"
            url:
              $ref: "#/components/schemas/Url"
          type: object
        status:
          description: Status code
          example: 200
          type: integer
      type: object
    ResponseEnvelope:
      properties:
        count:
          description: The maximum number of items in the response (as set in the query or by default).
          example: 293401
          type: integer
        count_current:
          description: The maximum number of items available to return.
          example: 100
          type: integer
        is_limited:
          description: Becomes false when the number of results is smaller than limit.
          example: true
          type: boolean
        next_url:
          description: URL to the next page of items. ( null if none)
          example: https://brain.intellifi.nl/api/items?before_id=5b599c427503c44239cf0399
          type: string
        query_duration_ms:
          description: Amount of time, in milliseconds, the request needed to complete.
          example: 42
          type: integer
        url:
          $ref: "#/components/schemas/Url"
      type: object
    ResponseListResource:
      properties:
        status:
          description: Status code
          example: 200
          type: integer
        total:
          description: Total items in the list
          example: 2
          type: integer
      type: object
    RestartRequest:
      description: Set this to `true` to send a reset request for the specific resource.
      example: true
      type: boolean
    RuleEnabled:
      description: Whether this rule should be in effect (`true`) or on hold (`false`).
      example: true
      type: boolean
    Senses:
      description: Senses are values that in most cases are generated inside the spot (number of presences, spot booted etc.). We also have a few senses that can be controlled by the brain. See [Sense & Control](https://intellifi.zendesk.com/hc/en-us/sections/360001568254) documentation for more information.
      example:
        foo: bar
      readOnly: true
      type: object
    SensesRequest:
      description: Object containing the new senses configuration. See [Sense & Control](https://intellifi.zendesk.com/hc/en-us/sections/360001568254) documentation for more information.
      example:
        foo: bar
      type: object
    SerialNumber:
      description: This is the fixed and unique spot number. It's assigned during the production process and used to identify an individual device during its lifetime.
      example: 1337
      readOnly: true
      type: integer
    Service:
      properties:
        boot_count:
          $ref: "#/components/schemas/BootCount"
        config:
          $ref: "#/components/schemas/Config"
        config_request:
          $ref: "#/components/schemas/ConfigRequest"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        name:
          $ref: "#/components/schemas/Name"
        restart_request:
          $ref: "#/components/schemas/RestartRequest"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        url:
          $ref: "#/components/schemas/Url"
        version:
          $ref: "#/components/schemas/Version"
      type: object
    SpotBase:
      properties:
        antenna_report_locations:
          description: You may configure this field to an object which couples individual antenna ports to locations.
          items:
            properties:
              antenna_number:
                description: Antenna number
                example: 1
                type: integer
              report_location:
                $ref: "#/components/schemas/Location"
              report_location_id:
                $ref: "#/components/schemas/IdReadOnly"
              report_location_url:
                $ref: "#/components/schemas/Url"
            type: object
          type: array
        config:
          $ref: "#/components/schemas/Config"
        config_request:
          $ref: "#/components/schemas/ConfigRequest"
        geo_coords:
          $ref: "#/components/schemas/GeoCoords"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        is_online:
          $ref: "#/components/schemas/IsOnline"
        request_counter:
          $ref: "#/components/schemas/RequestCounter"
        senses:
          $ref: "#/components/schemas/Senses"
        senses_request:
          $ref: "#/components/schemas/SensesRequest"
        serial_number:
          $ref: "#/components/schemas/SerialNumber"
        status:
          description: An object with specific information about the spot, directly send by the spot itself when the connection is created.
          example:
            foo: bar
          readOnly: true
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        url:
          $ref: "#/components/schemas/Url"
      type: object
    SpotGet:
      allOf:
        - $ref: "#/components/schemas/SpotBase"
        - oneOf:
            - properties:
                report_location:
                  $ref: "#/components/schemas/Location"
              type: object
            - properties:
                report_location_id:
                  $ref: "#/components/schemas/IdReadOnly"
              type: object
            - properties:
                report_location_url:
                  $ref: "#/components/schemas/Url"
              type: object
    SpotList:
      properties:
        custom:
          $ref: "#/components/schemas/Custom"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        label:
          $ref: "#/components/schemas/Label"
        list:
          $ref: "#/components/schemas/Url"
        metadata:
          $ref: "#/components/schemas/Metadata"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        total:
          description: Total amount of spots in this set
          example: 2
          readOnly: true
          type: integer
      type: object
    SpotSet:
      allOf:
        - $ref: "#/components/schemas/SpotSetBase"
        - oneOf:
            - $ref: "#/components/schemas/SpotSetTypeAny"
            - $ref: "#/components/schemas/SpotSetTypeAreacode"
            - $ref: "#/components/schemas/SpotSetTypeCodelength"
            - $ref: "#/components/schemas/SpotSetTypeCodemask"
            - $ref: "#/components/schemas/SpotSetTypeCoderange"
            - $ref: "#/components/schemas/SpotSetTypeExtended"
            - $ref: "#/components/schemas/SpotSetTypeList"
            - $ref: "#/components/schemas/SpotSetTypeProtocol"
            - $ref: "#/components/schemas/SpotSetTypeTechnology"
            - $ref: "#/components/schemas/SpotSetTypeType"
    SpotSetBase:
      properties:
        created_by:
          description: Who was responsible for the creation of this spot list. Value determines who's allowed to manages this object.
          readOnly: true
          type: string
        id:
          $ref: "#/components/schemas/IdReadOnly"
        setid:
          description: Spot set unique identifier. Must be unique within a single device
          maximum: 255
          minimum: 0
          type: integer
        spot_id:
          $ref: "#/components/schemas/IdReadOnly"
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
      type: object
    SpotSetCreate:
      allOf:
        - $ref: "#/components/schemas/SpotSetBase"
        - oneOf:
            - $ref: "#/components/schemas/SpotSetTypeAreacode"
            - $ref: "#/components/schemas/SpotSetTypeCodelength"
            - $ref: "#/components/schemas/SpotSetTypeCodemask"
            - $ref: "#/components/schemas/SpotSetTypeCoderange"
            - $ref: "#/components/schemas/SpotSetTypeExtended"
            - $ref: "#/components/schemas/SpotSetTypeList"
            - $ref: "#/components/schemas/SpotSetTypeProtocol"
            - $ref: "#/components/schemas/SpotSetTypeTechnology"
            - $ref: "#/components/schemas/SpotSetTypeType"
    SpotSetTypeAny:
      properties:
        type:
          description: Spot set type `any`; A wildcard that matches all type of items
          enum:
            - any
          type: string
      type: object
    SpotSetTypeAreacode:
      properties:
        area_code:
          description: Area Code
          format: int32
          minimum: 1
          type: integer
        type:
          description: Spot set type `areacode`; Matches Item with the same Area Code as specified by this set
          enum:
            - areacode
          type: string
      type: object
    SpotSetTypeCodelength:
      properties:
        length_bits:
          description: The length of the item code in bits
          format: int32
          minimum: 1
          type: integer
        type:
          description: Spot set type `codelength`; Matches all Item codes that have the exact same length in bits as specified by this value
          enum:
            - codelength
          type: string
      type: object
    SpotSetTypeCodemask:
      properties:
        code:
          description: Item code
          maxLength: 84
          minLength: 2
          type: string
        mask:
          description: Mask which part of the code should match.
          maxLength: 84
          minLength: 2
          type: string
        type:
          description: Spot set type `codemask`; Matches all Items that return true as a result of using the following equation ((Item.code & Item.mask) == (Set.code & Set.mask)).
          enum:
            - codemask
          type: string
      type: object
    SpotSetTypeCoderange:
      properties:
        end:
          description: End of the code range
          maxLength: 84
          minLength: 2
          type: string
        start:
          description: Start of the code range
          maxLength: 84
          minLength: 2
          type: string
        type:
          description: Spot set type `coderange`; Matches all Items codes if within specified range as specified by this set
          enum:
            - coderange
          type: string
      type: object
    SpotSetTypeExtended:
      properties:
        key:
          description: Extended data property key
          maxLength: 32
          minLength: 1
          type: string
        operator:
          description: Operator
          enum:
            - gt
            - gte
            - eq
            - in
            - ne
            - lt
            - lte
            - starts
            - ends
          maxLength: 32
          minLength: 1
          type: string
        type:
          description: Spot set type `extended`; Items that have the extended property (key) and match the requirement for value using the specified operator, as specified by this set
          enum:
            - extended
          type: string
        value:
          description: Extended data property value.
          oneOf:
            - format: byte
              maxLength: 100
              minLength: 2
              type: string
            - maxLength: 100
              minLength: 1
              type: string
            - format: float
              type: number
            - format: int32
              type: integer
            - type: boolean
      type: object
    SpotSetTypeList:
      properties:
        itemlist_id:
          $ref: "#/components/schemas/Id"
        limit:
          description: Number, list limit, default `1000` if not specified.
          format: int32
          maximum: 2000
          minimum: 1
          type: integer
        mutation:
          description: Last mutation that was synchronized to the device. This is used for internal synchronization between the device and the server.
          readOnly: true
          type: string
        restrictions:
          description: Restrict changes spot and brain.
          properties:
            allow_server_edit:
              description: Server can change this set.
              type: boolean
            allow_spot_edit:
              description: Spots can change set, differences from the brain server will be merged with the device
              type: boolean
          type: object
        sha1:
          description: The sha1 checksum of the list. This will change when the list is mutated.
          readOnly: true
          type: string
        total:
          description: Total amount of items in this set
          example: 2
          readOnly: true
          type: integer
        type:
          description: Spot set type `list`; List of items. Matches this set if Item is part of this list.
          enum:
            - list
          type: string
      type: object
    SpotSetTypeProtocol:
      properties:
        item_protocol:
          $ref: "#/components/schemas/ItemProtocol"
        type:
          description: Spot set type `protocol`; Matches Items with the same Protocol as specified by this set.
          enum:
            - protocol
          type: string
      type: object
    SpotSetTypeTechnology:
      properties:
        item_technology:
          $ref: "#/components/schemas/Technology"
        type:
          description: Spot set type `technology`; Matches Items with the same Technology as specified by this set.
          enum:
            - technology
          type: string
      type: object
    SpotSetTypeType:
      properties:
        item_type:
          $ref: "#/components/schemas/ItemType"
        type:
          description: Spot set type `type`; Matches Items with the same Type as specified by this set.
          enum:
            - type
          type: string
      type: object
    SpotSetUpdate:
      properties:
        delete:
          description: Request to delete a set. Remove request needs to be synchronized to the device, so it may take some time before the resource is being removed.
          type: boolean
      type: object
    SpotUpdate:
      allOf:
        - $ref: "#/components/schemas/SpotBase"
        - properties:
            report_location:
              $ref: "#/components/schemas/Id"
          type: object
    Subscription:
      properties:
        custom:
          $ref: "#/components/schemas/Custom"
        database_hold_time_h:
          description: The number of hours this event is retained in the database. *Only use larger numbers if you know what you are doing.* A couple of hours is enough for most use cases.
          example: 2
          type: integer
        description:
          description: Additional field to add some notes about this subscription.
          example: Item events
          nullable: true
          type: string
        events_url:
          $ref: "#/components/schemas/Url"
        id:
          $ref: "#/components/schemas/IdReadOnly"
        populate_events:
          description: If set to `true`, resource references in an event (e.g. the location an item moved to) are resolved and populated with data instead of giving just an ID.
          type: boolean
        target_delivery_last_failure:
          description: If `target_url` is set or has been set before, and delivery to the target URL failed at least once, this contains debugging information about the nature of the most recent failure.
          readOnly: true
          type: object
        target_delivery_status:
          description: If `target_url` is set, `target_delivery_status.ok` will be `true` or `false` depending on whether events are being succesfully delivered. `target_delivery_status.since` indicates when t his status last changed.
          readOnly: true
          type: object
        target_retry:
          description: Set to `true` if you want our server to retry if `target_url` is not giving back a `2xx` success code.
          type: boolean
        target_url:
          description: Url to an external service that all applicable events are pushed to (webhook). Configure to `null` if you don't wish to use this (default).
          type: string
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeUpdated"
        topic_filter:
          description: MQTT filter that is applied to all events. Allows you to select and filter events. See [Event filtering](https://intellifi.zendesk.com/hc/en-us/articles/360008791494) for more information
          example: items/#
          type: string
        url:
          $ref: "#/components/schemas/Url"
        verify_target_certificate:
          description: Whether or not the `target_url` endpoint TLS certificate is verified to be valid.
          type: boolean
      type: object
    Technology:
      description: Type of technology that was used to detect this item.
      enum:
        - bluetooth
        - optical
        - rfid
      example: rfid
      type: string
    TimeCreated:
      description: "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string for when this resource was created."
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    TimeEvent:
      description: "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string for when this event was generated on the device. This is the device's own timestamp. Could be different due to buffering and clock differences."
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    TimeExpire:
      description: "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string for when this resource is going to be deleted."
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    TimeLastAccessed:
      description: "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string for when this resource was last accessed."
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    TimeMoved:
      description: Last time this item moved. This is the last time that the location for this item was changed.
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    TimeUpdated:
      description: "[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string for when this resource was updated."
      example: 2018-08-30T09:51:59.737Z
      format: dateTime
      readOnly: true
      type: string
    Url:
      description: Url to the individual resource.
      example: https://brain.intellifi.nl/api/foobar
      readOnly: true
      type: string
    User:
      properties:
        email:
          description: Email address
          example: user@intellifi.nl
          type: string
        first_name:
          description: First name
          example: Foo
          type: string
        id:
          $ref: "#/components/schemas/IdReadOnly"
        is_admin:
          description: Whether or not this is an administrator.
          type: boolean
        is_locked:
          description: Whether or not this user is locked and can't change the password.
          type: boolean
        last_name:
          description: Last name
          example: Bar
          type: string
        password:
          description: Password of the user
          example: password1
          type: string
          writeOnly: true
        time_created:
          $ref: "#/components/schemas/TimeCreated"
        time_updated:
          $ref: "#/components/schemas/TimeCreated"
        url:
          $ref: "#/components/schemas/Url"
      type: object
    Version:
      description: Current running version of the resource.
      example: 1.2.3
      readOnly: true
      type: string
  securitySchemes:
    CookieSid:
      description: |
        This [session cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
        will be set after a successful graphical front-end login into the Brain.
        Authentication via this method is particularly useful for using the API manually via the
        '[tryitout](./tryitout)' tool or by browsing the API using some JSON viewer browser extension.
        A [same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy) is enforced for cookie authentication.
        Therefore applications accessing the API outside of the Brain, are not
        allowed to be authenticated via this cookie.

        Some endpoints, mainly `users` and `keys` can only be used when
        authenticated via an administrative account using a Cookie. This means
        that these endpoints can only be used when logged in into the Graphical
        front-end of the Brain.
      in: cookie
      name: brain.sid
      type: apiKey
    HeaderApiKey:
      description: |
        Applications are required to provide an API key with every HTTP request
        to the Web API.
      in: header
      name: X-Api-Key
      type: apiKey
    QueryApiKey:
      description: |
        Applications are required to provide an API key with every HTTP request
        to the Web API.
      in: query
      name: key
      type: apiKey
