DevArmor Rules API

The rules API from DevArmor — 8 operation(s) for rules.

Operations 12

GET /projects/{project_id}/rules List rules in a project #
POST /projects/{project_id}/rules Create a rule in a project #
GET /projects/{project_id}/rules/{resource_id} Get a rule from a project #
DELETE /projects/{project_id}/rules/{resource_id} Delete a rule from a project #
PUT /projects/{project_id}/rules/{resource_id} Update a rule in a project #
GET /projects/{project_id}/threat-models/{threat_model_id}/versions/{version}/policy/{policy_id}/rules List threat model rules in a project #
GET /projects/{project_id}/threat-models/{threat_model_id}/versions/{version}/policy/{policy_id}/rules/{platform} Get a threat model rule for a platform in a project #
GET /projects/{project_id}/design-review/{design_review_id}/policy/{policy_id}/rules List design review rules in a project #
GET /projects/{project_id}/design-review/{design_review_id}/policy/{policy_id}/rules/{platform} Get a design review rule for a platform in a project #
POST /projects/{project_id}/rules/{rule_id}/pull-request Create a pull request for a rule #
POST /projects/{project_id}/rules/{rule_id}/generate Request a rule generation #
GET /projects/{project_id}/rules/{rule_id}/generate Get a generated rule #

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/devarmor:devarmor-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

devarmor-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DevArmor Security Reviews Rules API
  version: 1.14.0
