> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GetPolicyImpactReportGraph



## OpenAPI

````yaml /docs/api/openapi/policies_openapi.json post /core.v1.PoliciesService/GetPolicyImpactReportGraph
openapi: 3.1.0
info:
  title: core.v1.PoliciesService
  version: 0.0.1
servers:
  - url: https://api.joinformal.com
    description: Production API
security: []
tags:
  - name: core.v1.PoliciesService
paths:
  /core.v1.PoliciesService/GetPolicyImpactReportGraph:
    post:
      tags:
        - core.v1.PoliciesService
      summary: GetPolicyImpactReportGraph
      operationId: core.v1.PoliciesService.GetPolicyImpactReportGraph
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/core.v1.GetPolicyImpactReportGraphRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/core.v1.GetPolicyImpactReportGraphResponse
        '400':
          description: Bad Request - Invalid request parameters or body
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: invalid_request
                  message:
                    type: string
                    example: Invalid request parameters
                  details:
                    type: object
        '401':
          description: Unauthorized - Missing or invalid authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: unauthorized
                  message:
                    type: string
                    example: Authentication required
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: forbidden
                  message:
                    type: string
                    example: Insufficient permissions to perform this action
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: not_found
                  message:
                    type: string
                    example: Resource not found
        '500':
          description: Internal Server Error - An error occurred processing the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: internal_error
                  message:
                    type: string
                    example: An internal error occurred
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X POST
            "https://api.joinformal.com/core.v1.PoliciesService/GetPolicyImpactReportGraph"
            \
              -H "X-API-KEY: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "example": "value"
              }'
        - lang: javascript
          label: JavaScript (fetch)
          source: >-
            fetch("https://api.joinformal.com/core.v1.PoliciesService/GetPolicyImpactReportGraph",
            {
              method: "POST",
              headers: {
                "X-API-KEY": "YOUR_API_KEY",
                "Content-Type": "application/json"
              },
              body: JSON.stringify({
                example: "value"
              })
            })
              .then(response => response.json())
              .then(data => console.log(data))
              .catch(error => console.error(error));
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.joinformal.com/core.v1.PoliciesService/GetPolicyImpactReportGraph"

            headers = {
                "X-API-KEY": "YOUR_API_KEY",
                "Content-Type": "application/json"
            }

            data = {
                "example": "value"
            }


            response = requests.post(url, headers=headers, json=data)

            print(response.json())
        - lang: go
          label: Go
          source: |-
            package main

            import (
                "bytes"
                "encoding/json"
                "fmt"
                "io"
                "net/http"
            )

            func main() {
                url := "https://api.joinformal.com/core.v1.PoliciesService/GetPolicyImpactReportGraph"

                body := map[string]string{
                    "example": "value",
                }

                jsonData, _ := json.Marshal(body)

                req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
                req.Header.Set("X-API-KEY", "YOUR_API_KEY")
                req.Header.Set("Content-Type", "application/json")

                client := &http.Client{}
                resp, err := client.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()

                responseBody, _ := io.ReadAll(resp.Body)
                fmt.Println(string(responseBody))
            }
components:
  schemas:
    core.v1.GetPolicyImpactReportGraphRequest:
      type: object
      properties:
        reportId:
          type: string
          title: report_id
          minLength: 1
        query:
          type: string
          title: query
          nullable: true
      title: GetPolicyImpactReportGraphRequest
      additionalProperties: false
    core.v1.GetPolicyImpactReportGraphResponse:
      type: object
      properties:
        graph:
          $ref: '#/components/schemas/core.v1.Graph'
          title: graph
      title: GetPolicyImpactReportGraphResponse
      additionalProperties: false
    core.v1.Graph:
      type: object
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/core.v1.Node'
          title: nodes
        edges:
          type: array
          items:
            $ref: '#/components/schemas/core.v1.Edge'
          title: edges
      title: Graph
      additionalProperties: false
    core.v1.Node:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        connectorNode:
          $ref: '#/components/schemas/core.v1.ConnectorNode'
          title: connector_node
          description: One of the discriminated union fields - use exactly one
        resourceNode:
          $ref: '#/components/schemas/core.v1.ResourceNode'
          title: resource_node
          description: One of the discriminated union fields - use exactly one
        userNode:
          $ref: '#/components/schemas/core.v1.UserNode'
          title: user_node
          description: One of the discriminated union fields - use exactly one
      title: Node
      additionalProperties: false
      description: >-
        Exactly one of these fields is required: connector_node or resource_node
        or user_node.
    core.v1.Edge:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        sourceId:
          type: string
          title: source_id
          minLength: 1
        targetId:
          type: string
          title: target_id
          minLength: 1
        requestCount:
          type:
            - integer
            - string
          title: request_count
          format: int64
        triggeredPolicyIds:
          type: array
          items:
            type: string
          title: triggered_policy_ids
        triggeredPolicyCount:
          type:
            - integer
            - string
          title: triggered_policy_count
          format: int64
        actions:
          type: array
          items:
            $ref: '#/components/schemas/core.v1.Action'
          title: actions
      title: Edge
      additionalProperties: false
    core.v1.ConnectorNode:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        name:
          type: string
          title: name
          minLength: 1
      title: ConnectorNode
      additionalProperties: false
    core.v1.ResourceNode:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        name:
          type: string
          title: name
          minLength: 1
        technology:
          type: string
          title: technology
          minLength: 1
      title: ResourceNode
      additionalProperties: false
    core.v1.UserNode:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        name:
          type: string
          title: name
          minLength: 1
        type:
          type: string
          title: type
          minLength: 1
      title: UserNode
      additionalProperties: false
    core.v1.Action:
      type: object
      properties:
        name:
          type: string
          title: name
          minLength: 1
        count:
          type:
            - integer
            - string
          title: count
          format: int64
      title: Action
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key authentication. Get your API key from the Formal console.

````