Upload or replace a hosted asset
Upload or replace a hosted asset at a specific 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.
PUT
/groups/{groupId}/apps/{appId}/hosting/assets/asset
curl \
--request PUT '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 '{"meta":{"path":"string","size":42,"attrs":[{"name":"string","value":"string"}],"hash":"string"},"file":"@file"}'
Request examples
{
"meta": {
"path": "string",
"size": 42,
"attrs": [
{
"name": "string",
"value": "string"
}
],
"hash": "string"
},
"file": "@file"
}
Response examples (400)
{
"error": "string",
"error_code": "string"
}