Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

AnchorTopTopSCM Instances can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of SCM Instances.

...

Include Page

...

titleBase URL for SCM Instance REST API

REST V1 Authentication
REST V1 Authentication

Table of Contents
maxLevel2

Each function returns a JSON SCM instance object. The test SCM instance Object is an object that has these attributes,

AttributesTypeDescriptioninstanceIdLongThis is an id of the SCM Instance.instanceCodeStringThis is a code of the SCM instance.instanceNameStringThis is the unique name of the SCM instance.scmTypeStringThis is the SCM type of the SCM instance.isActiveBooleanThis is a Boolean that tracks whether or not the SCM instance is active.descriptionStringThis is the description of the SCM instance.propertiesList<PropertyValuePojo>This is a list of the Properties associated with the SCM instance.

Each JSON SCM instance object contains a list of property values. The property value object has these attributes:

AttributesTypeDescriptionpropertyNameStringThis is the name of the propertypropertyValueStringThis is the value of the property

Currently there are 8 different source control management types that are supported in Flex Deploy. The scmType value is shown after the name of each.

ClearCaseUCM (CCUCM

Currently there are 8 different source control management types that are supported in Flex Deploy. The scmType value is shown after the name of each.

ClearCaseUCM (CCUCM)

Property Display NameProperty Key NameData TypeRequiredDescription
ClearCaseUCM URLFDCCUCM_URLStringYesURL of the ClearCase Server.
ClearCaseUCM UserFDCCUCM_USERStringYesClearCase User to connect with.
ClearCaseUCM PasswordFDCCUCM_PASSWORDStringYesClearCase Password for connecting user.

CVS (CVS)

Property Display NameProperty Key NameData TypeRequiredDescription
CVS URLFDCVS_URLStringYesURL to the CVS repository.
CVS UserFDCVS_PASSWORDStringYesCVS repository user.
CVS PasswordFDCVS_USERStringYesCVS repository password.

File System (FILE)

Property NameProperty Key NameData TypeRequiredDescription
File Repository RootFDFILE_REPO_ROOT_FOLDERStringYesLocation on the FlexDeploy server of the repository.

Git (GIT)

Property Display NameProperty Key NameData TypeRequiredDescription
ClearCaseUCM
Git URL
FDCCUCM
FDGIT_URLStringYesURL
of
to the
ClearCase Server
Git repository.
ClearCaseUCM
Git User
FDCCUCM
FDGIT_USERStringYes
ClearCase User to connect with
/NoGit repository user.
ClearCaseUCM
Git Password
FDCCUCM
FDGIT_PASSWORDStringYes
ClearCase Password for connecting user.

CVS (CVS)

/noGit repository password.
Git TimeoutFDGIT_TIMEOUTIntegerNoTimeout for Git command execution.

Perforce (PERF)

Property Display NameProperty Key NameData TypeRequiredDescription
CVS URL
Perforce Host
FDCVS
FDPERF_
URL
HOSTStringYes
URL to
Host of the
CVS
Perforce repository.
CVS User
Perforce Port
FDCVS
FDPERF_
PASSWORD
PORTStringYes
CVS
Port of the Perforce repository
user
.
CVS Password
Perforce User
FDCVS
FDPERF_USERStringYes
CVS repository password.

File System (FILE)

Property NameProperty Key NameData TypeRequiredDescriptionFile Repository RootFDFILE_REPO_ROOT_FOLDERStringYesLocation on the FlexDeploy server of the repository.Git (GIT
Perforce User to connect with.
Perforce User PasswordFDPERF_PASSWORDStringYesPerforce Password associated with Perforce User.
Perforce SSL ConnectionFDPERF_IS_SSLBooleanYesShould ssl be used connecting to the server.

PVCS (PVCS)

Property Display NameProperty Key NameData TypeRequiredDescription
Git URLFDGIT_URL
PVCS Project DatabaseFDPVCS_PROJECT_DATABASEStringYes
URL to the Git repository
Project Database Name.
Git
PVCS User
FDGIT
FDPVCS_USERStringYes
/No
Git repository
PVCS user to access ProjectDatabases.
Git
PVCS Password
FDGIT
FDPVCS_PASSWORDStringYes
/noProperty Display NameProperty Key NameData
Git repository password.Git TimeoutFDGIT_TIMEOUTIntegerNoTimeout for Git command execution.

Perforce (PERF)

PVCS password to access ProjectDatabases

Subversion (SVN)

Property Display NameProperty Key NameData TypeRequiredDescription
Perforce Host
Subversion URL
FDPERF
FDSVN_
HOST
URLStringYes
Host of
URL to the
Perforce
Subversion repository.
Perforce Port
Subversion User
FDPERF
FDSVN_
PORT
USERStringYes
Port of the Perforce
Subversion repository user.
Perforce User
Subversion Password
FDPERF
FDSVN_
USERFDPERF_PASSWORD
PASSWORDStringYes
Perforce User to connect with.Perforce User Password
Subversion repository password.
Subversion Authentication MethodsFDSVN_AUTH_METHODSString
YesPerforce Password associated with Perforce User.Perforce SSL ConnectionFDPERF_IS_SSLBooleanYesShould ssl be used connecting to the server.
PVCS (PVCS
NoOne or more subversion authentication methods. For example, Basic, Digest, Negotiate, NTLM.

TFVC (TFVC)

Property Display NameProperty Key NameData TypeRequiredDescription
PVCS Project DatabaseFDPVCS_PROJECT_DATABASE
TFVC URLFDTFVC_URLStringYes
Project Database Name
URL to the TFVC repository.
PVCS
TFVC User
FDPVCS
FDTFVC_USERStringYes
PVCS
TFVC repository user
to access ProjectDatabases
.
PVCS
TFVC Password
FDPVCS
FDTFVC_
PASSWORD
USERStringYes
PVCS password to access ProjectDatabases

Subversion (SVN)

Property Display NameProperty Key NameData TypeRequiredDescriptionSubversion URLFDSVN_URLStringYesURL to the Subversion repository.Subversion UserFDSVN_USERStringYesSubversion repository user.Subversion PasswordFDSVN_PASSWORDStringYesSubversion repository password.Subversion Authentication MethodsFDSVN_AUTH_METHODSStringNoOne or more subversion authentication methods. For example, Basic, Digest, Negotiate, NTLM.

TFVC (TFVC)

Property Display NameProperty Key NameData TypeRequiredDescriptionTFVC URLFDTFVC_URLStringYesURL to the TFVC repository.TFVC UserFDTFVC_USERStringYesTFVC repository user.TFVC PasswordFDTFVC_USERStringYesTFVC repository password.

Back to Top

GET

There are two implementations of GET. One will find a SCM instance with the given Id and return the JSON representation of the SCM instance. The other will find a list of SCM instances matching the parameters supplied to it.

GET (Using Id)

This GET service will find a SCM instance with the given Id and return the JSON representation of the object.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id}

Parameters

Parameter
Required
Type
Description

Id

YesURLThis is a URL parameter for the Id which is used to find and return a SCM instance with.

Response Codes

HTTP Code
Description
200SCM instance was found and returned400Bad request401Unauthorized500Unexpected internal server error

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance - 11101
{ "instanceId": 11101, "instanceName": "ScmName1", "properties": [ { "propertyName": "FDGIT_URL", "propertyValue"
TFVC repository password.

GET

There are two implementations of GET. One will find a SCM instance with the given Id and return the JSON representation of the SCM instance. The other will find a list of SCM instances matching the parameters supplied to it.

GET (Using Id)

This GET service will find a SCM instance with the given Id and return the JSON representation of the object.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id}

Request

Parameter
Required
Type
Description

Id

YesURLThis is a URL parameter for the Id which is used to find and return a SCM instance with.

Include Page
REST V1 SCM Instance Response
REST V1 SCM Instance Response

Response Codes

HTTP Code
Description
200SCM instance was found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance - 11101
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/11101

The GET request would return the  following JSON SCM instance object

Code Block
themeEclipse
titleSCM Instance GET Return JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/11101

The GET request would return the  following JSON SCM instance object

Code Block
themeEclipse
titleSCM Instance GET Return JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

Back to Top

GET (Using Query Parameters)

This GET service will find a SCM instance by querying based on a name, code, and/or type of the SCM and return the JSON representations of the objects. If no query parameters are given this request will return the entire list of SCM instances.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

instanceName={name}

instanceCode={code}

scmType={type}

Examples:
To search by code only:

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?instanceCode={code}

To search by name only:

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?instanceName={name}

To search by type and name:

http://host:port/flexdeploy/rest/v1/topology/scminstance?scmType={type}&instanceName={name}

Tip

The query parameters are not case sensitive. Searching by instanceName=NAME is the same as searching by instanceName=name.

Parameters

Parameter
Required
Type
Description

instanceName

NoURL(query)This is a URL query parameter for the name which is used to query the SCM instances with.instanceCodeNoURL(query)This is a URL query parameter for the code which is used to query the SCM instances with.scmTypeNoURL(query)This is a URL query parameter for the type which is used to query the SCM instances with.

Response Codes

HTTP Code
Description
200SCM Instances were found and returned400Bad request401Unauthorized500Unexpected internal server error

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance - 11101
{

GET (Using Query Parameters)

This GET service will find a SCM instance by querying based on a name, code, and/or type of the SCM and return the JSON representations of the objects. If no query parameters are given this request will return the entire list of SCM instances.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

instanceName={name}

instanceCode={code}

scmType={type}

Examples:
To search by code only:

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?instanceCode={code}

To search by name only:

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?instanceName={name}

To search by type and name:

http://host:port/flexdeploy/rest/v1/topology/scminstance?scmType={type}&instanceName={name}


Tip

The query parameters are not case sensitive. Searching by instanceName=NAME is the same as searching by instanceName=name.

Request

Parameter
Required
Type
Description

instanceName

NoURL(query)This is a URL query parameter for the name which is used to query the SCM instances with.
instanceCodeNoURL(query)This is a URL query parameter for the code which is used to query the SCM instances with.
scmTypeNoURL(query)This is a URL query parameter for the type which is used to query the SCM instances with.

Include Page
REST V1 SCM Instance Response
REST V1 SCM Instance Response

Response Codes

HTTP Code
Description
200SCM Instances were found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance - 11101
{
   "instanceId": 11101
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?code=code1&name=ScmName1

The GET request would return the  following JSON SCM instance object

Code Block
themeEclipse
titleSCM Instance GET Return JSON
{
   "instanceId": 11101
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

...

POST

This POST service will create a new SCM instance with the same attributes as the given JSON object.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance

Parameters

...

Parameters

...

Required

...

Type

...

Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an SCM instance with.
descriptionNoStringThis is the description that the SCM instance's description will be updated to.
isActiveYesBooleanThis is the isActive Boolean that the SCM instance's isActive Boolean will be updated to.
instanceCodeYesStringThis is the code that the SCM instance's code will be updated to.
propertiesYes/NoList<PropertyValue>This is the list of Properties that will be updated in the SCM instance. The JSON object must have all of the properties of the SCM instance's type. 
instanceNameYesStringThis is the name that the SCM instance's name will be updated to.
scmTypeYesStringThis is the scm type of the SCM instance. 

Response Codes

HTTP Code
Description
201Instance was created successfully
400Bad request
401Unauthorized
404Instance not found
500Unexpected internal server error

Example

If the POST  request receives the following JSON test instance object,

Code Block
themeEclipse
titlePOST JSON
{
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_

...

URL",
         "propertyValue": "

...

url"
      },
            {
     

...

    "

...

propertyName": "

...

FDGIT_USER",
         "

...

propertyValue": "

...

user"

...


     

...

 },
      

...

 

...

 

...

Parameters

Parameters
Required
Type
Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an SCM instance with.descriptionNoStringThis is the description that the SCM instance's description will be updated to.isActiveYesBooleanThis is the isActive Boolean that the SCM instance's isActive Boolean will be updated to.instanceCodeYesStringThis is the code that the SCM instance's code will be updated to.propertiesYes/NoList<PropertyValuePojo>This is the list of Properties that will be updated in the SCM instance. The JSON object must have all of the properties of the SCM instance's type. instanceNameYesStringThis is the name that the SCM instance's name will be updated to.instanceIdNoLongThis is the unique Id of the SCM instance. The SCM Instance will not be updated from this.scmTypeYesStringThis is the scm type of the SCM instance. 

Response Codes

HTTP Code
Description
201Instance was created successfully400Bad request401Unauthorized404Instance not found500Unexpected internal server error

Example

If the POST  request receives the following JSON test instance object,

Code Block
themeEclipse
titlePOST JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
                {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

The following SCM instance object will then be created as a new row in the database.

Code Block
themeEclipse
titleSCM Instance Post Return JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_
URL
USER",
         "propertyValue": "
url
user"
      },
            {
         "propertyName": "FDGIT_
USER
PASSWORD",
         "propertyValue": "
user
password"
      },
            {
         "propertyName": "FDGIT_
PASSWORD
TIMEOUT",
         "propertyValue": "
password
10000"
      }
,

   ],
   
"scmType": "GIT",
 
{
  
"propertyName
"description": "
FDGIT_TIMEOUT
description",

   
"
propertyValue
instanceCode": "
10000
CODE1",
   "isActive": true
} ], "scmType": "GIT", "description": "description", "instanceCode": "CODE1", "isActive": true }

The following SCM instance object will then be created as a new row in the database.

Code Block
themeEclipse
titleSCM Instance Post Return JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

Back to Top

PUT

This PUT service will update all attributes of a SCM instance with the given Id based on the attributes of a JSON object paramaters.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id}

Code Block
themeEclipse
titleSample PUT JSON Request
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

Parameters

...

Parameters

...

Required

...

Type

...

Description

...

Response Codes

...

HTTP Code

...

Description

...

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance PUT JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "url"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "user"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "password"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10000"
      }
   ],
   "scmType": "GIT",
   "description": "description",
   "instanceCode": "CODE1",
   "isActive": true
}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/11101

