Skip to content
Developer

AppWidget

System and settings3 EndpointsSettings / AppWidget

Native widgets the current user may use, filtered by rights and configuration. Without a valid session the list is empty (no 401, so the apps can simply remove all widgets). Optional filter: app.

GET/api/app_widget/available

Query parameters

appstringAllowed: main_erp

Responses

200{version, widgets: [{id, title, description, translations, apps, data_endpoint, refresh_seconds, sizes}]}

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/app_widget/available \
  --header 'x-iw-jwt-token: <TOKEN>'

Creates the API access token for one placed widget on one device and revokes the previous one of that widget and device. The token may only GET the widget's data endpoint, with the widget's scope; send it as x-iw-jwt-token header. It is returned only here.

POST/api/app_widget/token

Needs a normal login session (not an API token) and the rights the widget requires.

Query parameters

widgetrequiredstring
device_idrequiredstringrandom id of the app installation, 8-64 chars [A-Za-z0-9-]
device_namestringshown in the API token list

Responses

200{widget, token, header, data_endpoint, expires}

Request
curl --request POST \
  --url 'https://your-instance.iw-erp.de/api/app_widget/token?widget=string&device_id=42' \
  --header 'x-iw-jwt-token: <TOKEN>'

Revokes the widget tokens of this device: of one widget, or of all widgets when widget is empty (e.g. on logout). Needs a normal login session.

DELETE/api/app_widget/token

Query parameters

widgetstring
device_idrequiredstring

Responses

200{revoked: number of revoked tokens}

Request
curl --request DELETE \
  --url 'https://your-instance.iw-erp.de/api/app_widget/token?device_id=42' \
  --header 'x-iw-jwt-token: <TOKEN>'