Versions Compared

Key

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

...

Code Block
languagebash
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

Code Block
languagebash
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"
            }
          }'

...

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

Filter for Items

Code Block
languagebash
# 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"

...

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

...

Code Block
languagebash
# 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/unconsumeunlock" \
  --header 'Content-Type:application/json'