Versions Compared

Key

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

Project Properties App provides REST APIs with CLI, Python and Groovy examples:

Table of Contents


Get Project Properties

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

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

Query Parameters:

  • projectKey (String) - Jira Project Key

Response: [Status: 200]

Code Block
$ curl -u username -XGET "http://localhost:8080/rest/projectproperties/1.0/property/list?projectKey=DT"


Get Project Property

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}/keyid/{propertyKeypropertyId}

Query Parameters:

  • projectKey (String) - Jira Project Key
  • propertyId (Number) - Property ID
  • propertyKey (String)

Response: [Status: 200]

Code Block
$ curl -u"user:pass" username -XGET "http://localhost:8080/rest/projectproperties/1.0/property/list/DTone?projectKey=DT&propertyId=123"


Create/Add Project Properties

...

Code Block
$ 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."}
$


Clone Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/clone/?projectKey={projectKey}&cloneProjectKey={projectKey}

Move Project Properties

POST http://localhost:8080/rest/projectproperties/1.0/property/move/?projectKey={projectKey}&moveProjectKey={propertyId}

Delete Project Properties

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

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

Code Block
curl -u"user:pass" -XDELETE "http://localhost:8080/rest/projectproperties/1.0/property/remove/DT/5?projectKey=DT&propertyId=5"


Groovy Examples

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

...