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.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.
Include Page | ||||
---|---|---|---|---|
|
...
Request
Parameter | Type | Required | Description |
---|---|---|---|
projectid | URL | Yes | This is a URL parameter for the Project Id which is searched to find and return the Properties associated with it. |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Project was found and it's its properties returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Project was not found with the specified project id |
500 | Unexpected internal server error |
Example
If we had a Project in our database with an Id of 11101 and
the following properties.we run a GET request at the following URL: http://host:port/flexdeploy/rest/project/11101
The GET request would return the following JSON Project Property list
Code Block | ||||
---|---|---|---|---|
| ||||
{[ { "propertyName": "Approved Check Script", "propertyValuepropertyName": "MyCheckScript" }, FD_PARTIAL_FILE_EXCLUDES", { "propertyNamepropertyValue": "ServiceNow Passwordjava", "propertyValuecredentialId": null "Password" }, { { "propertyName": "ServiceNow PortFD_PARTIAL_FILE_INCLUDES", "propertyValue": "MyPort" sql", "credentialId": null }, { { "propertyName": "ServiceNow URLFDJDBC_IGNORE_COM_ERR_EXT_DEF", "propertyValue": null, "MyURL" }, "credentialId": null { }, "propertyName": "ServiceNow User Name", { "propertyName": "FDJDBC_IGNORE_FAILURE_EXT_DEF", "propertyValue": null, "MyUserNamecredentialId": null } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/project/11101
The GET request would return the following JSON Project Property list
Code Block | ||||
---|---|---|---|---|
| ||||
[ {, { "propertyName": "Approved Check Script","FDJDBC_OTHER_ROOT_TARGET_FOLDER", "propertyValue": "MyCheckScript"/other_root_target_folder", "credentialId": null }, { { "propertyName": "ServiceNow PasswordFDJDBC_PROPERTY_REPLACEMENT_DEFAULT", "propertyValue": "true", "*****"credentialId": null }, { { "propertyName": "ServiceNow PortFDJDBC_RETRY_COUNT_DEFAULT", "propertyValue": "MyPort" }, 5, { "propertyNamecredentialId": "ServiceNow URL", "propertyValue": "MyURL"null }, { { "propertyName": "ServiceNow User Name","FDJDBC_SQL_EXTENSIONS", "propertyValue": "MyUserName"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null } ] |
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
,
{
"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
Attributes | Type | Required | Description |
---|---|---|---|
projectid | URL | Yes | This is the Id of the Project which will have it's Properties updated. |
propertyNameproperties | StringList<PropertyValuePojo> | NoYes | This is the name list of the type of the single property associated with it. (Can be many)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 |
Tip |
---|
All unlisted properties for the project will default to null for PUT requests. |
Response Codes
HTTP Code | Description |
---|---|
200 | Project was found and it's 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
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { { "propertyName": "Approved Check Script","FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "MyCheckScriptjava", }, "credentialId": null { }, "propertyName": "ServiceNow Password", { "propertyValuepropertyName": "MyPassword" }, {FD_PARTIAL_FILE_INCLUDES", "propertyNamepropertyValue": "ServiceNow Port", "propertyValuecredentialId": null "MyPort" }, { { "propertyName": "ServiceNow URLFDJDBC_IGNORE_COM_ERR_EXT_DEF", "propertyValue": "MyURL"null, "credentialId": null }, { { "propertyName": "ServiceNow User Name","FDJDBC_IGNORE_FAILURE_EXT_DEF", "propertyValue": null, "MyUserNamecredentialId": null } ] |
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": "Approved Check ScriptFDJDBC_OTHER_ROOT_TARGET_FOLDER", "propertyValue": "Put1" /other_root_target_folder", "credentialId": null }, { { "propertyName": "ServiceNow PasswordFDJDBC_PROPERTY_REPLACEMENT_DEFAULT", "propertyValue": "Put2true", }, "credentialId": null { }, "propertyName": "ServiceNow Port",{ "propertyValuepropertyName": "Put3" }, {FDJDBC_RETRY_COUNT_DEFAULT", "propertyNamepropertyValue": "ServiceNow URL",5, "propertyValuecredentialId": null "Put4" }, { { "propertyName": "ServiceNow User Name","FDJDBC_SQL_EXTENSIONS", "propertyValue": "Put5"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "credentialId": null } ] |
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": "Approved Check Script","FDJDBC_SQL_ROOT_TARGET_FOLDER", "propertyValue": "Put1/sql", }, "credentialId": null { }, { "propertyName": "ServiceNow PasswordJDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "*****" }, { "propertyName, "credentialId": "ServiceNow Port", 49384 } ] |
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 | ||||
---|---|---|---|---|
| ||||
[ { "propertyValue": "Put3" }, "propertyName": "FD_PARTIAL_FILE_EXCLUDES", { "propertyNamepropertyValue": "ServiceNow URLjava", "propertyValuecredentialId": null "Put4" }, { { "propertyName": "ServiceNow User Name","FD_PARTIAL_FILE_INCLUDES", "propertyValue": "Put5sql", } ] |
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
...
This is the name of the type of the single property associated with it. (Can be many)
...
Response Codes
...
...
...
Example
...
"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": "",
"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": "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
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 |
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": "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
}
] |
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",
"propertyValue": "java",
"credentialId": null
},
{
"propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": "/targetfolder",
"credentialId": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "",
"credentialId": 80855
}
] |
The PATCH request would then update the specified Project's Properties and return the following JSON object
Code Block | ||||
---|---|---|---|---|
| ||||
[ { { "propertyName": "Approved Check Script","FD_PARTIAL_FILE_EXCLUDES", "propertyValue": "java", "MyCheckScriptcredentialId": null }, { { "propertyName": "ServiceNow PasswordFD_PARTIAL_FILE_INCLUDES", "propertyValue": "MyPasswordsql", }, "credentialId": null { }, "propertyName": "ServiceNow Port",{ "propertyValuepropertyName": "MyPort" }, {FDJDBC_IGNORE_COM_ERR_EXT_DEF", "propertyNamepropertyValue": null, "ServiceNow URL", "propertyValuecredentialId": null "MyURL" }, { { "propertyName": "ServiceNow User Name",FDJDBC_IGNORE_FAILURE_EXT_DEF", "propertyValue": "MyUserName" null, } ] |
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 | ||||
---|---|---|---|---|
| ||||
[ "credentialId": null }, { "propertyName": "ServiceNow URLFDJDBC_OTHER_ROOT_TARGET_FOLDER", "propertyValue": null, "PatchedURLcredentialId": null }, { { "propertyName": "ServiceNow User NameFDJDBC_PROPERTY_REPLACEMENT_DEFAULT", "propertyValue": "PatchedUserName"true", "credentialId": null } ] |
The PATCH request would then update the specified Project's Properties and return the following JSON object
Code Block | ||||
---|---|---|---|---|
| ||||
[ }, { "propertyName": "Approved Check Script",FDJDBC_RETRY_COUNT_DEFAULT", "propertyValue": "MyCheckScript" 5, }, "credentialId": null { }, "propertyName": "ServiceNow Password",{ "propertyValuepropertyName": "MyPassword" }, {FDJDBC_SQL_EXTENSIONS", "propertyNamepropertyValue": "ServiceNow Port",seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc", "propertyValuecredentialId": null "MyPort" }, { { "propertyName": "propertyName": "ServiceNow URL","FDJDBC_SQL_ROOT_TARGET_FOLDER", "propertyValue": "PatchedURL/targetfolder", }, "credentialId": null { }, { "propertyName": "ServiceNow User NameJDBC_ALTERNATE_SCHEMA_PASS", "propertyValue": "PatchedUserName*****", "credentialId": 80855 } ] |