openapi: 3.1.0 info: title: Microsoft Purview Account Accounts Retention Labels API description: APIs for managing Purview accounts, configurations, and administrative settings through Azure Resource Manager. Provides resource management operations for creating, updating, and deleting Purview accounts. version: 2021-12-01 contact: name: Microsoft Purview Support url: https://learn.microsoft.com/en-us/purview/ license: name: Microsoft API License url: https://azure.microsoft.com/en-us/support/legal/ servers: - url: https://management.azure.com description: Azure Resource Manager endpoint security: - oauth2: [] tags: - name: Retention Labels description: Operations for managing retention labels paths: /security/labels/retentionLabels: get: operationId: listRetentionLabels summary: Microsoft Purview List retention labels description: Get a list of retention labels configured in the organization. tags: - Retention Labels parameters: - name: $top in: query schema: type: integer format: int32 - name: $skip in: query schema: type: integer format: int32 - name: $filter in: query schema: type: string - name: $select in: query schema: type: string - name: $orderby in: query schema: type: string - name: $expand in: query description: Expand related entities (e.g., retentionEventType, descriptors) schema: type: string responses: '200': description: Retention labels listed successfully content: application/json: schema: type: object properties: value: type: array items: $ref: '#/components/schemas/RetentionLabel' '@odata.nextLink': type: string '401': description: Unauthorized '403': description: Forbidden post: operationId: createRetentionLabel summary: Microsoft Purview Create a retention label description: Create a new retention label for data lifecycle management. tags: - Retention Labels requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RetentionLabel' responses: '201': description: Retention label created successfully content: application/json: schema: $ref: '#/components/schemas/RetentionLabel' '400': description: Bad request '401': description: Unauthorized /security/labels/retentionLabels/{retentionLabelId}: get: operationId: getRetentionLabel summary: Microsoft Purview Get a retention label description: Get a retention label by its identifier. tags: - Retention Labels parameters: - name: retentionLabelId in: path required: true schema: type: string - name: $expand in: query schema: type: string responses: '200': description: Retention label retrieved successfully content: application/json: schema: $ref: '#/components/schemas/RetentionLabel' '401': description: Unauthorized '404': description: Retention label not found patch: operationId: updateRetentionLabel summary: Microsoft Purview Update a retention label description: Update the properties of a retention label. tags: - Retention Labels parameters: - name: retentionLabelId in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RetentionLabel' responses: '200': description: Retention label updated successfully content: application/json: schema: $ref: '#/components/schemas/RetentionLabel' '401': description: Unauthorized delete: operationId: deleteRetentionLabel summary: Microsoft Purview Delete a retention label description: Delete a retention label that is no longer needed. tags: - Retention Labels parameters: - name: retentionLabelId in: path required: true schema: type: string responses: '204': description: Retention label deleted successfully '401': description: Unauthorized '404': description: Retention label not found components: schemas: FilePlanReferenceTemplate: type: object properties: id: type: string displayName: type: string RetentionLabel: type: object description: A retention label for records management properties: id: type: string readOnly: true displayName: type: string descriptionForAdmins: type: string descriptionForUsers: type: string isInUse: type: boolean readOnly: true retentionTrigger: type: string enum: - dateLabeled - dateCreated - dateModified - dateOfEvent behaviorDuringRetentionPeriod: type: string enum: - doNotRetain - retain - retainAsRecord - retainAsRegulatoryRecord actionAfterRetentionPeriod: type: string enum: - none - delete - startDispositionReview retentionDuration: type: object properties: '@odata.type': type: string days: type: integer format: int32 defaultRecordBehavior: type: string enum: - startLocked - startUnlocked labelToBeApplied: type: string createdDateTime: type: string format: date-time readOnly: true lastModifiedDateTime: type: string format: date-time readOnly: true createdBy: $ref: '#/components/schemas/IdentitySet' lastModifiedBy: $ref: '#/components/schemas/IdentitySet' retentionEventType: $ref: '#/components/schemas/RetentionEventType' descriptors: type: object properties: authorityTemplate: $ref: '#/components/schemas/AuthorityTemplate' categoryTemplate: $ref: '#/components/schemas/CategoryTemplate' citationTemplate: $ref: '#/components/schemas/CitationTemplate' departmentTemplate: $ref: '#/components/schemas/DepartmentTemplate' filePlanReferenceTemplate: $ref: '#/components/schemas/FilePlanReferenceTemplate' CategoryTemplate: type: object properties: id: type: string displayName: type: string CitationTemplate: type: object properties: id: type: string displayName: type: string citationUrl: type: string format: uri citationJurisdiction: type: string DepartmentTemplate: type: object properties: id: type: string displayName: type: string AuthorityTemplate: type: object properties: id: type: string displayName: type: string RetentionEventType: type: object description: A retention event type properties: id: type: string readOnly: true displayName: type: string description: type: string createdDateTime: type: string format: date-time readOnly: true lastModifiedDateTime: type: string format: date-time readOnly: true createdBy: $ref: '#/components/schemas/IdentitySet' lastModifiedBy: $ref: '#/components/schemas/IdentitySet' IdentitySet: type: object properties: user: type: object properties: displayName: type: string id: type: string securitySchemes: oauth2: type: oauth2 description: Azure Active Directory OAuth2 authentication flows: clientCredentials: tokenUrl: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token scopes: https://management.azure.com/.default: Access Azure Resource Manager