Palo Alto Networks Rules API

The Rules API from Palo Alto Networks — 4 operation(s) for rules.

Operations 6

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 /code/api/v1/enforcement-rules/account/{accountId} Get enforcement rules for one code account · Get Scheme for Specific Account #
Ask an LLM
“Which enforcement thresholds apply to a specific repository account?”
“How do I see the enforcement scheme for one account?”
Tell an agent
Show the enforcement scheme for account {accountId}.
Get the code security enforcement rules applied to repo account {accountId}.
GET /code/api/v1/enforcement-rules List all code enforcement rules · Get All Enforcement Rules #
Ask an LLM
“What enforcement rules do we have across IaC, secrets, images and open source?”
“What behavior threshold is set for each code category?”
Tell an agent
List all our code security enforcement rules.
Show every enforcement rule with its per-category thresholds.
POST /code/api/v1/enforcement-rules Create an enforcement exception for repositories · Create New Exception for Enforcement Rule #
Ask an LLM
“How do I relax enforcement thresholds for a specific set of repositories?”
“Can I add a new exception rule instead of changing the main rule?”
Tell an agent
Create enforcement exception {name} for repositories {repositories} with thresholds {codeCategories}.
Add a new exception rule {name} covering {repositories} using categories {codeCategories}.
PUT /code/api/v1/enforcement-rules Update a code enforcement rule or exception · Update Enforcement Rule #
Ask an LLM
“How do I change the thresholds on an existing enforcement rule?”
“Can I change which repositories an exception rule applies to?”
Tell an agent
Update enforcement rule {id} named {name} with categories {codeCategories} on repositories {repositories}.
Edit exception {id} ({name}) so it covers repos {repositories} with thresholds {codeCategories}.
DELETE /code/api/v1/enforcement-rules/{ruleId} Delete an enforcement exception rule · Delete Exception #
Ask an LLM
“How do I remove an enforcement exception we no longer need?”
“Why can't I delete the main enforcement rule?”
Tell an agent destructive · confirm first
Delete enforcement exception {ruleId}.
Remove exception rule {ruleId} from future scan runs.
GET /code/api/v1/enforcement-rules/accounts List build-time repository accounts · Get All Repositories #
Ask an LLM
“Which repositories are connected for build-time code scanning?”
“Can I search connected repository accounts by name?”
Tell an agent
List all build-time repository accounts.
Search repository accounts for {search}, page {page}.

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/palo-alto-networks:palo-alto-networks-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

palo-alto-networks-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact: {}
  description: The Rules endpoints are listed below.
  title: Prisma Cloud API Overview Rules API
  version: Latest
