Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Introduction
This article will explain how we can push the assets to external repository and pull them on webMethods.io Integration platform.
Pre-requisite
webMethods.io Integration tenant with Develop Anywhere and Deloy Anywhere capabilities enabled
Audience
This article is targeted for Integration architects and developers of webMethods.
Use case
Client has developed the assets on self hosted setup in the past .Now client is planning to move the assets to cloud and want to run them on cloud runtimes.
Push the assets to external repository
For example: if the package assets are using the JDBC adapter then the reference to same should be added to the dependencies.
Note: Single package refers to single repository on the external version control system.
Notes:
Pull the assets from external repo
Note:
Automate the process of creating, updating and list of packages using API’s.
Create package using API
URL: https://<hostName>/apis/v1/rest/projects/<projectName>/configurations/packages
https://<hostName>/apis/v1/rest/projects/<projectName>/configurations/packages
METHOD: POST
Request payload
{ "packageName": "CustomServices", "gitUrl": "https://<hostName>/VikashSharma5/IBMcustomServices/_git", "gitServerName": "vikashazure", "gitUserName": "VikashSharma5", "gitBranch": "CustomServices" }
{
"packageName": "CustomServices",
"gitUrl": "https://<hostName>/VikashSharma5/IBMcustomServices/_git",
"gitServerName": "vikashazure",
"gitUserName": "VikashSharma5",
"gitBranch": "CustomServices"
}
Response payload
{ "output": { "message": "Package CustomServices updated successfully." } }
"output": {
"message": "Package CustomServices updated successfully."
Update package using API
METHOD: PUT
Request payload:
{ "projectPackageName": "LogisticAssetsProject", "name": "CustomServices", "gitServerName": "vikashazure", "gitBranch": "CustomServices" }
"projectPackageName": "LogisticAssetsProject",
"name": "CustomServices",
Response Payload
Get the list of all the packages available in a project
METHOD: GET
URL: https://<hostName>/apis/v1/rest/projects/<projectName>/configurations/package
https://<hostName>/apis/v1/rest/projects/<projectName>/configurations/package
Request Payload: NA
{ "output": [ { "packageName": "CustomServices", "gitUrl": "https://<hostName>/VikashSharma5/IBMcustomServices/_git", "gitServerName": "vikashazure", "gitUserName": "VikashSharma5", "gitBranch": "CustomServices" } ] }
"output": [
]