Items

Create Item

curl -X POST --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items" \ --header 'Content-Type:application/json' \ --data '{ "data":{ "Family-Name": "Doe", "Year-Born": "2001" } }'

Update Item

curl -X PUT --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items/$ITEM_KEY" \ --header 'Content-Type:application/json' \ --data '{ "data":{ "Family-Name": "Doe", "Year-Born": "2002" } }'

Get Item

curl -X GET--user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items/$ITEM_KEY"

Get All Items

# By default locked items are not shown. Toggle the includeLocked to see locked items as well curl -X GET --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items?includeLocked=true"

Filter for Items

# The JSON is the HTML encoded into the &filter= parameter # Example: Filter for Family-Name=Doe # 1. JSON: {"Family-Name":"Doe"} # 2. URL-Encoded: %7B%22Family-Name%22%3A%22Doe%22%7D%0A curl -X GET --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items?filter=%7B%22Family-Name%22%3A%22Doe%22%7D%0A"

Search Items

# Search for items # Intended for UI/Humans. Fuzzy search through all attributes. # Note that this search basic at the moment. It is case-sensitive, does not handle umlauts etc etc. curl -X GET --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items?searchText=Zurich"

Delete Item

curl -X DELETE --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items/$ITEM_KEY"

Lock Item

curl -X PUT --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items/$ITEM_KEY/lock" \ --header 'Content-Type:application/json'

Unlock Item

# Mark an item as not consumed curl -X PUT --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items/$ITEM_KEY/unlock" \ --header 'Content-Type:application/json'