failure-status: 400 (bad request), 500
{
id: 1,
name: 'twoot',
...
links: [{
href: https://myapi.com/api/v1/products/1,
rel: 'self',
'method': 'GET'
}]
}
{
id: 1,
name: 'twoot',
...
links: [{
href: https://myapi.com/api/v1/products/1,
rel: 'self',
method: 'GET'
}]
}
DELETE /api/v1/products/:id
success-response: 204 (No Content)
failure-response: 404, 500
failure-status: 400, 404, 500
{
id: 1,
name: 'twoot'
...
links: [{
href: https://myapi.com/api/v1/products/1,
rel: 'self',
method: 'GET'
}]
}
GET /api/v1/products?offset=0&limit=2
{
items: [
{
id: 1,
name: 'twoot',
...,
links: [{
href: https://myapi.com/api/v1/products/1,
rel: 'self',
method: 'GET'
}]
},
{
id: 2,
name: 'twoot2'
...,
links: [{
href: https://myapi.com/api/v1/products/2,
rel: 'self',
method: 'GET'
}]
}
],
meta: {
count: 2,
offset: 0,
limit: 2
total: 10
}
}
{
links: [
{
href: https://myapi.com/api/v1,
rel: 'self',
method: 'GET'
},
{
href: https://myapi.com/api/v1/products,
rel: 'products',
method: 'GET'
}
{
href: https://myapi.com/api/v1/products/{id},
rel: 'product',
method: 'GET'
},
{
href: https://myapi.com/api/v1/products/{id},
rel: 'product',
method: 'DELETE'
},
{
href: https://myapi.com/api/v1/products,
rel: 'product',
method: 'POST'
},
{
href: https://myapi.com/api/v1/products/{id},
rel: 'product'
method: 'PUT'
},
]
}