Microsoft Purview Data Sources API

The Data Sources API from Microsoft Purview — 2 operation(s) for data sources.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Data Governance Management BC-610.10

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PUT /scan/datasources/{dataSourceName} Register or replace a data source · Microsoft Purview Create or replace a data source #
Ask an LLM
“How do I register a new data source for Purview to scan?”
“Can I overwrite the registration of an existing data source?”
Tell an agent
Register data source {source} of kind {kind}.
Replace the registration of data source {source} with properties {props}.
GET /scan/datasources/{dataSourceName} Get a registered data source · Microsoft Purview Get a data source #
Ask an LLM
“How is a specific data source registered in Purview?”
“Can I see the kind and properties of one data source by name?”
Tell an agent
Show me data source {source}.
Get the registration details of data source {source}.
DELETE /scan/datasources/{dataSourceName} Unregister a data source · Microsoft Purview Delete a data source #
Ask an LLM
“Can I remove a data source registration from Purview?”
“What is the way to stop tracking a data source entirely?”
Tell an agent destructive · confirm first
Delete data source {source}.
Unregister the {source} data source.
GET /scan/datasources List registered data sources · Microsoft Purview List data sources #
Ask an LLM
“Which data sources are registered in our Purview data map?”
“What sources has Purview been set up to scan?”
Tell an agent
List all registered data sources.
List data sources using API version {version}.
PUT /datasources/{dataSourceName} Data sources create or replace #
GET /datasources/{dataSourceName} Data sources get #
DELETE /datasources/{dataSourceName} Data sources delete #
GET /datasources Data sources list #

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/
📖
Authentication
https://learn.microsoft.com/en-us/purview/tutorial-using-rest-apis
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/data-gov-api-create-assets
📖
Authentication
https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/legacy/how-to-purview-custom-lineage-api-user-guide
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/legacy/tutorial-metadata-policy-collections-apis
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/unified-catalog-api-overview
📖
Authentication
https://learn.microsoft.com/en-us/purview/data-gov-api-rest-data-plane
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/unified-catalog-data-quality
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/security-ediscovery-apioverview?view=graph-rest-1.0
📖
Authentication
https://learn.microsoft.com/en-us/graph/security-ediscovery-appauthsetup
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/edisc-ref-api-guide
📖
Documentation
https://learn.microsoft.com/en-us/graph/security-information-protection-overview
📖
Documentation
https://learn.microsoft.com/en-us/graph/security-datasecurityandgovernance-overview
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/developer/use-the-api
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/security-recordsmanagement-overview?view=graph-rest-1.0

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-purview:microsoft-purview-data-sources-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-purview-data-sources-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Purview Scanning Data Sources API
  description: APIs for configuring and managing scans of data sources to automatically discover and catalog data assets. Supports registering data sources and scheduling automated scans across your data estate.
  version: 2023-09-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://{accountName}.scan.purview.azure.com
  description: Microsoft Purview Scanning API endpoint
  variables:
    accountName:
      description: The name of the Microsoft Purview account
      default: myaccount
security:
- oauth2: []
tags:
- name: Data Sources
  description: Operations for managing data source registrations
