Skip to main content

Shutdown and Delete an App

When you want to stop an app (and pause the billing for that app), you want to call the update-app endpoint and set the active_workers to 0. You can do that by executing the following request

PUT /app/<app-id>

where app-id is the app you want to scale down to 0.

Required Headers

  • x-api-key: A valid API key that authenticates the user.
  • x-team-id: (Optional/Nullable) The ID of the team associated with the request.
  • Content-Type: application/json
curl --location --request PUT 'https://api.rungen.ai/app/<APP-ID>' \
--header 'x-api-key: <YOUR-API-KEY>' \
--header 'Content-Type: application/json' \
--data '{
"configuration": {
"active_workers": 0
}
}'

You should receive a response where the status for that app is STOPPED

{
"data": {
...
"status": "STOPPED",
"updated_at": "2025-01-02T02:30:57",
...
}
}

If you think you don't need the app anymore, you can delete it. To delete an app, you must send a DELETE request to:

DELETE /app/<app_id>

where <app_id> is the unique identifier of the app you want to remove.

Important Pre-requisite

  1. Update the app so that active_workers is set to 0.
    • This ensures that no active processes or workers are running before you remove the app.
  2. Confirm that the app is in a safe state to be deleted (e.g., not currently processing jobs).

Required Headers

  • x-api-key: A valid API key for the authenticated user.
  • (Optional) x-team-id: If your API requires team context, also include it here.

Example Requests

curl --location --request DELETE 'https://api.rungen.ai/app/<APP-ID>' \
--header 'x-api-key: <YOUR-API-KEY>' \
--header 'x-team-id: <YOUR-TEAM-ID>'