Change app protection API Reference
PATCH
/tenants/{tenant}/apps/{app}
const url = 'https://api.kupe.cloud/api/v1/tenants/example/apps/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"deletionProtection":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.kupe.cloud/api/v1/tenants/example/apps/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "deletionProtection": true }'Change deletion protection. Send If-Match with the app’s ETag to reject a spec change made since your review. Available while apps are switched off.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
app
required
string
App name
Header Parameters
Section titled “ Header Parameters ” If-Match
string
ETag from the app or environment read
Request Body
Section titled “ Request Body ”Request
Media type application/json
object
deletionProtection
boolean
Example generated
{ "deletionProtection": true}Responses
Section titled “ Responses ”OK
Media type application/json
object
createdAt
string
deletionProtection
boolean
generation
integer
name
string
resourceVersion
string
status
object
conditions
Array<object>
object
lastTransitionTime
string
message
string
reason
string
status
string
type
string
environments
Array<object>
object
address
string
name
string
phase
string
phase
string
uid
string
Example generated
{ "createdAt": "example", "deletionProtection": true, "generation": 1, "name": "example", "resourceVersion": "example", "status": { "conditions": [ { "lastTransitionTime": "example", "message": "example", "reason": "example", "status": "example", "type": "example" } ], "environments": [ { "address": "example", "name": "example", "phase": "example" } ], "phase": "example" }, "uid": "example"}Headers
Section titled “ Headers ” ETag
string
UID and spec generation
Bad Request
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Unauthorized
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Forbidden
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Not Found
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Conflict
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Precondition Failed
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Too Many Requests
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"} Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}