REST API

Note

To access the API, you need to send the following headers:

  • –header ‘Ipaddr: ipaddr
  • –header ‘Domain: domain
  • –header ‘User: user
  • –header ‘Password: password

RemoteApp API

Module Information.

Detailed information about the module.

GET
/api/
Getting detailed information about a module.
Request
Request example:
curl --location --request GET 'http://localhost:8001/api'
Answer
Answer options:
Name In Type Description
version body object Module version.

Example of getting information about a module in JSON format:

{
    "versions": {
        "values": [
            {
                "id": "v1.0",
                "links": [
                    {
                        "href": "/api/v1/",
                        "rel": "self"
                    }
                ],
                "media-types": [
                    {
                        "base": "application/json",
                        "type": "application/accentos-ra-v1+json"
                    }
                ],
                "status": "stable",
                "updated": "2021-08-19T00:00:00Z"
            }
        ]
    }
}

Applications.

Actions on applications.

GET
/api/v1/app
Getting applications.

Getting all applications as a list of dictionaries.

Request
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/app'
Answer
Answer options:
Name In Type Description
desc body string Application description.
ico body string Application icon.
id body string Application ID.
name body string Application name.
path body string Application path.
pub body string Publication type.
type body string Application type.

Example result in JSON format:

[
    {
        "desc": "desc: desc",
        "ico": "skype",
        "id": 1,
        "name": "app: 1",
        "path": "path: /etc/",
        "pub": 1,
        "type": 1
    }
]
POST
/api/v1/app
Application Creation.
Request
Request parameters:
Name In Type Description
desc body string Application description.
ico body string Application icon.
name body string Application name.
path body string Application path.
pub body string Publication type.
type body string Application type.
Request example:
curl --location --request POST 'http://localhost:8001/api/v1/app' --data-raw '{"desc": "desc: desc", "ico": "skype", "name": "app: 1", "path": "path: /etc/", "pub": 1, "type": 1}'
Answer
Answer options:
Name In Type Description
desc body string Application description.
ico body string Application icon.
name body string Application name.
path body string Application path.
pub body string Publication type.
type body string Application type.

Example result in JSON format:

{
    "desc": "desc: desc",
    "ico": "skype",
    "id": 4,
    "name": "app: 1",
    "path": "path: /etc/",
    "pub": 1,
    "type": 1
}
GET
/api/v1/{api_id}
Getting applications by ID.
Request
Request parameters:
Name In Type Description
id body string Application ID.
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/app/1' --data-raw ''
Answer
Answer options:
Name In Type Description
desc body string Application description.
ico body string Application icon.
name body string Application name.
path body string Application path.
pub body string Publication type.
type body string Application type.

Example result in JSON format:

{
    "desc": "desc: desc",
    "ico": "skype",
    "id": 1,
    "name": "app: 1",
    "path": "path: /etc/",
    "pub": 1,
    "type": 1
}
PATCH
/api/v1/app/{app_id}
Application updating.
Request
Request parameters:
Name In Type Description
desc (Optional) body string Application description.
id body string Application ID.
ico (Optional) body string Application icon.
name (Optional) body string Application name.
path (Optional) body string Application path.
pub (Optional) body string Publication type.
type (Optional) body string Application type.
Request example:
curl --location --request PATCH 'http://localhost:8001/api/v1/app/1' --data-raw '{"desc": "desc: desc", "ico": "skype", "id": 1, "name": "app: 1. Patched", "path": "path: /etc/", "pub": 1, "type": 1}'
Answer
Answer options:
Name In Type Description
desc body string Application description.
ico body string Application icon.
name body string Application name.
path body string Application path.
pub body string Publication type.
type body string Application type.

Example result in JSON format:

{
    "desc": "desc: desc",
    "ico": "skype",
    "id": 1,
    "name": "app: 1",
    "path": "path: /etc/",
    "pub": 1,
    "type": 1
}
DELETE
/api/v1/app/{app_id}
Deleting applications.
Request
Request parameters:
Name In Type Description
id body string Application ID.
Request example:
curl --location --request DELETE 'http://localhost:8001/api/v1/app/1' \ --data-raw ''

This operation has no answer content.

Instances.

Actions with instances.

GET
/api/v1/vm
Getting a list of instances associated with applications.
Request
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/vm' \ --data-raw ''
Answer
Answer options:
Name In Type Description
vm_app_id body string Application ID.
vm_id body string Instance ID.
vm_uid body string Instance UID.

Example result in JSON format:

