Attachments - List By Party Id
Returns a paginated list of attachment resources under a particular party.
GET {endpoint}/parties/{partyId}/attachments?api-version=2023-11-01-preview
GET {endpoint}/parties/{partyId}/attachments?resourceIds={resourceIds}&resourceTypes={resourceTypes}&ids={ids}&names={names}&propertyFilters={propertyFilters}&statuses={statuses}&minCreatedDateTime={minCreatedDateTime}&maxCreatedDateTime={maxCreatedDateTime}&minLastModifiedDateTime={minLastModifiedDateTime}&maxLastModifiedDateTime={maxLastModifiedDateTime}&maxPageSize={maxPageSize}&skipToken={skipToken}&api-version=2023-11-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string (uri) |
The host name of the namespace, e.g. admaInstanceName.farmbeats.azure.net |
party
|
path | True |
string |
Id of the associated party. |
api-version
|
query | True |
string |
The requested API version |
ids
|
query |
string[] |
Ids of the resource. |
|
max
|
query |
string (date-time) |
Maximum creation date of resource (inclusive). |
|
max
|
query |
string (date-time) |
Maximum last modified date of resource (inclusive). |
|
max
|
query |
integer (int32) minimum: 10maximum: 1000 |
Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. |
|
min
|
query |
string (date-time) |
Minimum creation date of resource (inclusive). |
|
min
|
query |
string (date-time) |
Minimum last modified date of resource (inclusive). |
|
names
|
query |
string[] |
Names of the resource. |
|
property
|
query |
string[] |
Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}". |
|
resource
|
query |
string[] |
Resource Ids of the resource. |
|
resource
|
query |
string[] |
Resource Types of the resource. i.e. Party, Farm, Field, SeasonalField, ApplicationData, HarvestData, TillageData, PlantingData, PlantTissueAnalysis, Prescription. |
|
skip
|
query |
string |
Skip token for getting next set of results. |
|
statuses
|
query |
string[] |
Statuses of the resource. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Authorization | True |
string |
Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
Error Headers x-ms-error-code: string |
Security
Authorization
Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before.
Type:
apiKey
In:
header
Examples
Attachments_ListByPartyId
Sample request
GET {endpoint}/parties/PARTY123/attachments?api-version=2023-11-01-preview
Sample response
{
"value": [
{
"id": "ATTACHMENT123",
"partyId": "PARTY123",
"resourceId": "PARTY123",
"resourceType": "Party",
"originalFileName": "attachment-file",
"name": "John Smith's attachment",
"status": "Active",
"description": "Some description",
"source": "source",
"createdDateTime": "2021-04-21T06:49:30Z",
"modifiedDateTime": "2021-04-21T06:49:30Z",
"createdBy": "00000000-0000-0000-0000-000000000000",
"modifiedBy": "00000000-0000-0000-0000-000000000000",
"eTag": "0f8fad5b-d9cb-469f-a165-70867728950e"
}
],
"skipToken": "string",
"nextLink": "https://{{resourceName}}.farmbeats.azure.net/parties/{{partyId}}/attachments/{{attachmentId}}?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7e23TRC%3a10%23ISA%3d%22%2c%22range%22%3a%7b%22min%22%3a%22%22%2c%22max%22%3a%22FF%22%7d%7d%5d"
}
Definitions
Name | Description |
---|---|
Attachment |
Schema of attachment resource. |
Attachment |
Paged response contains list of requested objects and a URL link to get the next set of results. |
Attachment |
Associated Resource type for this attachment. |
Error |
An error from the Azure AgPlatform service. |
Error |
An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document. |
Inner |
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. |
Attachment
Schema of attachment resource.
Name | Type | Description |
---|---|---|
createdBy |
string |
Created by user/tenant id. |
createdDateTime |
string (date-time) |
Date when resource was created. |
description |
string minLength: 0maxLength: 500 |
Textual description of resource. |
eTag |
string |
The ETag value to implement optimistic concurrency. |
id |
string |
Unique id. |
modifiedBy |
string |
Modified by user/tenant id. |
modifiedDateTime |
string (date-time) |
Date when resource was last modified. |
name |
string minLength: 0maxLength: 100 |
Name to identify resource. |
originalFileName |
string |
Original File Name for this attachment. |
partyId |
string |
PartyId id for this attachment. |
resourceId |
string |
Associated Resource id for this attachment. |
resourceType |
Associated Resource type for this attachment. |
|
source |
string minLength: 2maxLength: 100 |
Source of the resource. |
status |
string minLength: 0maxLength: 100 |
Status of the resource. |
AttachmentListResponse
Paged response contains list of requested objects and a URL link to get the next set of results.
Name | Type | Description |
---|---|---|
nextLink |
string |
Continuation link (absolute URI) to the next page of results in the list. |
skipToken |
string |
Token used in retrieving the next page. If null, there are no additional pages. |
value |
List of requested objects. |
AttachmentResourceType
Associated Resource type for this attachment.
Value | Description |
---|---|
ApplicationData | |
Farm | |
Field | |
HarvestData | |
Party | |
PlantTissueAnalysis | |
PlantingData | |
Prescription | |
SeasonalField | |
TillageData |
Error
An error from the Azure AgPlatform service.
Name | Type | Description |
---|---|---|
code |
string minLength: 1 |
Server-defined set of error codes. |
details |
Error[] |
Array of details about specific errors that led to this reported error. |
innererror |
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. |
|
message |
string minLength: 1 |
Human-readable representation of the error. |
target |
string |
Target of the error. |
ErrorResponse
An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document.
Name | Type | Description |
---|---|---|
error |
An error from the Azure AgPlatform service. |
|
traceId |
string |
Unique trace Id. |
InnerError
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.
Name | Type | Description |
---|---|---|
code |
string |
Specific error code than was provided by the containing error. |
innererror |
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. |