openapi: 3.2.0 info: title: OpenAgri Farm Calendar Alerts API version: 1.0.0 description: API for farm assets and other farm related things. tags: - name: Alerts paths: /api/v1/Alerts/: get: operationId: api_v1_Alerts_list description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: activity_type schema: type: string format: uuid - in: query name: format schema: type: string enum: - json - jsonld - in: query name: fromDate schema: type: string format: date-time - in: query name: parcel schema: type: string format: uuid - in: query name: severity schema: type: string enum: - critical - major - minor - moderate - severe description: '* `minor` - Minor * `moderate` - Moderate * `severe` - Severe * `major` - Major * `critical` - Critical' - in: query name: title schema: type: string - in: query name: toDate schema: type: string format: date-time tags: - Alerts security: - cookieAuth: [] responses: '200': content: application/ld+json: schema: type: array items: $ref: '#/components/schemas/Alert' application/json: schema: type: array items: $ref: '#/components/schemas/Alert' description: '' summary: Api v1 alerts list x-summary-source: derived post: operationId: api_v1_Alerts_create description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: format schema: type: string enum: - json - jsonld tags: - Alerts requestBody: content: application/json: schema: $ref: '#/components/schemas/Alert' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Alert' multipart/form-data: schema: $ref: '#/components/schemas/Alert' required: true security: - cookieAuth: [] responses: '201': content: application/ld+json: schema: $ref: '#/components/schemas/Alert' application/json: schema: $ref: '#/components/schemas/Alert' description: '' summary: Api v1 alerts create x-summary-source: derived /api/v1/Alerts/{id}/: get: operationId: api_v1_Alerts_retrieve description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: format schema: type: string enum: - json - jsonld - in: path name: id schema: type: string format: uuid description: A UUID string identifying this Alert. required: true tags: - Alerts security: - cookieAuth: [] responses: '200': content: application/ld+json: schema: $ref: '#/components/schemas/Alert' application/json: schema: $ref: '#/components/schemas/Alert' description: '' summary: Api v1 alerts retrieve x-summary-source: derived put: operationId: api_v1_Alerts_update description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: format schema: type: string enum: - json - jsonld - in: path name: id schema: type: string format: uuid description: A UUID string identifying this Alert. required: true tags: - Alerts requestBody: content: application/json: schema: $ref: '#/components/schemas/Alert' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Alert' multipart/form-data: schema: $ref: '#/components/schemas/Alert' required: true security: - cookieAuth: [] responses: '200': content: application/ld+json: schema: $ref: '#/components/schemas/Alert' application/json: schema: $ref: '#/components/schemas/Alert' description: '' summary: Api v1 alerts update x-summary-source: derived patch: operationId: api_v1_Alerts_partial_update description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: format schema: type: string enum: - json - jsonld - in: path name: id schema: type: string format: uuid description: A UUID string identifying this Alert. required: true tags: - Alerts requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedAlert' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedAlert' multipart/form-data: schema: $ref: '#/components/schemas/PatchedAlert' security: - cookieAuth: [] responses: '200': content: application/ld+json: schema: $ref: '#/components/schemas/Alert' application/json: schema: $ref: '#/components/schemas/Alert' description: '' summary: Api v1 alerts partial update x-summary-source: derived delete: operationId: api_v1_Alerts_destroy description: API endpoint that allows Alert to be viewed or edited. parameters: - in: query name: format schema: type: string enum: - json - jsonld - in: path name: id schema: type: string format: uuid description: A UUID string identifying this Alert. required: true tags: - Alerts security: - cookieAuth: [] responses: '204': description: No response body summary: Api v1 alerts destroy x-summary-source: derived components: schemas: SeverityEnum: enum: - minor - moderate - severe - major - critical type: string description: '* `minor` - Minor * `moderate` - Moderate * `severe` - Severe * `major` - Major * `critical` - Critical' ObservationQuantityValueField: type: object properties: unit: type: - string - 'null' readOnly: true hasValue: type: - string - 'null' readOnly: true required: - hasValue - unit Alert: type: object properties: id: type: string format: uuid readOnly: true activityType: type: string format: uuid title: type: string maxLength: 200 details: type: - string - 'null' severity: $ref: '#/components/schemas/SeverityEnum' hasAgriParcel: type: string format: uuid validFrom: type: string format: date-time validTo: type: string format: date-time dateIssued: type: - string - 'null' format: date-time readOnly: true quantityValue: $ref: '#/components/schemas/ObservationQuantityValueField' relatedObservation: type: - string - 'null' format: uuid required: - activityType - dateIssued - hasAgriParcel - id - relatedObservation - validFrom - validTo PatchedAlert: type: object properties: id: type: string format: uuid readOnly: true activityType: type: string format: uuid title: type: string maxLength: 200 details: type: - string - 'null' severity: $ref: '#/components/schemas/SeverityEnum' hasAgriParcel: type: string format: uuid validFrom: type: string format: date-time validTo: type: string format: date-time dateIssued: type: - string - 'null' format: date-time readOnly: true quantityValue: $ref: '#/components/schemas/ObservationQuantityValueField' relatedObservation: type: - string - 'null' format: uuid securitySchemes: cookieAuth: type: apiKey in: cookie name: sessionid