Microsoft Graph Data Policy Operations

Microsoft Graph Data Policy Operations is the mechanism Microsoft Graph uses to represent and track long-running, privacy- and compliance-related tasks, most commonly exporting a user’s personal data. When you start an action like exportPersonalData, Graph creates a dataPolicyOperation resource that you can poll to monitor status and progress, inspect errors, and, when finished, obtain the storage location link to download the results.

OpenAPI Specification

datapolicyoperations-openapi-original.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Graph Datapolicyoperations
  description: Needs a description.
paths:
  /dataPolicyOperations:
    description: >-
      Provides operations to manage the collection of dataPolicyOperation
      entities.
    get:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Get dataPolicyOperation
      description: Retrieve the properties of a dataPolicyOperation object.
      operationId: dataPolicyOperations.dataPolicyOperation.ListDataPolicyOperation
      parameters:
        - $ref: '#/components/parameters/top'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/count'
        - name: $orderby
          in: query
          description: Order items by property values
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $select
          in: query
          description: Select properties to be returned
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $expand
          in: query
          description: Expand related entities
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
      responses:
        2XX:
          $ref: >-
            #/components/responses/microsoft.graph.dataPolicyOperationCollectionResponse
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Add new entity to dataPolicyOperations
      operationId: dataPolicyOperations.dataPolicyOperation.CreateDataPolicyOperation
      requestBody:
        description: New entity
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.dataPolicyOperation'
        required: true
      responses:
        2XX:
          description: Created entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.dataPolicyOperation'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /dataPolicyOperations/{dataPolicyOperation-id}:
    description: >-
      Provides operations to manage the collection of dataPolicyOperation
      entities.
    get:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Get dataPolicyOperation
      description: Retrieve the properties of a dataPolicyOperation object.
      externalDocs:
        description: Find more info here
        url: >-
          https://learn.microsoft.com/graph/api/datapolicyoperation-get?view=graph-rest-1.0
      operationId: dataPolicyOperations.dataPolicyOperation.GetDataPolicyOperation
      parameters:
        - name: $select
          in: query
          description: Select properties to be returned
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
        - name: $expand
          in: query
          description: Expand related entities
          style: form
          explode: false
          schema:
            uniqueItems: true
            type: array
            items:
              type: string
      responses:
        2XX:
          description: Retrieved entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.dataPolicyOperation'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Update entity in dataPolicyOperations
      operationId: dataPolicyOperations.dataPolicyOperation.UpdateDataPolicyOperation
      requestBody:
        description: New property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.dataPolicyOperation'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.dataPolicyOperation'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Delete entity from dataPolicyOperations
      operationId: dataPolicyOperations.dataPolicyOperation.DeleteDataPolicyOperation
      parameters:
        - name: If-Match
          in: header
          description: ETag
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    parameters:
      - name: dataPolicyOperation-id
        in: path
        description: The unique identifier of dataPolicyOperation
        required: true
        schema:
          type: string
        x-ms-docs-key-type: dataPolicyOperation
  /dataPolicyOperations/$count:
    description: Provides operations to count the resources in the collection.
    get:
      tags:
        - dataPolicyOperations.dataPolicyOperation
      summary: Microsoft Graph Get the number of the resource
      operationId: dataPolicyOperations.GetCount-b129
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
components:
  schemas:
    microsoft.graph.dataPolicyOperation:
      allOf:
        - $ref: '#/components/schemas/microsoft.graph.entity'
        - title: dataPolicyOperation
          required:
            - '@odata.type'
          type: object
          properties:
            completedDateTime:
              pattern: >-
                ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
              type: string
              description: >-
                Represents when the request for this data policy operation was
                completed, in UTC time, using the ISO 8601 format. For example,
                midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Null until
                the operation completes.
              format: date-time
              nullable: true
            progress:
              oneOf:
                - type: number
                  format: double
                  nullable: true
                - type: string
                  nullable: true
                - $ref: '#/components/schemas/ReferenceNumeric'
              description: Specifies the progress of an operation.
            status:
              anyOf:
                - $ref: >-
                    #/components/schemas/microsoft.graph.dataPolicyOperationStatus
                - type: object
                  nullable: true
              description: >-
                The possible values are: notStarted, running, complete, failed,
                unknownFutureValue.
            storageLocation:
              type: string
              description: >-
                The URL location to where data is being exported for export
                requests.
              nullable: true
            submittedDateTime:
              pattern: >-
                ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
              type: string
              description: >-
                Represents when the request for this data operation was
                submitted, in UTC time, using the ISO 8601 format. For example,
                midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
              format: date-time
            userId:
              type: string
              description: The id for the user on whom the operation is performed.
            '@odata.type':
              type: string
      x-ms-discriminator-value: '#microsoft.graph.dataPolicyOperation'
  parameters:
    top:
      name: $top
      in: query
      description: Show only the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
      example: 50
    skip:
      name: $skip
      in: query
      description: Skip the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
  examples: {}
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'
    ODataCountResponse:
      description: The count of the resource
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ODataCountResponse'
tags:
  - name: dataPolicyOperations.dataPolicyOperation