paths:
  /scan/datasources/{dataSourceName}:
    put:
      operationId: createOrReplaceDataSource
      summary: Microsoft Purview Create or replace a data source
      description: Creates or replaces a data source registration in the Purview account.
      tags:
      - Data Sources
      parameters:
      - name: dataSourceName
        in: path
        required: true
        description: The name of the data source
        schema:
          type: string
      - name: api-version
        in: query
        required: true
        schema:
          type: string
          default: '2023-09-01'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSource'
      responses:
        '200':
          description: Data source updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '201':
          description: Data source created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
    get:
      operationId: getDataSource
      summary: Microsoft Purview Get a data source
      description: Gets a data source by name.
      tags:
      - Data Sources
      parameters:
      - name: dataSourceName
        in: path
        required: true
        description: The name of the data source
        schema:
          type: string
      - name: api-version
        in: query
        required: true
        schema:
          type: string
          default: '2023-09-01'
      responses:
        '200':
          description: Data source retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '401':
          description: Unauthorized
        '404':
          description: Data source not found
    delete:
      operationId: deleteDataSource
      summary: Microsoft Purview Delete a data source
      description: Deletes a data source registration.
      tags:
      - Data Sources
      parameters:
      - name: dataSourceName
        in: path
        required: true
        description: The name of the data source
        schema:
          type: string
      - name: api-version
        in: query
        required: true
        schema:
          type: string
          default: '2023-09-01'
      responses:
        '200':
          description: Data source deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '401':
          description: Unauthorized
        '404':
          description: Data source not found
  /scan/datasources:
    get:
      operationId: listDataSources
      summary: Microsoft Purview List data sources
      description: Lists data sources in Data catalog.
      tags:
      - Data Sources
      parameters:
      - name: api-version
        in: query
        required: true
        schema:
          type: string
          default: '2023-09-01'
      responses:
        '200':
          description: Data sources listed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceList'
        '401':
          description: Unauthorized
  /datasources/{dataSourceName}:
    put:
      tags:
      - Data Sources
      description: Creates or replaces a data source.
      operationId: DataSources_CreateOrReplace
      parameters:
      - $ref: '#/components/parameters/dataSourceName'
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        '201':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        default:
          description: An error response received from the Scanning Service.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSource'
        description: The data source definition.
        required: true
      summary: Data sources create or replace
      x-summary-source: derived
    get:
      tags:
      - Data Sources
      description: Gets a data source.
      operationId: DataSources_Get
      parameters:
      - $ref: '#/components/parameters/dataSourceName'
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSource'
        default:
          description: An error response received from the Scanning Service.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      summary: Data sources get
      x-summary-source: derived
    delete:
      tags:
      - Data Sources
      description: Deletes a data source.
      operationId: DataSources_Delete
      parameters:
      - $ref: '#/components/parameters/dataSourceName'
      - $ref: '#/components/parameters/api-version'
      responses:
        '204':
          description: Success.
        default:
          description: An error response received from the Scanning Service.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      summary: Data sources delete
      x-summary-source: derived
  /datasources:
    get:
      tags:
      - Data Sources
      description: Lists data sources in Data catalog.
      operationId: DataSources_List
      parameters:
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSourceList'
        default:
          description: An error response received from the Scanning Service.
          headers:
            x-ms-error-code:
              description: String error code indicating what went wrong.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Data sources list
      x-summary-source: derived
