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.

...

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.
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
overrideDetailsOverrideDetailsPojoNo*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

AttributesTypeRequiredDescription
environmentIdLongNo*Id of the environment being overridden. *null if overriding all.
instanceIdLongNo*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

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

...

Code Block
themeEclipse
titleProject 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
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
overrideDetailsOverrideDetailsPojoNo*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

AttributesTypeRequiredDescription
environmentIdLongNo*Id of the environment being overridden. *null if overriding all.
instanceIdLongNo*Id of the instance being overridden. *null if overriding all.

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,
		"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
themeEclipse
titleProject 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  the following JSON object

Code Block
themeEclipse
titleProject Properties PATCH 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": "/targetfolder",
        "credentialId": null,
		"isExpression": false,
		"overrideDetailsPojo": null
    },
	{
		"propertyName": "JDBC_ALTERNATE_SCHEMA_PASS",
		"propertyValue": "*****",
		"credentialId": 80855,
		"isExpression": false,
		"overrideDetailsPojo": null
	}
]