4. Using Integration Manager : Using JobConfig Aliasing
 
Share this page                  
Using JobConfig Aliasing
APIs in Integration Manager can accept an alias to call a JobConfig listener. The jobconfig-aliases API allows aliasing a JobConfig listener with a name. An alias name may be mapped to one JobConfig. The API supports assignment of multiple aliases for a JobConfig.
Creating a JobConfig Alias
The following is an example of assigning the alias “alias1” with JobConfig “1”:
POST /api/jobconfig-aliases HTTP/1.1
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
Content-Type: application/json
   {
       "name": "alias1",
       "jobConfigId": "1"
}
Calling a Listener by JobConfig Alias
The following is an example that calls a listener with the JobConfig alias “alias1” created above.
POST /api/listener/alias1?messagename=messageName&outmessagename=outMessageName HTTP/1.1
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
Content-Type: text/plain
   Message Body
In the example above, the route /api/listener/alias1 is an alias of /api/jobconfig/1/listener. The JobConfig alias for listeners, endpoint POST api/listener/{alias}, enables using the same functionality as calling POST api/jobconfig/{id}/listener.
Run JobConfiguration with text message input and text message output (if running synchronously). If the out message is not supplied, the job will execute asynchronously. The out message may be retrieved by GET /api/job/{id} after the job is complete.
Managing JobConfig Aliases
Other than creating aliases for JobConfiguration, the API provides administration requests to manage (modify, read, and delete) aliases.
Here is an example of updating the same alias to point to a different JobConfig “2”:
PUT /api/jobconfig-aliases/alias1
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
Content-Type: application/json
   {
       “name”: “alias1”,
       “jobConfigId”: “2”R
}
And an example of retrieving JobConfig alias “alias1”:
GET /api/jobconfig-aliases/alias1
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
An example of deleting JobConfig alias “alias1”:
DELETE /api/jobconfig-aliases/alias1
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
The following is an example to retrieve all JobConfig aliases:
GET /api/jobconfig-aliases
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi...
For more information about jobconfig-aliases requests, responses, and error messaging, see Available Services and Documentation.