Suppose I create a resource with POST /resource
and that yields an id
on the response body, and then I use that id
to retrieve my resource with GET /resource/{id}
.
How do I put these two requests in the same API Blueprint group ?
Apparently a group has only one endpoint, which makes the following look like you would create a resource with POST /resource/{id}
which is not true, because you don't even have an id at this point.
## Resource [/resource/{id}]
### Creating the resource [POST]
+ Response 201
+ Body
{
"id": "uuid"
}
### Retrieving the resource [GET]
+ Parameters
+ name (string) ... The name of your collection.
+ Response 200
+ Body
{
"id": "uuid"
}
I looked at the examples but couldn't find an example of creating and retrieving a specific resource. Am I doing this the wrong way ?