Integrating Redwood Server into Third-Party Applications with PermaLink
The permalink API allows third-party applications to interact with Redwood Server and create, display, edit, and submit Redwood Server objects, as long as the object allows the action.
Prerequisites
You need to have the PermaLink module, which requires the Module.Scripting license key.
Syntax
api-permalink/(create|diagram|edit|help|list|output|show|submit)?link-objecttype=<objecttype>&(link-path=<name>|link-uniqueid=<n>|link-jobid=<jobid>)
api-permalink/list?link-objecttype=<objecttype>&(link-search=<search>)
api-permalink/diagram?link-objecttype=Job&(link-jobid=<jobid>|link-path=<name>|link-uniqueid=<n>)
<objecttype>
- The object type; not all object types are supported. For example,JobDefinition
andJobChain
are supported.<name>
- The full name of the object in the form of<partition>.<objectName>
, for exampleGLOBAL.System_Info
, or ID for processes.<n>
- The unique ID of the object.<search>
- The IntelliSearch query.<jobid>
- The ID of the process.
note
link-jobid
and diagram
can only be used with processes.
Suppress Popups
When you follow a permalink and are already logged into the instance the permalink is pointing to, a popup is displayed. You suppress the popup using the following suffix in the URL:
&suppress-popup=true
Example:
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-uniqueid=79036&suppress-popup=true
Suppress Output
When you follow a permalink and would like the output to be suppressed, that is, you do not want the current tab of your browser to display the External link was opened page, you use the suppress-output
parameter. Note that this either uses the tab where Redwood Server is currently displayed or creates a new tab for Redwood Server (if there is no active tab open).
This is useful when you have an external page, such as an extension point, with a list of permalinks and you do not want to remain on the page with links.
Example:
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-uniqueid=79036&suppress-output=true
Suppress both Output and Popups
When you follow a permalink and would like to suppress both output and the popup, you use silent-invocation
. You use this much like the suppress-output
option, in extension points.
Example:
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-uniqueid=79036&silent-invocation=true
Showing Filters
Process filters can be linked-to by using the link-path
keyword and specifying the technical name of the filter. The following table lists the built-in filters that can be linked-to with permalink. You can also link to your custom filters, provided you know the name of the filter.
note
Filters are displayed by their Description and not their Name; this is due to the fact that filter-names, unlike descriptions, cannot contain spaces or special reserved prefixes.
Technical Name | English Name |
---|---|
Job.state.Completed | With Status "Completed" |
Job.state.Error | With Status "Error" |
Job.state.Never | With Status "Never" |
Job.state.Overdue | With Status "Overdue" |
Job.state.Running | With Status "Running" |
Job.stategroup.Active | In an Active State |
Job.stategroup.Console | In a Console State |
Job.stategroup.Final | In a Final State |
Job.stategroup.Initial | In an Initial State |
Job.stategroup.Pending | In a Pending State |
Job.time.last24h | For the Last 24 Hours |
Job.time.last7d | For the Last 7 Days |
Job.time.next24h | For the Next 24 Hours |
Job.time.next7d | For the Next 7 Days |
Job.time.window24h | For a Window of 24 Hours |
Job.time.window7d | For a Window of 7 Days |
JobChain.all | All Chains |
Job.all | All (Non-Maintenance) Processes |
Job.maintenance | Standard Maintenance (Background) Processes |
Job.customMaintenance | Custom Maintenance (Background) Processes |
Job.stategroup.Manual | In a Manual Intervention State |
create
Open a create new object dialog for the given object type.
Create a new format dialog. http://pr1.example.com:50200/redwood/api-permalink/create?link-objecttype=Format
diagram
Show a Chain in a chain diagram.
Example
http://pr1.example.com:50200/redwood/api-permalink/diagram?link-objecor ttype=Job&link-path=65
edit
Open the edit dialog for the given object, besides, in the main window the show page is also shown for the object.
Example
Open process definition System_Info edit page by businesskey.
http://pr1.example.com:50200/redwood/api-permalink/edit?link-objecttype=JobDefinition&link-path=GLOBAL.System_Info
Open process definition System_Sleep edit page by uniqueid.
http://pr1.example.com:50200/redwood/api-permalink/edit?link-objecttype=JobDefinition&link-uniqueid=79036
help
Since business keys are preferred for usage in permalinks, when you do not know the valid business key path for an object. You can use the help function to obtain the correct path for an object for which you do know the uniqueid.
Example
http://pr1.example.com:50200/redwood/api-permalink/help?link-objecttype=JobDefinition&link-uniqueid=79036
This will present a show permalink to the process definition using the businesskey, but only when the objecttype has a businesskey.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-path=GLOBAL.System_Info
list
Show the overview page for a certain object type, also used to link to IntelliSearch queries.
Example
Open process definition overview.
http://pr1.example.com:50200/redwood/api-permalink/list?link-objecttype=JobDefinition
List all processes matching IntelliSearch query a:MSLN
.
http://pr1.example.com:50200/redwood/api-permalink/list?link-objecttype=JobDefinition&link-search=a:MSLN
output
Link directly to the file.
Example
http://pr1.example.com:50200/redwood/api-permalink/output?link-objecttype=JobFile&link-jobid=2147&link-jobfilename=stdout.log
show
Open a show page for the given object.
Objects
For linking to objects, such as JobDefinitions, you can choose to use either the link-path, which is [<partition>.]<object>
or the unique ID of the object.
Example
Open process definition System_Sleep show page by businesskey.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-path=GLOBAL.System_Info
Open process definition System_Sleep show page by uniqueid.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobDefinition&link-uniqueid=79036
Files
For linking to the JobFile show pages, there are extra convenience attributes, which allow to access the JobFile show page by: jobid and (filename or file order).
Example
Show JobFile page by uniqueid.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobFile&link-uniqueid=340644
Show JobFile page by jobid and filename.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobFile&link-jobid=22727&link-jobfilename=stdout.log
Show JobFile page by jobid and fileorder.
http://pr1.example.com:50200/redwood/api-permalink/show?link-objecttype=JobFile&link-jobid=22727&link-jobfileorder=1
note
The attributes: link-jobid, link-jobfileorder and link-jobfilename only work for JobFiles!
submit
Open the submit wizard, optionally with a predefined definition.
Example
Submit a new process and select the process definition manually.
http://pr1.example.com:50200/redwood/api-permalink/submit
Submit a new process for the given JobDefinition.
http://pr1.example.com:50200/redwood/api-permalink/submit?link-path=GLOBAL.System_Info