openapi: 3.0.0 info: title: Aloft API V1 Accounts Batteries API contact: email: support@aloft.ai version: 1.0.0 description: Accounts tags: - name: Batteries description: Batteries paths: /v1/account/{account_id}/batteries: get: tags: - Batteries summary: Get all batteries description: Get all batteries operationId: 6b500968984e0b460875928e045ce87f parameters: - name: account_id in: path required: true schema: $ref: '#components/schemas/model_id' - name: search in: query description: Search by identifier & source. schema: type: string - name: order_by in: query description: The field to order the data by schema: type: string enum: - id - user_id - chemistry - capacity - model - cycles - identifier - serial_number - internal_serial_number - deep_cycle_date - charge_remaining - max_temp - min_temp - max_voltage - min_voltage - max_capacity - degradation - source - last_flown - created_at - retired - updated_at - name: order in: query schema: $ref: '#components/schemas/order_direction' - name: retired in: query description: Returns retired batteries schema: type: boolean example: false - name: pilot_id in: query description: Filters to only batteries attached to flights flown by a given pilot. schema: type: integer - name: tags_required in: query description: When true, all tags must be connected to the object schema: type: boolean - name: tags[] in: query description: array of tag ids schema: type: array items: description: A tag id type: integer - name: appends[] in: query description: Array of appendable resource names schema: type: array items: type: string enum: - flight_time_30_days - total_flight_time - flight_30_days - total_flights - health - tags - name: page in: query schema: type: integer - name: page_length in: query schema: type: integer responses: '403': description: Access Denied '401': description: Unauthorized '200': description: Successful operation content: application/json: {} application/csv: {} security: - Aloft Token: [] post: tags: - Batteries summary: Create a battery description: Create a battery operationId: 05383c190c29008a5d901e827cea8f81 parameters: - name: account_id in: path required: true schema: $ref: '#components/schemas/model_id' - name: appends[] in: query description: Array of appendable resource names schema: type: array items: type: string enum: - flight_time_30_days - total_flight_time - flight_30_days - total_flights - health - tags requestBody: content: application/json: schema: $ref: '#components/schemas/battery' responses: '403': description: Access Denied '401': description: Unauthorized '422': description: Unprocessable Content '200': description: Successful operation security: - Aloft Token: [] /v1/account/{account_id}/batteries/{battery_id}: get: tags: - Batteries summary: Get a battery description: Get a battery operationId: c35ca4944ea386fe03509fdf5aa73756 parameters: - name: account_id in: path schema: $ref: '#components/schemas/model_id' - name: appends[] in: query description: Array of appendable resource names schema: type: array items: type: string enum: - flight_30_days - flight_time_30_days - health - tags - total_flights - total_flight_time - name: battery_id in: path description: Battery ID required: true schema: type: integer responses: '403': description: Access Denied '401': description: Unauthorized '200': description: Successful operation security: - Aloft Token: [] put: tags: - Batteries summary: Update a battery description: Update a battery operationId: 4dda325e016e7807bd4bb6919d24e1c8 parameters: - name: account_id in: path required: true schema: $ref: '#components/schemas/model_id' - name: appends[] in: query description: Array of appendable resource names schema: type: array items: type: string enum: - flight_30_days - flight_time_30_days - health - tags - total_flights - total_flight_time - name: battery_id in: path description: Battery ID required: true schema: type: integer requestBody: content: application/json: schema: $ref: '#components/schemas/battery' responses: '403': description: Access Denied '401': description: Unauthorized '422': description: Unprocessable Content '200': description: Successful operation security: - Aloft Token: [] delete: tags: - Batteries summary: Delete a battery description: Delete a battery operationId: 13809f1f6addcbabc3822caa07365a6d parameters: - name: account_id in: path required: true schema: $ref: '#components/schemas/model_id' - name: battery_id in: path description: Battery ID required: true schema: type: integer responses: '403': description: Access Denied '401': description: Unauthorized '204': description: Successful operation security: - Aloft Token: [] /v1/batteries/manufacturers: get: tags: - Batteries summary: List battery manufacturers description: List battery manufacturers operationId: 6c1c91c458ce7a25b10b74c3ae97e485 responses: '403': description: Access Denied '401': description: Unauthorized '200': description: Successful operation security: - Aloft Token: [] /v1/batteries/models: get: tags: - Batteries summary: List battery models description: List battery models operationId: b852c571d31d8522cf83d564991a4406 responses: '403': description: Access Denied '401': description: Unauthorized '200': description: Successful operation security: - Aloft Token: [] components: securitySchemes: Aloft Token: type: http name: Aloft Token in: header scheme: bearer