SCM Instances can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services SCM 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 |
---|
| REST V1 Authentication |
---|
| REST V1 Authentication |
---|
|
...
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 CVS (
CCUCMCVS)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
ClearCaseUCM FDCCUCM of ClearCase ServerClearCaseUCM FDCCUCMUSERClearCase User to connect with. | ClearCaseUCM Password | FDCCUCM_PASSWORD | String | Yes | ClearCase Password for connecting user. CVS ()Property Display Name | Property Key Name | Data Type | Required | Description |
---|
CVS URL | FDCVS_URL | String | Yes | URL to the CVS repository . | CVS User | FDCVS_PASSWORD | String | Yes | CVS repository user. |
CVS Password | FDCVS_USER | String | Yes | CVS repository password. |
File System (FILE)
Property Name | Property Key Name | Data Type | Required | Description |
---|
File Repository Root | FDFILE_REPO_ROOT_FOLDER | String | Yes | Location on the FlexDeploy server of the repository. |
Git (GIT)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
Git URL | FDGIT_URL | String | Yes | URL to the Git repository. |
Git User | FDGIT_USER | String | Yes/No | Git repository user. |
Git Password | FDGIT_PASSWORD | String | Yes/no | Git repository password. |
Git Timeout | FDGIT_TIMEOUT | Integer | No | Timeout for Git command execution. |
Perforce (PERF)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
Perforce Host | FDPERF_HOST | String | Yes | Host of the Perforce repository. |
Perforce Port | FDPERF_PORT | String | Yes | Port of the Perforce repository. |
Perforce User | FDPERF_USER | String | Yes | Perforce User to connect with. |
Perforce User Password | FDPERF_PASSWORD | String | Yes | Perforce Password associated with Perforce User. |
Perforce SSL Connection | FDPERF_IS_SSL | Boolean | Yes | Should ssl be used connecting to the server. |
PVCS (PVCS)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
PVCS Project Database | FDPVCS_PROJECT_DATABASE | String | Yes | Project Database Name. |
PVCS User | FDPVCS_USER | String | Yes | PVCS user to access ProjectDatabases. |
PVCS Password | FDPVCS_PASSWORD | String | Yes | PVCS password to access ProjectDatabases |
Subversion (SVN)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
Subversion URL | FDSVN_URL | String | Yes | URL to the Subversion repository. |
Subversion User | FDSVN_USER | String | Yes | Subversion repository user. |
Subversion Password | FDSVN_PASSWORD | String | Yes | Subversion repository password. |
Subversion Authentication Methods | FDSVN_AUTH_METHODS | String | No | One or more subversion authentication methods. For example, Basic, Digest, Negotiate, NTLM. |
TFVC (TFVC)
Property Display Name | Property Key Name | Data Type | Required | Description |
---|
TFVC URL | FDTFVC_URL | String | Yes | URL to the TFVC repository. |
TFVC User | FDTFVC_USER | String | Yes | TFVC repository user. |
TFVC Password | FDTFVC_USER | String | Yes | 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.
...
Request
Id | Yes | URL | This 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
200 | SCM instance was found and returned |
400 | Bad request |
401Unauthorized | Authentication failure |
500 | Unexpected internal server error |
403 | Authorization failure (no access to resource) |
404 | SCM instance not found |
500 | Unexpected 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 |
---|
theme | Eclipse |
---|
title | SCM Instance - 11101 |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10000,
"10000credentialId": null
}
],
"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 |
---|
theme | Eclipse |
---|
title | SCM Instance GET Return JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password"
*****",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10000,
"10000credentialId": null
}
],
"scmType": "GIT",
"description": "description",
"instanceCode": "CODE1",
"isActive": true
} |
GET (Using Query Parameters)
...
Info |
---|
|
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} isActive={boolean} Examples:To search by code only:http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?instanceCode={code} To search by IsActive only:http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance?isActive={boolean} 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
URL(query)Query - String | This is a URL query parameter for the name which is used to query the SCM instances with. Contains ignore case search |
instanceCode | No |
URL(query)Query - String | This is a URL query parameter for the code which is used to query the SCM instances with. Equals ignore case search |
scmType | No |
URL(query)Query - String | This is a URL query parameter for the type which is used to query the SCM instances with. Equals ignore case search |
isActive | No | Query - Boolean | Returns scm instances where isActive field matches parameter. |
Include Page |
---|
| REST V1 SCM Instance Response |
---|
| REST V1 SCM Instance Response |
---|
|
Response Codes
200 | SCM Instances were found and Search successful and results returned |
400 | Bad request |
401Unauthorized | Authentication failure |
500 | Unexpected 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 |
---|
theme | Eclipse |
---|
title | SCM 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 object403 | Authorization failure (no access to resource) |
500 | Unexpected 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 |
---|
theme | Eclipse |
---|
title | SCM Instance GET Return JSON- 11101 |
---|
|
{
"instanceId": 11101
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10000,
"10000"credentialId": null
}
],
"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.
...
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
...
SCM Instance GET Return JSON |
|
{
"instanceId": 11101 |
...
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10000,
" |
...
credentialId": null
}
],
"scmType": "GIT",
"description": "description",
"instanceCode": "CODE1",
"isActive": true
} |
...
This POST service will create a new SCM instance with the same attributes as the given JSON object.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance |
Parameters
Id | Yes | URL | This is a URL parameter for the Id which is used to find and return an SCM instance with. updated updated updated instanceIdNoLong unique Id The SCM Instance will not be updated from this.scmType | YesPropertyValue
Attributes | Type | Description |
---|
propertyName | String | This is the code of the property |
propertyValue | String | This is the |
scm type of the SCM instance. value of the property |
credentialId | Long | Id of the credential associated with this property. Applicable only for encrypted properties. |
Response Codes
201 | Instance was created successfully |
400 | Bad request |
401Unauthorized | Authentication failure |
404 | Instance not found403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If the POST request receives the following JSON test instance object,
Code Block |
---|
theme | Eclipse |
---|
title | POST JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": "10000"
10000,
"credentialId": null
}
],
"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 |
---|
theme | Eclipse |
---|
title | SCM Instance Post Return JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": "user"null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": "10000"10000,
"credentialId": null
}
],
"scmType": "GIT",
"description": "description",
"instanceCode": "CODE1",
"isActive": true
} |
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 |
---|
|
http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id} |
Request
instanceIdNoLong unique Id The SCM Instance will not be updated from this.
scmType | Yes | String | This is the SCM type of the SCM instancePropertyValue
Attributes | Type | Description |
---|
propertyName | String | This is the code of the property |
propertyValue | String | This is the value of the property |
credentialId | Long | Id of the credential associated with this property. Applicable only for encrypted properties. |
Include Page |
---|
| REST V1 SCM Instance Response |
---|
| REST V1 SCM Instance Response |
---|
|
...
200 | SCM Instance was found and updated |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | SCM Instance not found |
500 | Unexpected internal server error |
...
Code Block |
---|
theme | Eclipse |
---|
title | SCM Instance PUT JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName1",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "url",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "user",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "password",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10000,
"propertyValuecredentialId": "10000"null
}
],
"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
...
Code Block |
---|
theme | Eclipse |
---|
title | SCM Instance PUT Receive JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName2",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "urlPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "userPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "passwordPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": "10001"10001,
"credentialId": null
}
],
"scmType": "GIT",
"description": "descriptionPUT",
"instanceCode": "CODE2",
"isActive": true
} |
The PUT request would then update the SCM instance with Id 11101 and return the the following JSON SCM instance object
Code Block |
---|
theme | Eclipse |
---|
title | SCM Instance PUT Return JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName2",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "urlPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "userPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "*****",
"passwordPUTcredentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10001,
"10001credentialId": null
}
],
"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 |
---|
|
http://host:port/flexdeploy/rest/v1/topology/integrations/scminstance/{Id} |
Request
. The JSON object must have all of the properties of the SCM instance's type.
instanceId | No | LongPropertyValue
Attributes | Type | Description |
---|
propertyName | String | This is the code of the property |
propertyValue | String | This is the |
unique Id SCM instance. The SCM Instance will not be updated from this.scmType | Yes | String | This is the SCM type of the SCM instanceproperty |
credentialId | Long | Id of the credential associated with this property. Applicable only for encrypted properties. |
Include Page |
---|
| REST V1 SCM Instance Response |
---|
| REST V1 SCM Instance Response |
---|
|
Response Codes
200 | SCM Instance was found and patched |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | SCM Instance not found |
500 | Unexpected 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 |
---|
theme | Eclipse |
---|
title | SCM Instance PATCH JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName2",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "urlPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "userPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "passwordPUT"",
"credentialId": 46259
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": 10001,
"10001credentialId": null
}
],
"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 |
---|
theme | Eclipse |
---|
title | SCM Instance Patch Receive JSON |
---|
|
{
"instanceId": 11101,
"instanceName": null,
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "urlPatch"
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "",
"passwordPatchcredentialId": 15825
},
],
"scmType": "GIT",
"description": null,
"instanceCode": "CODE3",
"isActive": true
} |
The PATCH request would then update the SCM instance with Id 11101 and return the the following JSON SCM instance object
Code Block |
---|
theme | Eclipse |
---|
title | SCM Instance PATCH Return JSON |
---|
|
{
"instanceId": 11101,
"instanceName": "ScmName2",
"properties": [
{
"propertyName": "FDGIT_URL",
"propertyValue": "urlPatch",
"credentialId": null
},
{
"propertyName": "FDGIT_USER",
"propertyValue": "userPUT",
"credentialId": null
},
{
"propertyName": "FDGIT_PASSWORD",
"propertyValue": "passwordPatch"*****",
"credentialId": 15825
},
{
"propertyName": "FDGIT_TIMEOUT",
"propertyValue": "10001",
"credentialId": null
}
],
"scmType": "GIT",
"description": "descriptionPUT",
"instanceCode": "CODE3",
"isActive": true
} |
...