Skip to end of banner
Go to start of banner

Items

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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 consumed items are not shown. Toggle the includeConsumed to see consumed items as well
curl -X GET --user $USER_PASSWORD "$JIRA_INSTANCE/rest/tdo/1.0/$PROJECT_KEY/environments/demo-env/types/PersonType/items?includeConsumed=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/consume" \
  --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/unconsume" \
  --header 'Content-Type:application/json'
  • No labels