Microsoft Azure Pre Rules API

The PreRules API from Microsoft Azure, for prerules.

GitHub OpenAPI
Business capability
Cybersecurity Management BC-620

Operations 7

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

GET /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules List pre-rules in a global rulestack · Microsoft Azure Get Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“Which pre-rules are defined in my Cloud NGFW global rulestack?”
“How do I see all pre-rules in order of priority for a rulestack?”
Tell an agent
List the pre-rules in global rulestack {globalRulestackName}.
Show every pre-rule configured on rulestack {globalRulestackName}.
GET /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority} Get a pre-rule by priority · Microsoft Azure Get Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“What does the pre-rule at a given priority in my global rulestack do?”
“How do I inspect a single Cloud NGFW pre-rule?”
Tell an agent
Show pre-rule {priority} in global rulestack {globalRulestackName}.
Get the settings of the priority {priority} pre-rule on {globalRulestackName}.
PUT /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority} Create or replace a pre-rule · Microsoft Azure Put Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“How do I add a new pre-rule to a Cloud NGFW global rulestack?”
“Can I overwrite the pre-rule at an existing priority?”
Tell an agent
Create pre-rule at priority {priority} in rulestack {globalRulestackName} with {properties}.
Replace the pre-rule at priority {priority} on {globalRulestackName} with {properties}.
DELETE /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority} Delete a pre-rule · Microsoft Azure Delete Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“How do I remove a pre-rule from my global rulestack?”
“Can I delete the pre-rule at a specific priority?”
Tell an agent destructive · confirm first
Delete pre-rule {priority} from global rulestack {globalRulestackName}.
Remove the priority {priority} pre-rule on {globalRulestackName}.
POST /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters Get hit counters for a pre-rule · Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“How many times has a pre-rule been hit?”
“Can I see a pre-rule's hit counters for one specific firewall?”
Tell an agent
Get hit counters for pre-rule {priority} in {globalRulestackName}.
Show pre-rule {priority} counters on rulestack {globalRulestackName} for firewall {firewallName}.
POST /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters Refresh hit counters for a pre-rule · Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“How do I pull the latest hit counts for a pre-rule?”
“Can I refresh a pre-rule's counters for a single firewall?”
Tell an agent
Refresh counters for pre-rule {priority} in {globalRulestackName}.
Update pre-rule {priority} hit counts on {globalRulestackName} from firewall {firewallName}.
POST /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters Reset hit counters for a pre-rule · Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks… #
Ask an LLM
“How do I zero out the hit counters on a pre-rule?”
“Can I reset a pre-rule's counters for only one firewall?”
Tell an agent destructive · confirm first
Reset counters for pre-rule {priority} in {globalRulestackName}.
Clear pre-rule {priority} hit counts on {globalRulestackName} for firewall {firewallName}.

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-azure:microsoft-azure-prerules-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-azure-prerules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure PaloAltoNetworks.Cloudngfw Pre Rules API
  version: 2024-01-19-preview
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: PreRules
paths:
  /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules:
    get:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesList
      description: List PreRulesResource resources by Tenant
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRulesResourceListResult'
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-pageable:
        nextLinkName: nextLink
      x-ms-examples:
        PreRules_List_MaximumSet_Gen:
          $ref: ./examples/PreRules_List_MaximumSet_Gen.json
        PreRules_List_MinimumSet_Gen:
          $ref: ./examples/PreRules_List_MinimumSet_Gen.json
      summary: Microsoft Azure Get Providers Paloaltonetworks Cloudngfw Globalrulestacks…
  /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}:
    get:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesGet
      description: Get a PreRulesResource
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRulesResource'
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-examples:
        PreRules_Get_MaximumSet_Gen:
          $ref: ./examples/PreRules_Get_MaximumSet_Gen.json
        PreRules_Get_MinimumSet_Gen:
          $ref: ./examples/PreRules_Get_MinimumSet_Gen.json
      summary: Microsoft Azure Get Providers Paloaltonetworks Cloudngfw Globalrulestacks…
    put:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesCreateorupdate
      description: Create a PreRulesResource
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRulesResource'
        '201':
          description: Azure create operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreRulesResource'
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
      x-ms-long-running-operation: true
      x-ms-examples:
        PreRules_CreateOrUpdate_MaximumSet_Gen:
          $ref: ./examples/PreRules_CreateOrUpdate_MaximumSet_Gen.json
        PreRules_CreateOrUpdate_MinimumSet_Gen:
          $ref: ./examples/PreRules_CreateOrUpdate_MinimumSet_Gen.json
      summary: Microsoft Azure Put Providers Paloaltonetworks Cloudngfw Globalrulestacks…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreRulesResource'
        description: Resource create parameters.
        required: true
    delete:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesDelete
      description: Delete a PreRulesResource
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      responses:
        '200':
          description: Resource deleted successfully.
        '202':
          description: Resource deletion accepted.
        '204':
          description: Resource deleted successfully.
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
      x-ms-long-running-operation: true
      x-ms-examples:
        PreRules_Delete_MaximumSet_Gen:
          $ref: ./examples/PreRules_Delete_MaximumSet_Gen.json
        PreRules_Delete_MinimumSet_Gen:
          $ref: ./examples/PreRules_Delete_MinimumSet_Gen.json
      summary: Microsoft Azure Delete Providers Paloaltonetworks Cloudngfw Globalrulestacks…
  /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters:
    post:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesGetcounters
      description: Get counters
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      - name: firewallName
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleCounter'
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-examples:
        PreRules_getCounters_MaximumSet_Gen:
          $ref: ./examples/PreRules_getCounters_MaximumSet_Gen.json
        PreRules_getCounters_MinimumSet_Gen:
          $ref: ./examples/PreRules_getCounters_MinimumSet_Gen.json
      summary: Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks…
  /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters:
    post:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesRefreshcounters
      description: Refresh counters
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      - name: firewallName
        in: query
        required: false
        schema:
          type: string
      responses:
        '204':
          description: 'There is no content to send for this request, but the headers may be useful. '
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-examples:
        PreRules_refreshCounters_MaximumSet_Gen:
          $ref: ./examples/PreRules_refreshCounters_MaximumSet_Gen.json
        PreRules_refreshCounters_MinimumSet_Gen:
          $ref: ./examples/PreRules_refreshCounters_MinimumSet_Gen.json
      summary: Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks…
  /providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters:
    post:
      tags:
      - PreRules
      operationId: microsoftAzurePrerulesResetcounters
      description: Reset counters
      parameters:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/GlobalRulestackResource.globalRulestackName'
      - $ref: '#/components/parameters/PreRulesResource.priority'
      - name: firewallName
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleCounterReset'
        default:
          description: Common error response for all Azure Resource Manager APIs to return error details for failed operations.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse
      x-ms-examples:
        PreRules_resetCounters_MaximumSet_Gen:
          $ref: ./examples/PreRules_resetCounters_MaximumSet_Gen.json
        PreRules_resetCounters_MinimumSet_Gen:
          $ref: ./examples/PreRules_resetCounters_MinimumSet_Gen.json
      summary: Microsoft Azure Post Providers Paloaltonetworks Cloudngfw Globalrulestacks…
components:
  schemas:
    StateEnum:
      type: string
      description: Enabled or Disabled Enum
      enum:
      - DISABLED
      - ENABLED
      x-ms-enum:
        name: StateEnum
        modelAsString: true
    DestinationAddr:
      type: object
      properties:
        cidrs:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: special value 'any'
        countries:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: list of countries
        feeds:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: list of feeds
        prefixLists:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: prefix list
        fqdnLists:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: fqdn list
      description: destination address
    AppSeenData:
      type: object
      properties:
        count:
          type: integer
          format: int32
          description: number of rows
        appSeenList:
          type: array
          items:
            $ref: '#/components/schemas/AppSeenInfo'
          x-ms-identifiers: []
          x-cadl-name: AppSeenInfo[]
          description: array of appSeen
      description: Data Type for App Seen
      required:
      - count
      - appSeenList
    SourceAddr:
      type: object
      properties:
        cidrs:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: special value 'any'
        countries:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: list of countries
        feeds:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: list of feeds
        prefixLists:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: prefix list
      description: Address properties
    RuleCounterReset:
      type: object
      properties:
        priority:
          type: string
          description: priority number
          readOnly: true
        ruleStackName:
          type: string
          description: rule Stack Name
        ruleListName:
          type: string
          description: rule list name
        firewallName:
          type: string
          description: firewall name
        ruleName:
          type: string
          description: rule name
      description: Rule counter reset
    BooleanEnum:
      type: string
      description: Boolean Enum
      enum:
      - 'TRUE'
      - 'FALSE'
      x-ms-enum:
        name: BooleanEnum
        modelAsString: true
    ActionEnum:
      type: string
      enum:
      - Allow
      - DenySilent
      - DenyResetServer
      - DenyResetBoth
      x-ms-enum:
        name: ActionEnum
        modelAsString: true
    RuleCounter:
      type: object
      properties:
        priority:
          type: string
          description: priority number
        ruleStackName:
          type: string
          description: rule Stack Name
        ruleListName:
          type: string
          description: rule list name
        firewallName:
          type: string
          description: firewall name
        ruleName:
          type: string
          description: rule name
        hitCount:
          type: integer
          format: int32
          description: hit count
        appSeen:
          $ref: '#/components/schemas/AppSeenData'
          description: apps seen
        timestamp:
          type: string
          format: date-time
          description: timestamp of response
        requestTimestamp:
          type: string
          format: date-time
          description: timestamp of request
        lastUpdatedTimestamp:
          type: string
          format: date-time
          description: last updated timestamp
      description: Rule counter
      required:
      - priority
      - ruleName
    TagInfo:
      type: object
      properties:
        key:
          type: string
          description: tag name
        value:
          type: string
          description: tag value
      description: Tag
      required:
      - key
      - value
    Category:
      type: object
      properties:
        urlCustom:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: custom URL
        feeds:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: feed list
      description: URL/EDL to match
      required:
      - urlCustom
      - feeds
    ProvisioningState:
      type: string
      description: Provisioning state of the firewall resource.
      enum:
      - Accepted
      - Creating
      - Updating
      - Deleting
      - Succeeded
      - Failed
      - Canceled
      - Deleted
      - NotSpecified
      x-ms-enum:
        name: ProvisioningState
        modelAsString: true
    DecryptionRuleTypeEnum:
      type: string
      enum:
      - SSLOutboundInspection
      - SSLInboundInspection
      - None
      x-ms-enum:
        name: DecryptionRuleTypeEnum
        modelAsString: true
    PreRulesResourceListResult:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/PreRulesResource'
          x-cadl-name: PreRulesResource[]
          description: The items on this page
        nextLink:
          type: string
          description: The link to the next page of items
      description: The response of a PreRulesResource list operation.
      required:
      - value
    AppSeenInfo:
      type: object
      properties:
        title:
          type: string
          description: title
        category:
          type: string
          description: category
        subCategory:
          type: string
          description: subCategory
        risk:
          type: string
          description: risk
        tag:
          type: string
          description: tag
        technology:
          type: string
          description: technology
        standardPorts:
          type: string
          description: standardPorts
      description: Definition for App Seen
      required:
      - title
      - category
      - subCategory
      - risk
      - tag
      - technology
      - standardPorts
    RuleEntry:
      type: object
      properties:
        etag:
          type: string
          description: etag info
        ruleName:
          type: string
          description: rule name
        priority:
          type: integer
          format: int32
          readOnly: true
        description:
          type: string
          description: rule description
        ruleState:
          $ref: '#/components/schemas/StateEnum'
          description: state of this rule
        source:
          $ref: '#/components/schemas/SourceAddr'
          description: source address
        negateSource:
          $ref: '#/components/schemas/BooleanEnum'
          description: cidr should not be 'any'
        destination:
          $ref: '#/components/schemas/DestinationAddr'
          description: destination address
        negateDestination:
          $ref: '#/components/schemas/BooleanEnum'
          description: cidr should not be 'any'
        applications:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: array of rule applications
        category:
          $ref: '#/components/schemas/Category'
          description: rule category
        protocol:
          type: string
          description: any, application-default, TCP:number, UDP:number
          default: application-default
        protocolPortList:
          type: array
          items:
            type: string
          x-cadl-name: string[]
          description: prot port list
        inboundInspectionCertificate:
          type: string
          description: inbound Inspection Certificate
        auditComment:
          type: string
          description: rule comment
        actionType:
          $ref: '#/components/schemas/ActionEnum'
          description: rule action
        enableLogging:
          $ref: '#/components/schemas/StateEnum'
          description: enable or disable logging
        decryptionRuleType:
          $ref: '#/components/schemas/DecryptionRuleTypeEnum'
          description: enable or disable decryption
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagInfo'
          x-ms-identifiers: []
          x-cadl-name: TagInfo[]
          description: tag for rule
        provisioningState:
          $ref: '#/components/schemas/ProvisioningState'
          description: Provisioning state of the resource.
          readOnly: true
      description: definition of rule
      required:
      - ruleName
    PreRulesResource:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/RuleEntry'
          description: The resource-specific properties for this resource.
          x-ms-mutability:
          - read
          - create
          x-ms-client-flatten: true
        systemData:
          $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/systemData
          description: System metadata for this resource.
          readOnly: true
      description: PreRulestack rule list
      required:
      - properties
      allOf:
      - $ref: ../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource
  parameters:
    GlobalRulestackResource.globalRulestackName:
      name: globalRulestackName
      in: path
      required: true
      description: GlobalRulestack resource name
      x-ms-parameter-location: method
      schema:
        type: string
    PreRulesResource.priority:
      name: priority
      in: path
      required: true
      description: Pre Rule priority
      x-ms-parameter-location: method
      schema:
        type: string
  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.