Microsoft Sentinel Source Controls API

The SourceControls API from Microsoft Sentinel — 3 operation(s) for sourcecontrols.

Operations 4

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols Source controls list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId} Source controls get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId} Source controls create #
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}/delete Source controls delete #

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-sentinel:microsoft-sentinel-sourcecontrols-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

microsoft-sentinel-sourcecontrols-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Sentinel Source Controls API
  version: '2025-09-01'
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
  description: 'Operations tagged SourceControls across 2 of this provider''s published API definitions: microsoft-sentinel-securityinsights-2025-09-01.json, microsoft-sentinel-securityinsights-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: SourceControls
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols
  : get:
      operationId: SourceControls_List
      tags:
      - SourceControls
      description: Gets all source controls, without source control items.
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: workspaceName
        in: path
        description: The name of the monitor workspace.
        required: true
        schema:
          type: string
          maxLength: 90
          minLength: 1
          pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceControlList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Get all source controls.:
          $ref: ./examples/sourcecontrols/GetSourceControls.json
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Source controls list
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}
  : get:
      operationId: SourceControls_Get
      tags:
      - SourceControls
      description: Gets a source control byt its identifier.
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: workspaceName
        in: path
        description: The name of the monitor workspace.
        required: true
        schema:
          type: string
          maxLength: 90
          minLength: 1
          pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$
      - name: sourceControlId
        in: path
        description: Source control Id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceControl'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Get a source control.:
          $ref: ./examples/sourcecontrols/GetSourceControlById.json
      summary: Source controls get
      x-summary-source: derived
    put:
      operationId: SourceControls_Create
      tags:
      - SourceControls
      description: Creates a source control.
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: workspaceName
        in: path
        description: The name of the monitor workspace.
        required: true
        schema:
          type: string
          maxLength: 90
          minLength: 1
          pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$
      - name: sourceControlId
        in: path
        description: Source control Id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource 'SourceControl' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceControl'
        '201':
          description: Resource 'SourceControl' create operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceControl'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Creates or updates a source control.:
          $ref: ./examples/sourcecontrols/CreateSourceControl.json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceControl'
        description: The SourceControl
        required: true
      summary: Source controls create
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}/delete
  : post:
      operationId: SourceControls_Delete
      tags:
      - SourceControls
      description: Delete a source control.
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: workspaceName
        in: path
        description: The name of the monitor workspace.
        required: true
        schema:
          type: string
          maxLength: 90
          minLength: 1
          pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$
      - name: sourceControlId
        in: path
        description: Source control Id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Warning'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        Delete a source control.:
          $ref: ./examples/sourcecontrols/DeleteSourceControl.json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepositoryAccessProperties'
        description: The repository access credentials.
        required: true
      summary: Source controls delete
      x-summary-source: derived
    servers:
    - url: https://management.azure.com
