Skip to main content

PUT /{url}/{id}

Description

Updates a row in the table data

The route handles the HTTP PUT request made to the /{url}/{id} path.

Parameters

NameTypeDescription
urlnumberRequired. A custom provided url segment.
idstring or numberRequired. The id of a row to be updated.

Payload

The server needs to receive a JSON object with only new/modified data for a row.

Example:

{
"row": {
"name": "New Film"
},
"id": 6
}

Response

In case of the success status, a JSON object with all data of the updated row is returned.

Example:

{
"name": "New Film",
"year": 2022,
"votes": 1,
"id": 6
}

The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: