Update the metadata attributes of a hosted asset

PATCH /groups/{groupId}/apps/{appId}/hosting/assets/asset

Update the metadata attributes of a hosted asset at a specific resource path.

Path parameters

Query parameters

  • path string Required

    The resource path of a hosted asset.

application/json

Body Required

The new metadata attributes for the hosted asset. These attributes replace all existing attributes for the file.

Responses

  • 204

    Successfully updated the hosted asset.

  • 400 application/json

    There is an error in the request.

    Hide response attributes Show response attributes object
    • error string

      A message that describes the error.

    • error_code string

      The error type.

PATCH /groups/{groupId}/apps/{appId}/hosting/assets/asset
curl \
 --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/hosting/assets/asset?path=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"attributes":[{"name":"string","value":"string"}]}'
Request examples
{
  "attributes": [
    {
      "name": "string",
      "value": "string"
    }
  ]
}
Response examples (400)
{
  "error": "string",
  "error_code": "string"
}