Object ID in CRUD Operations:
REST APIs commonly use CRUD operations to interact with resources. The Object ID serves as a
unique identifier for the resource and is generally required for the following actions:
A . Update:
To update a specific resource, the API must know which resource to modify. The Object ID is used to
identify the exact resource that should be updated.
Example: A PUT or PATCH request typically requires the Object ID in the URL or body of the request.
URL Example:
PUT /tasks/{id}
B . Delete:
Similarly, when deleting a specific resource, the Object ID is needed to ensure the correct resource is
removed.
Example: A DELETE request requires the Object ID in the URL to target the specific resource.
URL Example:
DELETE /tasks/{id}
Why Not Other Options?
C . Respond: This is not a standard CRUD operation in REST APIs and does not involve an Object ID.
D . Create: The Create operation (typically POST) does not require an Object ID because the resource
does not yet exist. Instead, the API usually generates the Object ID after creation.
Reference:
REST API Documentation Best Practices: CRUD Operations
Experience League: Understanding CRUD in Workfront APIs