Verbs Flashcards

1
Q

GET

A

Fetches a record or set of resources from the server

Success: 200
Failure: 404

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

OPTIONS

A

Fetches all available REST operations

Success: 200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

POST

A

Creates a new set of resources or a resource on a server

Success: 201
Failure: 404, 409

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

PUT

A

Updates or replaces the given record.
If a resource does not exist, create one.
PUT is idempotent.

Success: 200, 204
Failure: 404

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

PATCH

A

Modifies the given record.
PATCH won’t replace the whole record, it only patches the modified column.

Success: 200, 204
Failure: 404

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DELETE

A

Delete the given record

Success: 200
Failure: 404

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

GET: Query Parameters

A

Intended to add detailed information to identify a resource from the server.

ex: /v1/books/?category=fiction&publish_date=2017

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

GET: Path-based Parameters

A

The resource query is with the path.

ex: /v1/payments/billing-agreements/agreement_id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Query vs Path Parameters

A

Query parameters should be used to fetch multiple resources based on the query parameters.
A single resource with exact URI information can use Path Parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

POST vs PUT

A

POST creates two instances with the same data

PUT updates a single resource that already exists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly