A helper method used to call appendRequest method of RequestClient
response from sasjs request
name of program
a boolean that indicates whether debug was enabled or not
Creates a compute context on the given server.
the name of the context to be created.
the name of the launcher context used by the compute service.
the ID of the account to run the servers for this context.
the lines of code to execute during session initialization.
Optional
accessToken: stringan access token for an authorized user.
Optional
authorizedUsers: string[]an optional list of authorized user IDs.
Creates a file. Path to or URI of the parent folder is required.
the name of the new file.
the content of the new file in Buffer.
Optional
parentFolderPath: stringthe full path to the parent folder. If not provided, the parentFolderUri must be provided.
Optional
parentFolderUri: stringthe URI (eg /folders/folders/UUID) of the parent folder. If not provided, the parentFolderPath must be provided.
Optional
accessToken: stringan access token for authorizing the request.
Creates a folder. Path to or URI of the parent folder is required.
the name of the new folder.
Optional
parentFolderPath: stringthe full path to the parent folder. If not provided, the parentFolderUri must be provided.
Optional
parentFolderUri: stringthe URI (eg /folders/folders/UUID) of the parent folder. If not provided, the parentFolderPath must be provided.
Optional
accessToken: stringan access token for authorizing the request.
Optional
isForced: booleanflag that indicates if target folder already exists, it and all subfolders have to be deleted.
Creates a Job in the specified folder (or folder uri).
the name of the new job to be created.
the SAS code for the new job.
Optional
parentFolderPath: stringthe location of the new job.
Optional
parentFolderUri: stringthe URI location of the new job. The function is a little faster if the folder URI is supplied instead of the path.
Optional
accessToken: stringCreates a launcher context on the given server.
the name of the context to be created.
the description of the context to be created.
launch type of the context to be created.
Optional
accessToken: stringan access token for an authorized user.
Deletes a compute context on the given server.
the name of the context to be deleted.
Optional
accessToken: stringan access token for an authorized user.
For performance (and in case of accidental error) the deleteFolder
function does not actually delete the folder (and all its content and subfolder content). Instead the folder is simply moved to the recycle bin. Deletion time will be added to the folder name.
the full path (eg /Public/example/deleteThis
) of the folder to be deleted.
Optional
accessToken: stringan access token for authorizing the request.
Updates a compute context on the given server.
the original name of the context to be updated.
an object with the properties to be updated.
Optional
accessToken: stringan access token for an authorized user.
Executes a job via the SAS Viya Compute API.
the relative path to the job.
the name of the context where the job is to be executed.
Optional
debug: booleansets the _debug flag in the job arguments.
Optional
data: anyany data to be passed in as input to the job.
Optional
authConfig: AuthConfiga boolean indicating if the function should wait for a result.
a boolean indicating whether to expect a _webout response.
Optional
pollOptions: PollOptionsan object that represents poll interval(milliseconds) and maximum amount of attempts. Object example: { maxPollCount: 24 * 60 * 60, pollInterval: 1000 }. More information available at src/api/viya/pollJobState.ts.
a boolean that indicates whether the function should print (PID) of the started job.
Optional
variables: MacroVaran object that represents macro variables.
Executes a job via the SAS Viya Job Execution API
the relative or absolute path to the job.
the name of the context where the job is to be executed.
sets the _debug flag in the job arguments.
Optional
data: anyany data to be passed in as input to the job.
Optional
authConfig: AuthConfigExecutes code on the current SAS Viya server.
the path to the file being submitted for execution.
an array of code lines to execute.
the context to execute the code in.
Optional
authConfig: AuthConfigan object containing an access token, refresh token, client ID and secret.
execution data.
when set to true, the log will be returned.
when set to true, the automatic _webout fileref will be checked for content, and that content returned. This fileref is used when the Job contains a SASjs web request (as opposed to executing arbitrary SAS code).
when set to true, function will return the session
Optional
pollOptions: PollOptionsan object that represents poll interval(milliseconds) and maximum amount of attempts. Object example: { maxPollCount: 24 * 60 * 60, pollInterval: 1000 }. More information available at src/api/viya/pollJobState.ts.
a boolean that indicates whether the function should print (PID) of the started job.
Optional
variables: MacroVaran object that represents macro variables.
Exchanges the auth code for an access token for the given client.
the client ID to authenticate with.
the client secret to authenticate with.
the auth code received from the server.
Returns a JSON representation of a compute context.
an id of the context to return.
Optional
accessToken: stringan access token for an authorized user.
Returns a JSON representation of a compute context. @example: { "createdBy": "admin", "links": [...], "id": "ID", "version": 2, "name": "context1" }
the name of the context to return.
Optional
accessToken: stringan access token for an authorized user.
Returns all available compute contexts on this server.
Optional
accessToken: stringan access token for an authorized user.
Returns all available launcher contexts on this server.
Optional
accessToken: stringan access token for an authorized user.
Lists children folders for given Viya folder.
the full path (eg /Public/example/myFolder
) or URI of the source folder listed. Providing URI instead of path will save one extra request.
Optional
accessToken: stringan access token for authorizing the request.
Moves Viya folder to a new location. The folder may be renamed at the same time.
the full path (eg /Public/example/myFolder
) or URI of the source folder to be moved. Providing URI instead of path will save one extra request.
the full path or URI of the parent folder to which the sourceFolder
will be moved (eg /Public/newDestination
). To move a folder, a user has to have write permissions in targetParentFolder. Providing URI instead of the path will save one extra request.
the name of the "moved" folder. If left blank, the original folder name will be used (eg myFolder
in /Public/newDestination/myFolder
for the example above). Optional field.
Optional
accessToken: stringan access token for authorizing the request.
Exchanges the refresh token for an access token for the given client. This method can only be used by Node.
the client ID to authenticate with.
the client secret to authenticate with.
the refresh token received from the server.
Generated using TypeDoc
A client for interfacing with the SAS Viya REST API.