Extended application-protocol for REST-API services.
- Avoid hitting the wall as API gets bigger
- Guide myself and possibly others.
Topic | Summary | Status |
---|---|---|
versioning | Versioning should be defined in host name, not in header or url. | final |
name_conventions | Resources in snake_case, intents in pascalCase, api-arguments in UPPER_SNAKE_CASE | final |
api_arguments | In url (not header) PAGE, COUNT, OP_(field)), LANG, etc.. | draft |
parsing | Routing of request to resource / collection / intent | draft |
hateoas | Embedded in (_links) and with label declaration | draft |
return_codes | Code and msg. | draft |
Each API-endpoint should be of one of the types below, with standard endpoint-location.
Type | Description | Methods allowed |
---|---|---|
Collection | List with filter-, sorting- and field arguments on resource fields. POST create resouce |
GET, POST |
View | Alternate view of collection with non-resource arguments | GET |
Resource | View, update & delete record and extended support for form-based deletion/upload | GET, PATCH, DELETE, POST |
Intent | Request action on resource, syncronous or asyncronous | POST |
Upload | Binary upload to resource field with support for chuncks | PUT |