You are currently using the beta version of Celsiview 2. Click here if you prefer to use Celsiview 1. Celsiview 2 BETA. Click here for Celsiview 1.
  • Introduction
  • How to use
  • Basic Data Types

  • Object types

  • API Key
  • Account
  • AlarmGroupAssignment
  • AlarmGroupMapping
  • Branch
  • Concrete Fit
  • Concrete Job
  • Concrete Recipe
  • File
  • Location Attachment
  • Location Dependency
  • Organization
  • PhyAttr
  • Physical Sensor
  • Prognosis
  • Purchaser
  • Response
  • Sensor Binding
  • Sensor Type

  • Function calls

    API Key

  • GET /apikey/default
  • GET /apikey/APIKeyID
  • DELETE /apikey/APIKeyID
  • PUT /apikey/APIKeyID
  • POST /apikey
  • Account

  • GET /account/default/{bbr_zid}...
  • GET /account/AccountID
  • GET /accounts
  • PUT /account/AccountID
  • POST /account/BranchID
  • Branch

  • GET /branch/BranchID
  • GET /branch/default/Organizati...
  • PUT /branch/BranchID
  • POST /branch/OrganizationID
  • CelsiDrive

  • GET /file/default
  • GET /file/FileID
  • GET /files
  • GET /file/FileID/download
  • GET /file/FileID/view
  • PUT /file/FileID
  • POST /file
  • Concrete Job

  • GET /concrete_job/default
  • GET /concrete_job/JobID
  • GET /concrete_jobs
  • PUT /concrete_job/JobID
  • POST /concrete_job
  • Concrete Recipe

  • GET /concrete_recipe/default
  • GET /concrete_recipe/RecipeID
  • DELETE /concrete_recipe/Recipe...
  • GET /concrete_recipes
  • PUT /concrete_recipe/RecipeID
  • POST /concrete_recipe
  • Device

  • GET /devices
  • PUT /logical/LogicalSensorID
  • PUT /device/AccountID/DeviceHa...
  • Location

  • GET /location/default
  • GET /location/LocationIDList
  • GET /locations
  • GET /attachment/AttachmentID/l...
  • PUT /location/LocationID
  • POST /location
  • DELETE /location/LocationID
  • DELETE /location/LocationID/hi...
  • POST /location/LocationID/sens...
  • POST /location_dependency
  • DELETE /location_dependency
  • POST /attachment/locations
  • DELETE /attachment/locations
  • DELETE /attachment/AttachmentI...
  • PUT /location/LocationID/event...
  • DELETE /location/LocationID/ev...
  • PUT /location/LocationID/injec...
  • GET /location/LocationIDList/h...
  • POST /export/location_data
  • Organization

  • GET /org/OrganizationID
  • POST /org
  • PUT /org/OrganizationID
  • GET /orgs
  • PhyAttr

  • GET /phyattr/PhysicalSensorIDL...
  • PUT /physical/PhysicalSensorID...
  • Prognosis

  • GET /prognosis/PrognosisID
  • PUT /prognosis/PrognosisID
  • POST /prognosis
  • Purchaser

  • GET /pur/PurchaserID
  • GET /pur/default/OrganizationI...
  • GET /purs/OrganizationID
  • PUT /pur/PurchaserID
  • POST /pur/OrganizationID
  • GET /pur/check/OrganizationID/...
  • User

  • GET /user/default
  • GET /user/UserID
  • GET /users
  • DELETE /user/UserID
  • PUT /user/UserID
  • POST /user
  • Celsiview API Reference


    Version 2.0

    Compiled on 2022-04-27 23:25

    How to use

    The Celsiview API is an easy-to-use REST API that can be used from virtually any programming language.

    Celsiview consists of Objects of different types, such as Devices and Locations. These all have a representation in the API, and most tasks are accomplished by retrieving or modifying these Objects. Objects are, with only a few exceptions, identified by a unique, autogenerated 32 character identifier called a Zid.

    When retrieving objects from Celsiview, you may sometimes find that they include fields not documented here. This means the fields are unsupported, may change and should not be relied upon. This API documentation is the authoritative documentation for the object schemas.

    To be able to access the Celsiview API, you must complete the following steps:

    1. • Create a new user that has the role ROLE_API. This is called the service user and will be the user with which you access the API.
    2. • Give the service user additional roles and permissions as required. E.g. for it to be able to access locations, it must have the ROLE_INVENTORY role. This works just like normal users in Celsiview.
    3. • Create an API Key and bind the service user to this key. Make note of the Application Key, and optionally, for greater security, the Client Key.
    You are now ready to start making API calls!

    All API calls are made against this base URL https://api.celsiview.se/api/v2/

    To this base, you append the endpoint you want to access. For example, to obtain a list of locations, use the following URL: https://api.celsiview.se/api/v2/locations

    All responses from the API, unless otherwise stated, will be in JSON format.

    Normal HTTP codes are used. 200 is returned on successful calls, 403 if not permitted, 404 if resource is not available. Exceptions, if any, are noted for each API call in this documentation.

    You must pass the Application Key in the HTTP header X-Application-Key.

    If you have enabled client secret keys, you must also generate a 100+ character random string and pass this in the header X-Request-Nonce. Additionally you must renerate a SHA256 or SHA512 hash of the Client Key and the random nonce and pass this in the header X-Request-Key. You should generate a new nonce string for each request.

    Here is a sample PHP script to obtain the list of locations. It should be easy to adapt to any language.

    // Application Key obtained from API Key page
    $appKey = "TqpNsq8XKfb4T1EwKdu8vh7gDnHUSu5bWb1Egdbqd6T786j5zt46cHPJ";
    
    // Client Key obtained from API Key page
    $clientKey = "U2agg6P73W4V5QfJ7Z17a5M6cmwCK77mrq38Vd0DtM95t9Pz";
    
    // Generate a random Nonce string
    $nonce = "NonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonceNonce";
    
    // Generate the request key
    $requestKey = hash('sha256', $clientKey . $nonce);
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://api.celsiview.se/api/v2/locations");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'X-Application-Key: ' . $appKey,
        'X-Request-Nonce: ' . $nonce,
        'X-Request-Key: ' . $requestKey
    ]);
    $response = curl_exec($ch);
    echo $response;
    curl_close($ch);
    

    Basic data types

    bool Boolean values. Both 0 and false should be interpreted as false, and 1 and true should be interpreted as true.
    date Dates are represented in the format YYYY-MM-DD.
    json In some cases complex or variable data structures are returned as stringified JSON objects.
    refstr A refstr is a string with optional references to other entities' names. To obtain the actual value of a refstr, check if the refstr is an array or a string. If an array, use the second element of the array. If a string, use it as-is.
    set The value must be one of a predetermined set of values. The allowed values are stated in the documentation for each field.
    string A string.
    time All timestamps in Celsiview are expressed as integers representing a Unix timestamp with an epoch of 00:00:00 Jan 1, 1970 UTC, in second precision. In e.g. PHP this value can be obtained from the call time(), in JavaScript you can use Date.getTime() / 1000 (note that JS used milliseconds rather than seconds).
    Zid A Zid is a hexadecimal lower case string of length 32 bytes, that is used to identify objects of all different types in Celsiview.

    API Key

    An API key is an authorization container for accessing the Celsiview API. It connects a user (with the role ROLE_API) to access tokens that are required when making calls to the API.

    allowed_ipsstring A newline separated list of IP numbers (in CIDR format) that are allowed to use this API key. If empty, all IPs are allowed.
    application_keystring
    read-only
    The application key that must be provided in API calls. This is automatically generated when the API key is created.
    client_secret_requiredbool Whether or not client secret / request keys are required for making API calls.
    client_secret_saltstring
    read-only
    The client secret that should be obtained and safely stored by the client application, and then used to generate request keys for API calls. This is automatically generated when the API key is created.
    namestring A descriptive name for this API key.
    service_user_zidZid The Zid of the User that is connected to this API key.
    time_insertedtime
    read-only
    Time when API key was created.
    zidZid
    read-only
    Unique ID of the API key.

    Account

    Accounts represent groupings of resources in Celsiview (e.g. locations, devices, logical sensors etc). Users have a home account but may have access to resources in accounts outside their home account. Accounts are organized under Branches.

    account_descstring
    read-only
    Account type, e.g. "Ultimate" or "Professional"
    account_namestring A descriptive name of the account.
    admin_emailstring Optional administrative email address of the account.
    bbr_zidZid
    read-only
    Zid of the Branch that this account belongs to.
    localeset Locale preference for the account. Can be one of: de, en, fi, no, sv
    realnamestring Optional real or descriptive name of the account.
    sms_quotainteger
    read-only
    Number of SMS credits remaining in account
    timezonestring The timezone that dates should be displayed in. E.g. Europe/Stockholm.
    zidZid
    read-only
    Unique ID of the account.

    AlarmGroupAssignment

    An alarm group that is attached to an event-producing entity, such as a location or a sensor.

    ag_zidZid
    read-only
    ID of the Alarm Group
    entity_type
    read-only
    Type of the Entity set (LOCATION, LOGICAL)
    entity_zidZid
    read-only
    ID of the Entity

    AlarmGroupMapping

    A mapping from an address to an alarm group.

    addr_zidZid
    read-only
    ID of the Alarm Address
    ag_zidZid
    read-only
    ID of the Alarm Group
    time_insertedtime
    read-only
    Time when the mapping was created

    Branch

    This represents a branch within a customer. It is used to model a branch office, a customer installation or other subdivision of a customer's organization. Locations and sensors are held within Accounts that are held in branches. A branch can have up to three custom fields (br_custom1, br_custom2, br_custom3) with arbitrary information.

    additionalstring Additional free-text information.
    borg_zidZid
    read-only
    Zid of the Organization that this branch belongs to.
    br_address1string Branch address line 1. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_address2string Branch address line 2. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_citystring Branch city. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_countrystring Branch country. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_custom1string Custom field 1.
    br_custom2string Custom field 2.
    br_custom3string Custom field 3.
    br_emailstring Email address of contact person in branch.
    br_namestring Name of branch.
    br_phone_mobilestring Branch mobile/extra phone number. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_phone_switchstring Branch main phone number. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    br_postalcodestring Branch postal code. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    default_bpur_zidZid
    read-only
    Zid of the Purchaser that new purchases of devices, services and articles will be assigned to by default.
    firstnamestring First name of contact person in branch.
    lastnamestring Last name of contact person in branch.
    start_datedate Date when branch is taken in use.
    time_insertedtime
    read-only
    Time when the branch was created.
    zidZid
    read-only
    Unique ID of the business branch, in Zid format.

    Concrete Fit

    This describes a set of measured concrete maturities that are used as the basis for computing a recipe

    Concrete Job

    This represents a concrete job, which is a collection of: 1) A number of locations for the real temperature sensors for air and concrete temperatures. 2) A number of derived locations that track the concrete hardening from the concrete temperatures. 3) A Concrete Recipe that describes the physical properties of the concrete mix. 4) Various metadata such as the start and end times of the job.

    28daybool Enable using percentage of 28 day target strength as criterion
    28daypercentdecimal Percentage of 28 day target strength to use as target, e.g. 70%. (i.e. when a strength of 70% is achieved an alert is generated). Should be given as percentage.
    account_zidZid Account that this job belongs to.
    alarm_freezebool Enable alarms on air temperature reaching too low
    alarm_freeze_valuedecimal Air temperature to trigger alarm at
    alarm_maturitybool Enable alarms on reached concrete maturity level.
    alarm_maturity_valuedecimal Maturity level to trigger alarm at
    classbool Enable using class strength as criterion
    classnumberset Strength class number to use as criterion. Currently classes 2, 3 and 4 are supported.
    namestring Descriptive name of job, e.g. "Bridge left wall section 3"
    notesstring Notes. This could be any text and is just for reference.
    pclassstring Target hardening class, e.g. C30/35.
    recipeZid Zid of Concrete Recipe to use
    starttime Start of job, i.e. time of initial concrete pour.
    stoptime End of job, i.e. time when no more data should be tracked on the job's locations. Typically 28 days after start of job.
    time_insertedtime
    read-only
    Time when the job was created.
    verticalbool Enable using vertical strength as criterion
    verticalpercentdecimal Target vertical pressure, which when reached will produce an alert. Should be given in MPa.
    zidZid
    read-only
    Unique ID of the concrete job, in Zid format.

    Concrete Recipe

    This describes a concrete mix used for doing concrete jobs.

    account_zidZid Account that this recipe belongs to.
    betaddecimal Concrete parameter: βΔ
    dte0decimal Concrete parameter: Δte0
    fadecimal Concrete parameter: fA
    fcc28decimal Concrete parameter: fcc28
    is_protectedbool
    read-only
    If true, the underlying parameters of the recipe are proprietary and/or protected, and thus cannot be viewed or retrieved, but the recipe may still be used in jobs.
    is_readonlybool
    read-only
    If true, this is a system recipe that is provided by Celsicom.
    is_user_editedbool
    read-only
    If true, this recipe has been created or edited by a user.
    kappa3decimal Concrete parameter: Κ3
    nadecimal Concrete parameter: nA
    namestring Descriptive name of recipe.
    ncc28ddecimal Concrete parameter: ncc28d
    sdecimal Concrete parameter: s
    tadecimal Concrete parameter: tA
    thetarefdecimal Concrete parameter: Θref
    time_insertedtime
    read-only
    Time when the recipe was created.
    tsdecimal Concrete parameter: tS
    zidZid
    read-only
    Unique ID of the concrete recipe, in Zid format.

    File

    This represents a file in CelsiDrive.

    account_zidZid Account that this file belongs to.
    content_typeString The content type of the file. This can only be set once, when the file is created.
    dataString The actual data of the file. This can only be set once, when the file is created.
    namestring Descriptive name of file, e.g. the filename
    sizeint The size of the file. This can only be set once, when the file is created.
    thumbnailString
    read-only
    Thumbnail image. This will be created automatically.
    time_insertedtime
    read-only
    Time when the file was created.
    zidZid
    read-only
    Unique ID of the file, in Zid format.

    Location Attachment

    A mapping from a location to an attachment.

    attachment_zidZid
    read-only
    ID of the Attachment
    location_zidZid
    read-only
    ID of the Location
    time_insertedtime
    read-only
    Time when the mapping was created

    Location Dependency

    Dependencies from one location to another. These consist of 1) A master location producing values 2) A child location receiving values 3) A dependency type 4) An optional payload.
    A location can have a dependency on itself (in which computations will be carried out on its own values) and dependencies may form chains.

    dependent_location_zidZid
    read-only
    ID of the child Location that will receive values
    master_location_zidZid
    read-only
    ID of the parent Location that will produce values
    payloadjson Custom data for the dependency. For DEPx dependencies, this gives the expression to use for the dependency. E.g. for a DEP1 dependency this could be {"expression":"-[1]"}, which would produce a location that negates the values from master location 1.
    time_insertedtime
    read-only
    Time when the dependency was created
    typeset The type of dependency. Values of interest are DEPx where x is between 0 and 9. These form expression dependencies. DEP0 means a dependency on the location to itself, and DEP1 through DEP9 means dependencies from master location x to this location.

    Organization

    This represents a top level customer in Celsiview, and is uniquely defined by a legal organization number. An organization is then further broken down into branches.

    additionalstring Additional free-text information.
    allow_anonymous_usersbool True if this organization allows new users to signup to it without administrator consent.
    custom_br1string Caption to be used on custom line 1 of the organization's Branches.
    custom_br2string Caption to be used on custom line 2 of the organization's Branches.
    custom_br3string Caption to be used on custom line 3 of the organization's Branches.
    custom_pur1string Caption to be used on custom line 1 of the organization's Purchasers.
    custom_pur2string Caption to be used on custom line 2 of the organization's Purchasers.
    custom_pur3string Caption to be used on custom line 3 of the organization's Purchasers.
    org_address1string Head office address line 1. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    org_address2string Head office address line 2. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    org_citystring Head office city. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    org_countrystring Organization's legal country of business.
    org_emailstring Head office main administrative email address
    org_namestring Identifying name of the organization, typically its legal name.
    org_nostring Legal organization number of customer. For instance, in Sweden, this should be a valid 10-digit organization number.
    org_no_canonstring
    read-only
    Canonical organization number. This is calculated from the organization number provided in org_no and the legal country of incorporation provided in country and uniquely identifies the organization.
    org_phone_mobilestring Extra or mobile phone number
    org_phone_switchstring Head office main phone number
    org_postalcodestring Head office postal code. This is just a point of registration and contact, and is not used for e.g. invoicing, refer to Purchaser for this.
    require_customer_codebool True if this organization requires a customer code for signup
    start_datedate
    read-only
    Date when the organization was started as a customer.
    time_insertedtime
    read-only
    Time when the organization was created.
    zidZid
    read-only
    Unique ID of the business organization.

    PhyAttr

    An attribute of a Physical Sensor. Many attributes are not stored on the physical sensor directly, but rather in this data structure. This has several reasons, one being that many of these attributes record historic data (e.g. battery voltage over time), and that they need to retain both current and setpoint values (e.g. the device has one current transmission interval but the user requests another that will lay pending until the device retrieves the new setting.) PhyAttrs are normally not modified directly but are rather set on e.g. the Physical Sensor

    classset
    read-only
    The attribute id, e.g. PhyAttrBattery
    pendingbool
    read-only
    True if there is a pending value.
    sensor_zidZid
    read-only
    ID of the Physical Sensor
    time_acktime
    read-only
    Time when the current value was acknowledged by the device.
    time_queuedtime
    read-only
    Time when the last outgoing value entered the transmission queue.
    time_statetime
    read-only
    Time when this value was first seen.
    valuestring or decimal
    read-only
    The current value as last reported by the device
    value_pendingstring or decimal
    read-only
    A value that has been set by the user and is waiting to be transferred to and acknowledged from the device, or null if no pending value.

    Physical Sensor

    A physical sensor. A Device can have multiple physical sensors. They may be built into the device or be external.

    addressstring
    read-only
    Probe address / hardware ID of an attached external sensor. Will be a string of zeros if sensor has no hardware ID.
    batterydecimal
    read-only
    Current battery voltage of sensor, in volts. Deprecated, use PhyAttr PhyAttrBattery instead.
    cal_createdtime
    read-only
    If the sensor is calibrated, this will give the calibration time. Null otherwise.
    cal_signaturestring
    read-only
    If the sensor is calibrated, this will give the calibration signature. Null otherwise.
    cal_valid_thrutime
    read-only
    If the sensor is calibrated, this will give the calibration expiration time. Null otherwise.
    channelinteger
    read-only
    Channel number. Sensors within a Device are given channel number. They need not be unique within a device.
    hwidstring
    read-only
    Hardware ID of the Device that the physical sensor belongs to
    lastcontacttime
    read-only
    Time of last sensor communication.
    modelstring
    read-only
    Model code of the sensor (e.g. TH600)
    sqdecimal
    read-only
    Current signal quality of sensor, in percent. Deprecated, use PhyAttr PhyAttrSignalQuality instead.
    stypestring
    read-only
    Sensor type (e.g. T for normal precision temperature or THP for high precision temperature). This maps to Sensor Types.
    technologyset
    read-only
    Technology class of sensor. Valid values are NB (EasyConnect) and CC (Celsicom Connect/Gateway), or OTHER for special cases.
    valuedecimal
    read-only
    Current value from sensor. You are advised to use a Location to collect data from a sensor, rather than going against this field
    zidZid
    read-only
    Unique ID of the sensor

    Prognosis

    This represents a prognosis on a location.

    account_zidZid Account that this prognosis belongs to.
    calcstring Calculation method to use
    enabledbool True if prognosis calculation is currently active. If inactive, prognosticized values will be stale.
    fit_paramsarray of decimals
    read-only
    Parameters of fit.
    fit_typeset
    read-only
    Type of fit
    last_valuedecimal
    read-only
    Last value used for prognosis
    namestring Descriptive name of prognosis.
    notesstring Notes. This could be any text and is just for reference.
    targetdecimal Target value, or empty if not used
    target_validbool
    read-only
    True if target can be reached by prognosis
    time_insertedtime
    read-only
    Time when the prognosis was created.
    time_last_valuetime
    read-only
    Time of last value used for prognosis
    time_recalctime
    read-only
    Time when prognosis was updated
    time_targettime
    read-only
    Time when target is prognosticized to be reached
    zidZid
    read-only
    Unique ID of the prognosis, in Zid format.

    Purchaser

    This represents a purchaser within an organization, i.e. an entity capable of receiving an paying invoices from Celsicom. You can have multiple purchasers within an organization. Each may handle a subset of branches, sensors or services. Any discounts are applied organization-wide and are not affected by the structure of your purchasers. A purchaser can have up to three custom fields (pur_custom1, pur_custom2, pur_custom3) with arbitrary information.

    additionalstring Additional free-text information.
    borg_zidZid
    read-only
    Zid of the Organization that this branch belongs to.
    inv_address1string Invoice address, line 1.
    inv_address2string Invoice address, line 2.
    inv_citystring Invoice address, city.
    inv_costcenterstring "Your costcenter", to appear on invoices.
    inv_countrystring Invoice address, country.
    inv_email_pdfinvstring Email address that PDF invoices will be sent to.
    inv_gln_efakturastring GLN/PEPPOL ID to be used for e-Invoices.
    inv_intervalset Perferred invoicing interval in months. Valid values are 6 or 12 months.
    inv_methodset Method of invoice sending. This can be PDF (for PDF invoices sent through mail) or EFAKTURA (for electronic invoicing using GLN/PEPPOL.)
    inv_postalcodestring Invoice address, postal code.
    inv_provider_efakturastring Optional provider specification to be used for e-Invoices.
    inv_ref_efakturastring Optional free-text reference that will be set on e-Invoices.
    inv_refnamestring Name of contact person.
    inv_vat_nostring VAT number
    inv_yourordnostring "Your order number", to appear on invoices.
    inv_yourrefstring "Your reference", to appear on invoices.
    pur_custom1string Custom field 1.
    pur_custom2string Custom field 2.
    pur_custom3string Custom field 3.
    pur_namestring Name of purchaser, for your reference.
    time_insertedtime
    read-only
    Time when the organization was created.
    zidZid
    read-only
    Unique ID of the business purchaser.

    Response

    A Response object contains the response of a mutating API call.

    errorsobject This will provide error descriptions, if any, of the fields in the values object.
    statusstring Gives the overall status of the call. Will have the value "ok" if everything went OK, and take on other values if a problem occurred. This will also be reflected in the HTTP status code of the call.
    valuesobject This will contain the interpreted version of the object that was provided by the caller.
    zidZid If the call created a new object, the Zid if the new object can be found here.

    Sensor Binding

    The represents a Logical Sensor bound to a Location. If a binding exists and the time is within the location's valid times, the location will record samples from the bound sensor. Currently a single sensor can be bound to a location. In future versions there may be support for multiple sensors.

    location_zidZid
    read-only
    ID of the Location
    ss_zidZid
    read-only
    ID of the Logical Sensor
    time_boundtime
    read-only
    Time when the Logical Sensor was bound to this Location

    Sensor Type

    This describes the values produced by a sensor, their units and characteristics. This is a read only object.

    decimalsinteger
    read-only
    Number of default significant decimals with which to present values.
    iconstring
    read-only
    Suitable icon from the FontAwesome icon set
    stypestring
    read-only
    Sensor type, e.g. "T"
    unit_desc_destring
    read-only
    Description in German
    unit_desc_enstring
    read-only
    Description in English
    unit_desc_fistring
    read-only
    Description in Finnish
    unit_desc_nostring
    read-only
    Description in Norwegian
    unit_desc_svstring
    read-only
    Description in Swedish
    unit_htmlstring
    read-only
    Unit, with special characters escaped as HTML entities
    unit_utf8string
    read-only
    Unit with UTF-8 encoding

    /apikey/default

    GET

    Required authorization: ROLE_API_DEVELOPER

    Returns an API Key object with default values,

    Return valueAn API Key object

    /apikey/APIKeyID

    GET

    Required authorization: ROLE_API_DEVELOPER

    Returns an API Key object.

    APIKeyIDZid of the API Key
    Return valueAn API Key object

    /apikey/APIKeyID

    DELETE

    Required authorization: ROLE_API_DEVELOPER

    Deletes an API Key object.

    APIKeyIDZid of the API Key
    Return valueAn API Key object

    /apikey/APIKeyID

    PUT

    Required authorization: ROLE_API_DEVELOPER

    Updates an API Key based on an API Key object.

    APIKeyIDZid of the API Key
    Return valueA Response object containing the updated API Key object and its Zid, alternatively the errors in fields encountered.
    Bodythe API Key object to use.

    /apikey

    POST 201 if successful

    Required authorization: ROLE_API_DEVELOPER

    Creates a new API Key based on an API Key object.

    Return valueA Response object containing the newly created API Key object and its Zid, alternatively the errors in fields encountered.

    /account/default/{bbr_zid}

    GET

    Required authorization: ROLE_ADMIN_ACCOUNT

    Returns an Account object with default values,

    Return valueAn Account object

    /account/AccountID

    GET

    Required authorization: Any user with object access

    Returns an Account object

    AccountIDZid of the Account
    Return valueAn Account object

    /accounts

    GET

    Required authorization: Any user with object access

    Returns all Account objects that the user has access to

    Return valueList of Account objects

    /account/AccountID

    PUT

    Required authorization: ROLE_ADMIN_ACCOUNT

    Updates an Account based on a Account object

    AccountIDZid of the Account
    Return valueA Response object containing the updated Account object and its Zid, alternatively the errors in fields encountered.
    BodyThe Account object to use.

    /account/BranchID

    POST 201 if successful

    Required authorization: ROLE_ADMIN_ACCOUNT

    Creates a new Account based on an Account object

    BranchIDID of the Branch to create the account in
    Return valueA Response object containing the new Account object and its Zid, alternatively the errors in fields encountered.
    BodyThe Account object to use.

    /branch/BranchID

    GET

    Required authorization: Any user with object access

    Returns a Branch object

    BranchIDZid of the Branch
    Return valueA Branch object

    /branch/default/OrganizationID

    GET

    Required authorization: ROLE_ADMIN_BRANCH

    Returns a Branch object with default properties for the selected Organization. This is useful to use as a template when creating a new branch.

    OrganizationIDZid of the Organization
    Return valueA Branch object

    /branch/BranchID

    PUT

    Required authorization: ROLE_ADMIN_BRANCH

    Updates a Branch based on a Branch object

    BranchIDZid of the Branch
    Return valueA Response object containing the updated Branch object and its Zid, alternatively the errors in fields encountered.
    BodyThe Branch object to use.

    /branch/OrganizationID

    POST 201 if successful

    Required authorization: ROLE_ADMIN_BRANCH

    Creates a new Branch based on a Branch object

    OrganizationIDID of the Organization to create the branch in
    Return valueA Response object containing the new Branch object and its Zid, alternatively the errors in fields encountered.
    BodyThe Branch object to use.

    /file/default

    GET

    Required authorization: ROLE_CELSIDRIVE

    Returns a File object with default values, for use as the basis in creating a new file.

    Return valueA File object

    /file/FileID

    GET

    Required authorization: ROLE_CELSIDRIVE

    Returns a File object

    FileIDID of the File
    Return valueA File object

    /files

    GET

    Required authorization: ROLE_CELSIDRIVE

    Returns File objects for which the user has access

    /file/FileID/download

    GET

    Required authorization: ROLE_CELSIDRIVE

    Downloads the data for a File object, setting Content-Disposition to make sure a file is downloaded as a result.

    FileIDID of the File
    Return valueThe downloaded data

    /file/FileID/view

    GET

    Required authorization: ROLE_CELSIDRIVE

    Returns the data for a File object

    FileIDID of the File
    Return valueThe downloaded data

    /file/FileID

    PUT

    Required authorization: ROLE_ADMIN_CELSIDRIVE

    Updates a File based on a File object

    FileIDID of the File
    Return valueA Response object containing the updated File object and its Zid, alternatively the errors in fields encountered.
    BodyThe File object to use.

    /file

    POST 201 if successful

    Required authorization: ROLE_ADMIN_CELSIDRIVE

    Creates a File in CelsiDrive based on a File object

    Return valueA Response object containing the updated File object and its Zid, alternatively the errors in fields encountered.
    BodyThe File object to use.

    /concrete_job/default

    GET

    Required authorization: ROLE_CONCRETE

    Returns a Concrete Job object with default values, for use as the basis in creating a new job.

    Return valueA Concrete Job object

    /concrete_job/JobID

    GET

    Required authorization: ROLE_CONCRETE

    Returns a Concrete Job object

    JobIDID of the Concrete Job
    Return valueA Concrete Job object

    /concrete_jobs

    GET

    Required authorization: ROLE_CONCRETE

    Returns Concrete Job objects for which the user has access

    /concrete_job/JobID

    PUT

    Required authorization: ROLE_ADMIN_CONCRETE_JOB

    Updates a Concrete Job based on a Concrete Job object

    JobIDID of the Concrete Job
    Return valueA Response object containing the updated Concrete Job object and its Zid, alternatively the errors in fields encountered.
    BodyThe Concrete Job object to use.

    /concrete_job

    POST 201 if successful

    Required authorization: ROLE_ADMIN_CONCRETE_JOB

    Updates a Concrete Job based on a Concrete Job object

    Return valueA Response object containing the updated Concrete Job object and its Zid, alternatively the errors in fields encountered.
    BodyThe Concrete Job object to use.

    /concrete_recipe/default

    GET

    Required authorization: ROLE_CONCRETE

    Returns a Concrete Recipe object with default values, for use as the basis in creating a new recipe.

    Return valueA Concrete Recipe object

    /concrete_recipe/RecipeID

    GET

    Required authorization: ROLE_CONCRETE

    Returns a Concrete Recipe object

    RecipeIDID of the Concrete Recipe
    Return valueA Concrete Recipe object

    /concrete_recipe/RecipeID

    DELETE

    Required authorization: ROLE_ADMIN_CONCRETE_RECIPE

    Deletes a Concrete Recipe object

    RecipeIDID of the Concrete Recipe

    /concrete_recipes

    GET

    Required authorization: ROLE_CONCRETE

    Returns a Concrete Recipe objects for which the user has access

    /concrete_recipe/RecipeID

    PUT 200 if successful

    Required authorization: ROLE_ADMIN_CONCRETE_RECIPE

    Updates a Concrete Recipe based on a Concrete Recipe object

    RecipeIDID of the Concrete Recipe
    Return valueA Response object containing the updated Concrete Recipe object and its Zid, alternatively the errors in fields encountered.
    BodyThe Concrete Recipe object to use.

    /concrete_recipe

    POST 201 if successful

    Required authorization: ROLE_ADMIN_CONCRETE_RECIPE

    Creates a Concrete Recipe based on a Concrete Recipe object

    Return valueA Response object containing the created Concrete Recipe object and its Zid, alternatively the errors in fields encountered.
    BodyThe Concrete Recipe object to use.

    /devices

    GET

    Required authorization: ROLE_INVENTORY

    Returns the devices and sensors that the user has access to.

    includeGETOmit or pass an empty string to include all object types. Pass a comma separated list from logical,physical,sensortypes,phyattrs,devices to only include those object types.
    phyattrsGETOmit or pass an empty string to include all phyattrs. Pass a comma separated list of phyattr classes to only include those phyattrs.

    /logical/LogicalSensorID

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Updates a Logical Sensor based on a Logical Sensor object

    LogicalSensorIDID of the Logical Sensor
    Return valueA Response object containing the updated Logical Sensor, alternatively the errors in fields encountered.
    BodyThe Logical Sensor object to use.

    /device/AccountID/DeviceHardwareID

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Updates a Device based on a Device object

    DeviceHardwareIDHardware ID of the Device
    AccountIDAccount ID which the Device belongs to
    Return valueA Response object containing the updated Concrete Recipe object, alternatively the errors in fields encountered.
    BodyThe Device object to use.

    /location/default

    GET

    Required authorization: ROLE_ADMIN_INVENTORY

    Returns a Location} object with default values, for use as the basis in creating a new location.

    Return valueA Location object

    /location/LocationIDList

    GET

    Required authorization: ROLE_INVENTORY

    Returns one or more Location object with associated objects.

    LocationIDListComma-separated list of IDs of Locations
    must_have_attachmentsGETPass a comma-separated list of Attachment ids to only include locations bound to these attachments.
    cant_have_attachmentsGETPass a comma-separated list of Attachment ids to omit locations bound to these attachments.
    includeGETOmit or pass an empty string to include all object types. Pass a comma separated list from locations,logical,physical,bindings,sensortypes,phyattrs,devices,dependencies to only include those object types.
    phyattrsGETOmit or pass an empty string to include all phyattrs. Pass a comma separated list of phyattr classes to only include those phyattrs.
    Return valueAn object of the format: {"locations":[], "logical":[], "physical":[], "bindings":[], "sensortypes":[], "phyattrs":[], "devices":[], "dependencies:[]}

    /locations

    GET

    Required authorization: ROLE_INVENTORY

    Returns all Location objects with associated objects.

    includeGETOmit or pass an empty string to include all object types. Pass a comma separated list from locations,logical,physical,bindings,sensortypes,phyattrs,devices,dependencies to only include those object types.
    phyattrsGETOmit or pass an empty string to include all phyattrs. Pass a comma separated list of phyattr classes to only include those phyattrs.
    Return valueAn object of the format: {"locations":[], "logical":[], "physical":[], "bindings":[], "sensortypes":[], "phyattrs":[], "devices":[], "dependencies:[]}

    /attachment/AttachmentID/locations

    GET

    Required authorization: ROLE_INVENTORY

    Returns all Location objects with associated objects, that have the specified attachment.

    AttachmentIDThe attachment ID to use
    includeGETOmit or pass an empty string to include all object types. Pass a comma separated list from locations,logical,physical,bindings,sensortypes,phyattrs,devices,dependencies to only include those object types.
    phyattrsGETOmit or pass an empty string to include all phyattrs. Pass a comma separated list of phyattr classes to only include those phyattrs.
    Return valueAn object of the format: {"locations":[], "logical":[], "physical":[], "bindings":[], "sensortypes":[], "phyattrs":[], "devices":[], "dependencies:[]}

    /location/LocationID

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Updates a Location based on a Location object

    LocationIDThe id of the Location to update.
    must_have_attachmentsGETPass a comma-separated list of Attachment ids to only update the location if it is bound to these attachments.
    cant_have_attachmentsGETPass a comma-separated list of Attachment ids to prevent updating location if bound to these attachments.
    Return valueA Response object containing the updated Location object, alternatively the errors in fields encountered.
    BodyThe Location object to use.

    /location

    POST 201 if successful

    Required authorization: ROLE_ADMIN_INVENTORY

    Creates a new a Location based on a Location object

    Return valueA Response object containing the created Location object and its Zid alternatively the errors in fields encountered.
    BodyThe Location object to use.

    /location/LocationID

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Deletes a Location object

    LocationIDID of the Location to delete
    no_dependenciesGETIf true, prevent deleting location if it is the master if other locations. Default false (which may lead to dangling dependencies.)
    must_have_attachmentsGETPass a comma-separated list of Attachment ids to only delete the location if it is bound to these attachments.
    cant_have_attachmentsGETPass a comma-separated list of Attachment ids to prevent deleting location if bound to these attachments.

    /location/LocationID/history

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Deletes the historical data on a Location

    LocationIDID of the Location to delete history from

    /location/LocationID/sensors

    POST

    Required authorization: ROLE_ADMIN_INVENTORY

    Bind Location to Logical Sensors

    LocationIDID of the Location
    Return valueA Response object with status.
    BodyShould be a ss_zids variable with an array of Logical Sensor ids to bind the location to.

    /location_dependency

    POST

    Required authorization: ROLE_ADMIN_INVENTORY

    Adds a new Dependency

    Return valueA Response object containing the Dependency object, alternatively the errors in fields encountered.
    BodyThe Dependency object to use.

    /location_dependency

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Removes Dependencies on locations

    dependent_loc_zidBodyThe Zid of the location for which to remove dependencies.
    typesBodyAn optional array of dependency types to remove. If omitted or empty, all dependencies on location will be removed.
    Return valueA Response object with status information, alternatively the errors in fields encountered.

    /attachment/locations

    POST

    Required authorization: ROLE_ADMIN_INVENTORY

    Attaches an Attachment to a set of Locations.

    attachment_zidBodyThe Attachment to assign.
    loc_zidsBodyA list of Location ids to assign the attachment to.
    keepExistingLocsOnAttachmentGETIf false, other locations with this attachment will be detached from the location. If true, they will be retained. Default false.
    keepExistingAttachmentsOnLocGETIf true, if the specified location have other attachments already, they will be retained. If false, the previous attachments will be detached. Default true.
    Return valueA Response object with status, alternatively the errors in fields encountered.

    /attachment/locations

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Detaches an Attachment from a set of Locations.

    attachment_zidBodyThe Attachment to detach.
    loc_zidsBodyA list of Location ids to detach the attachment from.
    Return valueA Response object containing the updated Concrete Recipe object and its Zid, alternatively the errors in fields encountered.

    /attachment/AttachmentID

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Deletes an Attachment object

    AttachmentIDID of the Attachment

    /location/LocationID/event

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Adds an event to a Location

    LocationIDThe id of the Location to update.
    timestampBodyTimestamp of event.
    textBodyDescription of event.
    valueBodyOptional value to associate with event.
    Return valueA Response object containing the event fields, alternatively the errors in fields encountered.

    /location/LocationID/event/timestamp

    DELETE

    Required authorization: ROLE_ADMIN_INVENTORY

    Deletes an event from a Location

    LocationIDThe id of the Location to update.
    timestampTimestamp of event.
    Return valueA Response object containing the event fields, alternatively the errors in fields encountered.

    /location/LocationID/inject

    PUT

    Required authorization: ROLE_INJECTOR

    Post one or more data points to a Location

    LocationIDThe id of the Location to update.
    valuesBodyArray of values.
    timestampsBodyArray of timestamps.

    /location/LocationIDList/history

    GET

    Required authorization: ROLE_INVENTORY

    Returns history for Locations

    LocationIDListA comma-separated list of Location ids
    decimalsGETOptional parameter that sets the number of decimals to use for historic data.
    deltaGETOptional. If true, all sample times except the first one will be the delta time from the last sample rather than the full timestamp. This saves space in the response. Default false.
    averageIntrervalGETOptional. If true, the time series will be averaged in buckets of this many seconds. Default is 0, no averaging.
    startTimeGETRequired, should be a unix timestamp. Retrieve history starting from this timestamp.
    endTimeGETRequired, should be a unix timestamp. Retrieve history up until this timestamp.
    Return valueAn object keyed on location ID. Each location has the following information: {"times":[list of timestamps], "values":[list of values], "tr":[list of trigger indexes], "triggers":[list of trigger objects]}

    /export/location_data

    POST

    Required authorization: ROLE_INVENTORY

    Exports Location history as a file.

    LocationIDListGETA comma-separated list of Location ids
    extGETThe file format to export to. Valid values are xslx (Excel), csv or xml.
    typeGETThe Content-Type to use when sending back the exported file.
    sendtoGETProvide an email address here to send the export as an email.
    decimalsGETOptional parameter that sets the number of decimals to use for historic data.
    averageIntrervalGETOptional. If true, the time series will be averaged in buckets of this many seconds. Default is 0, no averaging.
    startTimeGETRequired, should be a unix timestamp. Retrieve history starting from this timestamp.
    endTimeGETRequired, should be a unix timestamp. Retrieve history up until this timestamp.
    titleGETOptional parameter giving the title to affix to the export.
    notesGETOptional parameter giving notes to affix to the export.
    Return valueA file in the requested format.

    /org/OrganizationID

    GET

    Required authorization: Any user with object access

    Returns an Organization object

    OrganizationIDID of the Organization
    Return valueAn Organization object

    /org

    POST 201 if successful

    Required authorization: ROLE_ADMIN_ORG

    Creates a new Business Organization based on a Business Organization object

    Return valueA Response object containing a Business Organization object and its Zid, alternatively the errors in fields encountered.
    BodyThe Business Organization object to use.

    /org/OrganizationID

    PUT

    Required authorization: ROLE_ADMIN_ORG

    Updates a Business Organization based on a Organization object

    OrganizationIDZid of the Organization
    Return valueA Response object containing the updated Organization object and its Zid, alternatively the errors in fields encountered.
    BodyThe Organization object to use.

    /orgs

    GET

    Required authorization: ROLE_ADMIN_ORG

    Returns a list of all Organization objects to which the user has access

    Return valueList of Organization objects

    /phyattr/PhysicalSensorIDList/AttrList/history

    GET

    Required authorization: ROLE_INVENTORY

    Returns the history of a PhyAttrs

    PhysicalSensorIDListA comma-separated list of Physical Sensor ids.
    AttrListA comma-separated list of PhyAttr classes.
    Return valueAn object of the form {"PhysicalSensorID":{"PhyAttrClass":[ [ValueFirstSeenTime,ValueLastSeenTime,Value], ...] }}

    /physical/PhysicalSensorID

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Updates a Physical Sensor. Note that these fields are mainly represented as PhyAttrs

    PhysicalSensorIDID of the Physical Sensor
    txintBodyThe transmission interval, in seconds.
    sampleintBodyThe sample interval, in seconds.
    tc_typeBodyOnly available for TC type sensors. 0 means type K thermocouple and 1 means type T thermocouple.
    Return valueA Response object with status, alternatively the errors in fields encountered.

    /prognosis/PrognosisID

    GET

    Required authorization: ROLE_INVENTORY

    Returns a Prognosis object

    PrognosisIDID of the Prognosis
    Return valueA Prognosis object

    /prognosis/PrognosisID

    PUT

    Required authorization: ROLE_ADMIN_INVENTORY

    Updates a Prognosis based on a Prognosis object

    PrognosisIDID of the Prognosis
    Return valueA Response object containing the updated Prognosis object and its Zid, alternatively the errors in fields encountered.
    BodyThe Prognosis object to use.

    /prognosis

    POST 201 if successful

    Required authorization: ROLE_ADMIN_INVENTORY

    Creates a Prognosis based on a Prognosis object

    Return valueA Response object containing the updated Prognosis object and its Zid, alternatively the errors in fields encountered.
    BodyThe Prognosis object to use.

    /pur/PurchaserID

    GET

    Required authorization: Any user with object access

    Returns a Purchaser object

    PurchaserIDID of the Purchaser
    Return valueA Purchaser object

    /pur/default/OrganizationID

    GET

    Required authorization: ROLE_ADMIN_PUR

    Returns a Purchaser object with default properties for the selected Organization. This is useful to use as a template when creating a new purchaser.

    OrganizationIDZid of the Organization
    Return valueA Purchaser object

    /purs/OrganizationID

    GET

    Required authorization:

    Returns a list of all Purchaser objects in a Organization

    OrganizationIDID of the Organization
    Return valueList of Purchaser objects

    /pur/PurchaserID

    PUT

    Required authorization: ROLE_ADMIN_PUR

    Updates a purchaser based on a Purchaser object

    PurchaserIDID of the Organization
    Return valueA Response object containing the updated Purchaser object and its Zid, alternatively the errors in fields encountered.
    BodyThe Purchaser object to use.

    /pur/OrganizationID

    POST 201 if successful

    Required authorization: ROLE_ADMIN_PUR

    Creates a new purchaser based on a Purchaser object

    OrganizationIDID of the Organization to create the branch in
    dupcheckOptional, if set to 1 existing purchasers will be checked for a duplicate. If found, the purchaser will not be created and the duplicate will be returned in dup in the response.
    Return valueA Response object containing the updated Purchaser object and its Zid, alternatively the errors in fields encountered.
    BodyThe Purchaser object to use.

    /pur/check/OrganizationID/PurchaserID

    GET

    Required authorization:

    Checks if a Purchaser is valid, and retrieves any error strings for it.

    OrganizationIDID of the Organization
    PurchaserIDID of the Purchaser

    /user/default

    GET

    Required authorization: ROLE_ADMIN_USER

    Returns a User object with default values, for use as the basis in creating a new user.

    Return valueA User object

    /user/UserID

    GET

    Required authorization: Any user with object access

    Returns a User object

    UserIDID of the User
    Return valueA User object

    /users

    GET

    Required authorization: ROLE_ADMIN_USER

    Returns list of User objects for which the user has access

    /user/UserID

    DELETE

    Required authorization: ROLE_ADMIN_USER

    Deletes a User. Use caution - This operation cannot be undone!

    UserIDThe user ID to delete.
    Return valueA Response object containing deleted user's Zid.

    /user/UserID

    PUT

    Required authorization: ROLE_ADMIN_USER

    Updates a User based on a User object

    UserIDThe user ID to update
    Return valueA Response object containing the updated User object and its Zid, alternatively the errors in fields encountered.
    BodyThe User object to use.

    /user

    POST 201 if successful

    Required authorization: ROLE_ADMIN_USER

    Creates a User based on a User object

    Return valueA Response object containing the updated User object and its Zid, alternatively the errors in fields encountered.
    BodyThe User object to use.