---
title: "GenerateReport generates and streams a report file for download"
method: GET
path: "/portfolio/v1/generate"
tags: ["PortfolioQueryService"]
---

# GenerateReport generates and streams a report file for download

`GET /portfolio/v1/generate`

Uses the reporters registered for report_type/format (see
x/portfolio/infra/reporters) — account_id defaults to the caller's own
account and requires the :all scope to query on behalf of another

## Query parameters

- `reportType` string, required
- `format` string, required
- `startDate` string, date-time
- `endDate` string, date-time
- `accountId` string, required

## Response `200`

A successful response.

- ApiHttpBody — Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
  - `contentType` string — The HTTP Content-Type header value specifying the content type of the body.
  - `data` string, byte — The HTTP request/response body as raw binary.
  - `extensions` ProtobufAny[] — Application specific response metadata. Must be set in the first response for streaming APIs.
    - `@type` string — A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.

## Other responses

- `default` — An unexpected error response. `details[0]` is always an AppError, see #/components/schemas/AppError

---

[API](https://skmtc.net/kiiglobal/apis/kiichain-pay-backend.md) · [All operations](https://skmtc.net/kiiglobal/apis/kiichain-pay-backend/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kiiglobal/kiichain-pay-backend/revisions/8951249f5b63/schema)
