|
| 1 | +--- |
| 2 | +title: Working with Farm Activities and in-field activity data in Azure Data Manager for Agriculture |
| 3 | +description: Learn how to manage Farm Activities data with manual and auto sync data ingestion jobs |
| 4 | +author: lbpudi |
| 5 | +ms.author: lbethapudi |
| 6 | +ms.service: data-manager-for-agri |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 08/14/2023 |
| 9 | +ms.custom: template-how-to |
| 10 | +--- |
| 11 | +# Working with Farm Activities and activity data in Azure Data Manager for Agriculture |
| 12 | + |
| 13 | +Users can create a farm operation data ingestion job to **pull associated Farm Activities activity data** from a specified data provider into your Azure Data Manager for Agriculture instance, associated with a specific party. The job handles any required auth refresh, and by default detects and syncs any changes daily. In some cases, the job will also **pull farm and field** information associated with the given account into the party. |
| 14 | + |
| 15 | +> [!NOTE] |
| 16 | +> |
| 17 | +>Before creating Farm Activities job, it is mandatory to successfully [**integrate with Farm Activities data provider oAuth flow**](./how-to-integrate-with-farm-ops-data-provider.md) |
| 18 | +> |
| 19 | +
|
| 20 | +## Create FarmOperations Job |
| 21 | + |
| 22 | +Create a farm-operations job to ingest Farm Activity data with an ID of your choice. This job ID is used to monitor the status of the job using GET Farm Operations job. |
| 23 | + |
| 24 | +API documentation:[FarmOperations_CreateDataIngestionJob](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/farm-operations/create-data-ingestion-job) |
| 25 | + |
| 26 | +> [!NOTE] |
| 27 | +>`shapeType` and `shapeResolution` are provider specific attributes. If they aren't applicable to your provider, set the value to "None". |
| 28 | +
|
| 29 | +Based on the `startYear` and `operations` list provided, Azure Data Manager for Agriculture fetches the data from the start year to the current date. |
| 30 | + |
| 31 | +Along with specific data (geometry), Farm Activities data provider also gives us the DAT file for the activity performed on your farm or field. The DAT file, Shape File etc. contain a geometry that reflects where the activity was performed. |
| 32 | + |
| 33 | +Job status and details can be retrieved with: [FarmOperations_GetDataIngestionJobDetails](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/farm-operations/get-data-ingestion-job-details) |
| 34 | + |
| 35 | + |
| 36 | +## Finding and retrieving Farm Activities data |
| 37 | + |
| 38 | +Now that the data is ingested into Azure Data Manager for Agriculture, it can be queried or listed with the following methods: |
| 39 | + |
| 40 | +### Method 1: List data by type |
| 41 | + |
| 42 | +Retrieved data is sorted by type under the party. These can be listed, with standard filters applied |
| 43 | + |
| 44 | +[PlantingData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/planting-data/search) |
| 45 | + |
| 46 | +[HarvestData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/harvest-data/search) |
| 47 | + |
| 48 | +[ApplicationData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/application-data/search) |
| 49 | + |
| 50 | +Individual data items may be retrieved to view the properties and metadata, including the `sourceActivityId`, `providerFieldId` and `Geometry`. |
| 51 | + |
| 52 | + |
| 53 | +[PlantingData_Get](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/planting-data/get) |
| 54 | + |
| 55 | +[HarvestData_Get](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/harvest-data/get) |
| 56 | + |
| 57 | +[ApplicationData_Get](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/application-data/get) |
| 58 | + |
| 59 | + |
| 60 | +### Method 2: search Farm Activities data using geometry intersect |
| 61 | +To account for the high degree of change found in field definitions, Azure Data Manager for Agriculture supports a search by intersect feature that allows you to organize data by space and time, without needing to first know the farm/field hierarchy or association. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +[PlantingData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/planting-data/search) |
| 66 | + |
| 67 | + |
| 68 | +[HarvestData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/harvest-data/search) |
| 69 | + |
| 70 | +[ApplicationData_Search](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/application-data/search) |
| 71 | + |
| 72 | +You can also use the ID like `plantingId` to fetch the above data in the same API. if you remove the ID, you're able to see any other data that intersects with the same geometry across party. So it shows data for the same geometry across different parties. |
| 73 | + |
| 74 | +## List and Download Attachments |
| 75 | + |
| 76 | +The message attribute in the response of `FarmOperations_GetDataIngestionJobDetails` API shows how much data was processed and how many attachments were created. To check the attachments associated to the partyId, go to attachment API. The response gives you all the attachments created under the partyId. |
| 77 | + |
| 78 | +API documentation: [Attachments](/rest/api/data-manager-for-agri/dataplane-version2023-07-01-preview/attachments) |
| 79 | + |
| 80 | +## Next steps |
| 81 | + |
| 82 | +* Understand our APIs [here](/rest/api/data-manager-for-agri). |
0 commit comments