Versions Compared

Key

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

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 PageREST 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

...

Request

Parameter
Type
Required
Description

projectid

URLYesThis is a URL parameter for the Project Id which is searched to find and return the Properties associated with it.

Include Page
REST V1 Project Properties Response
REST V1 Project Properties Response

Response Codes

HTTP Code
Description
200Project was found and it's its properties returned
400Bad request
401UnauthorizedAuthentication failure
403Authorization failure (no access to resource)
404Project was not found with the specified project id
500Unexpected 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/v1/project/11101

The GET request would return the following JSON Project Property list

{
Code Block
themeEclipse
titleProject 11101 Properties
GET Return JSON
[
    {
        "propertyName": "Approved Check Script","FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "MyCheckScriptjava",
   },
      {
       "propertyNamecredentialId": "ServiceNow Password"null,
      "propertyValue		"isExpression": "Password"false
    },
    {
 {       "propertyName": "ServiceNow PortFD_PARTIAL_FILE_INCLUDES",
        "propertyValue": "MyPortsql",
   },     "credentialId":  {
      "propertyNamenull,
		"isExpression": "ServiceNow URL",
  false
    "propertyValue": "MyURL"
   },
    {
 {       "propertyName": "ServiceNow User Name",FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
        "propertyValue": "MyUserNametrue",
    }

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
themeEclipse
titleProject 11101 Properties GET Return JSON
[
       "credentialId": null,
		"isExpression": false
    },
    {
        "propertyName": "Approved Check Script",FDJDBC_RETRY_COUNT_DEFAULT",
        "propertyValue": 5,
        "propertyValuecredentialId": null,
		"MyCheckScriptisExpression": false
    },
    {
 {       "propertyName": "ServiceNow PasswordFDJDBC_SQL_EXTENSIONS",
        "propertyValue": "*****"
   },
seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
     {       "propertyNamecredentialId": "ServiceNow Port"null,
      "propertyValue		"isExpression": "MyPort"false
    },
    {
 {       "propertyName": "ServiceNow URLFDJDBC_SQL_ROOT_TARGET_FOLDER",
        "propertyValue": "MyURL/sql",
   },     "credentialId":  {
null,
		"isExpression": false
     "},
	{
		"propertyName": "ServiceNow User NameJDBC_ALTERNATE_SCHEMA_PASS",
      		"propertyValue": "MyUserName"
   *****",
		"credentialId": 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
titleAPI URL

http://host:port/flexdeploy/rest/v1/project/{projectid}/property

Request

AttributesTypeRequiredDescription
projectidURLYesThis is the Id of the Project which will have it's Properties updated.
propertyNamepropertiesStringList<PropertyValuePojo>NoYesThis 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

AttributesTypeRequiredDescription
propertyNameStringYesThis is the key name of the property
propertyValueStringNoThis is the value that
will be updated to for
the property with the associated
propertyName. (Can be many)
Note: unlisted properties
propertyName will be updated to
credentialIdLongNoThe id of the credential associated to this property. Applicable only for encrypted properties
isExpressionBooleanNoIs 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
200Project was found and it's its Properties were updated
400Bad request
401UnauthorizedAuthentication failure404
403Authorization failure (no access to resource)
404Project not found
500Unexpected internal server error

Example

...

Code Block
themeEclipse
titleSample PUT JSON Request
[
    {
 {       "propertyName": "Approved Check Script",FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "MyCheckScriptjava",
   },     "credentialId": null,
		"isExpression": false
  {  },
    "propertyName": "ServiceNow Password",{
        "propertyValuepropertyName": "MyPassword"
   }FD_PARTIAL_FILE_INCLUDES",
      {       "propertyNamepropertyValue": "ServiceNow Port",
        "propertyValuecredentialId": null,
		"MyPortisExpression": false
    },
    {
 {       "propertyName": "ServiceNow URLFDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
        "propertyValue": "MyURLtrue",
   },     "credentialId": null,
		"isExpression": false
    },
    {
        "propertyName": "ServiceNow User Name",FDJDBC_RETRY_COUNT_DEFAULT",
        "propertyValue": "MyUserName" 5,
       }
]

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
themeEclipse
titleProject 25262 Property PUT Receive JSON
[
   "credentialId": null,
		"isExpression": false
   { },
     "propertyName": "Approved Check Script",{
        "propertyValuepropertyName": "Put1"
   },
FDJDBC_SQL_EXTENSIONS",
     {       "propertyNamepropertyValue": "ServiceNow Password",
      "propertyValue": "Put2"
   },
      {seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
        "propertyNamecredentialId": "ServiceNow Port"null,
      "propertyValue		"isExpression": false
"Put3"    },
    {
 {       "propertyName": "ServiceNow URLFDJDBC_SQL_ROOT_TARGET_FOLDER",
        "propertyValue": "Put4"
   }/sql",
      {  "credentialId":     "propertyNamenull,
		"isExpression": "ServiceNowfalse
User Name",   },
	{
  		"propertyValuepropertyName": "Put5"
   JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyValue": "*****",
		"credentialId": 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
themeEclipse
titleProject Properties 25262 Property PUT Return Receive JSON
[
    {
 {       "propertyName": "Approved Check Script",FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "Put1java",
   },     "credentialId":  {
      "propertyNamenull,
		"isExpression": "ServiceNow Password",
  false
    "propertyValue": "*****"
   },
    {
 {       "propertyName": "ServiceNow PortFD_PARTIAL_FILE_INCLUDES",
        "propertyValue": "Put3sql",
   },     "credentialId":  {
      "propertyNamenull,
		"isExpression": "ServiceNow URL",
  false
    "propertyValue": "Put4"
   },
    {
 {       "propertyName": "ServiceNow User Name",FDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
        "propertyValue": "Put5true",
    }
]

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
titleAPI URL

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

...

HTTP Code

...

Description

...

Example

...

    "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": "JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyValue": "",
		"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
themeEclipse
titleProject Properties PUT Return JSON
[
    {
        "propertyName": "FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "java",
        "credentialId": null,
		"isExpression": false
    },
    {
        "propertyName": "FD_PARTIAL_FILE_INCLUDES",
        "propertyValue": "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": null,
        "credentialId": null,
		"isExpression": false
    },
	{
		"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyValue": "*****",
		"credentialId": 71422,
		"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
titleAPI URL

http://host:port/flexdeploy/rest/v1/project/{projectid}/property

Request

AttributesTypeRequiredDescription
projectIdURLYesThis is the Id of the Project which will have it's Properties updated.
propertiesList<PropertyValuePojo>YesThis is the list of properties being set for the project. Attributes for a property object are described below

PropertyValuePojo

AttributesTypeRequiredDescription
propertyNameStringYesThis is the key name of the property
propertyValueStringNoThis is the value that the property with the associated propertyName will be updated to
credentialIdLongNoThe id of the credential associated to this property. Applicable only for encrypted properties
isExpressionBooleanNoIs the propertyValue a groovy expression? @Since 5.3.0.1

Include Page
REST V1 Project Properties Response
REST V1 Project Properties Response

Response Codes

HTTP Code
Description
200Project was found and its Properties were updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Project not found
500Unexpected internal server error

Example

If we had a Project in our database with an Id of 12723 and had the following attributes

Code Block
themeEclipse
titleProject Properties PATCH JSON
[
    {
        "propertyName": "FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "java",
        "credentialId": null,
		"isExpression": false
    },
    {
        "propertyName": "FD_PARTIAL_FILE_INCLUDES",
        "propertyValue": "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": null,
        "credentialId": null,
		"isExpression": false
    },
	{
		"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyValue": "*****",
		"credentialId": 71422,
		"isExpression": false
	}
]

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
themeEclipse
titleProject Properties PATCH Receive JSON
[ 
   {
 {       "propertyName": "Approved Check Script",FD_PARTIAL_FILE_EXCLUDES",
        "propertyValue": "java",
        "credentialId": null,
 		"propertyValueisExpression": false
"MyCheckScript"    },
    {
 {       "propertyName": "ServiceNow PasswordFDJDBC_SQL_ROOT_TARGET_FOLDER",
        "propertyValue": "MyPassword/targetfolder",
    },    "credentialId": null,
		"isExpression": false
 {   },
	{
		"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyNamepropertyValue": "ServiceNow Port",
		"credentialId": 80855,
		"isExpression": false
  "propertyValue": "MyPort"	}
]

The PATCH request would then update the specified Project's Properties and return the  following JSON object

Code Block
themeEclipse
titleProject Properties PATCH Return JSON
[
    },
   {
  {       "propertyName": "ServiceNow URL",
      "propertyValue": "MyURL"
   },
      {FD_PARTIAL_FILE_EXCLUDES",
        "propertyNamepropertyValue": "java"ServiceNow,
User Name",       "propertyValuecredentialId": null,
		"MyUserNameisExpression": false
  }
]

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
themeEclipse
titleProject PATCH Receive JSON
[  },
    {
        "propertyName": "ServiceNow URL",FD_PARTIAL_FILE_INCLUDES",
        "propertyValue": "sql",
        "propertyValue"credentialId": null,
		"isExpression": "PatchedURL"false
    },
      {
{        "propertyName": "ServiceNow User NameFDJDBC_PROPERTY_REPLACEMENT_DEFAULT",
        "propertyValue": "PatchedUserNametrue",
      }
]

The PATCH request would then update the specified Project's Properties and return the  following JSON object

Code Block
themeEclipse
titleProject Properties PATCH Return JSON
[
   "credentialId": null,
		"isExpression": false
    },
    {
        "propertyName": "Approved Check Script",FDJDBC_RETRY_COUNT_DEFAULT",
        "propertyValue": 5,
         "propertyValue": "MyCheckScript" "credentialId": null,
		"isExpression": false
    },
    {
 {       "propertyName": "ServiceNow PasswordFDJDBC_SQL_EXTENSIONS",
        "propertyValue": "MyPassword"
   },
      {seq,tbl,idx,typ,tps,tpb,sql,pkh,plb,pks,pkb,pls,pck,fnc,trg,spc,bdy,prc",
        "propertyNamecredentialId": "ServiceNow Port"null,
      "propertyValue		"isExpression": "MyPort"false
    },
    {
 {       "propertyName": "ServiceNow URLFDJDBC_SQL_ROOT_TARGET_FOLDER",
        "propertyValue": "PatchedURL/targetfolder",
   },     "credentialId": null,
		"isExpression": false
{    },
	{
 		"propertyName": "ServiceNow User NameJDBC_ALTERNATE_SCHEMA_PASS",
      		"propertyValue": "*****",
		"PatchedUserNamecredentialId": 80855,
		"isExpression": false
	}
]