kinlane
8/11/2018 - 1:11 AM

NxtPort Big Belly API

NxtPort Big Belly API

{
  "swagger": "2.0",
  "info": {
    "title": "Big Belly API (staging)",
    "version": "v1",
    "description": "API for ingestion of fill level updates from smart containers. The project is part of the Antwerp Smart Zone initiative.",
    "termsOfService": "https://www.nxtport.eu/General-Terms-And-Conditions",
    "contact": {
      "email": "support@nxtport.eu"
    }
  },
  "schemes": [
    "https"
  ],
  "host": "api-stg.nxtport.eu",
  "basePath": "/bigbelly/v1",
  "security": [
    {
      "SubscriptionKey": []
    }
  ],
  "securityDefinitions": {
    "SubscriptionKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Ocp-Apim-Subscription-Key"
    }
  },
  "paths": {
    "/devices": {
      "post": {
        "summary": "Publish the fill level for all Big Belly devices.",
        "description": "",
        "operationId": "Publish_Devices",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Devices"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Devices": {
      "type": "object",
      "properties": {
        "time": {
          "type": "string",
          "format": "date-time",
          "example": "2018-02-14T11:00:26Z"
        },
        "count": {
          "type": "integer",
          "example": 15
        },
        "devices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Device"
          }
        }
      },
      "required": [
        "time",
        "count",
        "devices"
      ]
    },
    "Device": {
      "type": "object",
      "properties": {
        "assets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "435152"
              },
              "name": {
                "type": "string",
                "example": "Container - 435152"
              },
              "altId": {
                "type": "string",
                "example": "373145"
              },
              "place": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "320400"
                  },
                  "postalCode": {
                    "type": "string",
                    "example": "2050"
                  },
                  "address": {
                    "type": "string",
                    "example": "Gloriantlaan 46"
                  },
                  "name": {
                    "type": "string",
                    "example": "349 - Amelinckx-ABC"
                  },
                  "group": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "124030"
                      },
                      "name": {
                        "type": "string",
                        "example": "Amelinckx-ABC"
                      }
                    }
                  },
                  "country": {
                    "type": "string",
                    "example": "Belgium"
                  },
                  "city": {
                    "type": "string",
                    "example": "Antwerpen"
                  }
                }
              },
              "type": {
                "type": "string",
                "example": "Container"
              }
            }
          }
        },
        "subType": {
          "type": "string",
          "example": "WE-008W"
        },
        "name": {
          "type": "string",
          "example": "239489"
        },
        "configurations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "parameters": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "time": {
                "type": "string",
                "format": "date-time",
                "example": "2018-02-14T06:52:57Z"
              },
              "name": {
                "type": "string",
                "example": "filllevel"
              },
              "value": {
                "type": "string",
                "example": "28"
              },
              "type": {
                "type": "string",
                "example": "FILLLEVEL"
              }
            }
          }
        },
        "statuses": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "type": {
          "type": "string",
          "example": "Container"
        },
        "alarms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "deviceId": {
          "type": "string",
          "example": "239489"
        }
      }
    }
  }
}