...

}

PUT

This PUT service will update all attributes of a SCM instance with the given Id based on the attributes of a JSON object paramaters.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id}

Request

Parameters
Required
Type
Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an SCM instance with.
descriptionNoStringThis is the description that the SCM instance's description will be updated to.
isActiveYesBooleanThis is the isActive Boolean that the SCM instance's isActive Boolean will be updated to.
instanceCodeYesStringThis is the code that the SCM instance's code will be updated to.
propertiesYes/NoList<PropertyValue>This is the list of Properties that will be updated in the SCM instance. The JSON object must have all of the properties of the SCM instance's type. 
instanceNameYesStringThis is the name that the SCM instance's name will be updated to.
scmTypeYesStringThis is the SCM type of the SCM instance.

Include Page
REST V1 SCM Instance Response
REST V1 SCM Instance Response

Response Codes

HTTP Code
Description
200SCM Instance was found and updated
400Bad request
401Unauthorized
404SCM Instance not found
500Unexpected internal server error

Example

If we had a SCM instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance PUT Receive JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName2ScmName1",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "urlPUTurl"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "userPUTuser"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "passwordPUTpassword"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "1000110000"
      }
   ],
   "scmType": "GIT",
   "description": "descriptionPUTdescription",
   "instanceCode": "CODE2CODE1",
   "isActive": true
}

