...
...
...
...
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.
Info |
---|
title | Base URL for Project Properties REST API |
---|
|
http://host:port/flexdeploy/rest/project/{projectid} |
Each function returns a JSON of Project Property objects. The Project Property object has these attributes:
...
Back to Top
GET
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 |
---|
| REST V1 Authentication |
---|
| REST V1 Authentication |
---|
|
GET
There is one implementation which will find a list of Project Properties associated with the URL specified Project and return the JSON representation of the list of Project Properties.
...
Info |
---|
|
http://host:port/flexdeploy/rest/v1/project/{projectid}/property |
...
Request
projectid | URL | Yes | This is a URL parameter for the Project Id which is searched to find and return the Properties associated with it. |
Response Include Page |
---|
| REST V1 Project Properties Response |
---|
| REST V1 Project Properties Response |
---|
|
Response Codes
200 | Project was found and it's its properties returned |
400 | Bad request |
401Unauthorized | 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. Code Block |
---|
theme | 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 |
---|
theme | Eclipse |
---|
title | Project 11101 Properties |
---|
| { |
[
{
"propertyName": "Approved Check Script","FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "MyCheckScriptjava"
},
{ "credentialId": "propertyNamenull,
"isExpression": "ServiceNow Password"false,
"propertyValue": "Password" "overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
{ "propertyName": "ServiceNow PortFD_PARTIAL_FILE_INCLUDES",
"propertyValue": "MyPortsql"
},
{ "credentialId": "propertyNamenull,
"isExpression": "ServiceNow URL",
"propertyValue": "MyURL"false,
"overrideDetailsPojo": {
"environmentId": null,
"instanceId": 5678
}
},
{
{ "propertyName": "ServiceNow User Name",FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "MyUserName"true",
} |
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 |
---|
theme | Eclipse |
---|
title | Project 11101 Properties GET Return JSON |
---|
|
[
{
"propertyName": "Approved Check Script","credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyValuepropertyName": "MyCheckScript"FDJDBC_RETRY_COUNT_DEFAULT",
}, "propertyValue": 5,
{ "propertyNamecredentialId": null,
"isExpression"ServiceNow: Password"false,
"overrideDetailsPojo": null
"propertyValue": "*****"},
},
{
{ "propertyName": "ServiceNow PortFDJDBC_SQL_EXTENSIONS",
"propertyValue": "MyPort"seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
}, "credentialId": {
"propertyNamenull,
"isExpression": "ServiceNow URL"false,
"propertyValue "overrideDetailsPojo": "MyURL"null
},
{
{ "propertyName": "ServiceNow User Name",FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": "MyUserName/sql",
}
] |
Back to Top
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/project/{projectid} |
Code Block |
---|
theme | Eclipse |
---|
title | Sample PUT JSON Request |
---|
|
[
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "Approved Check ScriptJDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "Put1"
},
{
"propertyName": "ServiceNow Password",
"propertyValue": "Put2"
},
{
"propertyName": "ServiceNow Port",
"propertyValue": "Put3"
},
{
"propertyName": "ServiceNow URL",
"propertyValue": "Put4"
},
{
"propertyName": "ServiceNow User Name",
"propertyValue": "Put5"
}
] |
Parameters*****",
"credentialId": 49384,
"isExpression": false,
"overrideDetailsPojo": 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
PropertyValuePojo
Attributes | Type | Required | Description |
---|
projectidURL Id Project which will have it's Properties updated.propertyNameproperty |
propertyValue | String | No | This is the |
name of the type of the single property associated with it. (Can be many)propertyValue | String | No | This is the value that will be updated to for the property with the associated propertyName. (Can be many) |
Note: unlisted properties will default to null.
Response Codes
200 | Project was found and it's Properties were updated |
400 | Bad request |
401 | Unauthorized |
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
...
theme | Eclipse |
---|
title | Sample PUT JSON Request |
---|
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 |
overrideDetails | OverrideDetailsPojo | No* | If you want to update an overridden property, you need to set this. If not it's null.*only required if updating overridden properties. |
OverrideDetailsPojo
Attributes | Type | Required | Description |
---|
environmentId | Long | No* | Id of the environment being overridden. *null if overriding all. |
instanceId | Long | No* | Id of the instance being overridden. *null if overriding all. |
Tip |
---|
All unlisted properties for the project will default to null for PUT requests. |
Response Codes
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 |
---|
theme | Eclipse |
---|
title | Sample PUT JSON Request |
---|
|
[
{
"propertyValuepropertyName": "MyPassword"
FD_PARTIAL_FILE_EXCLUDES",
}, {"propertyValue": "java",
"propertyNamecredentialId": null,
"ServiceNow Port"isExpression": false,
"overrideDetailsPojo": {
"environmentId": "propertyValue1234,
"instanceId": "MyPort" 5678
}
},
{
{ "propertyName": "ServiceNow URL"FD_PARTIAL_FILE_INCLUDES",
"propertyValue": "MyURL"
},
{ "credentialId": null,
"isExpression": false,
"propertyNameoverrideDetailsPojo": {
"ServiceNow User Name",
"environmentId": null,
"instanceId": 5678
}
"propertyValue": "MyUserName"},
}
] |
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 |
---|
theme | Eclipse |
---|
title | Project 25262 Property PUT Receive JSON |
---|
|
[
{{
"propertyName": "Approved Check Script",FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "Put1true"
},
{ "credentialId": "propertyNamenull,
"isExpression": "ServiceNow Password"false,
"propertyValue "overrideDetailsPojo": "Put2"null
},
{
{ "propertyName": "ServiceNow Port"FDJDBC_RETRY_COUNT_DEFAULT",
"propertyValue": "Put3"
}5,
{ "credentialId": "propertyNamenull,
"isExpression": "ServiceNow URL"false,
"propertyValue "overrideDetailsPojo": 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",
}
] |
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 |
---|
theme | Eclipse |
---|
title | Project Properties PUT Return JSON |
---|
|
[
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "Approved Check Script",FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": "Put1/sql",
}, "credentialId": {null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "ServiceNow PasswordJDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "*****",
},
{
"propertyName": "ServiceNow Port",
"propertyValue": "Put3"
},
{
"propertyName": "ServiceNow URL", "credentialId": 49384,
"isExpression": false,
"overrideDetailsPojo": null
}
] |
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 |
---|
theme | Eclipse |
---|
title | Project 25262 Property PUT Receive JSON |
---|
|
[
{
"propertyValuepropertyName": "Put4"FD_PARTIAL_FILE_EXCLUDES",
}, "propertyValue": "java",
{ "propertyNamecredentialId": null,
"isExpression"ServiceNow: User Name",
"propertyValue": "Put5"
}
] |
Back to Top
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/project/{projectid} |
Parameters
...
This is the name of the type of the single property associated with it. (Can be many)
...
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 |
---|
...
false,
"overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
"propertyName": "FD_PARTIAL_FILE_INCLUDES",
"propertyValue": "sql",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": null,
"instanceId": 5678
}
},
{
"propertyName": "FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "true",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "FDJDBC_RETRY_COUNT_DEFAULT",
"propertyValue": 5,
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": 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,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "",
"credentialId": 71422,
"isExpression": false,
"overrideDetailsPojo": 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 |
---|
theme | Eclipse |
---|
title | Project Properties PUT Return JSON |
---|
|
[
{
"propertyName": "FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "java",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
"propertyName": "FD_PARTIAL_FILE_INCLUDES",
"propertyValue": "sql",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": null,
"instanceId": 5678
}
},
{
"propertyName": "FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "true",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "FDJDBC_RETRY_COUNT_DEFAULT",
"propertyValue": 5,
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": 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,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": null,
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "*****",
"credentialId": 71422,
"isExpression": false,
"overrideDetailsPojo": null
}
] |
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
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 |
overrideDetails | OverrideDetailsPojo | No* | If you want to update an overridden property, you need to set this. If not it's null.*only required if updating overridden properties. |
OverrideDetailsPojo
Attributes | Type | Required | Description |
---|
environmentId | Long | No* | Id of the environment being overridden. *null if overriding all. |
instanceId | Long | No* | Id of the instance being overridden. *null if overriding all. |
Include Page |
---|
| REST V1 Project Properties Response |
---|
| REST V1 Project Properties Response |
---|
|
Response Codes
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 |
---|
theme | Eclipse |
---|
title | Project Properties PATCH JSON |
---|
|
[
{
"propertyName": "FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "java",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
"propertyName": "FD_PARTIAL_FILE_INCLUDES",
"propertyValue": "sql",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": null,
"instanceId": 5678
}
},
{
"propertyName": "FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "true",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "FDJDBC_RETRY_COUNT_DEFAULT",
"propertyValue": 5,
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": 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,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": null,
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "*****",
"credentialId": 71422,
"isExpression": false,
"overrideDetailsPojo": null
}
] |
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 |
---|
theme | Eclipse |
---|
title | Project PATCH Receive JSON |
---|
|
[
{
"propertyName": "FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "java",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
"propertyName": "FDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": "/targetfolder",
"credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "",
"credentialId": 80855,
"isExpression": false,
"overrideDetailsPojo": null
}
] |
The PATCH request would then update the specified Project's Properties and return the following JSON object
Code Block |
---|
theme | Eclipse |
---|
title | Project Properties PATCH Return JSON |
---|
|
[
{
"propertyName": "FD_PARTIAL_FILE_EXCLUDES",
"propertyValue": "MyPasswordjava",
}, "credentialId": {
"propertyName": "ServiceNow Port",
"propertyValue": "MyPort"null,
"isExpression": false,
"overrideDetailsPojo": {
"environmentId": 1234,
"instanceId": 5678
}
},
{
{ "propertyName": "ServiceNow URLFD_PARTIAL_FILE_INCLUDES",
"propertyValue": "MyURLsql"
},
{ "propertyNamecredentialId": null,
"ServiceNow User Name",
"propertyValue": "MyUserName"
}
] |
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 |
---|
theme | Eclipse |
---|
title | Project PATCH Receive JSON |
---|
|
[ "isExpression": false,
"overrideDetailsPojo": {
"environmentId": null,
"instanceId": 5678
}
},
{
"propertyName": "ServiceNow URLFDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
"propertyValue": "PatchedURLtrue",
}, "credentialId": null,
"isExpression": false,
{ "overrideDetailsPojo": null
},
"propertyName": "ServiceNow User{
Name", "propertyValuepropertyName": "PatchedUserName"
}
] |
The PATCH request would then update the specified Project's Properties and return the following JSON object
Code Block |
---|
theme | Eclipse |
---|
title | Project Properties PATCH Return JSON |
---|
|
[FDJDBC_RETRY_COUNT_DEFAULT",
{"propertyValue": 5,
"propertyNamecredentialId": null,
"isExpression"Approved: Check Script",false,
"overrideDetailsPojo": null
},
"propertyValue": "MyCheckScript" {
}, "propertyName": "FDJDBC_SQL_EXTENSIONS",
{ "propertyNamepropertyValue": "ServiceNow Passwordseq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
"propertyValue": "MyPassword" "credentialId": null,
"isExpression": false,
"overrideDetailsPojo": null
},
{
{ "propertyName": "ServiceNow PortFDJDBC_SQL_ROOT_TARGET_FOLDER",
"propertyValue": "MyPort"
},
/targetfolder",
{ "propertyNamecredentialId": "ServiceNow URL"null,
"propertyValue "isExpression": false,
"PatchedURL"
},
{overrideDetailsPojo": null
},
{
"propertyName": "ServiceNow User NameJDBC_ALTERNATE_SCHEMA_PASS",
"propertyValue": "*****",
"credentialId": "propertyValue80855,
"isExpression": false,
"PatchedUserNameoverrideDetailsPojo": null
}
] |
Back to Top