HTTP GET retrieves the data stored for one identified resource. It accepts the resource identifier as its only required input, performs a key-value lookup, and should be idempotent and free of noticeable side effects. section 7.3.3
Listing 7.1 An example of the standard get method
abstract class ChatRoomApi {
@get("/{id=chatRooms/*}") #1
GetChatRoom(req: GetChatRoomRequest): ChatRoom; #2
}
interface GetChatRoomRequest {
id: string;
}
A ChatRoom API maps GET /{id=chatRooms/*} to GetChatRoom, whose request contains the resource identifier. section 7.3.3
Apply these design rules:
- Return the complete resource by default when partial retrieval through a field mask is supported. section 8.3.4
- Exclude exceptionally large or expensive fields from the default only when necessary, and document that explicit requesting is required. section 8.3.4
- Return a soft-deleted resource normally when its identifier is supplied; do not treat that lookup as a request to hide it. section 25.3.2













