Move or copy a hosted asset
Move or copy a hosted asset to a new resource path.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
Body
Required
The hosted asset file and its metadata. (Must use
Content-Type: multipart/mixed
)
-
The current resource path of the asset to move. Must be used with
move_to
. -
The resource path to which the asset will move. Must be used with
move_from
. -
The current resource path of the asset to copy. Must be used with
copy_to
. -
The resource path to which the asset will be copied. Must be used with
copy_from
.
POST
/groups/{groupId}/apps/{appId}/hosting/assets
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/hosting/assets' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"move_from":"string","move_to":"string","copy_from":"string","copy_to":"string"}'
Request examples
{
"move_from": "string",
"move_to": "string",
"copy_from": "string",
"copy_to": "string"
}