...

}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/11101

And the PUT request recieves the following JSON SCM instace object,

Code Block
themeEclipse
titleSCM Instance PUT Return Receive JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName2",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "urlPUT"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "userPUT"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "passwordPUT"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10001"
      }
   ],
   "scmType": "GIT",
   "description": "descriptionPUT",
   "instanceCode": "CODE2",
   "isActive": true
}

Back to Top

PATCH

This PATCH service will update an existing SCM instance with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the SCM instance.

...

titleAPI URL

...

The PUT request would then update the SCM instance with Id 11101 and return the  following JSON SCM instance object

Code Block
themeEclipse
title

...

SCM Instance PUT Return JSON

...

{
   "instanceId": 11101,
   "instanceName": "

...

ScmName2",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "

...

urlPUT"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "

...

userPUT"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "

...

passwordPUT"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "

...

10001"
      }
   ],
   "scmType": "GIT",
   "description": "

...

descriptionPUT",
   "instanceCode": "

...

CODE2",
   "isActive": true
}

PATCH

This PATCH service will update an existing SCM instance with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the SCM instance.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id}

Request

This is the unique Id of the SCM instance The SCM Instance will not be updated from this.
Parameters
Required
Type
Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an SCM instance with.
descriptionNoStringThis is the description that the SCM instance's description will be updated to.
isActiveNoBooleanThis is the isActive Boolean that the SCM instance's isActive Boolean will be updated to.
instanceCodeNoStringThis is the code that the SCM instance's code will be updated to.
propertiesNoList<PropertyValuePojo>List<PropertyValue>This is the list of Properties that will be updated in the SCM instance. The JSON object must have all of the properties of the SCM instance's type. 
instanceNameNoStringThis is the name that the SCM instance's name will be updated to.instanceIdNoLong.
scmTypeYesStringThis is the SCM type of the SCM instance.

