What is the restful way to represent a resource clone operation in the URL?

后端 未结 5 2124
执笔经年
执笔经年 2020-12-07 23:02

I have REST API that exposes a complex large resource and I want to be able to clone this resource. Assume that the resource is exposed at /resources/{resoureId}

5条回答
  •  眼角桃花
    2020-12-07 23:22

    You want to create a copy of a specific resource. My Approach in that case, would be to use the following endpoint : POST /resources/{id}/copy, read it "create a copy of resource {id}"

提交回复
热议问题