Execute Script By String
Execute a CRMScript 2 (JavaScript), returning the printed output value.
NsApiSlow threshold: 5000 ms.
Authorizations
SuperOffice username:password are passed in Base64-encoded.
You can also pass inn an unencoded ticket 7T:abc== with the HTTP Authenticate header.
SuperOffice SuperId OAuth implicit flow. You need to issue a request to the SuperId authorization URL https://online.superoffice.com/login/common/oauth/authorize?response_type=token &client_id=670734e0-4c5a-11e3-be9e-a171392e81db &redirect_uri=https://example.com/spa/
passing in the application id and redirect URL.
SuperId will log the user in, and redirect to the requested redirect URL with a #payload containing the access token and claims. (The redirect URL must be registered with SuperId in advance)
https://example.com/spa#access_token=8A%3aCust12227.AXRrCITpPBvQX3UbIohb &token_type=bearer &state= &expires_in=3600 &ctx=Cust12227 &netserver_url=https%3a%2f%2fsod.superoffice.com%2fCust12227%2fRemote%2fServices82%2f
You can take the #access_token value and pass it as the Authenticate HTTP header as a BEARER token.
- Authorization URL
- https://online.superoffice.com/login/common/oauth/authorize
Headers
Convert string references and multi-language values into a specified language (iso2) code.
Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value.
Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set.
Specify the timezone code that you would like date/time responses converted to.
The application token that identifies the partner app. Used when calling Online WebAPI from a server.
Query Parameters
Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category". Default = show all fields.
Body
Script, Parameters, EventData
ExecuteScriptByString: Execute a CRMScript 2 (JavaScript), returning the printed output value.
Response
OK
Object for returning result from a CRMScript Carrier object for CRMScriptRunResult. Services for the CRMScriptRunResult Carrier is available from the CRMScript Agent.
The output from the script, normally from a print or printLine statement
The parameters/variables that might have been modified by the script
Object for returning Trace run result from a CRMScript Carrier object for CRMScriptTraceRun. Services for the CRMScriptTraceRun Carrier is available from the CRMScript Agent.
EventData containing data related to event handlers Carrier object for EventData. Services for the EventData Carrier is available from the CustomerService Agent.
Indicates if the script was executed successfully, or if it failed. In case of failing, the error members will contain more information
Object containing error information for a CRMScript Carrier object for CRMScriptErrorInfo. Services for the CRMScriptErrorInfo Carrier is available from the CRMScript Agent.
The status code which is available to be returned from Typescript scripts
An additional status message that can be sent along with the status code
Optional result headers for context that supports it
Wraps a table right together with an explanatory reason. Code can indicate why access is restricted.
Field property dictionary mapping field names to field access rights.