Project Properties can be accessed and modified through this API using three services: GET,PUT, and PATCH. These three services allow for the retrieval, complete update, and partial update of Project Properties.
...
If we had a Project in our database with an Id of 11101 and we run a GET request at the following URL: http://host:port/flexdeploy/rest/v1/project/11101
The GET request would return the following JSON Project Property list
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "propertyName": "FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "java", "credentialId": null, "isExpression": false }, { "propertyName": "FD_PARTIAL_FILE_INCLUDES", "propertyValue": "sql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_IGNOREPROPERTY_COM_ERR_EXT_DEFREPLACEMENT_DEFAULT", "propertyValue": null"true", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_IGNORERETRY_FAILURECOUNT_EXT_DEFDEFAULT", "propertyValue": null5, "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_OTHER_ROOT_TARGET_FOLDERSQL_EXTENSIONS", "propertyValue": "/other_root_target_folderseq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null }, "isExpression": false }, { "propertyName": "FDJDBC_SQL_PROPERTYROOT_REPLACEMENTTARGET_DEFAULTFOLDER", "propertyValue": "true/sql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCJDBC_RETRYALTERNATE_COUNTSCHEMA_DEFAULTPASS", "propertyValue": 5, "*****", "credentialId": null }, { "propertyName": "FDJDBC_SQL_EXTENSIONS", "propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null }, { "propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER", "propertyValue": "/sql", "credentialId": null }, { "propertyName": "JDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "*****", "credentialId": 49384 } ] |
PUT
This PUT service will update the propertyValue of each property in the project associated with the Project id specified in the URL.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/property |
Request
PropertyValuePojo
Tip |
---|
All unlisted properties for the project will default to null for PUT requests. |
Response Codes
Example
If we had an Project in our database with a Project Id of 25262 and the following Properties
...
theme | Eclipse |
---|---|
title | Sample PUT JSON Request |
...
49384,
"isExpression": false
}
] |
PUT
This PUT service will update the propertyValue of each property in the project associated with the Project id specified in the URL.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/property |
Request
Attributes | Type | Required | Description |
---|---|---|---|
projectid | URL | Yes | This is the Id of the Project which will have it's Properties updated. |
properties | List<PropertyValuePojo> | Yes | This is the list of properties being set for the project. Attributes for a property object are described below |
PropertyValuePojo
Attributes | Type | Required | Description |
---|---|---|---|
propertyName | String | Yes | This is the key name of the property |
propertyValue | String | No | This is the value that the property with the associated propertyName will be updated to |
credentialId | Long | No | The id of the credential associated to this property. Applicable only for encrypted properties |
isExpression | Boolean | No | Is the propertyValue a groovy expression? @Since 5.3.0.1 |
Tip |
---|
All unlisted properties for the project will default to null for PUT requests. |
Response Codes
HTTP Code | Description |
---|---|
200 | Project was found and its Properties were updated |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Project not found |
500 | Unexpected internal server error |
Example
If we had an Project in our database with a Project Id of 25262 and the following Properties
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "propertyName": "FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "java", "credentialId": null, "isExpression": false }, { "propertyName": "FD_PARTIAL_FILE_INCLUDES", "propertyValue": "", "credentialId": null, "isExpression": false }, { "propertyName": "FDFDJDBC_PARTIALPROPERTY_FILEREPLACEMENT_EXCLUDESDEFAULT", "propertyValue": "javatrue", "credentialId": null, "isExpression": false }, { "propertyName": "FDFDJDBC_PARTIALRETRY_FILECOUNT_INCLUDESDEFAULT", "propertyValue": ""5, "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_IGNORE_COM_ERR_EXT_DEFSQL_EXTENSIONS", "propertyValue": null, "credentialId": null },"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", { "credentialId": "propertyNamenull, "isExpression": "FDJDBC_IGNORE_FAILURE_EXT_DEF",false }, "propertyValue": null, { "credentialIdpropertyName": null }, { "propertyName": "FDJDBC_OTHERSQL_ROOT_TARGET_FOLDER", "propertyValue": "/other_root_target_foldersql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCJDBC_PROPERTYALTERNATE_REPLACEMENTSCHEMA_DEFAULTPASS", "propertyValue": "true*****", "credentialId": null }, { "propertyName": "FDJDBC_RETRY_COUNT_DEFAULT", "propertyValue": 5,49384, "isExpression": false } ] |
When we run a PUT request at the following URL: http://host:port/flexdeploy/rest/v1/project/25262
And the PUT request receives the following JSON Project Properties list
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "credentialIdpropertyName": null "FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "java", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCFD_PARTIAL_SQLFILE_EXTENSIONSINCLUDES", "propertyValue": "sql"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",, "credentialId": null, "credentialIdisExpression": nullfalse }, { "propertyName": "FDJDBC_SQLPROPERTY_ROOTREPLACEMENT_TARGET_FOLDERDEFAULT", "propertyValue": "/sqltrue", "credentialId": null, "isExpression": false }, { "propertyName": "JDBCFDJDBC_ALTERNATERETRY_SCHEMACOUNT_PASSDEFAULT", "propertyValue": 5, "*****"credentialId": null, "credentialIdisExpression": 49384false } ] |
When we run a PUT request at the following URL: http://host:port/flexdeploy/rest/project/25262
And the PUT request receives the following JSON Project Properties list
Code Block | ||||
---|---|---|---|---|
| ||||
[ {}, { "propertyName": "FDFDJDBC_PARTIALSQL_FILE_EXCLUDESEXTENSIONS", "propertyValue": "java", seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_PARTIALALTERNATE_FILESCHEMA_INCLUDESPASS", "propertyValue": "sql", "credentialId": 71422, "isExpression": false } ] |
The PUT request would then update the Project Properties of the Project with Id 25262 and return the following JSON Project Properties list.
Code Block | ||||
---|---|---|---|---|
| ||||
[ "credentialId": null { }, { "propertyName": "FDJDBCFD_IGNOREPARTIAL_COM_ERR_EXT_DEFFILE_EXCLUDES", "propertyValue": null"java", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCFD_IGNOREPARTIAL_FAILUREFILE_EXT_DEFINCLUDES", "propertyValue": null"sql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_OTHERPROPERTY_ROOTREPLACEMENT_TARGET_FOLDERDEFAULT", "propertyValue": "true", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_PROPERTYRETRY_REPLACEMENTCOUNT_DEFAULT", "propertyValue": "true"5, "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_RETRYSQL_COUNT_DEFAULTEXTENSIONS", "propertyValue": 5"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_SQL_ROOT_EXTENSIONSTARGET_FOLDER", "propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",null, "credentialId": null, "isExpression": false }, { "propertyName": "JDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "*****", "credentialId": 71422, } ] |
The PUT request would then update the Project Properties of the Project with Id 25262 and return the following JSON Project Properties list.
Code Block | ||||
---|---|---|---|---|
| ||||
[
{
"propertyName": "FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "java",
"credentialId": null
},
{
"propertyName": "FD_PARTIAL_FILE_INCLUDES",
"propertyValue": "sql",
"credentialId": null
},
{
"propertyName": "FDJDBC_IGNORE_COM_ERR_EXT_DEF",
"propertyValue": null,
"credentialId": null
},
{
"propertyName": "FDJDBC_IGNORE_FAILURE_EXT_DEF",
"propertyValue": null,
"credentialId": null
},
{
"propertyName": "FDJDBC_OTHER_ROOT_TARGET_FOLDER",
"propertyValue": null,
"credentialId": null
},
{
"propertyName": "FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "true",
"credentialId": null
},
{
"propertyName": "FDJDBC_RETRY_COUNT_DEFAULT",
"propertyValue": 5,
"credentialId": null
},
{
"propertyName": "FDJDBC_SQL_EXTENSIONS",
"propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
"credentialId": null
},
{
"propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": null,
"credentialId": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "*****",
"credentialId": 71422
}
] |
PATCH
This PATCH service will update an existing Project's Properties with the information passed through a JSON object. If a property is not listed it will not be updated in the Project.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/property |
Request
...
PropertyValuePojo
...
Response Codes
...
...
...
Example
If we had a Project in our database with an Id of 12723 and had the following attributes
...
theme | Eclipse |
---|---|
title | Project Properties PATCH JSON |
...
"isExpression": false
}
] |
PATCH
This PATCH service will update an existing Project's Properties with the information passed through a JSON object. If a property is not listed it will not be updated in the Project.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{projectid}/property |
Request
Attributes | Type | Required | Description |
---|---|---|---|
projectId | URL | Yes | This is the Id of the Project which will have it's Properties updated. |
properties | List<PropertyValuePojo> | Yes | This is the list of properties being set for the project. Attributes for a property object are described below |
PropertyValuePojo
Attributes | Type | Required | Description |
---|---|---|---|
propertyName | String | Yes | This is the key name of the property |
propertyValue | String | No | This is the value that the property with the associated propertyName will be updated to |
credentialId | Long | No | The id of the credential associated to this property. Applicable only for encrypted properties |
isExpression | Boolean | No | Is the propertyValue a groovy expression? @Since 5.3.0.1 |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Project was found and its Properties were updated |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Project not found |
500 | Unexpected internal server error |
Example
If we had a Project in our database with an Id of 12723 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "propertyName": "FDJDBCFD_RETRYPARTIAL_COUNTFILE_DEFAULTEXCLUDES", "propertyValue": 5"java", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCFD_PARTIAL_SQLFILE_EXTENSIONSINCLUDES", "propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc": "sql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_SQLPROPERTY_ROOTREPLACEMENT_TARGET_FOLDERDEFAULT", "propertyValue": null"true", "credentialId": null, "isExpression": false }, { { "propertyName": "JDBCFDJDBC_RETRY_ALTERNATE_SCHEMA_PASS", COUNT_DEFAULT", "propertyValue": 5, "*****"credentialId": null, "credentialIdisExpression": 71422false } ] |
When we run a PATCH request at the following URL: http://host:port/flexdeploy/rest/project/12723
And the PATCH request receives the following JSON Project Properties object,
Code Block | ||||
---|---|---|---|---|
| ||||
[ }, { "propertyName": "FD_PARTIAL_FILE_EXCLUDES": "FDJDBC_SQL_EXTENSIONS", "propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "propertyValuecredentialId": "java"null, "credentialId "isExpression": nullfalse }, { "propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER", "propertyValue": "/targetfolder"null, "credentialId": null, "isExpression": false }, { "propertyName": "JDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "*****", "credentialId": 71422, "isExpression": 80855false } ] |
When we run a PATCH request at the following URL: http://host:port/flexdeploy/rest/v1/project/12723
And the PATCH request receives the following JSON Project Properties object,
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "propertyName": "FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "java", "credentialId": null, "isExpression": false }, { "propertyName": "FDFDJDBC_SQL_PARTIALROOT_FILETARGET_INCLUDESFOLDER", "propertyValue": "sql/targetfolder", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBCJDBC_IGNOREALTERNATE_COM_ERR_EXT_DEFSCHEMA_PASS", "propertyValue": null"", "credentialId": "credentialId80855, "isExpression": nullfalse }, } ] |
The PATCH request would then update the specified Project's Properties and return the following JSON object
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "propertyName": "FDJDBCFD_IGNOREPARTIAL_FAILUREFILE_EXT_DEFEXCLUDES", "propertyValue": null"java", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_OTHERFD_ROOTPARTIAL_TARGETFILE_FOLDERINCLUDES", "propertyValue": null"sql", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_PROPERTY_REPLACEMENT_DEFAULT", "propertyValue": "true", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_RETRY_COUNT_DEFAULT", "propertyValue": 5, "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_SQL_EXTENSIONS", "propertyValue": "seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null, "isExpression": false }, { "propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER", "propertyValue": "/targetfolder", "credentialId": null, "isExpression": false }, { "propertyName": "JDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "*****", "credentialId": 80855, "isExpression": false } ] |