https://github.com/ifsantana/rest-api-custom-methods
A sample project about how to use custom methods - [Google AIP-136](https://google.aip.dev/136)
https://github.com/ifsantana/rest-api-custom-methods
custom-methods http-requests kotlin rest-api restful-api spring-boot
Last synced: about 2 months ago
JSON representation
A sample project about how to use custom methods - [Google AIP-136](https://google.aip.dev/136)
- Host: GitHub
- URL: https://github.com/ifsantana/rest-api-custom-methods
- Owner: ifsantana
- Created: 2025-01-23T13:59:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T14:08:14.000Z (over 1 year ago)
- Last Synced: 2025-03-19T03:16:30.788Z (over 1 year ago)
- Topics: custom-methods, http-requests, kotlin, rest-api, restful-api, spring-boot
- Language: Kotlin
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rest Api Custom Methods Sample
Custom methods
Resource-oriented design ([AIP-121](https://google.aip.dev/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```