openapi: 3.0.3 info: title: UpKeep Assets API description: UpKeep is an asset operations management and CMMS (Computerized Maintenance Management System) platform. The UpKeep API provides programmatic access to work orders, assets, parts, locations, preventive maintenance schedules, purchase orders, meters, and webhooks for maintenance teams and facility managers. version: '2022-09-14' contact: name: UpKeep Developer Support url: https://developers.onupkeep.com/ termsOfService: https://upkeep.com/terms/ servers: - url: https://api.onupkeep.com/api/v2 description: UpKeep Production API security: - SessionToken: [] tags: - name: Assets description: Asset lifecycle and downtime management paths: /assets: get: operationId: listAssets summary: List Assets description: Retrieve a paginated list of assets. tags: - Assets parameters: - name: page in: query schema: type: integer default: 0 - name: limit in: query schema: type: integer default: 25 - name: includes in: query schema: type: string description: Comma-separated related resources to include - name: locationId in: query schema: type: string description: Filter by location responses: '200': description: List of assets content: application/json: schema: $ref: '#/components/schemas/AssetList' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createAsset summary: Create Asset description: Create a new asset in the system. tags: - Assets requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AssetRequest' responses: '200': description: Asset created content: application/json: schema: $ref: '#/components/schemas/Asset' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /assets/{id}: get: operationId: getAsset summary: Get Asset description: Retrieve details of a specific asset. tags: - Assets parameters: - name: id in: path required: true schema: type: string responses: '200': description: Asset details content: application/json: schema: $ref: '#/components/schemas/Asset' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateAsset summary: Update Asset description: Update an existing asset. tags: - Assets parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AssetRequest' responses: '200': description: Asset updated content: application/json: schema: $ref: '#/components/schemas/Asset' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteAsset summary: Delete Asset description: Delete an asset from the system. tags: - Assets parameters: - name: id in: path required: true schema: type: string responses: '204': description: Asset deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /assets/{id}/downtime: post: operationId: recordAssetDowntime summary: Record Asset Downtime description: Record a downtime event for an asset. tags: - Assets parameters: - name: id in: path required: true schema: type: string description: Asset identifier requestBody: required: true content: application/json: schema: type: object required: - startTime - downtimeStatusId properties: startTime: type: string format: date-time endTime: type: string format: date-time downtimeStatusId: type: string description: Downtime status category identifier notes: type: string responses: '200': description: Downtime event recorded content: application/json: schema: $ref: '#/components/schemas/DowntimeEvent' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' components: responses: Unauthorized: description: Session token missing or invalid content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request body or parameters content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' schemas: DowntimeEvent: type: object properties: id: type: string assetId: type: string startTime: type: string format: date-time endTime: type: string format: date-time downtimeStatusId: type: string duration: type: integer description: Duration in minutes notes: type: string AssetList: type: object properties: success: type: boolean total: type: integer results: type: array items: $ref: '#/components/schemas/Asset' AssetRequest: type: object required: - name properties: name: type: string description: type: string serialNumber: type: string model: type: string manufacturer: type: string locationId: type: string purchaseDate: type: string format: date purchaseCost: type: number Asset: type: object properties: id: type: string name: type: string description: type: string serialNumber: type: string model: type: string manufacturer: type: string locationId: type: string purchaseDate: type: string format: date purchaseCost: type: number status: type: string enum: - operational - needs-repair - decommissioned createdAt: type: string format: date-time updatedAt: type: string format: date-time Error: type: object properties: success: type: boolean example: false error: type: string description: Error message securitySchemes: SessionToken: type: apiKey in: header name: session-token description: Session token obtained from POST /auth