Replace the casting of an asset. Send the full list of assets that the asset contains. The assets that are not in the list are removed from the casting. You must be a manager of the project.
PUT
/data/assets/{asset_id}/casting
curl
curl -X PUT "http://api.example.com/data/assets/a24a6ea4-ce75-4665-a070-57453082c25/casting" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"casting": [
{
"entity_id": "d57d9hd7-fh08-7998-d403-80786315f58",
"entity_type": "shot"
}
]
}'
import requests
url = "http://api.example.com/data/assets/a24a6ea4-ce75-4665-a070-57453082c25/casting"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"casting": [
{
"entity_id": "d57d9hd7-fh08-7998-d403-80786315f58",
"entity_type": "shot"
}
]
}
response = requests.put(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Request examples
[
{
"asset_id": "b35b7fb5-df86-5776-b181-68564193d360",
"nb_occurences": 1,
"label": ""
}
]
Response examples (200)
{
"asset_id": "a24a6ea4-ce75-4665-a070-57453082c250",
"casting": [
{
"id": "b35b7fb5-df86-5776-b181-68564193d360",
"entity_id": "d57d91d7-f108-7998-d403-80786315f580",
"entity_name": "SH001"
}
]
}