Searching...

Matching results

    Settings

    User-defined set of fixed settings (key, value) used by AirVantage to configure an embedded application.

    Read only fields are computed by AirVantage and can only be seen on response fragments sent by find, create, or edit requests.

    Field Description Read Only Type
    uid Setting uid true uid
    name Settings name false string
    description Optional settings description false string
    application The application identifier false uid
    applicationName Application name true string
    applicationRevision Application revision true string
    configuration The configuration of the settings. false map

    This is a complete representation of a Entity. This fragment can be used for create or edit requests. Please refer to the fields section to know which fields can be modified.

    {
        "uid": "",
        "name": "",
        "application" : "",
        "applicationName": "",
        "applicationRevision": "",
        "description": "",
        "configuration": [
           {
              "key": "",
              "value": ""
           }
        ]
    }

    /api/v1/settings

    Returns a paginated list of settings with their complete details.

    It is possible to restrain the result list using criteria parameters.

    The fields parameter has to be defined in order to specify the attributes of the setting that will be returned.
    If fields parameter is missing, only the following attributes of the setting are returned: uid, name, applicationName, applicationRevision.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/settings?fields=uid,name,configuration

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "items":    [
                {
             "uid": "082ff307d428461a9eb24f3c8b68f756",
             "name": "MySettings-1",
             "configuration": [
                   {
                         "key": "car.engine.autostart",
                         "value": "false"
                   },
                   {
                         "key": "car.engine.boost",
                         "value": "true"
                   }
             ]
          },
                {
             "uid": "064ff30d7528461a9eb1563c8b69f742",
             "name": "MySettings-2",
             "configuration": [
                   {
                         "key": "car.engine.autostart",
                         "value": null
                   }
             ]
          }
       ],
       "count": 2,
       "size": 2,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find a settings whose uid match with the specified id. optional null uid =
    name Returns all settings whose name contains the given string. optional null string like
    applicationName Returns all settings associated to an application whose name contains the given string. optional null string like
    applicationRevision Returns all settings associated to an application whose revision contains the given string. optional null string like
    applicationType Returns all settings associated to an application whose type is the given string. optional null string = (case insensitive)
    company Set the context company. optional caller's company uid =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.settings.view
    Fields uid, name, description, applicationName, applicationRevision, configuration

    /api/v1/settings

    Creates a new settings. Application, name and configuration are required fields

    Request

    POST https://na.airvantage.net/api/v1/settings
    Content-Type: application/json
    {
      "application":"3eb137e9ae784c2da393345eeda19a60",
      "name": "MySetting",
      "configuration": [
             {
                "key": "car.engine.autostart",
                "value": "false"
             },
             {
                "key": "car.engine.boost",
                "value": "true"
             }
          ]
    }
    

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "settings": {
            "applicationName": "AC341U Firmware",
            "applicationRevision": "04.07.01.01",
            "uid": "d42dc680e4a9412585d53e54f53eb80e",
            "configuration": [
                {
                    "key": "car.engine.autostart",
                    "value": "false"
                },
                {
                    "key": "car.engine.boost",
                    "value": "true"
                }
            ],
            "description": null,
            "name": "MySetting"
        },
        "validationResult": {
            "errors": [],
            "warnings": [
                {
                    "message": "data.validation.unknown.data",
                    "params": [
                        "car.engine.autostart",
                        "false"
                    ]
                }
            ]
        }
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    settings.missing A setting must be provided.
    settings.missing.name A setting name must be provided.
    settings.not.unique.name.for.application A setting with the same name for the given application already exists.
    application.unknown The specified uid does not match with any application.
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.settings.create

    /api/v1/settings/{uid}

    Edits an existing settings template. Only "name", "description" and "configuration" can be edited.

    Request

    PUT https://na.airvantage.net/api/v1/settings/c9a0a0c98ffa461f9fa5888cb200cbd8
    Content-Type: application/json
    ...
    {
          "name": "NewSettingsName",
          "configuration": [ {
             "key" : "car.engine.boost",
             "value" : "150"}
          ]
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "settings" : {
              "uid": "c9a0a0c98ffa461f9fa5888cb200cbd8",
              "name": "NewSettingsName",
              "description": "It is a description",
              "applicationName": "The Application",
              "applicationRevision": "1.1.0",
              "configuration": [ {
                 "key" : "car.engine.boost",
                 "value" : "150"}
              ]
        },
        "validationResult": {
            "errors": [],
            "warnings": [
                {
                    "message": "data.validation.unknown.data",
                    "params": [
                        "car.engine.boost",
                        "false"
                    ]
                }
            ]
        }
    }
    Name Description
    settings.unknow The specified uid does not match with any settings.
    settings.missing A setting must be provided.
    settings.missing.name A setting name must be provided.
    settings.not.unique.name.for.application A setting with the same name for the given application already exists.
    application.unknown The specified uid does not match with any application.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.settings.create

    /api/v1/settings/{uid}

    Returns detailed information about the specified settings.

    Request

    GET https://na.airvantage.net/api/v1/settings/c9a0a0c98ffa461f9fa5888cb200cbd8

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
          "uid": "c9a0a0c98ffa461f9fa5888cb200cbd8",
          "name": "NewSettingsName",
          "description": "It is a description",
          "applicationName": "The Application",
          "applicationRevision": "1.1.0",
          "configuration": [ {
             "key" : "car.engine.boost",
             "value" : "150"}
          ]
    }
    Name Description
    settings.unknow The specified uid does not match with any settings.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.settings.view

    /api/v1/settings/{uid}

    Deletes an existing settings

    Request

    DELETE https://na.airvantage.net/api/v1/settings/c9a0a0c98ffa461f9fa5888cb200cbd8
    ...
        

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    
    Name Description
    settings.missing A settings must be provided
    settings.unknow The specified uid does not match with any settings.
    HTTP Method DELETE
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.settings.delete
    TOP