1

i am trying to do insert and update operations using PUT method in REST API with out using rest resource class in workbench/postman. But i am getting following error as shown in image.

Can anybody answer my question why i am facing this problem. This image for updaing

This is for inserting

Note: Before answering to this, please go through PUT method in workbench or postman. If you go through workbench or postman, you may understand what my query is.

Thanking you KS Kumar

1 Answer 1

1

The standard REST API doesn't support the PUT method.

Each resource in the Force.com REST API is identified by a named URI, and is accessed using standard HTTP methods (HEAD, GET, POST, PATCH, DELETE).

(Source: Understanding Force.com REST Resources)

Depending on what you are trying to achieve you can use POST or PATCH.

To create a new record then you can use POST. For example to create a new Account you can POST to /services/data/v36.0/sobjects/Account

To update an existing record you can use PATCH. For example to update an existing Account you can PATCH to /services/data/v36.0/sobjects/Account/YOUR_ACCOUNT_ID

4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .