To approve you create a new approval resource: POST to /approval with the id of the resource to approve. This creates a new resource at /approval/1
Then you can revoke the approval by DELETE /approval/1
To approve you create a new approval resource: POST to /approval with the id of the resource to approve. This creates a new resource at /approval/1
Then you can revoke the approval by DELETE /approval/1
The typical model is to have 'container' resources. For example, if /articles/9001 is a resource, /articles is the container. You can POST to the container to create a new resource, and you can GET the container to find out some information about it, such as the number of resources it contains and a list of them. For this part of the design I'll typically return a list of links to the first N resources in the container and a navigation link to the next N resources. That navigation link uses the same URL for the container resource, but with a query parameter that tells it which resource to start on. I'll typically also implement search/filter query parameters to allow further control over the list of resources to include in the container's representation.