Delete applications
You can delete applications from your organization using the nullplatform UI, CLI, or API.
- UI
- CLI
- cURL
You can delete an application directly from the Namespace view.
Open the options menu (⋮) next to the application you want to remove and select Delete.
Patch the application's status to deleting.
np application update \
--id :id \
--body '{
"status": "deleting"
}'
Patch the application's status to deleting.
curl -L -X PATCH 'https://api.nullplatform.com/application/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"status": "deleting",
}'
Troubleshooting: I can't delete my application
You can't delete an application if it still owns any services or links, or has scopes associated with it.
To resolve this, you'll need to:
- Transfer ownership of links and services.
- Update where the service can be linked.
- Remove scopes associated with the application.
Transfer ownership of links and services
1. Identify what services or links the application owns
First, check what services or links the application owns:
- UI
- CLI
- cURL
- Go to Development > Services.
- Select the Owned by this application tab to see the services you need to transfer.
Use the service list or link list commands with the application's entity_nrn as a query parameter.
Tip: For services, the
nrn(source) must match theentity_nrn.
- Service
- Link
np service list
--nrn organization=1:account=1:namespace=1:application=1
--entity_nrn organization=1:account=1:namespace=1:application=1
np link list
--nrn organization=1:account=1:namespace=1:application=1
Use the service list or link list commands with the application's entity_nrn as a query parameter.
Tip: For services, the
nrn(source) must match theentity_nrn.
- Service
- Link
curl -L 'https://api.nullplatform.com/service?nrn=organization=1:account=1:namespace=1:application=1&entity_nrn=organization=1:account=1:namespace=1:application=1' \
-H 'Authorization: Bearer <token>'
curl -L 'https://api.nullplatform.com/link?nrn=organization=1:account=1:namespace=1:application=1' \
-H 'Authorization: Bearer <token>'
These commands will show what the application owns and what's blocking deletion.
2. Change the owner
Once you've identified the service or link, update its owner by changing the entity_nrn to a different application. Use a PATCH request to services or links.
- CLI
- cURL
-
Update a service owner:
np service patch \
--id <SERVICE_ID> \
--body '{
"entity_nrn": "organization=1:account=1:namespace=1:application=2"
}' -
Update a link owner:
np link patch \
--id <LINK_ID> \
--body '{
"entity_nrn": "organization=1:account=1:namespace=1:application=2"
}'
-
Update a service owner:
curl -L -X PATCH 'https://api.nullplatform.com/service/<SERVICE_ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"entity_nrn": "organization=1:account=1:namespace=1:application=2"
}' -
Update a link owner:
curl -L -X PATCH 'https://api.nullplatform.com/link/<LINK_ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"entity_nrn": "organization=1:account=1:namespace=1:application=2"
}'
Replace the IDs and target NRNs with your own values.
Update the linkable_to property
After transferring ownership, you might also want to update the service's linkable_to property so it reflects the new relationships between applications.
- Decide which applications should be able to link to this service using their
nrnvalues. - Patch the service's
linkable_toarray to include the new application(s) and remove the old owner if needed.
- CLI
- cURL
np service patch \
--id <SERVICE_ID> \
--body '{
"linkable_to": [
"organization=1:account=1:namespace=1:application=2",
"organization=1:account=1:namespace=1:application=3"
]
}'
curl -L -X PATCH 'https://api.nullplatform.com/service/<SERVICE_ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"linkable_to": [
"organization=1:account=1:namespace=1:application=2",
"organization=1:account=1:namespace=1:application=3"
]
}'
Remove scopes from your application
Next, remove all scopes associated with your application.
- UI
- CLI
- cURL
- Go to Development > Scopes.
- Click on Manage and select Delete for each scope.
Use the scope endpoint to list and remove scopes.
- List scopes associated with the application.
np scope list \
--application_id 1234
- Take the IDs returned for each scope and delete them.
np scope delete \
--id 2345
Use the scope endpoint to list and remove scopes.
- List scopes associated with the application.
curl -L 'https://api.nullplatform.com/scope?application_id=1234' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>'
- Take the IDs returned for each scope and delete them.
curl -L -X DELETE 'https://api.nullplatform.com/scope/1' \
-H 'Authorization: Bearer <token>'
If you're having problems deleting your scopes, see how to force delete misconfigured scopes.
Now try deleting your application again.