syshub-rest-module
Advanced tools
Changelog
[3.0.0] - 2023-12-07
Changelog
[2.4.1] - 2023-08-08
SyshubInterceptor
: In the case of FormData objects as payload, the interceptor no longer sets a Content-Type header, as this would destroy the standard browser header.postFile()
method: Since no header is needed, the method is no longer necessary and has been removed.uploadFileToJob(jobId: number, fileType: 'ticket' | 'source', file: File, fileName: string)
to upload a file for a sysHUB jobChangelog
[2.3.1] - 2023-07-31
webapi
before the custom
Changelog
[2.3.0] - 2023-07-26
deletec()
to call a custom HTTP DELETE endpoint.getc()
to call a custom HTTP GET endpoint.head()
to call a HTTP HEAD endpoint.headc()
to call a custom HTTP HEAD endpoint.options()
to call a HTTP OPTIONS endpoint.optionsc()
to call a custom HTTP OPTIONS endpoint.patchc()
to call a custom HTTP PATCH endpoint.postc()
to call a custom HTTP POST endpoint.putc()
to call a custom HTTP PUT endpoint.Changelog
[2.2.0] - 2023-07-25
getCurrentUsersPermissions()
to get a list of permission names of the current user.getCurrentUsersRoles()
to get a list of role names of the current user.getDevices(withImg: boolean = false)
to get the IPP devices.getPermissions()
to get a list of permissions.getPermissionSets()
to get a list of permissionsets.getRoles()
to get a list of roles.getUsers()
to get a list of users.getWorkflows(params: SearchParams)
to get a filtered and sorted list of workflows.getWorkflowReferences(uuid: string)
to get a list of workflow references.getWorkflowStartpoints(uuid: string)
to get the start point names of a workflow.getWorkflowVersions(uuid: string)
to get a list of workflow versions.Changelog
[2.1.0] - 2023-07-24
createCategory(category: SyshubCategory)
to create a category.createSyslogEntry(entry: SyshubSyslogEntryToCreate)
to create a syslog entry.createUserlogEntry(entry: SyshubUserlogEntryToCreate)
to create a syslog entry.deleteCategory(uuid: string)
to delete a category.deleteConfigItem(uuid: string)
to delete a config item and all its children.deletePSetItem(uuid: string)
to delete a parameterset item and all its children.getCategories()
to retrieve a list of all categories.getCategory(uuid: string)
to retrieve a category.getCategoryRefs(uuid: string, type?: 'Decision' | 'Process' | 'Jobtype' | 'Workflow' | undefined)
to retrieve a category.getClusterStatus()
to get the cluster status.getConfigChildren(uuid: string, maxDeep: number = 0)
to get all children of a config item.getConfigItem(uuid: string)
to get one item from the config tree.getConfigPath(uuid: string)
to get the path of an item from the config tree.getConnectedClients(all: boolean = true)
to get a list of connected clients.getJndiConnectionNames()
to get a list of JNDI connections.getJndiDatabaseStructure(jndi: string = 'System', native: boolean = true)
to get the structure of a JNDI connected database.getJobDir(id?: number | undefined)
to get the jobdir.getNamedSystemsForConfigPath()
to get a list of named systems for a path in the config tree.getPsetChildren(uuid: string, maxDeep: number = 0)
to get all children of a parameterset item.getPsetItem(uuid: string)
to get one item from the parameterset tree.getPsetPath(uuid: string)
to get the path of an item from the parameterset tree.getSyslogEntries(params?: SearchParams)
to retrieve a filterable and sortable list of syslog entries from the server.getSyslogEntry(id: number)
to retrieve one syslog entry from the server.getSyslogHostnames()
to retrieve a list of all hostnames used in syslog.getUserlogEntries(params?: SearchParams)
to retrieve a filterable and sortable list of userlog entries from the server.getUserlogEntry(id: number)
to retrieve one userlog entry from the server.searchConfig(search: SearchTree)
to search inside the config tree.searchPSet(search: SearchTree)
to search inside the config tree.Changelog
[2.0.0] - 2023-07-21
This is a breaking change if you upgrade from Version 1.1 or older. The methods delete()
, get()
, patch()
, post()
, postFile()
, put()
returns a new kind of object.
Env
in the module to provide typechecking for apps that make use of this module.delete()
, get()
, patch()
, post()
, postFile()
, put()
will throw an NotLoggedinError
if user is not loggedin via OAuth. In case of basic auth user counts as always logged in.getServerInformation()
throw an MissingScopeError
if the scope configuration in the envionment is missing the correct scope.throwErrors
has been added to the environment configuration. If set to false (default) the previous stated errors will not be thrown.backupSyshub(backupName: string, backupDescription: string, folderpath: string, includeOptions: string[])
to create a new backup.createJob(job: SyshubJob)
to create a new job.deleteJob(id: number)
to delete one job from the server.getBackupMetadata(folder: string)
to retrieve information for a created backup.getCertStoreItems()
to retrieve cert store information.getJob(id: number)
to retrieve one job from the server.getJobs(params?: SearchParams)
to retrieve a filterable and sortable list of jobs from the server.getServerInformation()
to retrieve server information like license, system and grid node name, version.getServerProperties()
to retrieve items from server.properties
file.getWorkflowExecution(uuid: string)
to retrieve one running workflow executions.getWorkflowExecutions()
to retrieve running workflow executions.replaceJob(id: number, job: SyshubJobToPatch)
to replace a job on the server.restoreSyshub(folderpath: string, includeOptions: string[])
to restore from a backup.runConsoleCommand(cmd: string, params: string[] = [])
to execute a console command.runConsoleCommandHelp()
to execute the console command HELP and convert the server response into a list of key-value strings where key is the command and value the description of the command.runConsoleCommandMem()
to execute the console command MEM and convert the server response into a usable object instead of string-array.runConsoleCommandP()
to execute the console command P and convert the server response into a usable object instead of string-array.runWorkflow(uuid: string, async: boolean = true, jobId?: number)
to start a workflow execution.runWorkflowAlias(alias: string, payload: any | undefined, method: 'DELETE' | 'GET' | 'POST' | 'PUT' = 'POST')
to start a workflow based on it's alias name.delete()
, get()
, patch()
, post()
, postFile()
, put()
) will return an object of type Response
in case of success. This object contains three objects:
content
: Contains the response body (normally a string)header
: The headers from the responsestatus
: The HTTP Status code of the response