Request A Demo
Back to All Blog Articles

Setup GIT Integrations in FlexDeploy using REST API

FlexDeploy has various REST API that can be used for many useful purposes. For example, you can create Topology configurations or execute Build and Deploy workflows using REST API. See details at FlexDeploy REST API Guide.

In this blog entry, I will demonstrate use of REST API to setup Git Integrations in FlexDeploy with inputs from CSV file. This task can be done from FlexDeploy UI, but it is good idea to use REST API to speed up the configuration process. We will use POST method of Source Control Management Instance API.

For example, I have prepared CSV file with 10 Git Integrations with columns for Code, Name and URL to be used in FlexDeploy Git Integration. In this example, I am using same user ID and password for all Git repositories but you can always adjust this script as necessary.

With FlexDeploy you can use REST API to setup Git Integrations.

Adjust file (shown below) for various properties like FD_HOST, FD_PORT, FD_USER, FD_PASSWORD, GITUSER and GITPASSWORD. When you run this script, it will invoke FlexDeploy REST API to create Git Integration configurations with data from scm.csv file.

Here is sample scm.csv file.

DEMO10,Demo10, code that will use scm.csv file.



export IFS=","
cat scm.csv | while read CODE NAME GITURL
   echo Create FlexDeploy Git Connection using $CODE $NAME $GITURL
   curl -u $FD_USER:$FD_PASSWORD -i -X POST -H "Content-Type:application/json" http://$FD_HOST:$FD_PORT/flexdeploy/rest/v1/topology/integrations/scminstance -d '{"instanceName":"'$NAME'","properties":[{"propertyName":"FDGIT_URL","propertyValue":"'$GITURL'"},{"propertyName":"FDGIT_USER","propertyValue":"'$GITUSER'"},{"propertyName":"FDGIT_PASSWORD","propertyValue":"'$GITPASSWORD'"}],"scmType":"GIT","instanceCode":"'$CODE'","isActive":true}'

There are many possibilities with API, this was just a simple example for API usage.

DevOps and CI/CD Done Right

Out of the Box DevOps Platform for your Business and Open Systems

Related Resources

Integrating ACCELQ with FlexDeploy for Seamless Test Automation

ACCELQ is a cloud-based, continuous testing platform that offers codeless test automation for web, mobile, API, desktop, and packaged applications. ...

Mastering Source Control: Streamlining Functional Setup Data Sync with FlexDeploy and Git Integration in Oracle FSM

Effective source control management (SCM) is pivotal in ensuring the seamless tracking and management of functional setup data. In this ...

New in 7.0: Release Work Items

Work item tracking tools play a crucial role in the DevOps process, helping teams plan new features, resolve bugs efficiently, ...

Join DevOps leaders across the globe who receive analysis, tips, and trends in their inbox