---
updatedAt: 2026-07-14T09:04:00.000Z
agentTools:
  projectIndex: https://apidocs.picussecurity.com/llms.txt
---

# # Generate Simulation Report

Generates a report for the specified simulation. The report can either provide an overview or focus on a specific run of the simulation, depending on the parameters.

## About

This endpoint generates a report on simulation results, including Prevention and Detection details. The report can either provide an overall simulation overview or focus on a specific simulation run.

To generate an overview report for all simulations, set the type parameter to **overview**.

To generate a report for a specific simulation run, set the type parameter to **run**, and specify the runId parameter as either:\
&#x9;•	latest – Generates a report for the most recent simulation run.\
&#x9;•	A specific runId – Generates a report for the specified simulation run.

The report can be generated in **CSV** or **PDF** format, based on the format parameter.

## Examples

Generate a PDF report for the overall overview of the simulation with id 1 (With prevention and detection results)

```curl request
curl --request POST \
     --url 'https://api.picussecurity.com/v2/simulations/1/results/reports?type=overview' \
     --header 'Authorization: Bearer access_token' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "format": [
    "PDF"
  ],
  "includesSensitiveData": true,
  "onlyPrevention": false
}
'
```
```text response
[
  {
    "id": 1,
    "status": "IN PROGRESS",
    "format": "PDF"
  }
]
```

<br />

Generate a CSV report for the latest run of the simulation with id 1 (With only prevention results)

```curl request
curl --request POST \
     --url 'https://api.picussecurity.com/v2/simulations/1/results/reports?type=run&runId=latest' \
     --header 'Authorization: Bearer access_token' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "format": [
    "CSV"
  ],
  "includesSensitiveData": true,
  "onlyPrevention": true
}
'
```
```text response
[
  {
    "id": 1,
    "status": "IN PROGRESS",
    "format": "CSV"
  }
]
```

<br />

Generate both CSV and PDF reports for the specific run of the simulation with id 1

