Project Properties App provides REST APIs with CLI, Python and Groovy examples:
GET http://localhost:8080/rest/projectproperties/1.0/property/list/?projectKey={projectKey}
GET http://localhost:8080/rest/projectproperties/1.0/property/list/{projectKey}
Query Parameters:
Response: [Status: 200]
$ curl -u username -XGET "http://localhost:8080/rest/projectproperties/1.0/property/list?projectKey=DT" |
GET http://localhost:8080/rest/projectproperties/1.0/property/one/?projectKey={projectKey}&propertyId={propertyId}
GET http://localhost:8080/rest/projectproperties/1.0/property/list/{projectKey}/id/{propertyId}
Query Parameters:
Response: [Status: 200]
$ curl -u username -XGET "http://localhost:8080/rest/projectproperties/1.0/property/one?projectKey=DT&propertyId=123" |
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."} $ |
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.
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.
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."} $ |
POST http://localhost:8080/rest/projectproperties/1.0/property/clone/?projectKey={projectKey}&cloneProjectKey={projectKey}
POST http://localhost:8080/rest/projectproperties/1.0/property/move/?projectKey={projectKey}&moveProjectKey={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/?projectKey=DT&propertyId=5" |
https://bitbucket.org/scmenthusiast/scmenthusiast-utilities/src/master/project-properties/groovy/
https://bitbucket.org/scmenthusiast/scmenthusiast-utilities/src/master/project-properties/python/