Security Center icon

Security Center

API spec for Microsoft

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "API spec for Microsoft.Security (Azure Security Center) resource provider",
    "title": "Security Center",
    "version": "2019-01-01-preview",
    "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/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/serverVulnerabilityAssessments.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "security-serverVulnerabilityAssessments",
    "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"
      ]
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments": {
      "get": {
        "description": "Gets a list of server vulnerability assessment onboarding statuses on a given resource.",
        "operationId": "ServerVulnerabilityAssessment_ListByExtendedResource",
        "parameters": [
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The Namespace of the resource.",
            "in": "path",
            "name": "resourceNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "The type of the resource.",
            "in": "path",
            "name": "resourceType",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource.",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ServerVulnerabilityAssessmentsList"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "ServerVulnerabilityAssessments"
        ],
        "x-ms-examples": {
          "Get a list of server vulnerability assessments on a resource. Though this API returns a list, Currently Microsoft.Security only supports a single default type of server vulnerability assessment": {
            "parameters": {
              "api-version": "2019-01-01-preview",
              "resourceGroupName": "rg1",
              "resourceName": "vm1",
              "resourceNamespace": "Microsoft.Compute",
              "resourceType": "virtualMachines",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default",
                      "name": "default",
                      "properties": {
                        "provisioningState": "Succeeded"
                      },
                      "type": "Microsoft.Security/serverVulnerabilityAssessments"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}": {
      "delete": {
        "description": "Removing server vulnerability assessment from a resource.",
        "operationId": "ServerVulnerabilityAssessment_Delete",
        "parameters": [
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The Namespace of the resource.",
            "in": "path",
            "name": "resourceNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "The type of the resource.",
            "in": "path",
            "name": "resourceType",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource.",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "description": "ServerVulnerabilityAssessment status. only a 'default' value is supported.",
            "enum": [
              "default"
            ],
            "in": "path",
            "name": "serverVulnerabilityAssessment",
            "required": true,
            "type": "string"
          },
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "No Content - Resource does not exist"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "ServerVulnerabilityAssessment"
        ],
        "x-ms-examples": {
          "Delete a server vulnerability assessments on a resource. Only 'default' resource is supported. Once deleting, Microsoft.Security will not provide vulnerability assessment findings on the resource.": {
            "parameters": {
              "api-version": "2019-01-01-preview",
              "resourceGroupName": "rg1",
              "resourceName": "vm1",
              "resourceNamespace": "Microsoft.Compute",
              "resourceType": "virtualMachines",
              "serverVulnerabilityAssessment": "default",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets a server vulnerability assessment onboarding statuses on a given resource.",
        "operationId": "ServerVulnerabilityAssessment_Get",
        "parameters": [
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The Namespace of the resource.",
            "in": "path",
            "name": "resourceNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "The type of the resource.",
            "in": "path",
            "name": "resourceType",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource.",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "description": "ServerVulnerabilityAssessment status. only a 'default' value is supported.",
            "enum": [
              "default"
            ],
            "in": "path",
            "name": "serverVulnerabilityAssessment",
            "required": true,
            "type": "string"
          },
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ServerVulnerabilityAssessment"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "ServerVulnerabilityAssessments"
        ],
        "x-ms-examples": {
          "Get a server vulnerability assessments onboarding status on a resource. Currently Microsoft.Security only supports the single 'default' resource": {
            "parameters": {
              "api-version": "2019-01-01-preview",
              "resourceGroupName": "rg1",
              "resourceName": "vm1",
              "resourceNamespace": "Microsoft.Compute",
              "resourceType": "virtualMachines",
              "serverVulnerabilityAssessment": "default",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default",
                  "name": "default",
                  "properties": {
                    "provisioningState": "Succeeded"
                  },
                  "type": "Microsoft.Security/serverVulnerabilityAssessments"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creating a server vulnerability assessment on a resource, which will onboard a resource for having a vulnerability assessment on it",
        "operationId": "ServerVulnerabilityAssessment_CreateOrUpdate",
        "parameters": [
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The Namespace of the resource.",
            "in": "path",
            "name": "resourceNamespace",
            "required": true,
            "type": "string"
          },
          {
            "description": "The type of the resource.",
            "in": "path",
            "name": "resourceType",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the resource.",
            "in": "path",
            "name": "resourceName",
            "required": true,
            "type": "string"
          },
          {
            "description": "ServerVulnerabilityAssessment status. only a 'default' value is supported.",
            "enum": [
              "default"
            ],
            "in": "path",
            "name": "serverVulnerabilityAssessment",
            "required": true,
            "type": "string"
          },
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "schema": {
              "$ref": "#/definitions/ServerVulnerabilityAssessment"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "ServerVulnerabilityAssessment"
        ],
        "x-ms-examples": {
          "Create a server vulnerability assessments on a resource. Only 'default' resource is supported. Once creating the resource, the server will be onboarded to vulnerability assessment by Microsoft.Security": {
            "parameters": {
              "api-version": "2019-01-01-preview",
              "body": {
                "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default",
                "name": "default",
                "type": "Microsoft.Security/serverVulnerabilityAssessments"
              },
              "resourceGroupName": "rg1",
              "resourceName": "vm1",
              "resourceNamespace": "Microsoft.Compute",
              "resourceType": "virtualMachines",
              "serverVulnerabilityAssessment": "default",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "202": {
                "body": {
                  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourcegroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default",
                  "name": "default",
                  "properties": {
                    "provisioningState": "Provisioning"
                  },
                  "type": "Microsoft.Security/serverVulnerabilityAssessments"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "ServerVulnerabilityAssessment": {
      "allOf": [
        {
          "description": "Describes an Azure resource.",
          "properties": {
            "id": {
              "description": "Resource Id",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "description": "Resource name",
              "readOnly": true,
              "type": "string"
            },
            "type": {
              "description": "Resource type",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object",
          "x-ms-azure-resource": true
        }
      ],
      "description": "Describes the server vulnerability assessment details on a resource",
      "properties": {
        "properties": {
          "$ref": "#/definitions/ServerVulnerabilityAssessmentProperties",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "ServerVulnerabilityAssessmentProperties": {
      "description": "describes ServerVulnerabilityAssessment properties.",
      "properties": {
        "provisioningState": {
          "description": "The provisioningState of the vulnerability assessment capability on the VM",
          "enum": [
            "Succeeded",
            "Failed",
            "Canceled",
            "Provisioning",
            "Deprovisioning"
          ],
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "ServerVulnerabilityAssessmentsList": {
      "description": "List of server vulnerability assessments",
      "properties": {
        "value": {
          "items": {
            "$ref": "#/definitions/ServerVulnerabilityAssessment"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}