components:
  schemas:
    RepositoryAccess:
      type: object
      description: Credentials to access repository.
      properties:
        kind:
          $ref: '#/components/schemas/RepositoryAccessKind'
          description: The kind of repository access credentials
        code:
          type: string
          format: password
          description: OAuth Code. Required when `kind` is `OAuth`
          x-ms-secret: true
        state:
          type: string
          format: password
          description: OAuth State. Required when `kind` is `OAuth`
          x-ms-secret: true
        clientId:
          type: string
          description: OAuth ClientId. Required when `kind` is `OAuth`
        token:
          type: string
          format: password
          description: Personal Access Token. Required when `kind` is `PAT`
          x-ms-secret: true
        installationId:
          type: string
          description: Application installation ID. Required when `kind` is `App`. Supported by `GitHub` only.
      required:
      - kind
    WorkloadIdentityFederation:
      type: object
      description: Workload Identity Federation metadata.
      properties:
        id:
          type: string
          description: Id of Workload Identity Federation.
          readOnly: true
        tenantId:
          type: string
          description: Tenant id of Workload Identity Federation.
          readOnly: true
        appId:
          type: string
          description: App id of Workload Identity Federation.
          readOnly: true
        subject:
          type: string
          description: Subject of Workload Identity Federation.
          readOnly: true
        issuer:
          type: string
          description: Issuer of Workload Identity Federation.
          readOnly: true
    Webhook:
      type: object
      description: Detail about the webhook object.
      properties:
        webhookId:
          type: string
          description: Unique identifier for the webhook.
          readOnly: true
        webhookUrl:
          type: string
          description: URL that gets invoked by the webhook.
          readOnly: true
        webhookSecretUpdateTime:
          type: string
          format: date-time
          description: Time when the webhook secret was updated.
          readOnly: true
        rotateWebhookSecret:
          type: boolean
          description: A flag to instruct the backend service to rotate webhook secret.
    Repository:
      type: object
      description: metadata of a repository.
      properties:
        url:
          type: string
          description: Url of repository.
        branch:
          type: string
          description: Branch name of repository.
        displayUrl:
          type: string
          description: Display url of repository.
        deploymentLogsUrl:
          type: string
          description: Url to access repository action logs.
          readOnly: true
      required:
      - url
      - branch
    Warning:
      type: object
      description: Warning response structure.
      properties:
        warning:
          $ref: '#/components/schemas/WarningBody'
          description: Warning data.
          readOnly: true
    Version:
      type: string
      description: The version of the source control.
      enum:
      - V1
      - V2
      x-ms-enum:
        name: Version
        modelAsString: true
        values:
        - name: V1
          value: V1
          description: V1
        - name: V2
          value: V2
          description: V2
    RepositoryAccessProperties:
      type: object
      description: Credentials to access repository.
      properties:
        properties:
          $ref: '#/components/schemas/RepositoryAccessObject'
          description: RepositoryAccess properties
          x-ms-client-flatten: true
      required:
      - properties
    CloudError:
      type: object
      description: Error response structure.
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: Error data
    RepositoryResourceInfo:
      type: object
      description: Resources created in user's repository for the source-control.
      properties:
        webhook:
          $ref: '#/components/schemas/Webhook'
          description: The webhook object created for the source-control.
        gitHubResourceInfo:
          $ref: '#/components/schemas/GitHubResourceInfo'
          description: Resources created in GitHub for this source-control.
          readOnly: true
        azureDevOpsResourceInfo:
          $ref: '#/components/schemas/AzureDevOpsResourceInfo'
          description: Resources created in Azure DevOps for this source-control.
          readOnly: true
    WarningBody:
      type: object
      description: Warning details.
      properties:
        code:
          $ref: '#/components/schemas/WarningCode'
          description: An identifier for the warning. Codes are invariant and are intended to be consumed programmatically.
          readOnly: true
        message:
          type: string
          description: A message describing the warning, intended to be suitable for display in a user interface.
          readOnly: true
        details:
          type: array
          items:
            $ref: '#/components/schemas/WarningBody'
          readOnly: true
          x-ms-identifiers: []
    RepositoryAccessObject:
      type: object
      description: Credentials to access repository.
      properties:
        repositoryAccess:
          $ref: '#/components/schemas/RepositoryAccess'
          description: RepositoryAccess properties
          x-ms-client-flatten: true
      required:
      - repositoryAccess
    RepoType:
      type: string
      description: The type of repository.
      enum:
      - Github
      - AzureDevOps
      x-ms-enum:
        name: RepoType
        modelAsString: true
        values:
        - name: Github
          value: Github
          description: Github
        - name: AzureDevOps
          value: AzureDevOps
          description: AzureDevOps
    WarningCode:
      type: string
      description: The type of repository.
      enum:
      - SourceControlWarning_DeleteServicePrincipal
      - SourceControlWarning_DeletePipelineFromAzureDevOps
      - SourceControlWarning_DeleteWorkflowAndSecretFromGitHub
      - SourceControlWarning_DeleteRoleAssignment
      - SourceControl_DeletedWithWarnings
      x-ms-enum:
        name: WarningCode
        modelAsString: true
        values:
        - name: SourceControlWarning_DeleteServicePrincipal
          value: SourceControlWarning_DeleteServicePrincipal
          description: SourceControlWarning_DeleteServicePrincipal
        - name: SourceControlWarning_DeletePipelineFromAzureDevOps
          value: SourceControlWarning_DeletePipelineFromAzureDevOps
          description: SourceControlWarning_DeletePipelineFromAzureDevOps
        - name: SourceControlWarning_DeleteWorkflowAndSecretFromGitHub
          value: SourceControlWarning_DeleteWorkflowAndSecretFromGitHub
          description: SourceControlWarning_DeleteWorkflowAndSecretFromGitHub
        - name: SourceControlWarning_DeleteRoleAssignment
          value: SourceControlWarning_DeleteRoleAssignment
          description: SourceControlWarning_DeleteRoleAssignment
        - name: SourceControl_DeletedWithWarnings
          value: SourceControl_DeletedWithWarnings
          description: SourceControl_DeletedWithWarnings
    DeploymentState:
      type: string
      description: The current state of the deployment.
      enum:
      - In_Progress
      - Completed
      - Queued
      - Canceling
      x-ms-enum:
        name: DeploymentState
        modelAsString: true
        values:
        - name: In_Progress
          value: In_Progress
          description: In_Progress
        - name: Completed
          value: Completed
          description: Completed
        - name: Queued
          value: Queued
          description: Queued
        - name: Canceling
          value: Canceling
          description: Canceling
    GitHubResourceInfo:
      type: object
      description: Resources created in GitHub repository.
      properties:
        appInstallationId:
          type: string
          description: GitHub application installation id.
    RepositoryAccessKind:
      type: string
      description: The kind of repository access credentials
      enum:
      - OAuth
      - PAT
      - App
      x-ms-enum:
        name: RepositoryAccessKind
        modelAsString: true
        values:
        - name: OAuth
          value: OAuth
          description: OAuth
        - name: PAT
          value: PAT
          description: PAT
        - name: App
          value: App
          description: App
    SourceControl:
      type: object
      description: Represents a SourceControl in Azure Security Insights.
      properties:
        properties:
          $ref: '#/components/schemas/SourceControlProperties'
          description: source control properties
          x-ms-client-flatten: true
        etag:
          type: string
          description: Etag of the azure resource
      required:
      - properties
      allOf:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource
    Deployment:
      type: object
      description: Description about a deployment.
      properties:
        deploymentId:
          type: string
          description: Deployment identifier.
        deploymentState:
          $ref: '#/components/schemas/DeploymentState'
          description: Current status of the deployment.
        deploymentResult:
          $ref: '#/components/schemas/DeploymentResult'
          description: The outcome of the deployment.
        deploymentTime:
          type: string
          format: date-time
          description: The time when the deployment finished.
        deploymentLogsUrl:
          type: string
          description: Url to access repository action logs.
    SourceControlProperties:
      type: object
      description: Describes source control properties
      properties:
        id:
          type: string
          description: The id (a Guid) of the source control
          readOnly: true
        version:
          $ref: '#/components/schemas/Version'
          description: The version number associated with the source control
          readOnly: true
        displayName:
          type: string
          description: The display name of the source control
        description:
          type: string
          description: A description of the source control
        repoType:
          $ref: '#/components/schemas/RepoType'
          description: The repository type of the source control
        contentTypes:
          type: array
          description: Array of source control content types.
          items:
            $ref: '#/components/schemas/ContentType'
        repository:
          $ref: '#/components/schemas/Repository'
          description: Repository metadata.
        servicePrincipal:
          $ref: '#/components/schemas/ServicePrincipal'
          description: Service principal metadata.
        workloadIdentityFederation:
          $ref: '#/components/schemas/WorkloadIdentityFederation'
          description: Workload Identity metadata.
          readOnly: true
        repositoryAccess:
          $ref: '#/components/schemas/RepositoryAccess'
          description: Repository access credentials. This is write-only object and it never returns back to a user.
          x-ms-mutability:
          - update
          - create
        repositoryResourceInfo:
          $ref: '#/components/schemas/RepositoryResourceInfo'
          description: Information regarding the resources created in user's repository.
        lastDeploymentInfo:
          $ref: '#/components/schemas/DeploymentInfo'
          description: Information regarding the latest deployment for the source control.
          readOnly: true
        pullRequest:
          $ref: '#/components/schemas/PullRequest'
          description: Information regarding the pull request of the source control.
          readOnly: true
      required:
      - displayName
      - repoType
      - contentTypes
      - repository
    PullRequestState:
      type: string
      description: Status of the pull request.
      enum:
      - Open
      - Closed
      x-ms-enum:
        name: PullRequestState
        modelAsString: true
        values:
        - name: Open
          value: Open
          description: Open
        - name: Closed
          value: Closed
          description: Closed
    PullRequest:
      type: object
      description: Information regarding pull request for protected branches.
      properties:
        url:
          type: string
          description: URL of pull request
          readOnly: true
        state:
          $ref: '#/components/schemas/PullRequestState'
          description: State of the pull request
          readOnly: true
    CloudErrorBody:
      type: object
      description: Error details.
      properties:
        code:
          type: string
          description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
          readOnly: true
        message:
          type: string
          description: A message describing the error, intended to be suitable for display in a user interface.
          readOnly: true
    DeploymentResult:
      type: string
      description: Status while trying to fetch the deployment information.
      enum:
      - Success
      - Canceled
      - Failed
      x-ms-enum:
        name: DeploymentResult
        modelAsString: true
        values:
        - name: Success
          value: Success
          description: Success
        - name: Canceled
          value: Canceled
          description: Canceled
        - name: Failed
          value: Failed
          description: Failed
    DeploymentFetchStatus:
      type: string
      description: Status while trying to fetch the deployment information.
      enum:
      - Success
      - Unauthorized
      - NotFound
      x-ms-enum:
        name: DeploymentFetchStatus
        modelAsString: true
        values:
        - name: Success
          value: Success
          description: Success
        - name: Unauthorized
          value: Unauthorized
          description: Unauthorized
        - name: NotFound
          value: NotFound
          description: NotFound
    SourceControlList:
      type: object
      description: List all the source controls.
      properties:
        value:
          type: array
          description: The SourceControl items on this page
          items:
            $ref: '#/components/schemas/SourceControl'
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
          readOnly: true
      required:
      - value
    ContentType:
      type: string
      description: The content type of a source control path.
      enum:
      - AnalyticsRule
      - AutomationRule
      - HuntingQuery
      - Parser
      - Playbook
      - Workbook
      x-ms-enum:
        name: ContentType
        modelAsString: true
        values:
        - name: AnalyticsRule
          value: AnalyticsRule
          description: AnalyticsRule
        - name: AutomationRule
          value: AutomationRule
          description: AutomationRule
        - name: HuntingQuery
          value: HuntingQuery
          description: HuntingQuery
        - name: Parser
          value: Parser
          description: Parser
        - name: Playbook
          value: Playbook
          description: Playbook
        - name: Workbook
          value: Workbook
          description: Workbook
    DeploymentInfo:
      type: object
      description: Information regarding a deployment.
      properties:
        deploymentFetchStatus:
          $ref: '#/components/schemas/DeploymentFetchStatus'
          description: Status while fetching the last deployment.
        deployment:
          $ref: '#/components/schemas/Deployment'
          description: Deployment information.
        message:
          type: string
          description: Additional details about the deployment that can be shown to the user.
    AzureDevOpsResourceInfo:
      type: object
      description: Resources created in Azure DevOps repository.
      properties:
        pipelineId:
          type: string
          description: Id of the pipeline created for the source-control.
        serviceConnectionId:
          type: string
          description: Id of the service-connection created for the source-control.
    ServicePrincipal:
      type: object
      description: Service principal metadata.
      properties:
        id:
          type: string
          description: Id of service principal.
          readOnly: true
        tenantId:
          type: string
          description: Tenant id of service principal.
          readOnly: true
        appId:
          type: string
          description: App id of service principal.
          readOnly: true
        credentialsExpireOn:
          type: string
          format: date-time
          description: Expiration time of service principal credentials.
  securitySchemes:
    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.
x-refined-from:
- microsoft-sentinel-securityinsights-2025-09-01.json
- microsoft-sentinel-securityinsights-openapi.yml