swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for getting the network connectivity status of your Azure API Management deployment. When the API Management service is deployed inside a Virtual Network, it needs to have access to other Azure resources it depends on. This also gives details about the DNS Servers visible to Azure API Management deployment.
  title: ApiManagementClient
  version: 2016-10-10
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2016-10-10/apimnetworkstatus.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: apimanagement-apimnetworkstatus
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus":
    get:
      description: Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.
      operationId: NetworkStatus_GetByService
      parameters:
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: Gets the Network status details.
          schema:
            $ref: "#/definitions/NetworkStatusContract"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Body contract.
            properties:
              code:
                description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                type: string
              details:
                description: The list of invalid fields send in request, in case of validation error.
                items:
                  description: Error Field contract.
                  properties:
                    code:
                      description: Property level error code.
                      type: string
                    message:
                      description: Human-readable representation of property-level error.
                      type: string
                    target:
                      description: Property name.
                      type: string
                type: array
              message:
                description: Human-readable representation of the error.
                type: string
      tags:
        - NetworkStatus
      x-ms-examples:
        ApiManagementServiceGetNetworkStatus:
          parameters:
            api-version: 2016-10-10
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                connectivityStatus:
                  - lastStatusChange: 2017-03-20T08:47:20.7981057Z
                    lastUpdated: 2017-03-20T08:47:20.7043553Z
                    name: xxxxx.database.windows.net
                    status: success
                  - lastStatusChange: 2017-03-20T08:47:20.9075183Z
                    lastUpdated: 2017-03-20T08:47:20.720918Z
                    name: xxxxxxx.blob.core.windows.net
                    status: success
                dnsServers:
                  - 10.xx.3.87
                  - 10.xx.5.29
                  - 10.xx.32.105
definitions:
  ConnectivityStatusContract:
    description: Details about connectivity to a resource.
    properties:
      error:
        description: Error details of the connectivity to the resource.
        type: string
      lastStatusChange:
        description: |
          The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
        format: date-time
        type: string
      lastUpdated:
        description: |
          The date when the resource connectivity status was last updated. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
        format: date-time
        type: string
      name:
        description: The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon.
        minLength: 1
        type: string
      status:
        description: Resource Connectivity Status Type identifier.
        enum:
          - initializing
          - success
          - failure
        type: string
        x-ms-enum:
          modelAsString: true
          name: ConnectivityStatusType
    required:
      - name
      - status
      - lastUpdated
      - lastStatusChange
  NetworkStatusContract:
    description: Network Status details.
    properties:
      connectivityStatus:
        description: Gets the list of Connectivity Status to the Resources.
        items:
          $ref: "#/definitions/ConnectivityStatusContract"
        type: array
      dnsServers:
        description: Gets the list of DNS servers IPV4 addresses.
        items:
          type: string
        type: array
    required:
      - dnsServers
      - connectivityStatus
