What is general opinion about describing some resource behaviors into link section, something similar to “actions” concept in Siren ?
So, for example, if resource could be exported, to point to that in a link section like this ?
“links”: [
{
“href”: “users/123/export”,
“meta” : {
“name”: “export”,
“type” : “action”,
“title”: “Export user”,
“method”: “POST”,
“parameters”: [
{ “name”: “fields”, “type”: “array”},
{ “name”: “exportType”, “type”: "string”}
{“name”: “exportSetting”, “type” : “number” }
]
}
}
What do you think about this approach, and if it is not right than what is suggestion for describing possible non standard actions for the resource ?