---
title: "POST /#X-Amz-Target=AmazonForecast.ListDatasetGroups"
method: POST
path: "/#X-Amz-Target=AmazonForecast.ListDatasetGroups"
---

# POST /#X-Amz-Target=AmazonForecast.ListDatasetGroups

`POST /#X-Amz-Target=AmazonForecast.ListDatasetGroups`

Returns a list of dataset groups created using the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_CreateDatasetGroup.html">CreateDatasetGroup</a> operation. For each dataset group, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). You can retrieve the complete set of properties by using the dataset group ARN with the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_DescribeDatasetGroup.html">DescribeDatasetGroup</a> operation.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

- `X-Amz-Target` 'AmazonForecast.ListDatasetGroups', required

## Request body

- ListDatasetGroupsRequest
  - `NextToken` string — If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
  - `MaxResults` integer — The number of items to return in the response.

## Response `200`

Success

- ListDatasetGroupsResponse
  - `DatasetGroups` DatasetGroupSummary[] — An array of objects that summarize each dataset group's properties.
    - `DatasetGroupArn` string — The Amazon Resource Name (ARN) of the dataset group.
    - `DatasetGroupName` string — The name of the dataset group.
    - `CreationTime` string, date-time — When the dataset group was created.
    - `LastModificationTime` string, date-time — When the dataset group was created or last updated from a call to the <a href="https://docs.aws.amazon.com/forecast/latest/dg/API_UpdateDatasetGroup.html">UpdateDatasetGroup</a> operation. While the dataset group is being updated, <code>LastModificationTime</code> is the current time of the <code>ListDatasetGroups</code> call.
  - `NextToken` string — If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

## Other responses

- `480` — InvalidNextTokenException

---

[API](https://skmtc.net/aws/apis/forecast.md) · [All operations](https://skmtc.net/aws/apis/forecast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/forecast/versions/3d1c872d2ac9/schema)