```curl request
curl --request POST \
     --url 'https://api.picussecurity.com/v2/simulations/1/results/reports?type=run&runId=1' \
     --header 'Authorization: Bearer access_token' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "format": [
    "CSV",
    "PDF"
  ],
  "includesSensitiveData": false,
  "onlyPrevention": false
}
'
```
```text response
[
    {
        "id": 1,
        "status": "COMPLETED",
        "format": "CSV"
    },
    {
        "id": 2,
        "status": "IN PROGRESS",
        "format": "PDF"
    }
]
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "<p class=\"body-1\">You can access the simulation raw data using the Rest API. Scope of the API includes; Simulation list, Simulation Details, Threat/Objective/Action Results, Results mapped to MITRE ATTC&K and Unified Kill Chain frameworks, Detection Analysis Results, Validated Logs & Alerts with SIEM & EDR integration.</p>\n<p class=\"body-1\">OAuth2 protocol is used to authorize Refresh/Access tokens. To obtain the API, you should generate a refresh token and then request an access token using the /v1/auth/token endpoint. The refresh token will be valid for 6 months, whereas the access token will be available for 2 hours. After getting the access token, add Authorization: Bearer {accessToken} to the header to request access to the below endpoints.</p>\n<p class=\"body-1\">Endpoints returning data with a lot of load works with the pagination method. You can use the offset and limit parameters to get the correct page.</p>\n\n<i class=\"body-1\">Your usage will be limited with your Picus license.</i>",
    "title": "Picus Rest API",
    "version": "1.0"
  },
  "paths": {
    "/v2/simulations/{Id}/results/reports": {
      "post": {
        "security": [
          {
            "Access-Token": []
          }
        ],
        "description": "Generates a report for the specified simulation. The report can either provide an overview or focus on a specific run of the simulation, depending on the parameters.",
        "tags": [
          "Simulation-Result-Reports"
        ],
        "summary": "# Generate Simulation Report",
        "operationId": "generateSimulationReportParams",
        "parameters": [
          {
            "description": "Simulation ID",
            "name": "Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "uint64"
            }
          },
          {
            "x-go-name": "Type",
            "description": "Type of the report. One of: 'run' | 'overview'",
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "x-go-name": "RunId",
            "description": "Id of the run or 'latest'. Required if type is 'run'",
            "name": "runId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateSimulationReportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/GenerateSimulationReportResponse"
          },
          "401": {
            "$ref": "#/components/responses/unauthorizedErrorSwagger"
          },
          "422": {
            "$ref": "#/components/responses/validationErrorSwagger"
          },
          "default": {
            "$ref": "#/components/responses/genericErrorSwagger"
          }
        }
      }
    }
  },
  "security": [
    {
      "Access-Token": []
    }
  ],
  "servers": [
    {
      "url": "https://api.picussecurity.com"
    }
  ],
  "components": {
    "responses": {
      "GenerateSimulationReportResponse": {
        "description": "GenerateSimulationReportResponse",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SimulationReportBasicOutput"
              }
            }
          }
        }
      },
      "genericErrorSwagger": {
        "description": "genericErrorSwagger is represents the erroneous cases",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error_code": {
                  "description": "Error Code is optional. It is using for define specific error types.",
                  "type": "integer",
                  "format": "int64",
                  "x-go-name": "ErrorCode",
                  "example": 1001
                },
                "errors": {
                  "description": "Errors are optional. If there are multiple error, this field gives details.",
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "x-go-name": "Errors",
                  "example": "[\"error1\", \"error2\"]"
                },
                "message": {
                  "description": "Error Message that contains information about error",
                  "type": "string",
                  "x-go-name": "Message"
                }
              }
            }
          }
        }
      },
      "unauthorizedErrorSwagger": {
        "description": "unauthorizedErrorSwagger is represents unauthorized error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "x-go-name": "Message",
                  "example": "unauthorized error"
                }
              }
            }
          }
        }
      },
      "validationErrorSwagger": {
        "description": "validationErrorSwagger is represents the erroneous cases",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "description": "Validation Error List",
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "x-go-name": "Errors",
                  "example": {
                    "param": "tag=max, param=25, given value=1000"
                  }
                },
                "message": {
                  "description": "Message will be \"validation error\"",
                  "type": "string",
                  "x-go-name": "Message",
                  "example": "validation error"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Access-Token": {
        "description": "After getting the access token, type <i>Bearer accessToken</i> to the Value input box to request access to the below endpoints For example <i>Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</i>",
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "GenerateSimulationReportInput": {
        "type": "object",
        "properties": {
          "format": {
            "description": "Corresponding report will be generated for each format specified. Available formats: PDF, CSV",
            "type": "array",
            "items": {
              "type": "string"
            },
            "x-go-name": "Formats",
            "example": [
              "PDF"
            ]
          },
          "includesSensitiveData": {
            "description": "If false, generated report will display threat information with access links (Only for CSV reports)",
            "type": "boolean",
            "x-go-name": "IncludesSensitiveData"
          },
          "onlyPrevention": {
            "description": "If true, generated report will include only prevention results",
            "type": "boolean",
            "x-go-name": "OnlyPrevention"
          }
        },
        "x-go-package": "github.com/picusnext/picus-digital/go/customer-api/internal_request/customer_api_dto"
      },
      "SimulationReportBasicOutput": {
        "type": "object",
        "properties": {
          "format": {
            "description": "Report Format. One of: 'PDF' | 'CSV'",
            "type": "string",
            "x-go-name": "Format",
            "example": "PDF"
          },
          "id": {
            "description": "Report Id",
            "type": "integer",
            "format": "uint64",
            "x-go-name": "ID",
            "example": 1
          },
          "status": {
            "description": "Report Status. One of: 'IN PROGRESS' | 'COMPLETED' | 'ERROR'",
            "type": "string",
            "x-go-name": "Status",
            "example": "COMPLETED"
          }
        },
        "x-go-package": "github.com/picusnext/picus-digital/go/customer-api/internal_request/customer_api_dto"
      }
    }
  }
}
```