Searching...

Matching results

    Dataset

    User defined set of variables used in AirVantage to retrieve system data either periodically (heartbeat communication) or on-demand.

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

    Field Description Read Only Type
    uid Dataset's uid true uid
    name Dataset's name false string
    description An optional description about this Dataset false string
    application The application where data configuration is declared. false uid
    applicationName Application name true string
    applicationRevision Application revision true string
    configuration List of data keys or ids. false string array

    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": [
              "key1",
              "key2"
        ]
    }

    /api/v1/datasets

    Returns a paginated list of datasets 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 dataset that will be returned.
    If fields parameter is missing, only the following attributes of the dataset are returned: uid, name, applicationName, applicationRevision.

    More information about paging, filtering, and sorting here

    Request

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

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
       "items":    [
                {
             "uid": "082ff307d428461a9eb24f3c8b68f756",
             "name": "MyDataset-1",
             "configuration": [
                   "car.engine.autostart",
                   "car.engine.boost"
             ]
          },
                {
             "uid": "064ff30d7528461a9eb1563c8b69f742",
             "name": "MyDataset-2",
             "configuration": [
                   "car.engine.autostart"
             ]
          }
       ],
       "count": 2,
       "size": 2,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find a dataset whose uid match with the specified id. optional null uid =
    name Returns all datasets whose name contains the given string. optional null string like
    applicationName Returns all datasets associated to an application whose name contains the given string. optional null string like
    applicationRevision Returns all datasets associated to an application whose revision contains the given string. optional null string like
    applicationType Returns all datasets 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.datasets.view
    Fields uid, name, description, applicationName, applicationRevision, configuration

    /api/v1/datasets

    Creates a new dataset. Name, application, and configuration are required fields. Response may return warnings and errors.

    Request

    POST https://na.airvantage.net/api/v1/datasets
    {
        "name": "MyDataset",
        "application" : "a28c8b33c95ffa896c68486b45675548",
        "description": "It is a description",
        "configuration": [
            "engine.temperature",
            "tire.pression"
        ]
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "dataset": {
          "uid": "c9a0a0c98ffa461f9fa5888cb200cbd8",
          "name": "MyDataset",
          "description": "It is a description",
          "applicationName": "The Application",
          "applicationRevision": "1.1.0",
          "configuration": [
             "engine.temperature",
             "tire.pression"
          ]
       },
       "validationResult":    {
          "errors": [],
          "warnings": [      {
             "message": "data.validation.unknown.data",
             "params": [
                "engine.temperature"
             ]
          }]
       }
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    dataset.missing A dataset must be provided.
    dataset.missing.name A dataset name must be provided.
    dataset.not.unique.name.for.application A dataset 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.datasets.create

    /api/v1/datasets/{uid}

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

    Request

    PUT https://na.airvantage.net/api/v1/datasets/c9a0a0c98ffa461f9fa5888cb200cbd8
    Content-Type: application/json
    ...
    {
        "name": "NewDatasetName",
        "configuration": [
            "car.engine.boost"
        ]
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
          "uid": "c9a0a0c98ffa461f9fa5888cb200cbd8",
          "name": "NewDatasetName",
          "description": "It is a description",
          "applicationName": "The Application",
          "applicationRevision": "1.1.0",
          "configuration": [
             "car.engine.boost"
          ]
    }
    Name Description
    dataset.missing A dataset must be provided
    dataset.unknow The specified uid does not match with any dataset.
    dataset.missing.name Dataset name is missing
    dataset.not.unique.name.for.application A dataset 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.datasets.create

    /api/v1/datasets/{uid}

    Returns detailed information about the specified dataset

    Request

    GET https://na.airvantage.net/api/v1/datasets/1c060437de054f3190af21ecd7202bd3

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "applicationName": "AC341U Firmware",
        "applicationRevision": "04.07.01.01",
        "description": "It is a description",
        "configuration": [
            "tire.pression",
            "engine.temperature"
        ],
        "uid": "1c060437de054f3190af21ecd7202bd3",
        "name": "MyDataset"
    }
    Name Description
    dataset.unknow The specified uid does not match with any dataset.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions entities.datasets.view

    /api/v1/datasets/{uid}

    Deletes an existing dataset

    Request

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

    Response
    200 OK

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