--- swagger: "2.0" info: description: "DualInventive's common Asset API" version: "1.0.1" title: "Asset API" termsOfService: "http://swagger.io/terms/" contact: name: "patrick.vanleeuwen@dualinventive.com" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" host: "api.mtinfo3000.com" basePath: "/assets-service/v1" schemes: - "https" securityDefinitions: AccessToken: type: apiKey in: header name: Authorization paths: /assets/{assetID}: get: tags: - "Assets" summary: "" description: "Returns an Asset by the given assetID" operationId: "GetAssetByID" consumes: - "application/json" produces: - "application/json" security: - AccessToken: [] parameters: - name: assetID description: AssetID in: path required: true type: integer minimum: 1 responses: 200: description: "successful operation" schema: $ref: "#/definitions/Asset" 401: description: "authentication failed" schema: $ref: "#/definitions/ErrResponse" 404: description: "not found" schema: $ref: "#/definitions/ErrResponse" 500: description: "internal server error" schema: $ref: "#/definitions/ErrResponse" /assets: get: tags: - "Assets" summary: "" description: "Returns a list of assets" operationId: "GetAssets" consumes: - "application/json" produces: - "application/json" security: - AccessToken: [] parameters: - name: page description: Page number in: query required: false type: integer default: 1 minimum: 1 - name: per_page description: Items per page in: query required: false type: integer default: 200 minimum: 1 maximum: 200 - name: sort description: Sorting column in: query required: false type: string enum: - id - id:asc - id:desc - uid - uid:asc - uid:desc - serialnr - serialnr:asc - serialnr:desc default: id responses: 200: description: "successful operation" schema: $ref: "#/definitions/AssetsList" 401: description: "authentication failed" schema: $ref: "#/definitions/ErrResponse" 404: description: "not found" schema: $ref: "#/definitions/ErrResponse" 500: description: "internal server error" schema: $ref: "#/definitions/ErrResponse" definitions: ErrResponse: properties: errMsg: type: "string" Asset: properties: id: type: integer uid: type: string serialNr: type: string typeCode: type: string AssetsList: properties: asset: type: array items: $ref: "#/definitions/Asset" count: type: integer