openapi: 3.1.0 x-stoplight: id: b0495601c8e61 info: title: fw_exports version: '1.0' servers: - url: 'https://dev-fw-api.globalforestwatch.org' description: Dev - url: 'https://staging-fw-api.globalforestwatch.org' description: Staging - url: 'https://api.globalforestwatch.org' description: Production paths: /v3/exports/reports/exportSome: parameters: [] post: summary: Export some reports operationId: post-v3-reports-templateId-exportSome responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string examples: example-1: value: data: string '400': $ref: '#/components/responses/Error' '401': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' description: 'Exports a selection of report answers and associated images given its id as either fwbundle or zipped csv. The "fields" array in the body determines the columns in any csv export. Include "responses" if questions and answers are required. The response is an id to poll the GET /v3/exports/reports/{id} endpoint is for the URL once the export has completed' requestBody: content: application/json: schema: type: object properties: ids: type: array items: type: object properties: templateid: type: string reportid: type: string required: - templateid - reportid language: type: string fileType: type: string enum: - geojson - shp - fwbundle - csv - pdf fields: type: array items: type: string email: type: string required: - ids - language - fileType - fields - email examples: example-1: value: ids: - templateid: 624eb2e03a38cf001b822d95 reportid: 624eb2e03a38cf001b822d95 language: en fileType: zip fields: - name tags: - Reports /v3/exports/reports/exportAll: parameters: [] post: summary: Export all reports operationId: post-v3-reports-templateId-exportAll responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string '400': $ref: '#/components/responses/Error' '401': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' description: 'Exports all report answers and associated images available to the user for the given template as either fwbundle or zipped csv.The "fields" array in the body determines the columns in any csv export. Include "responses" if questions and answers are required. The response is an id to poll the GET /v3/exports/reports/{id} endpoint is for the URL once the export has completed' requestBody: content: application/json: schema: type: object properties: language: type: string fileType: type: string enum: - shp - pdf - fwbundle - geojson - csv fields: type: array items: type: string email: type: string required: - language - fileType - fields - email examples: example-1: value: language: en fileType: zip fields: - name email: email@email.com description: '' tags: - Reports '/v3/exports/reports/{id}': parameters: - schema: type: string name: id in: path required: true get: description: Returns the url for a given id token received from a reports export request summary: Get report export URL operationId: get-v3-exports-reports-id responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string '401': $ref: '#/components/responses/Error' tags: - Reports '/v3/exports/reports/{id}/images': parameters: - schema: type: string name: id in: path required: true post: description: Returns the id token for the exports file of the report (answer) images operationId: post-v3-exports-reports-id summary: Export report images responses: '200': description: OK - The export upload has started content: application/json: schema: type: object properties: data: type: string '401': $ref: '#/components/responses/Error' requestBody: content: application/json: schema: type: object properties: fileType: type: string description: Can be the string 'zip' or 'pdf' which dictates the file type of the exports response enum: - zip - pdf required: - fileType tags: - Reports '/v3/exports/areas/exportOne/{areaId}': parameters: - schema: type: string name: areaId in: path required: true post: summary: Export one area operationId: post-v3-areas-exportOne-areaId responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string examples: example-1: value: data: string '400': $ref: '#/components/responses/Error' '401': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' description: 'Exports an and associated images given its id as either fwbundle or zipped csv, shp or geojson. The "fields" array in the body determines the columns in any csv export. The response is an id to poll the GET /v3/exports/areas/{id} endpoint is for the URL once the export has completed' requestBody: $ref: '#/components/requestBodies/Export-areas-request' tags: - Areas /v3/exports/areas/exportAll: parameters: [] post: summary: Export all areas operationId: post-v3-areas-exportAll responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string '400': $ref: '#/components/responses/Error' '401': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' description: 'Exports all areas and associated images available to the user as either fwbundle or zipped csv, shp or geojson. The "fields" array in the body determines the columns in any csv export. The response is an id to poll the GET /v3/exports/areas/{id} endpoint is for the URL once the export has completed' requestBody: $ref: '#/components/requestBodies/Export-areas-request' tags: - Areas '/v3/exports/areas/{id}': parameters: - schema: type: string name: id in: path required: true get: summary: Get Areas Export URL operationId: get-v3-exports-areas-id responses: '200': $ref: '#/components/responses/Url' '401': $ref: '#/components/responses/Error' description: Returns the url for a given id token received from an areas export request tags: - Areas /v3/exports/assignments/exportAll: post: summary: Export all assignments operationId: post-v3-exports-assignments-exportAll responses: '200': $ref: '#/components/responses/Id' '401': $ref: '#/components/responses/Error' description: 'Exports all assignements and associated images the user can see as either fwbundle or zipped csv or geojson or shp. The "fields" array in the body determines the columns in any csv export. The response is an id to poll the GET /v3/exports/assignments/{id} endpoint is for the URL once the export has completed' tags: - Assignments requestBody: $ref: '#/components/requestBodies/Export-all-assignments' parameters: [] /v3/exports/assignments/exportSome: post: summary: Export some assignments operationId: post-v3-exports-assignments-exportSome responses: '200': $ref: '#/components/responses/Id' '401': $ref: '#/components/responses/Error' description: 'Exports a selection of assignements and associated images given its id as either fwbundle or zipped csv or geojson or shp. The "fields" array in the body determines the columns in any csv export. The response is an id to poll the GET /v3/exports/assignments/{id} endpoint is for the URL once the export has completed' tags: - Assignments requestBody: $ref: '#/components/requestBodies/Export-some-assignments-request' parameters: [] '/v3/exports/assignments/{id}': parameters: - schema: type: string name: id in: path required: true get: summary: Get Assignments Export URL operationId: get-v3-exports-assignments-id responses: '200': $ref: '#/components/responses/Url' '401': $ref: '#/components/responses/Error' description: Returns the url for a given id token received from an assignments export request tags: - Areas components: schemas: {} securitySchemes: Authorization: type: http scheme: bearer responses: Error: description: Error Response content: application/json: schema: description: '' type: object properties: errors: type: array uniqueItems: true minItems: 1 items: required: - status - detail properties: status: type: number detail: type: string minLength: 1 required: - errors examples: {} Healthcheck: description: Healthcheck response content: application/json: schema: type: object properties: uptime: type: number examples: {} Id: description: Id to poll endpoint content: application/json: schema: type: object properties: data: type: string Url: description: S3 bucket url content: application/json: schema: type: object properties: data: type: string requestBodies: Export-areas-request: content: application/json: schema: type: object properties: fileType: type: string fields: type: array items: type: string email: type: string examples: example-1: value: fileType: csv fields: - name email: email@email.com Export-answers-request: content: application/json: schema: type: object properties: fileType: type: string fields: type: array items: type: string language: type: string ids: type: array items: type: object properties: templateId: type: string reportId: type: string email: type: string required: - ids Export-some-assignments-request: content: application/json: schema: type: object properties: fileType: type: string enum: - csv - fwbundle - shp - geojson - pdf fields: type: array items: type: string ids: type: array items: type: string examples: example-1: value: fileType: csv fields: - name ids: - 624eb2e03a38cf001b822d95 Export-all-assignments: content: application/json: schema: type: object properties: fileType: type: string fields: type: array items: type: string examples: example-1: value: fileType: csv fields: - name security: - Authorization: []