Include Page
REST V1 SCM Instance Response
REST V1 SCM Instance Response

Response Codes

HTTP Code
Description
200SCM Instance was found and patched
400Bad request
401Unauthorized
404SCM Instance not found
500Unexpected internal server error

Example

If we had an test instance in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleSCM Instance PATCH JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName2",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "urlPUT"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "userPUT"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "passwordPUT"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10001"
      }
   ],
   "scmType": "GIT",
   "description": "descriptionPUT",
   "instanceCode": "CODE2",
   "isActive": true
}

When we run a PATCH request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/11101

And the PATCH request receives the following JSON SCM instance object,

Code Block
themeEclipse
titleSCM Instance Patch Receive JSON
{
   "instanceId": 11101,
   "instanceName": null,
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "urlPatch"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "passwordPatch"
      },
   ],
   "scmType": "GIT",
   "description": null,
   "instanceCode": "CODE3",
   "isActive": true
}

The PATCH request would then update the SCM instance with Id 11101 and return the  following JSON SCM instance object

Code Block
themeEclipse
titleSCM Instance PATCH Return JSON
{
   "instanceId": 11101,
   "instanceName": "ScmName2",
   "properties":    [
            {
         "propertyName": "FDGIT_URL",
         "propertyValue": "urlPatch"
      },
            {
         "propertyName": "FDGIT_USER",
         "propertyValue": "userPUT"
      },
            {
         "propertyName": "FDGIT_PASSWORD",
         "propertyValue": "passwordPatch"
      },
            {
         "propertyName": "FDGIT_TIMEOUT",
         "propertyValue": "10001"
      }
   ],
   "scmType": "GIT",
   "description": "descriptionPUT",
   "instanceCode": "CODE3",
   "isActive": true
}
Back to Top