Skip to content

ifsantana/rest-api-custom-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Rest Api Custom Methods Sample

Custom methods

Resource-oriented design (AIP-121) uses custom methods to provide a means to express arbitrary actions that are difficult to model using only the standard methods. Custom methods are important because they provide a means for an API's vocabulary to adhere to user intent.

Guidance

Custom methods should only be used for functionality that can not be easily expressed via standard methods; prefer standard methods if possible, due to their consistent semantics. (Of course, this only applies if the functionality in question actually conforms to the normal semantics; it is not a good idea to contort things to endeavor to make the standard methods "sort of work".)

Resource-based custom methods

Custom methods must operate on a resource if the API can be modeled as such the examples below:

Endpoitns List

Enable Users

http://localhost:8080/v1/users/1:enable

Disable Users

http://localhost:8080/v1/users/1:disable

About

A sample project about how to use custom methods - [Google AIP-136](https://google.aip.dev/136)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages