Overview
You are looking for instructions on how to archive a suspended plan using the GraphQL API rather than through Plan Design.
Solution
In order to make the requests through the API, the information below is required. For further details on the API refer to Using the CCAB GraphQL API.
To archive a plan, use the archivePlanVersion operation with the appropriate ID for the account (see the Get Plan details using the API article for further details).
Below is an example payload using API version 10.1:
mutation archivePlanVersion {
archivePlanVersion(input:{providerId: "<providerId>", planVersionId: "<planVersionId>"}) {
... on ArchivePlanVersionPayload {
archivedPlanVersion {
id
version
state
deployedAt
deployedBy
refCount
providerId
}
}
... on PlanVersionNotFound {
providerId
planVersionId
errorCode
errorMessage
}
... on PlanVersionWrongTransition {
providerId
planVersionId
errorCode
errorMessage
}
}
}
If the plan was archived successfully archived, a confirmation message will be displayed.
Otherwise, the JSON response will contain details about the error that occurred.