Move or copy a hosted asset

POST /groups/{groupId}/apps/{appId}/hosting/assets

Move or copy a hosted asset to a new resource path.

Path parameters

application/json

Body Required

The hosted asset file and its metadata. (Must use Content-Type: multipart/mixed)

  • move_from string

    The current resource path of the asset to move. Must be used with move_to.

  • move_to string

    The resource path to which the asset will move. Must be used with move_from.

  • copy_from string

    The current resource path of the asset to copy. Must be used with copy_to.

  • copy_to string

    The resource path to which the asset will be copied. Must be used with copy_from.

Responses

  • 204

    Successfully moved/copied the hosted asset.

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"
}