Skip to content

Api Items Id Put

Carlos Badenes edited this page Mar 31, 2016 · 1 revision

Update Item Instance

Modify the item information identified by the URI by the new one attached to the request.

Update only one attribute value of entity instance

Request

PUT http://zavijava.dia.fi.upm.es:8888/api/items/11111111-2222-3333-4444-555555555555/description
HEADER:
  Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c
Content-Type: application/json
{
    "description": "Journal Paper"
}
  • curl:
curl -i -X PUT -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{ 'description': 'Journal Paper'}" http://zavijava.dia.fi.upm.es:8888/api/items/11111111-2222-3333-4444-555555555555/description

Response

200 OK

Update the whole instance

Request

PUT http://zavijava.dia.fi.upm.es:8888/api/items/11111111-2222-3333-4444-555555555555
HEADER:
  Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c
Content-Type: application/json

{
  "title": "Guided Visibility Sampling",
  "description": "Journal Paper",
  "date": "20060730"
}
  • curl:
curl -i -X PUT -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{  'title': 'Guided Visibility Sampling','description': 'Journal Paper',  'date': '20060730'}" http://zavijava.dia.fi.upm.es:8888/api/items/11111111-2222-3333-4444-555555555555

Response

200 OK
Clone this wiki locally