Updated on Sep 14, 2023
1
min read
Update an actor
PATCH
You can modify the details of an existing actor in the Movies database using the Movies API. This document provides instructions on how to make a PATCH request to update actor information.
Endpoint
To update an actor, make a PATCH request to the following endpoint:
Replace {actor_id}
with the unique identifier of the actor you want to update.
Request
Here's an example of how to make a PATCH request to update actor information using JavaScript:
In this example, we use the fetch
function to make an HTTP PATCH request to the specified API endpoint. Replace 789
with the actual actor ID you want to update and provide the updated actor data.
Response
Upon successful update, the API will respond with the updated actor's details in JSON format, including any changes made to the actor's information.
Response Example
You can now update actor details as needed using the Movies API. Next, we'll cover how to delete an actor from the database.