Logotype Sitevision Developer
Log in
Log in

RestAppImport REST API endpoint

Disclaimer: This endpoint documentation is generated from the latest Sitevision version. It might differ from the actual Sitevision environment where your website resides.

Use the RestApi utility of the Public API for server-side access of this endpoint.

RestAppImport

Import a RESTApp archive to a headless custom module and remove an imported RESTApp.

Applicable to: sv:headlessCustomModule of the sv:addonRepository.

POST (MULTI-PART)

Upload and install a RESTApp to a sv:headlessCustomModule.

Permissions

Requires the feature "webapp" and that the user is authorized to MANAGE_ADDONS or has DEVELOPER authorization.

Example URL

188.6b9bf2d0177f80c4d6315/restAppImport

Curl example

Example using "curl" to upload the archive "./restapp.zip" to the headless custom module "myHeadlessModule" for site "www.intranet.com". The upload is performed by the "system" user.

curl --user system -X POST -H "Content-Type: multipart/form-data"
   -F "data=@./restapp.zip"
   https://www.intranet.com/rest-api/1/0/Intranet/Addon%20Repository/myHeadlessModule/restAppImport

Example response

{
   "id": "361.605cf571880f24240b34",
   "type": "sv:restApp",
   "name": "myRestapp-1.0.4",
   "path": "/Intranet/RestApp Repository/myRestapp-1.0.4"
}

DELETE

Delete a RESTApp of a sv:headlessCustomModule.

Note that the active RESTApp of a headless custom module cannot be removed.

Permissions

Requires the feature "webapp" and that the user is authorized to MANAGE_ADDONS or has DEVELOPER authorization.

Example URL

188.6b9bf2d0177f80c4d6315/restAppImport/361.605cf571880f24240b34

Example response

{
   "id": "361.605cf571880f24240b34",
   "type": "sv:restApp",
   "name": "myRestapp-1.0.4",
   "path": "/Intranet/RestApp Repository/myRestapp-1.0.4"
}
Did you find the content on this page useful?