Get request data in provision script

Good day.

Is it possible to use some data from request in provision script?
I would like to get request url to use this information in provision script (and paste this information to an external module ext(…)).

For example, CPE makes request to https://acs.server/someRandomString. I would like to get this “someRansomString” in provision script.

Best regards.

No unfortunately that is not currently possible.

Hello,
thank you information. I’ll try to modify sandbox.ts and add custom function to get this information. Will report about my progress :slight_smile:
Best regards.

Using this: https://github.com/victorvsmirnov/genieacs/commit/a114c49244eab7e13b650753dd80b4bd61c6aa9b
It’s possible to get url from provision:

const ct = getContext();
const url = ct.httpRequest.url;

This leaks internal state variables to the script sandbox. Now the provision scripts is no longer guaranteed to be idempotent and it’s hard to predict what can happen if whatever you’re accessing changes from between one request and the next.

But, if I do something like this (in sandbox.ts),
all will be fine?

function getRequestUrl(): any {
let url = ‘’;
url = state.sessionContext.httpRequest.url;
return url;
}