Generates code for an item at the given location
Given the location of a SAS program or the Studio flow file, return the code that SAS Studio would run.
Name | Type | Required | Description |
---|---|---|---|
sessionId | string | false | If referencing a file on the compute file system, use this session id to access the file. If not provided, a session will be created in the default SAS Studio compute context to access the file. |
The code generation request.
Describes how to generate the code, including flags to customize the generation. Flow or code must be provided either via a reference, or directly via an object. If no reference nor object is provided, it returns an error. It also returns an error when both are provided.
Name | Type | Required | Description |
---|---|---|---|
reference | externalReference | false | A pointer to an object in SAS Content, on the SAS Compute Server, or in a service. |
object | sourceObject | false | Flow or code that will be used to generate the result. If this is a flow, it will be the raw contents of a flow created in SAS Studio, and will look like JSON data. If this is code, it will be the actual SAS code. |
initCode | boolean | false | Indicates whether to include the initialization code for the SAS Studio session. |
wrapperCode | boolean | false | Indicates whether to include the wrapper code for the SAS Studio request. |
userAutoExec | boolean | false | If the initialization code is being included, this specifies whether to include the auto-exec code. The default for this if not specified is true (ie. include the auto-exec code). |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The generated code. | Schema | |
400 | Bad Request | Bad request. The request body had invalid input. |