tags:
- name: Rules
paths:
  /projects/{project_id}/rules:
    get:
      tags:
      - Rules
      summary: List rules in a project
      operationId: list_project_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Rule'
                title: Response List Project Rule
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Rules
      summary: Create a rule in a project
      operationId: create_project_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/rules/{resource_id}:
    get:
      tags:
      - Rules
      summary: Get a rule from a project
      operationId: get_project_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          type: string
          title: Resource Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Rules
      summary: Delete a rule from a project
      operationId: delete_project_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          type: string
          title: Resource Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      - name: force
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Force
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleDelete'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Rules
      summary: Update a rule in a project
      operationId: update_project_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          type: string
          title: Resource Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/threat-models/{threat_model_id}/versions/{version}/policy/{policy_id}/rules:
    get:
      tags:
      - Rules
      summary: List threat model rules in a project
      operationId: list_project_threat_model_version_rules
      security:
      - APIGatewayAuth: []
      parameters:
      - name: policy_id
        in: path
        required: true
        schema:
          type: integer
          title: Policy Id
      - name: version
        in: path
        required: true
        schema:
          type: string
          title: Version
      - name: threat_model_id
        in: path
        required: true
        schema:
          type: string
          title: Threat Model Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Rule'
                title: Response List Project Threat Model Version Rules
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/threat-models/{threat_model_id}/versions/{version}/policy/{policy_id}/rules/{platform}:
    get:
      tags:
      - Rules
      summary: Get a threat model rule for a platform in a project
      operationId: get_project_threat_model_version_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: policy_id
        in: path
        required: true
        schema:
          type: integer
          title: Policy Id
      - name: platform
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/AICodePlatform'
      - name: version
        in: path
        required: true
        schema:
          type: string
          title: Version
      - name: threat_model_id
        in: path
        required: true
        schema:
          type: string
          title: Threat Model Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/design-review/{design_review_id}/policy/{policy_id}/rules:
    get:
      tags:
      - Rules
      summary: List design review rules in a project
      operationId: list_project_design_review_rules
      security:
      - APIGatewayAuth: []
      parameters:
      - name: policy_id
        in: path
        required: true
        schema:
          type: integer
          title: Policy Id
      - name: design_review_id
        in: path
        required: true
        schema:
          type: string
          title: Design Review Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Rule'
                title: Response List Project Design Review Rules
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/design-review/{design_review_id}/policy/{policy_id}/rules/{platform}:
    get:
      tags:
      - Rules
      summary: Get a design review rule for a platform in a project
      operationId: get_project_design_review_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: policy_id
        in: path
        required: true
        schema:
          type: integer
          title: Policy Id
      - name: platform
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/AICodePlatform'
      - name: design_review_id
        in: path
        required: true
        schema:
          type: string
          title: Design Review Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/rules/{rule_id}/pull-request:
    post:
      tags:
      - Rules
      summary: Create a pull request for a rule
      operationId: create_project_rule_pr
      security:
      - APIGatewayAuth: []
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RulePRCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RulePR'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/rules/{rule_id}/generate:
    post:
      tags:
      - Rules
      summary: Request a rule generation
      operationId: create_project_rule_generate
      security:
      - APIGatewayAuth: []
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleGenerate'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Rules
      summary: Get a generated rule
      operationId: get_project_generated_rule
      security:
      - APIGatewayAuth: []
      parameters:
      - name: rule_id
        in: path
        required: true
        schema:
          type: string
          title: Rule Id
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Build'
                title: Response Get Project Generated Rule
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Project:
      properties:
        symbolic_name:
          type: string
          pattern: ^[0-9a-z-]+$
          title: Symbolic Name
        title:
          type: string
          title: Title
        default:
          type: boolean
          title: Default
          default: false
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        use_memory:
          type: boolean
          title: Use Memory
          default: true
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: integer
          title: Id
        owner_user:
          $ref: '#/components/schemas/User'
        memory_effective:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Memory Effective
        memory_effective_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Memory Effective Reason
      type: object
      required:
      - symbolic_name
      - title
      - id
      - owner_user
      title: Project
    RuleGenerate:
      properties:
        control_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Control Ids
        requirement_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Requirement Ids
      type: object
      title: RuleGenerate
    UserState:
      type: string
      enum:
      - active
      - inactive
      - pending_org_approval
      title: UserState
    Build:
      properties:
        family:
          $ref: '#/components/schemas/BuildFamily'
        type:
          $ref: '#/components/schemas/BuildType'
        parameters:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Parameters
        state:
          $ref: '#/components/schemas/JobState'
        eta:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Eta
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
        success:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Success
        result:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Result
        log:
          type: string
          title: Log
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: integer
          title: Id
        project:
          $ref: '#/components/schemas/Project'
        parent_id:
          type: integer
          title: Parent Id
      type: object
      required:
      - family
      - type
      - state
      - id
      - project
      - parent_id
      title: Build
    RuleDelete:
      properties:
        symbolic_name:
          type: string
          pattern: ^[0-9a-z-]+$
          title: Symbolic Name
        title:
          type: string
          title: Title
        rule:
          type: string
          title: Rule
        platform:
          anyOf:
          - $ref: '#/components/schemas/AICodePlatform'
          - type: 'null'
      type: object
      required:
      - symbolic_name
      - title
      - rule
      - platform
      title: RuleDelete
    User:
      properties:
        email:
          type: string
          title: Email
        name:
          type: string
          title: Name
        state:
          $ref: '#/components/schemas/UserState'
          default: active
        roles:
          items:
            $ref: '#/components/schemas/UserRole'
          type: array
          title: Roles
          default: []
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: integer
          title: Id
      type: object
      required:
      - email
      - name
      - id
      title: User
    BuildType:
      type: string
      enum:
      - main
      - architecture
      - architecture_from_code
      - architecture_from_diagrams
      - architecture_from_docs
      - assumptions
      - requirements
      - findings
      - action_items
      - rules
      - pull_request_review
      - threat_model_impact
      - diagram_from_image
      - pdf
      - version_diff
      - interpretation
      title: BuildType
    RulePR:
      properties:
        pr_url:
          type: string
          title: Pr Url
      type: object
      required:
      - pr_url
      title: RulePR
    RuleCreate:
      properties:
        symbolic_name:
          type: 'null'
          title: Symbolic Name
        title:
          type: string
          title: Title
        rule:
          type: string
          title: Rule
        platform:
          anyOf:
          - $ref: '#/components/schemas/AICodePlatform'
          - type: 'null'
        source_repository_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Source Repository Id
        source_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Path
        expresses_control_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Expresses Control Ids
        expresses_requirement_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Expresses Requirement Ids
        scope:
          anyOf:
          - $ref: '#/components/schemas/RuleScope'
          - type: 'null'
        threat_model_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Threat Model Id
        threat_model_version:
          anyOf:
          - type: string
            pattern: ^\d+(\.\d+)*$
          - type: 'null'
          title: Threat Model Version
        design_review_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Design Review Id
      type: object
      required:
      - title
      - rule
      title: RuleCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Rule:
      properties:
        symbolic_name:
          type: string
          pattern: ^[0-9a-z-]+$
          title: Symbolic Name
        title:
          type: string
          title: Title
        rule:
          type: string
          title: Rule
        platform:
          anyOf:
          - $ref: '#/components/schemas/AICodePlatform'
          - type: 'null'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: integer
          title: Id
        project_id:
          type: integer
          title: Project Id
        scope:
          anyOf:
          - $ref: '#/components/schemas/RuleScope'
          - type: 'null'
        threat_model_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Threat Model Id
        threat_model_version:
          anyOf:
          - type: string
            pattern: ^\d+(\.\d+)*$
          - type: 'null'
          title: Threat Model Version
        design_review_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Design Review Id
        policy_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Policy Id
        source_repository_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Source Repository Id
        source_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Path
        expresses_control_ids:
          items:
            type: integer
          type: array
          title: Expresses Control Ids
        expresses_requirement_ids:
          items:
            type: integer
          type: array
          title: Expresses Requirement Ids
      type: object
      required:
      - symbolic_name
      - title
      - rule
      - platform
      - id
      - project_id
      - source_repository_id
      - source_path
      - expresses_control_ids
      - expresses_requirement_ids
      title: Rule
    AICodePlatform:
      type: string
      enum:
      - augment
      - cursor
      - github
      title: AICodePlatform
    BuildFamily:
      type: string
      enum:
      - test
      - threat_model
      - design_review
      - diagram
      - code_review
      - report
      - rule
      - data_flow_diagram
      title: BuildFamily
    RuleUpdate:
      properties:
        symbolic_name:
          type: 'null'
          title: Symbolic Name
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        rule:
          anyOf:
          - type: string
          - type: 'null'
          title: Rule
        platform:
          anyOf:
          - $ref: '#/components/schemas/AICodePlatform'
          - type: 'null'
        source_repository_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Source Repository Id
        source_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Path
        expresses_control_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Expresses Control Ids
        expresses_requirement_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Expresses Requirement Ids
        scope:
          anyOf:
          - $ref: '#/components/schemas/RuleScope'
          - type: 'null'
        threat_model_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Threat Model Id
        threat_model_version:
          anyOf:
          - type: string
            pattern: ^\d+(\.\d+)*$
          - type: 'null'
          title: Threat Model Version
        design_review_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Design Review Id
      type: object
      title: RuleUpdate
    RuleScope:
      type: string
      enum:
      - threat_model
      - threat_model_version
      - design_review
      title: RuleScope
    UserRole:
      type: string
      enum:
      - admin
      - customer_support
      title: UserRole
    RulePRCreate:
      properties:
        source_repository_id:
          type: integer
          title: Source Repository Id
        source_path:
          type: string
          title: Source Path
        branch_name:
          type: string
          title: Branch Name
        pr_title:
          type: string
          title: Pr Title
        pr_description:
          type: string
          title: Pr Description
      type: object
      required:
      - source_repository_id
      - source_path
      - branch_name
      - pr_title
      - pr_description
      title: RulePRCreate
    JobState:
      type: string
      enum:
      - queued
      - running
      - completed
      title: JobState
  securitySchemes:
    APIGatewayAuth:
      type: http
      scheme: bearer