[
    {
        "app_id": 1,
        "id": 1,
        "uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"
    },
    {
        "app_id": 2,
        "id": 2,
        "uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"
    },
]
GET
/api/v1/vm/{vm_id}
Getting the application associated with a instance by ID.
Request
Request parameters:
Name In Type Description
vm_id body string Instance ID.
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/vm/1' --data-raw ''
Answer
Answer options:
Name In Type Description
vm_app_id body string Application ID.
vm_id body string Instance ID.
vm_uid body string Instance UID.

Example result in JSON format:

{
    "app_id": 1,
    "id": 1,
    "uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"
}
POST
/api/v1/vm/
Creating an association between an application and instance.
Request
Request parameters:
Name In Type Description
vm_app_id body string Application ID.
vm_uid body string Instance UID.
Request example:
curl --location --request POST 'http://localhost:8001/api/v1/vm' \--data-raw '{"app_id": 1,"uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"}'
Answer
Answer options:
Name In Type Description
vm_app_id body string Application ID.
vm_uid body string Instance UID.
vm_id body string Instance ID.

Example result in JSON format:

{
    "app_id": 1,
    "id": 8,
    "uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"
}
DELETE
/v1/node-classes/{vm_id}
Deleting an association between an application and instance.
Request
Request parameters:
Name In Type Description
vm_id body string Instance ID.
Request example:
curl --location --request DELETE 'http://localhost:8001/api/v1/vm' --data-raw '{"app_id": 1,"uid": "078972de-4fd1-4cdc-bdd6-43a3d0633a45"}'

This operation has no answer content.

Templates.

Actions with templates.

GET
/api/v1/type
Getting a list of templates.
Request
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/type' --data-raw ''
Answer
Answer options:
Name In Type Description
ext body string Ext.
template_id body string Template ID.
os_type body string Operating system type.
template body string Template.
template_type body string Template type.

Example result in JSON format:

[
    {
        "ext": "rdp",
        "id": 1,
        "os_type": "appv",
        "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
        "type": "mstsc"
    }
]
GET
/api/v1/type/{template_id}
Getting a template by ID.
Request
Request example:
curl --location --request GET 'http://localhost:8001/api/v1/type/2' --data-raw '{
 "ext": "rdp: Patch",
 "os_type": "appv",
 "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
 "type": "mstsc"}'
Answer
Answer options:
Name In Type Description
ext body string Ext.
template_id body string Template ID.
os_type body string Operating system type.
template body string Template.
template_type body string Template type.

Example result in JSON format:

{
    "ext": "rdp",
    "id": 2,
    "os_type": "appv",
    "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
    "type": "mstsc"
}
POST
/api/v1/type
Creating a template.
Request
Name In Type Description
ext body string Ext.
os_type body string Operating system type.
template body string Template.
template_type body string Template type.
Request example:
curl --location --request POST 'http://localhost:8001/api/v1/type' --data-raw '{
    "ext": "rdp: Patch",
    "os_type": "appv",
    "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
    "type": "mstsc"}'
Answer
Answer options:
Name In Type Description
ext body string Ext.
template_id body string Template ID.
os_type body string Operating system type.
template body string Template.
template_type body string Template type.

Example result in JSON format:

{
    "ext": "rdp: Patch",
    "id": 3,
    "os_type": "appv",
    "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
    "type": "mstsc"
}
PATCH
/api/v1/type
Template updating.
Request
Request example:
curl --location --request PATCH 'http://localhost:8001/api/v1/type/1' --data-raw '{
    "ext": "rdp: PatchToPatch",
    "os_type": "appv",
    "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
    "type": "mstsc"}'
Answer
Answer options:
Name In Type Description
ext body string Ext.
template_id body string Template ID.
os_type body string Operating system type.
template body string Template.
template_type body string Template type.

Example result in JSON format:

{
    "ext": "rdp: PatchToPatch",
    "os_type": "appv",
    "template": "allow desktop composition:i:1\nallow font smoothing:i:1\nalternate shell:s:rdpinit.exe\ndisableremoteappcapscheck:i:1\nprompt for credentials on client:i:1\npromptcredentialonce:i:0\nredirectcomports:i:1\nredirectdrives:i:1\nremoteapplicationmode:i:1\nremoteapplicationname:s:{name}\nremoteapplicationprogram:s:||{desc}\nspan monitors:i:1\ndomain:s:\nuse multimon:i:1\nusbdevicestoredirect:s:\ndevicestoredirect:s:*\ndrivestoredirect:s:*\nfull address:s:{ip}:3389\nalternate full address:s:{ip}:3389\n",
    "type": "mstsc"
}
DELETE
/api/v1/type/{template_id}
Template deleting.
Request
Request parameters:
Name In Type Description
template_id body string Template ID.
Request example:
curl --location --request DELETE 'http://localhost:8001/api/v1/type/2' --data-raw ''

This operation has no answer content.

Detailed description of response codes for requests is available in the tab with additional information.