Business use case:
- Allow app users for our single iPhone app to report bugs/feature requests via a native, in app help desk UI.
- Users can report issues for our development team to address.
POST http://api.restdesk.biz/tickets
Content-Type: application/json
{
"title": "Feature request",
"desc": "It would be really great if you could...",
"user": {
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com"
}
}
HTTP/1.1 201 Created
Content-Location: http://api.restdesk.biz/tickets/123
GET http://api.restdesk.biz/tickets/123
{
"status": "open",
"title": "Feature request",
"desc": "It would be really great if you could...",
"user": {
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com"
}
}
POST http://api.restdesk.biz/tickets/123/status
Content-Type: application/json
{ "status": "closed" }
GET http://api.restdesk.biz/
{
"links": {
{
"rel": "tickets",
"href": "http://api.restdesk.biz/tickets/"
}
}
}
GET http://api.restdesk.biz/tickets/
{
"links": {
{
"rel": "create_ticket",
"href": "http://api.restdesk.biz/tickets/"
}
}
}
POST http://api.restdesk.biz/tickets/
Content-Type: application/vnd.restdesk.ticket+json
{
"title": "Feature request",
"desc": "It would be really great if you could...",
"user": {
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com"
}
}
HTTP/1.1 201 Created
Content-Location: http://api.restdesk.biz/tickets/123
GET http://api.restdesk.biz/tickets/123
{
"links": {
{
"rel": "close_ticket",
"href": "http://api.restdesk.biz/tickets/123/status"
}
}
"status": "open",
"title": "Feature request",
"desc": "It would be really great if you could...",
"user": {
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com"
}
}
- Step 1: Follow "close_ticket" link
- Step 2:
POST http://api.restdesk.biz/tickets/123/status
Content-Type: application/vnd.restdesk.ticket.status+json
{ "status": "closed" }