openapi: 3.0.0 info: title: Leaf Agriculture Leaf API Reference > Alerts API Reference > Machine File Conversion API description: We are Leaf Agriculture, provider of a unified farm data API. After experiencing the difficulty of building applications in food and agriculture first hand as software developers, and hearing similar stories of frustration with existing tools and often insurmountable technical barriers from other companies, we decided to tackle the problem at hand. version: 1.0.0 tags: - name: API Reference > Machine File Conversion paths: /services/operations/api/files: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get all files parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/{file_id}: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get specific file by id parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: file_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/{file_id}/summary: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get file summary parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: file_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/{file_id}/images: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get file images parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: file_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/{file_id}/units: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get file units parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: file_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/{file_id}/status: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get file status parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: file_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/uncoveredFiles: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get all uncovered files parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: leafUserId in: query schema: type: string example: '{{leaf_user_id}}' responses: '200': description: Successful response content: application/json: {} /services/operations/api/batch: post: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Upload operation file requestBody: content: multipart/form-data: schema: type: object properties: file: type: string description: select your file format: binary parameters: - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: leafUserId in: query schema: type: string example: '{{leaf_user_id}}' - name: provider in: query schema: type: string example: Other responses: '200': description: Successful response content: application/json: {} get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get all batches parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} responses: '200': description: Successful response content: application/json: {} /services/operations/api/batch/{batch_id}: get: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Get batch by id parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} - name: batch_id in: path schema: type: string required: true responses: '200': description: Successful response content: application/json: {} /services/operations/api/files/merge: post: tags: - API Reference > Machine File Conversion summary: Leaf Agriculture Merge operation files description: "Make sure you are merging operations of the \n- same operationType (PLANTED, HARVESTED or APPLIED)\n- same Leaf User" requestBody: content: application/json: schema: type: object example: ids: - '{{operation_1_id}}' - '{{operation_2_id}}' parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Authorization in: header schema: type: string example: Bearer {{leaf_token}} responses: '200': description: Successful response content: application/json: {}