servers:
- url: https://api.prismacloud.io
tags:
- name: Rules
paths:
  /code/api/v1/enforcement-rules/account/{accountId}:
    get:
      description: Gets scheme for a specific account.
      operationId: getSchemeForAccount
      parameters:
      - in: path
        name: accountId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSchemeForAccountResponse'
          description: Get enforcement rules for account
        '422':
          description: Request arguments validation error
      security:
      - CustomAuthorizer: []
      summary: Get Scheme for Specific Account
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: 'import requests


          url = "https://api.prismacloud.io/code/api/v1/enforcement-rules/account/{accountId}"


          headers = {"authorization": "REPLACE_KEY_VALUE"}


          response = requests.request("GET", url, headers=headers)


          print(response.text)'
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url https://api.prismacloud.io/code/api/v1/enforcement-rules/account/{accountId} \\\n  --header 'authorization: REPLACE_KEY_VALUE'"
  /code/api/v1/enforcement-rules:
    get:
      description: 'This API is used to fetch an array of all your existing Enforcement rules.

        The response includes details of the rule and the behavior threshold configured to each Code category Prisma Cloud Application Security scans (IaC, Secrets, Images, Open source)'
      operationId: getSchemeForCustomer
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSchemeForCustomerResponse'
          description: Get list of enforcement rules for a specific customer
      security:
      - CustomAuthorizer: []
      summary: Get All Enforcement Rules
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: 'import requests


          url = "https://api.prismacloud.io/code/api/v1/enforcement-rules"


          headers = {"authorization": "REPLACE_KEY_VALUE"}


          response = requests.request("GET", url, headers=headers)


          print(response.text)'
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url https://api.prismacloud.io/code/api/v1/enforcement-rules \\\n  --header 'authorization: REPLACE_KEY_VALUE'"
    post:
      description: This API is used in order to add exception rule for a specific set of repositories
      operationId: addRule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRuleBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Add rule
        '422':
          description: Request arguments validation error
      security:
      - CustomAuthorizer: []
      summary: Create New Exception for Enforcement Rule
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: "import requests\n\nurl = \"https://api.prismacloud.io/code/api/v1/enforcement-rules\"\n\npayload = {\n    \"codeCategories\": {\n        \"IAC\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"IMAGES\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"OPEN_SOURCE\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"SECRETS\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"SUPPLY_CHAIN\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        }\n    },\n    \"name\": \"string\",\n    \"repositories\": [\n        {\n            \"accountId\": \"string\",\n            \"accountName\": \"string\"\n        }\n    ]\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"authorization\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"
      - lang: Shell + Curl
        source: "curl --request POST \\\n  --url https://api.prismacloud.io/code/api/v1/enforcement-rules \\\n  --header 'authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"codeCategories\":{\"IAC\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"IMAGES\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"OPEN_SOURCE\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"SECRETS\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"SUPPLY_CHAIN\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"}},\"name\":\"string\",\"repositories\":[{\"accountId\":\"string\",\"accountName\":\"string\"}]}'"
    put:
      description: 'This API is used in order to Edit existing rules, main one, or exception.

        The main rule threshold behavior can be updated, but users cant apply it on specific repositories, change its name, change status to exception or delete it.'
      operationId: editRule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditRuleBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Edit rule
        '422':
          description: Request arguments validation error
      security:
      - CustomAuthorizer: []
      summary: Update Enforcement Rule
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: "import requests\n\nurl = \"https://api.prismacloud.io/code/api/v1/enforcement-rules\"\n\npayload = {\n    \"codeCategories\": {\n        \"IAC\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"IMAGES\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"OPEN_SOURCE\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"SECRETS\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        },\n        \"SUPPLY_CHAIN\": {\n            \"commentsBotThreshold\": \"OFF\",\n            \"hardFailThreshold\": \"OFF\",\n            \"softFailThreshold\": \"OFF\"\n        }\n    },\n    \"id\": \"string\",\n    \"name\": \"string\",\n    \"repositories\": [\n        {\n            \"accountId\": \"string\",\n            \"accountName\": \"string\"\n        }\n    ]\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"authorization\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"
      - lang: Shell + Curl
        source: "curl --request PUT \\\n  --url https://api.prismacloud.io/code/api/v1/enforcement-rules \\\n  --header 'authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"codeCategories\":{\"IAC\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"IMAGES\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"OPEN_SOURCE\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"SECRETS\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"},\"SUPPLY_CHAIN\":{\"commentsBotThreshold\":\"OFF\",\"hardFailThreshold\":\"OFF\",\"softFailThreshold\":\"OFF\"}},\"id\":\"string\",\"name\":\"string\",\"repositories\":[{\"accountId\":\"string\",\"accountName\":\"string\"}]}'"
  /code/api/v1/enforcement-rules/{ruleId}:
    delete:
      description: 'This API is used in order to delete an Exception rule definition, main rules can’t be deleted.

        The deleted rule will not be applied to new runs, but won''t change the results of runs affected previously by this rule.

        In case of an error, it returns the following string: “Could not delete rule for customer”

        If you get this error message, ask for access to the relevant repositories from your admin, or check if the rule is a main rule'
      operationId: deleteRule
      parameters:
      - in: path
        name: ruleId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Delete rule
        '422':
          description: Request arguments validation error
      security:
      - CustomAuthorizer: []
      summary: Delete Exception
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: 'import requests


          url = "https://api.prismacloud.io/code/api/v1/enforcement-rules/{ruleId}"


          headers = {"authorization": "REPLACE_KEY_VALUE"}


          response = requests.request("DELETE", url, headers=headers)


          print(response.text)'
      - lang: Shell + Curl
        source: "curl --request DELETE \\\n  --url https://api.prismacloud.io/code/api/v1/enforcement-rules/{ruleId} \\\n  --header 'authorization: REPLACE_KEY_VALUE'"
  /code/api/v1/enforcement-rules/accounts:
    get:
      description: This API is used in order to get all buildtime accounts, with their name, id and source
      operationId: getAccounts
      parameters:
      - in: query
        name: pageSize
        required: false
        schema:
          format: double
          type: number
      - in: query
        name: page
        required: false
        schema:
          format: double
          type: number
      - in: query
        name: search
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/RepoData'
                type: array
          description: Get enforcement rules for account
        '422':
          description: Request arguments validation error
      security:
      - CustomAuthorizer: []
      summary: Get All Repositories
      tags:
      - Rules
      x-codeSamples:
      - lang: Python + Requests
        source: 'import requests


          url = "https://api.prismacloud.io/code/api/v1/enforcement-rules/accounts"


          querystring = {"pageSize":"SOME_NUMBER_VALUE","page":"SOME_NUMBER_VALUE","search":"SOME_STRING_VALUE"}


          headers = {"authorization": "REPLACE_KEY_VALUE"}


          response = requests.request("GET", url, headers=headers, params=querystring)


          print(response.text)'
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://api.prismacloud.io/code/api/v1/enforcement-rules/accounts?pageSize=SOME_NUMBER_VALUE&page=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE' \\\n  --header 'authorization: REPLACE_KEY_VALUE'"
components:
  schemas:
    RepoData:
      additionalProperties: false
      properties:
        accountId:
          type: string
        accountName:
          type: string
      required:
      - accountId
      - accountName
      type: object
    GetSchemeForAccountResponse:
      additionalProperties: false
      properties:
        accountId:
          type: string
        codeCategories:
          $ref: '#/components/schemas/CodeCategories'
      required:
      - accountId
      - codeCategories
      type: object
    CodeCategories:
      additionalProperties: false
      properties:
        IAC:
          $ref: '#/components/schemas/CodeCategory'
        IMAGES:
          $ref: '#/components/schemas/CodeCategory'
        OPEN_SOURCE:
          $ref: '#/components/schemas/CodeCategory'
        SECRETS:
          $ref: '#/components/schemas/CodeCategory'
        SUPPLY_CHAIN:
          $ref: '#/components/schemas/CodeCategory'
      required:
      - OPEN_SOURCE
      - IMAGES
      - IAC
      - SECRETS
      - SUPPLY_CHAIN
      type: object
    RuleThreshold:
      enum:
      - 'OFF'
      - INFO
      - LOW
      - MEDIUM
      - HIGH
      - CRITICAL
      type: string
    AddRuleBody:
      additionalProperties: false
      properties:
        codeCategories:
          $ref: '#/components/schemas/CodeCategories'
        name:
          type: string
        repositories:
          items:
            $ref: '#/components/schemas/RepoData'
          type: array
      required:
      - name
      - repositories
      - codeCategories
      type: object
    CodeCategory:
      additionalProperties: false
      properties:
        commentsBotThreshold:
          $ref: '#/components/schemas/RuleThreshold'
        hardFailThreshold:
          $ref: '#/components/schemas/RuleThreshold'
        softFailThreshold:
          $ref: '#/components/schemas/RuleThreshold'
      required:
      - hardFailThreshold
      - softFailThreshold
      - commentsBotThreshold
      type: object
    GetSchemeForCustomerResponse:
      additionalProperties: false
      properties:
        accountsNotInMainRule:
          items:
            $ref: '#/components/schemas/RepoData'
          type: array
        rules:
          items:
            $ref: '#/components/schemas/EnforcementRule'
          type: array
      required:
      - rules
      - accountsNotInMainRule
      type: object
    EditRuleBody:
      additionalProperties: false
      properties:
        codeCategories:
          $ref: '#/components/schemas/CodeCategories'
        id:
          type: string
        name:
          type: string
        repositories:
          items:
            $ref: '#/components/schemas/RepoData'
          type: array
      required:
      - name
      - repositories
      - codeCategories
      - id
      type: object
    EnforcementRule:
      additionalProperties: false
      properties:
        codeCategories:
          $ref: '#/components/schemas/CodeCategories'
        createdBy:
          type: string
        creationDate:
          type: string
        editable:
          type: boolean
        id:
          type: string
        mainRule:
          type: boolean
        name:
          type: string
        repositories:
          items:
            $ref: '#/components/schemas/RepoData'
          type: array
      required:
      - name
      - repositories
      - codeCategories
      - id
      - mainRule
      - creationDate
      - createdBy
      - editable
      type: object
  securitySchemes:
    CustomAuthorizer:
      in: header
      name: authorization
      type: apiKey
      x-amazon-apigateway-authorizer:
        authorizerResultTtlInSeconds: 0
        authorizerUri: arn:aws:apigateway:{Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:{Region}:{AccountId}:function:bc-authorization-authorizer-{UniqueTag}{Alias}/invocations
        identitySource: method.request.header.authorization
        type: request
      x-amazon-apigateway-authtype: custom