components:
  schemas:
    DataSourceList:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/DataSource'
        nextLink:
          type: string
        count:
          type: integer
          format: int64
    Scan:
      type: object
      description: A scan configuration
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        kind:
          type: string
          description: The scan type
        properties:
          type: object
          properties:
            scanRulesetName:
              type: string
            scanRulesetType:
              type: string
              enum:
              - Custom
              - System
            collection:
              $ref: '#/components/schemas/CollectionReference'
            connectedVia:
              $ref: '#/components/schemas/ConnectedVia'
            createdAt:
              type: string
              format: date-time
            lastModifiedAt:
              type: string
              format: date-time
            lastScheduled:
              type: string
              format: date-time
    ConnectedVia:
      type: object
      properties:
        referenceName:
          type: string
        integrationRuntimeType:
          type: string
    CollectionReference:
      type: object
      properties:
        referenceName:
          type: string
        type:
          type: string
    DataSource:
      type: object
      description: A registered data source
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        kind:
          type: string
          description: The data source type
          enum:
          - AzureSubscription
          - AzureResourceGroup
          - AzureSynapseWorkspace
          - AzureSynapse
          - AdlsGen1
          - AdlsGen2
          - AmazonAccount
          - AmazonS3
          - AmazonSql
          - AzureCosmosDb
          - AzureDataExplorer
          - AzureFileService
          - AzureSqlDatabase
          - AzureSqlDatabaseManagedInstance
          - AzureSqlDataWarehouse
          - AzureMySql
          - AzurePostgreSql
          - AzureStorage
          - Teradata
          - Oracle
          - SapS4Hana
          - SapEcc
          - PowerBI
        properties:
          type: object
          description: Data source properties
          properties:
            endpoint:
              type: string
            resourceGroup:
              type: string
            subscriptionId:
              type: string
            location:
              type: string
            resourceName:
              type: string
            resourceId:
              type: string
            collection:
              $ref: '#/components/schemas/CollectionReference'
            dataSourceCollectionMovingState:
              type: integer
              format: int32
            createdAt:
              type: string
              format: date-time
            lastModifiedAt:
              type: string
              format: date-time
        scans:
          type: array
          items:
            $ref: '#/components/schemas/Scan'
    QualifiedName:
      description: The qualified name.
      type: object
      properties:
        typeName:
          type: string
          description: The type name.
        name:
          type: string
          description: The name.
        extendedProperties:
          $ref: '#/components/schemas/ExtendedProperties'
    ItemPath:
      description: The item path.
      type: object
      properties:
        path:
          type: string
          description: The path.
        extendedProperties:
          description: The extended properties.
          $ref: '#/components/schemas/ExtendedProperties'
    ErrorResponseModel:
      description: The error response model.
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorModel'
      required:
      - error
    ScanResultWithIngestion:
      description: The scan result with ingestion.
      type: object
      properties:
        discoveryExecutionDetails:
          $ref: '#/components/schemas/DiscoveryExecutionDetails'
          readOnly: true
          description: The discovery execution details.
        ingestionExecutionDetails:
          $ref: '#/components/schemas/IngestionExecutionDetails'
          readOnly: true
          description: The ingestion execution details.
        parentId:
          type: string
          readOnly: true
          description: The parent scan result identifier.
        id:
          type: string
          readOnly: true
          description: The scan result identifier.
        ingestionJobId:
          type: string
          description: The ingestion job identifier.
        resourceId:
          type: string
          readOnly: true
          description: The resource identifier.
        status:
          type: string
          enum:
          - Accepted
          - InProgress
          - TransientFailure
          - Succeeded
          - Failed
          - Canceled
          description: The scan result status.
          x-ms-enum:
            name: ScanRunStatus
            modelAsString: true
            values:
            - value: Accepted
              description: the scan is accepted
            - value: InProgress
              description: the scan is InProgress
            - value: TransientFailure
              description: the scan is in transient failure
            - value: Succeeded
              description: the scan is succeeded
            - value: Failed
              description: the scan is failed
            - value: Canceled
              description: the scan is canceled
        diagnostics:
          $ref: '#/components/schemas/ScanDiagnostics'
          readOnly: true
          description: The scan diagnostics.
        startTime:
          format: date-time
          type: string
          description: The scan start time.
          readOnly: true
        endTime:
          format: date-time
          type: string
          description: The scan end time.
          readOnly: true
        scanRulesetVersion:
          format: int32
          type: integer
          description: The scan ruleset version.
          readOnly: true
        scanRulesetType:
          enum:
          - Custom
          - System
          type: string
          description: The scan ruleset type.
          readOnly: true
          x-ms-enum:
            name: ScanRulesetType
            values:
            - value: Custom
              description: the scan ruleset type is custom
            - value: System
              description: the scan ruleset type is system default
            modelAsString: true
        scanLevelType:
          enum:
          - Full
          - Incremental
          type: string
          description: Scan level type.
          readOnly: true
          x-ms-enum:
            name: ScanLevelType
            values:
            - value: Full
              description: the scan is full scan
            - value: Incremental
              description: the scan is incremental scan
            modelAsString: true
        errorMessage:
          type: string
          description: The error message.
          readOnly: true
        error:
          $ref: '#/components/schemas/ErrorModel'
          readOnly: true
          description: The error.
        runType:
          type: string
          readOnly: true
          description: The run type.
        dataSourceType:
          readOnly: true
          $ref: '#/components/schemas/DataSourceType'
    ErrorModel:
      description: The error model.
      type: object
      properties:
        code:
          description: A unique error code that identifies the specific error.
          type: string
        message:
          description: A human-readable error message that provides more details about the error.
          type: string
        target:
          description: The specific component that the error is associated with.
          type: string
        details:
          description: An array of nested ErrorModel objects that provides additional error details.
          type: array
          items:
            $ref: '#/components/schemas/ErrorModel'
      required:
      - code
      - message
    DiscoveryExecutionDetails:
      description: The discovery execution details.
      type: object
      properties:
        discoveryStartTime:
          format: date-time
          type: string
          description: The discovery start time.
        discoveryEndTime:
          format: date-time
          type: string
          description: The discovery end time.
        status:
          enum:
          - Queued
          - Running
          - Succeeded
          - Failed
          - Cancelled
          - Delayed
          - Throttled
          - CompletedWithExceptions
          - CompleteWithWarning
          type: string
          description: The discovery status.
          x-ms-enum:
            name: ScanStatus
            modelAsString: true
        statistics:
          type: object
          description: The discovery statistics.
          additionalProperties: {}
        isErrorLogAvailable:
          type: boolean
          description: Indicates whether the error log is available.
    DataSourceIdentifier:
      description: The data source identifier.
      type: object
      properties:
        itemPath:
          $ref: '#/components/schemas/ItemPath'
        qualifiedName:
          $ref: '#/components/schemas/QualifiedName'
        dataSourceName:
          type: string
          description: The data source name.
        guid:
          type: string
          description: The guid.
        resourceId:
          type: string
          description: The resource identifier.
    IngestionExecutionDetails:
      description: The ingestion execution details.
      type: object
      properties:
        ingestionStartTime:
          format: date-time
          type: string
          description: The ingestion start time.
        ingestionEndTime:
          format: date-time
          type: string
          description: The ingestion end time.
        status:
          enum:
          - None
          - Succeeded
          - Queued
          - InProgress
          - SourceUnknown
          - PartialSucceeded
          - Failed
          - Canceled
          - Canceling
          type: string
          description: The ingestion status.
          x-ms-enum:
            name: IngestionPhaseStatus
            modelAsString: true
        statistics:
          type: object
          description: The ingestion statistics.
          additionalProperties: {}
        estimatedTimeRemainingInSeconds:
          format: int64
          description: The estimated time remaining in seconds.
          type: integer
        isErrorLogAvailable:
          type: boolean
          description: Indicates whether the error log is available.
        lastUpdatedAt:
          format: date-time
          type: string
          description: The last updated time.
    DataSourceType:
      description: The data source type.
      enum:
      - None
      - Fabric
      - AzureSubscription
      - AzureResourceGroup
      - AzureSynapseWorkspace
      - AzureSynapse
      - AdlsGen1
      - AdlsGen2
      - AmazonAccount
      - AmazonS3
      - AmazonSql
      - AzureCosmosDb
      - AzureDataExplorer
      - AzureFileService
      - AzureSqlDatabase
      - ArcEnabledSqlServer
      - AmazonPostgreSql
      - AzurePostgreSql
      - Databricks
      - SqlServerDatabase
      - AzureSqlDatabaseManagedInstance
      - AzureSqlDataWarehouse
      - AzureMySql
      - Hdfs
      - TableauServer
      - AzureStorage
      - Teradata
      - Oracle
      - PostgreSql
      - AmazonRedShift
      - DatabricksHms
      - SapS4Hana
      - SapEcc
      - Snowflake
      - PowerBI
      - Trident
      - Dataverse
      - DatabricksUnityCatalog
      type: string
      x-ms-enum:
        name: DataSourceType
        modelAsString: true
    ScanDiagnostics:
      description: The scan diagnostics.
      type: object
      properties:
        notifications:
          type: array
          description: Notifications.
          items:
            $ref: '#/components/schemas/Notification'
        exceptionCountMap:
          type: object
          description: Exception count map.
          additionalProperties:
            format: int32
            type: integer
          readOnly: true
    Notification:
      description: The notification model.
      type: object
      properties:
        message:
          type: string
          description: Notification message.
        code:
          format: int32
          type: integer
          description: Notification code.
    ExtendedProperties:
      description: The extended properties.
      type: object
      properties:
        subscriptionId:
          type: string
          description: The subscription identifier.
        resourceGroup:
          type: string
          description: The resource group.
    ProxyResource:
      description: The proxy resource.
      type: object
      properties:
        id:
          description: The resource identifier.
          type: string
          readOnly: true
        name:
          description: The resource name.
          type: string
          readOnly: true
  securitySchemes:
    oauth2:
      type: oauth2
      description: Azure Active Directory OAuth2 authentication
      flows:
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
          scopes:
            https://purview.azure.net/.default: Access Microsoft Purview
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.
  parameters:
    api-version:
      in: query
      name: api-version
      description: The api version to use.
      required: true
      x-ms-client-name: ApiVersion
      x-ms-parameter-location: client
      schema:
        type: string
    dataSourceName:
      in: path
      name: dataSourceName
      description: The dataSource name.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 63
        minLength: 3
        pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$