Get Project Properties

GET http://localhost:8080/rest/projectproperties/1.0/property/list/{projectKey}

GET http://localhost:8080/rest/projectproperties/1.0/property/list/{projectKey}/id/{propertyId}

GET http://localhost:8080/rest/projectproperties/1.0/property/list/{projectKey}/key/{propertyKey}

Query Parameters:

Response: [Status: 200]

$ curl -u"user:pass" -XGET http://localhost:8080/rest/projectproperties/1.0/property/list/DT


Create/Add Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/add

Required Schema Fields:

Response: [Status: 200]

$ curl -u"user:pass" -XPOST  -H "Content-Type: application/json" --data '{"projectKey":"DT", \
"propertyKey":"project.security", "propertyValue":"nxoedoew"}' \
http://localhost:8080/rest/projectproperties/1.0/property/add
{"property":5,"message":"[Info] Added Property."}
$


Update Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/update

Required Schema Fields:

Response: [Status: 200]

$ curl -u"user:pass" -XPOST  -H "Content-Type: application/json" --data '{"projectKey":"DT", \
"propertyKey":"project.security", "propertyValue":"xxxxxxx"}' \
http://localhost:8080/rest/projectproperties/1.0/property/update
{"property":5,"message":"[Info] Updated Property."}
$

Note. Update creates property if not exists.


Batch Or Bulk Update Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/update/bulk/{projectKey}

Required Parameters:

Required Schema Fields:

Response: [Status: 200]

$ curl -u"user:pass" -XPOST  -H "Content-Type: application/json" --data '[ {"propertyKey":"project.name", \
"propertyValue":"Hello World"}, {"propertyKey":"project.description", "propertyValue":"Hello World Project"} ]' \
http://localhost:8080/rest/projectproperties/1.0/property/update/bulk/DT
{"property":5,"message":"[Info] Updated Properties - 5"}
$

Note. Update creates properties if not exists.


Force Update Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/update/force

Note. This API helps to rename property key.

Required Schema Fields:

Response: [Status: 200]

$ curl -u"user:pass" -XPOST  -H "Content-Type: application/json" --data '{"projectKey":"DT", \
"propertyId":"5", "propertyKey":"project.security.x", "propertyValue":"xxxxxxx"}' \
http://localhost:8080/rest/projectproperties/1.0/property/update/force
{"property":3,"message":"[Info] Updated Property."}
$


Delete Project Properties

DELETE http://localhost:8080/rest/projectproperties/1.0/property/remove/{projectKey}/{propertyId}

DELETE http://localhost:8080/rest/projectproperties/1.0/property/remove/bulk/{projectKey}

curl -u"user:pass" -XDELETE http://localhost:8080/rest/projectproperties/1.0/property/remove/DT/5


Groovy Examples

https://bitbucket.org/scmenthusiast/scmenthusiast-utilities/src/master/project-properties/groovy/


Python Examples

https://bitbucket.org/scmenthusiast/scmenthusiast-utilities/src/master/project-properties/python/