In the Desktop Client, when you navigate to the Web Page Settings menu, tab Advanced, you can enable or disable the following options:
- Allow opening web page without SSL certificate checking
- Allow using Client API
- Proxy all request contents
Instructions
To achieve this, you need to:
- Know the unique identifier of the applicable webpage.
- Obtain the JSON output of current configurations.
- Change the value of the JSON output.
- Send it back to the server to apply the desired configurations.
Please follow these steps to change the Advanced settings for the desired Web Page:
- Collect the ID of the applicable webpage with the following request:
GET /rest/v3/webPages
- Retrieve the current settings via:
GET /ec2/getResourceParams
- Change the values with:
POST /ec2/setResourceParam
To obtain the possible values, it is necessary to enable the values once manually in the Web Page settings menu. When all options are enabled, do the following API request:
GET /ec2/getResourceParams
And the output should look like this:
[
{
"name": "certificateCheck",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": "0"
},
{
"name": "proxyDomainAllowList",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": "[\"*\"]"
},
{
"name": "subtype",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": "clientApi"
}
]
To change these values, you can use the following API request:
POST /ec2/setResourceParams
And you can use this body:
[
{
"name": "certificateCheck",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": ""
},
{
"name": "proxyDomainAllowList",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": "[]"
},
{
"name": "subtype",
"resourceId": "{8b4b3531-7693-4eb1-b601-d9273808c827}",
"value": ""
}
]
How to enable Proxy all requested contents through the API?
Before you’re able to proxy all requested contents, you need to enable Proxy this webpage via server. You can achieve this by simply enabling the option in the Web Page Settings in the Desktop Client, however, you also can achieve this through the API.
When you collect the WebPage records with the following API request:
GET /rest/v3/webPages
The output should look like this:
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"parentId": "00000000-0000-0000-0000-000000000000",
"name": "Web page",
"url": "https://example.com"
}
]
In this output, you’ll notice four items:
id
- This is a universally unique identifier (UUID)parentId
- this is the server ID of the server you want to use to proxy the websitename
- the name of the web page- url - the url of the web page
To obtain the parentId
, you need the serverId
of the desired server.
You can use the following API call to collect the serverId
:
GET /rest/v3/servers
The (cropped) output will look like this:
...
},
"path": "C:\\<brand>VMS Media",
"serverId": "{93e2a086-a232-ab21-7199-8be9cc7d2693}",
"spaceLimitB": 32212254720,
"status": "Online",
"type": "local"
}
],
"url": "https://localhost:7001",
"version": "6.0.0.xxxxx"
}
]
When you use PUT
or PATCH
/rest/v3/webPages
and replace the parentId
, with the serverId
, the applicable web page will be proxied through the desired server.
Comments
0 comments
Article is closed for comments.