Response

Typically, the response will have a JSON-formatted body unless stated otherwise. A 2xx status code indicates a successful request—for example, POST and GET requests return a 200 status, while PUT and DELETE requests return a 204. The expected responses for each HTTPS request, including both success and error cases, are detailed in the API documentation.

For example, a successful response to the following list-assets request will resemble:

GET https://iot.campbell-cloud.com/api/v1/organizations/5a63cc03-c203-4dea-99a5-b3f2b8149733/assets

Status Code:

200 OK

JSON Response:

[

    {

        "created_ts": 1706648962979,

        "metadata": {

            "serial": "TRBE-6ATE-89JK",

            "name": "Aspen 10 Test",

            "$profile": "aspen10",

            "$version": 1,

            "status": "inactive",

            "uid": "TRBE-6ATE-89JK",

            "manufacturer": "Campbell Scientific",

            "configuration": {

                "communication_threshold": 60,

                "timezone": "Etc/UTC"

            },

            "auto_update": {

                "os": true,

                "recipe_version": "",

                "recipe": true,

                "os_version": ""

            },

            "model": "aspen10"

        },

        "created_by": "kfk83392-03m3-1s4d-90ce-5j1fd9l7e428",

        "id": "39h32e56-fp37-488n-99dd-182bf53a65j9"

    }

]

In the preceding example, a GET request has been used to request a list of all assets within the specified Organization. Since there is only 1 asset in this Organization, the GET request has responded with a 200 OK status code and the JSON formatted body providing information related to this 1 asset.