You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-10Lines changed: 52 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,13 +51,24 @@ docker compose up
51
51
52
52
The application will be served on http://127.0.0.1:8009 (I.E. typing localhost/docs in your browser will load the swagger documentation)
53
53
54
+
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/20645c6e8e3545d02c7c4570271bdc49/raw/6efafb74bd2bc33e4221ee2a202d0c830b867c70/reporting)
54
55
# Documentation
55
56
<h3>POST</h3>
56
57
57
58
```
58
59
/api/v1/openagri-report/irrigation-report/
59
60
```
60
61
62
+
## Request Params
63
+
64
+
### data
65
+
-**Type**: `UploadFile`
66
+
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
67
+
68
+
69
+
70
+
## Response
71
+
61
72
Response is generated PDF file.
62
73
63
74
@@ -67,10 +78,24 @@ Response is generated PDF file.
-**Description**: The name of the observation type for the report. The value of this parameter must be one of the following options:
86
+
- "Pesticides"
87
+
- "Irrigation"
88
+
- "Fertilization"
89
+
- "CropStressIndicator"
90
+
- "CropGrowthObservation"
73
91
92
+
### data
93
+
-**Type**: `UploadFile`
94
+
-**Description**: API processes the data directly to generate the report if data is passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
95
+
96
+
97
+
## Response
98
+
Response is generated PDF file.
74
99
75
100
<h3> Example usage </h3>
76
101
@@ -85,15 +110,28 @@ When service is run wihtout Gatekeeper data must be provided in .json file forma
85
110
86
111
```
87
112
88
-
Response: A generated PDF file containing the animal report.
113
+
## Request Params
114
+
115
+
### animal_group
116
+
-**Type**: `Optional[str]`
117
+
-**Description**: The group or category the animal belongs to. This is an optional string field, and it can be left as `None` if not applicable.
118
+
119
+
### name
120
+
-**Type**: `Optional[str]`
121
+
-**Description**: The name of the animal. It is an optional string field, and if no name is provided, it can be set to `None`.
122
+
123
+
### parcel
124
+
-**Type**: `Optional[UUID4]`
125
+
-**Description**: A unique identifier for a parcel, represented as a UUID4. This is an optional field that can be left empty if not required.
89
126
90
-
Possible query parameters:
127
+
### status
128
+
-**Type**: `Optional[int]`
129
+
-**Description**: The status code associated with the animal or the transaction. It is an optional integer field. If not specified, it defaults to `None`.
130
+
131
+
### data
132
+
-**Type**: `UploadFile`
133
+
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
91
134
92
-
animal_group (Optional, string): Specifies the group of animals to include in the report.
93
-
name (Optional, string): Filters results by animal name.
94
-
parcel (Optional, UUID4): Identifies the specific parcel where the animals are located.
95
-
status (Optional, integer): Filters animals by their status.
96
-
Example Usage
97
135
The Animal Report API can be used with or without Gatekeeper support:
98
136
99
137
With Gatekeeper: The data file parameter can be ignored.
@@ -102,6 +140,10 @@ If no data file is provided and Gatekeeper is not enabled, the API fetches data
102
140
103
141
If a valid JSON file is uploaded, the API processes the data directly to generate the report
104
142
143
+
## Response
144
+
145
+
Response is generated PDF file.
146
+
105
147
<h2>Pytest</h2>
106
148
Pytest can be run on the same machine the service has been deployed to by moving into the tests dir and running:
0 commit comments