---
title: "Create an Insights Report"
method: POST
path: "/{spaceId}/insights/reports/v1"
tags: ["Insights"]
---

# Create an Insights Report

`POST /{spaceId}/insights/reports/v1`

## Request

- Base URL: `https://demo.octopus.app/api`
- URL: `https://demo.octopus.app/api/{spaceId}/insights/reports/v1`
- Auth: one of:
  - API key in header `X-Octopus-ApiKey`
  - API key in query parameter `ApiKey`
  - API key in header `X-NuGet-ApiKey`

Creates a new Insights Report.

## Path parameters

- `spaceId` string, required

## Request body

- CreateInsightsReportCommand: Creates a new Insights Report.
  - `AllTenants` boolean: If true, all tenants in the space will be included in the report.
  - `ChannelIds` string[], required: The channels for the report.
  - `Description` string: The description for the report.
  - `EnvironmentGroups` InsightsEnvironmentGroupResource[], required: The environment groups for the report.
    - `Environments` string[], required
    - `Name` string, required
  - `Name` string, required: The name of the report.
  - `ProjectGroupIds` string[], required: The project groups for the report.
  - `ProjectIds` string[], required: The projects for the report.
  - `SpaceId` string, required
  - `TenantIds` string[], required: The tenants for the report.
  - `TenantMode` 'Untenanted' | 'TenantedAndUntenanted' | 'Tenanted': The kind of deployments that will be included in this report
  - `TenantTags` string[], required: The tenant tags the report.
  - `TimeZone` string, required: The timezone of the report.

## Response `200`

Success

- CreateInsightsReportResponse
  - `Report` InsightsReportResource, required
    - `AllTenants` boolean, required
    - `ChannelIds` string[], required
    - `Description` string
    - `EnvironmentGroups` InsightsEnvironmentGroupResource[], required
      - `Environments` string[], required
      - `Name` string, required
    - `IconColor` string
    - `IconId` string
    - `Id` string: Gets or sets a unique identifier for this resource.
    - `LastModifiedBy` string: Gets or sets the username of the user who last modified this resource.
    - `LastModifiedOn` string, date-time: Gets or sets the date/time that this resource was last modified.
    - `Links` object: Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    - `Name` string, required
    - `ProjectGroupIds` string[], required
    - `ProjectIds` string[], required
    - `SpaceId` string, required
    - `TenantIds` string[], required
    - `TenantMode` 'Untenanted' | 'TenantedAndUntenanted' | 'Tenanted', required
    - `TenantTags` string[], required
    - `TimeZone` string, required

## Other responses

- `400`: Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404`: Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.dev/octopus/apis/octopus-server-api.md) - [All operations](https://skmtc.dev/octopus/apis/octopus-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octopus/apis/octopus-server-api/revisions/fe937c07da34?raw)
