swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Attachments API schemes: - https tags: - name: Attachments paths: /parties/{partyId}/attachments: get: tags: - Attachments description: Returns a paginated list of attachment resources under a particular party. operationId: microsoftAzureAttachmentsListbypartyid produces: - application/json parameters: - in: path name: partyId description: Id of the associated party. required: true type: string - in: query name: resourceIds description: Resource Ids of the resource. type: array items: type: string collectionFormat: multi - in: query name: resourceTypes description: "Resource Types of the resource.\r\ni.e. Party, Farm, Field, SeasonalField, Boundary, ApplicationData, HarvestData, TillageData, PlantingData, PlantTissueAnalysis." type: array items: type: string collectionFormat: multi - in: query name: ids description: Ids of the resource. type: array items: type: string collectionFormat: multi - in: query name: names description: Names of the resource. type: array items: type: string collectionFormat: multi - in: query name: propertyFilters description: "Filters on key-value pairs within the Properties object.\r\neg. \"{testKey} eq {testValue}\"." type: array items: type: string collectionFormat: multi - in: query name: statuses description: Statuses of the resource. type: array items: type: string collectionFormat: multi - in: query name: minCreatedDateTime description: Minimum creation date of resource (inclusive). type: string format: date-time - in: query name: maxCreatedDateTime description: Maximum creation date of resource (inclusive). type: string format: date-time - in: query name: minLastModifiedDateTime description: Minimum last modified date of resource (inclusive). type: string format: date-time - in: query name: maxLastModifiedDateTime description: Maximum last modified date of resource (inclusive). type: string format: date-time - in: query name: maxPageSize description: "Maximum number of items needed (inclusive).\r\nMinimum = 10, Maximum = 1000, Default value = 50." type: integer format: int32 default: 50 maximum: 1000 minimum: 10 - in: query name: skipToken description: Skip token for getting next set of results. type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/AttachmentListResponse' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-pageable: nextLinkName: nextLink x-ms-examples: Attachments_ListByPartyId: $ref: ./examples/Attachments_ListByPartyId.json summary: Microsoft Azure Get Parties Partyid Attachments /parties/{partyId}/attachments/{attachmentId}: get: tags: - Attachments description: Gets a specified attachment resource under a particular party. operationId: microsoftAzureAttachmentsGet produces: - application/json parameters: - in: path name: partyId description: Id of the associated party. required: true type: string - in: path name: attachmentId description: Id of the attachment. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/Attachment' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Attachments_Get: $ref: ./examples/Attachments_Get.json summary: Microsoft Azure Get Parties Partyid Attachments Attachmentid patch: tags: - Attachments description: Creates or updates an attachment resource under a particular party. operationId: microsoftAzureAttachmentsCreateorupdate consumes: - multipart/form-data produces: - application/json parameters: - in: path name: partyId description: Id of the associated party resource. required: true type: string - in: path name: attachmentId description: Id of the attachment resource. required: true type: string - in: query name: api-version description: The requested API version required: true type: string - in: formData name: file type: file format: binary description: File to be uploaded. - in: formData name: resourceId description: Associated Resource id for this attachment. type: string - in: formData name: resourceType description: Associated Resource type for this attachment. type: string - in: formData name: originalFileName description: Original File Name for this attachment. type: string - in: formData name: id description: Unique id. type: string - in: formData name: status description: Status of the resource. type: string maxLength: 100 minLength: 0 - in: formData name: createdDateTime description: Date when resource was created. type: string format: date-time - in: formData name: modifiedDateTime description: Date when resource was last modified. type: string format: date-time - in: formData name: source description: Source of the resource. type: string maxLength: 100 minLength: 2 - in: formData name: name description: Name to identify resource. type: string maxLength: 100 minLength: 0 - in: formData name: description description: Textual description of resource. type: string maxLength: 500 minLength: 0 - in: formData name: createdBy description: Created by user/tenant id. type: string - in: formData name: modifiedBy description: Modified by user/tenant id. type: string responses: '200': description: Success schema: $ref: '#/definitions/Attachment' '201': description: Created schema: $ref: '#/definitions/Attachment' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Attachments_CreateOrUpdate: $ref: ./examples/Attachments_CreateOrUpdate.json summary: Microsoft Azure Patch Parties Partyid Attachments Attachmentid delete: tags: - Attachments description: Deletes a specified attachment resource under a particular party. operationId: microsoftAzureAttachmentsDelete produces: - application/json parameters: - in: path name: partyId description: Id of the party. required: true type: string - in: path name: attachmentId description: Id of the attachment. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '204': description: No Content default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Attachments_Delete: $ref: ./examples/Attachments_Delete.json summary: Microsoft Azure Delete Parties Partyid Attachments Attachmentid /parties/{partyId}/attachments/{attachmentId}/file: get: tags: - Attachments description: Downloads and returns attachment as response for the given input filePath. operationId: microsoftAzureAttachmentsDownload produces: - application/json - application/octet-stream parameters: - in: path name: partyId description: Id of the associated party. required: true type: string - in: path name: attachmentId description: Id of attachment to be downloaded. required: true type: string - in: query name: api-version description: The requested API version required: true type: string responses: '200': description: Success schema: format: binary type: file default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: Attachments_Download: $ref: ./examples/Attachments_Download.json summary: Microsoft Azure Get Parties Partyid Attachments Attachmentid File definitions: ErrorResponse: description: 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. type: object properties: error: $ref: '#/definitions/Error' traceId: description: Unique trace Id. type: string InnerError: description: Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. type: object properties: code: description: Specific error code than was provided by the containing error. type: string innererror: $ref: '#/definitions/InnerError' Attachment: description: Schema of attachment resource. type: object properties: resourceId: description: Associated Resource id for this attachment. type: string resourceType: description: Associated Resource type for this attachment. enum: - Party - Farm - Field - SeasonalField - Boundary - ApplicationData - HarvestData - TillageData - PlantingData - PlantTissueAnalysis type: string x-ms-enum: name: AttachmentResourceType modelAsString: true originalFileName: description: Original File Name for this attachment. type: string readOnly: true partyId: description: PartyId id for this attachment. type: string readOnly: true id: description: Unique id. type: string readOnly: true status: description: Status of the resource. maxLength: 100 minLength: 0 type: string createdDateTime: format: date-time description: Date when resource was created. type: string readOnly: true modifiedDateTime: format: date-time description: Date when resource was last modified. type: string readOnly: true source: description: Source of the resource. maxLength: 100 minLength: 2 type: string name: description: Name to identify resource. maxLength: 100 minLength: 0 type: string description: description: Textual description of resource. maxLength: 500 minLength: 0 type: string createdBy: description: Created by user/tenant id. type: string readOnly: true modifiedBy: description: Modified by user/tenant id. type: string readOnly: true eTag: description: The ETag value to implement optimistic concurrency. type: string readOnly: true Error: description: An error from the Azure AgPlatform service. required: - code - message type: object properties: code: description: Server-defined set of error codes. minLength: 1 type: string message: description: Human-readable representation of the error. minLength: 1 type: string target: description: Target of the error. type: string details: description: Array of details about specific errors that led to this reported error. type: array items: $ref: '#/definitions/Error' innererror: $ref: '#/definitions/InnerError' AttachmentListResponse: description: Paged response contains list of requested objects and a URL link to get the next set of results. required: - value type: object properties: value: description: List of requested objects. type: array items: $ref: '#/definitions/Attachment' skipToken: description: Token used in retrieving the next page. If null, there are no additional pages. type: string nextLink: description: Continuation link (absolute URI) to the next page of results in the list. type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'