---
title: "POST /backlog/agent-space/{agentSpaceId}/goals/list"
method: POST
path: "/backlog/agent-space/{agentSpaceId}/goals/list"
---

# POST /backlog/agent-space/{agentSpaceId}/goals/list

`POST /backlog/agent-space/{agentSpaceId}/goals/list`

Lists goals in the specified agent space with optional filtering

## Path parameters

- `agentSpaceId` string, required — Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)

## Request body

- object
  - `status` 'ACTIVE' | 'PAUSED' | 'COMPLETE' — Possible states of a goal throughout its lifecycle
  - `goalType` 'CUSTOMER_DEFINED' | 'ONCALL_REPORT' — Type of goal based on its origin
  - `limit` integer — Maximum number of goals to return
  - `nextToken` string — Pagination token for list operations (1-2048 characters)

## Response `200`

Success

- ListGoalsResponse — Response structure containing the list of goals
  - `goals` Goal[], required — List of goals matching the criteria
    - `agentSpaceArn` string, required — The unique identifier for the agent space containing this goal
    - `goalId` string, required — The unique identifier for this goal
    - `title` string, required — The title of the goal
    - `content` object, required — Content of the goal
      - `description` string, required — A detailed description of the goal.
      - `objectives` string, required — The objectives to be achieved for this goal.
    - `status` 'ACTIVE' | 'PAUSED' | 'COMPLETE', required — Current status of the goal itself
    - `goalType` 'CUSTOMER_DEFINED' | 'ONCALL_REPORT', required — Type of goal based on its origin
    - `createdAt` string, date-time, required — Timestamp when this goal was created
    - `updatedAt` string, date-time, required — Timestamp when this goal was last updated
    - `lastEvaluatedAt` string, date-time — Timestamp when the goal was last evaluated
    - `lastTaskId` string — ID of the most recent task associated with this goal
    - `lastSuccessfulTaskId` string — ID of the most recent successful task associated with this goal
    - `version` integer, required — Version number for optimistic locking
    - `evaluationSchedule` object — Goal Schedule. Allows to schedule the goal to run periodically, as well as disable a goal temporarily
      - `state` 'ENABLED' | 'DISABLED', required — Whether the schedule is enabled or disabled
      - `expression` string — Schedule expression (e.g., 'rate(7 days)')
  - `nextToken` string — Pagination token for the next set of results

## Other responses

- `480` — ValidationException
- `481` — ContentSizeExceededException
- `482` — ServiceQuotaExceededException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — AccessDeniedException
- `486` — ThrottlingException
- `487` — InvalidParameterException
- `488` — ResourceNotFoundException

---

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