Skip to main content

setEnabled

AppWrapper setEnabled(id, SetAppEnabledRequest)

PUT /api/2.0/apps/{id}/enabled

Enable or disable an app

Turns one portal application on or off for the current portal, and notifies the clients connected to the portal so that they can show or hide it without being reloaded. The identifier must be an application declared in the installation configuration, as listed by GET api/2.0/apps. The caller must be a portal administrator allowed to edit the portal settings. The call is mutating and idempotent: it stores the flag for this portal, overriding the default that the configuration gives the application, and repeating it with the same value changes nothing. Disabling an application does not delete its settings document, which stays saved and applies again as soon as the application is enabled. The response is the application in its new state, including that settings document. Only the enabled flag is affected here: to change the settings document use PUT api/2.0/apps/{id}/settings.

Parameters​

NameInTypeDescriptionNotes
idpathStringThe application to switch, by the identifier GET api/2.0/apps reports. It has to be an application declared in the installation configuration; an unknown identifier answers 404 rather than creating anything.[required] [example: ai-room]
SetAppEnabledRequestbodySetAppEnabledRequestThe new state of the application. Only the enabled flag travels here; the settings document is changed through PUT api/2.0/apps/{id}/settings.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The application in its new state, with the saved settings document left untouchedAppWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller has no portal-settings right--
404No application with this identifier is configured on this installation--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

AppWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json