---
title: "Cancel team maintenance"
method: POST
path: "/api/{cloudId}/v1/teams/{teamId}/maintenances/{id}/cancel"
tags: ["Maintenances"]
---

# Cancel team maintenance

`POST /api/{cloudId}/v1/teams/{teamId}/maintenances/{id}/cancel`

## Request

- Base URL: `https://api.atlassian.com/jsm/ops`
- URL: `https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/teams/{teamId}/maintenances/{id}/cancel`
- Auth: one of:
  - HTTP basic
  - OAuth 2
    - Authorization code: `https://auth.stg.atlassian.com/authorize`
    - Token URL: `https://auth.stg.atlassian.com/oauth/token` scopes: `read:ops-config:jira-service-management`, `write:ops-config:jira-service-management`

This endpoint is used to stop an ongoing maintenance plan of a specific team early. The functionality allows you to end the maintenance period before the initially set end time.

## Path parameters

- `teamId` string, required
- `id` string, required

## Response `200`

Returned if the request is successful.

- GetTeamMaintenance
  - `teamId` string: Identifier of the maintenance owning team.
  - `id` string: Identifier of the maintenance.
  - `status` 'cancelled' | 'past' | 'active' | 'planned': Current status of the maintenance plan.
  - `description` string: Description or name for the maintenance plan. This can be any text that helps identify the purpose or characteristics of the maintenance plan.
  - `startDate` string, date-time: Date and time when the maintenance plan starts.
  - `endDate` string, date-time: Date and time when the maintenance plan ends.
  - `rules` object[]: Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over policies, integrations and syncs.
    - `entity` MaintenanceEntity: Entities within a maintenance policy rule are used to specify which entity like policy, integration or sync should enabled or disabled during maintenance period.
      - `id` string
      - `type` 'sync' | 'integration' | 'policy'
    - `state` 'disabled' | 'enabled': State of rule that will be defined in maintenance. This field has to be disabled for integrations and syncs.

## Other responses

- `401`: Returned if the authentication credentials are incorrect.
- `403`: Returned if the request user does not have permission to cancel maintenance.
- `404`: Returned if the maintenance owning team or maintenance is not found.
- `422`: Returned if the payload cannot be validated.

---

[API](https://skmtc.dev/atlassian/apis/jsm-operations-api.md) - [All operations](https://skmtc.dev/atlassian/apis/jsm-operations-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/jsm-operations-api/revisions/804cddbe79aa?raw)
