DEV Community

Cover image for ๐Ÿš€ API Maker - Update by id & Replace by id API [Put operation]
API Makerยฎ
API Makerยฎ

Posted on

๐Ÿš€ API Maker - Update by id & Replace by id API [Put operation]

Update By id

โ–ธ Update the object's properties that match the payload and
๐Ÿ‘‰ leave the others unchanged.

Replace By id [Mongo specific API]

โ–ธ Update the object's properties that match the payload and
๐Ÿ‘‰ remove the rest of properties.


โœ… List of Feature
โšก๏ธ Primary key override
โšก๏ธ Modify response using Query Params
โšก๏ธ Nested level update
โšก๏ธ Upsert support
โšก๏ธ Retrive response prior to update or after the update


โญ Params โญ

๐Ÿ‘‰ id โ–ธ User can update single record by id
๐Ÿ‘‰ primaryKey โ–ธ Based on primary key field, user can update data.


โญ Query Params โญ

๐Ÿ‘‰ select โ–ธ Retrieve the fields based on the user's needs.
๐Ÿ‘‰ deep โ–ธ Obtain more precise / details data in a certain field.
๐Ÿ‘‰ upsert
โ–ธ true :- If record is not present then perform insert operation
โ–ธ false :- If record is present then perform update operation
๐Ÿ‘‰ returnDocument
โ–ธ before :- Retrieve the response prior to updating it.
โ–ธ after :- Retrieve the response after the update.


Youtube video link

https://youtu.be/PhtWr4kVkMQ

Websites

https://apimaker.dev

API Docs link

Generated-APIs

https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-update-by-id-api.html
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-replace-by-id-api.html

Schema-APIs

https://docs.apimaker.dev/v1/docs/apis-all/schema-apis/auto-generated-schema-based-update-by-id-api.html
https://docs.apimaker.dev/v1/docs/apis-all/schema-apis/auto-generated-schema-based-replace-by-id-api.html

More Examples

Generated-APIs

https://docs.apimaker.dev/v1/examples/sys/db/updateById.html
https://docs.apimaker.dev/v1/examples/sys/db/replaceById.html

Schema-APIs

https://docs.apimaker.dev/v1/examples/sys/db/gen/updateByIdGen.html
https://docs.apimaker.dev/v1/examples/sys/db/gen/replaceByIdGen.html

Follow on twitter

https://twitter.com/api_maker

Linked In

https://www.linkedin.com/company/api-maker

More YouTube Videos

https://www.youtube.com/@api_maker/playlists

Top comments (0)