Skip to main content

Delete specific version of application

Delete one or several versions of an application by their unique identifiers.

Endpoint​

DELETE /apps/delete?id=<id>
DELETE /apps/delete?id=<id_1>&id=<id_2>&id=<id_3>

Authentication​

HeaderValue
AuthorizationBearer <jwt_token>

Query Parameters​

ParameterTypeRequiredDescription
idstring✅The unique identifier of a version to delete. Repeat the parameter to delete several versions in one request

Bulk deletion rules​

  • One application per request. All ids must belong to the same application, otherwise the request is rejected.
  • All or nothing. Nothing is deleted unless every id is a valid, existing version you are allowed to delete.
  • Limit. The number of id parameters is capped by MAX_BULK_DELETE_VERSIONS (default: 10). The limit is checked against the ids as sent, before repeated ids are dropped.
  • Duplicates. Repeated ids are deleted once.

Example Requests​

Single version​

curl --location --request DELETE 'http://localhost:9000/apps/delete?id=653a5e4f51ce5114611f5abb' \
--header 'Authorization: Bearer <jwt_token>'

Several versions​

curl --location --request DELETE 'http://localhost:9000/apps/delete?id=653a5e4f51ce5114611f5abb&id=653a5e4f51ce5114611f5abc' \
--header 'Authorization: Bearer <jwt_token>'

Response​

Success Response (200 OK) — single version​

{
"deleteSpecificAppResult.DeletedCount": 1
}

Success Response (200 OK) — several versions​

{
"deleteSpecificAppResult.DeletedCount": 2,
"app_name": "bulkapp",
"deleted": [
{ "id": "653a5e4f51ce5114611f5abb", "version": "1.0.3.0", "channel": "" },
{ "id": "653a5e4f51ce5114611f5abc", "version": "1.0.4.0", "channel": "" }
]
}

channel is an empty string for versions uploaded without a channel.

Response Fields​

FieldTypeDescription
deleteSpecificAppResult.DeletedCountnumberNumber of versions deleted
app_namestringApplication the versions belonged to (only when several ids were sent)
deletedarrayDeleted versions with id, version and channel (only when several ids were sent)
orphaned_linksarrayArtifact links that could not be removed from storage. The versions are already deleted; only present when storage cleanup partially failed

Error Responses​

A request with a single id keeps the original error format. The responses below apply when several ids are sent.

400 Bad Request — too many ids:

{
"error": "too many versions requested",
"limit": 10,
"requested": 12
}

400 Bad Request — malformed id:

{
"error": "invalid version id",
"id": "not-an-object-id",
"details": "the provided hex string is not a valid ObjectID"
}

400 Bad Request — versions from different applications:

{
"error": "all versions must belong to the same application",
"apps": ["myapp", "otherapp"]
}

403 Forbidden — some versions belong to another owner (not_found is included only if some ids also do not exist):

{
"error": "you don't have permission to delete these items",
"forbidden": ["653a5e4f51ce5114611f5abb"],
"not_found": ["653a5e4f51ce5114611f5abd"]
}

404 Not Found — some versions do not exist:

{
"error": "some of the requested versions do not exist",
"not_found": ["653a5e4f51ce5114611f5abd"]
}

Notes​

  • This operation permanently deletes the specified versions and all their associated artifacts
  • The deletion is irreversible - deleted versions cannot be recovered
  • Only the specified versions are deleted, other versions of the same application remain unaffected