Get the folder path and the file name of an output file of an entity. The route uses the file tree of the project to make the path. If revision is 0, the route uses the next revision. A vendor must have a task on the entity.
POST
/data/entities/{entity_id}/output-file-path
curl
curl -X POST "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-file-path" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "main",
"mode": "output",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"task_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"extension": ".mp4",
"representation": "mp4",
"revision": 1,
"separator": "/"
}'
import requests
url = "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-file-path"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"name": "main",
"mode": "output",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"task_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"extension": ".mp4",
"representation": "mp4",
"revision": 1,
"separator": "/"
}
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Request examples
{
"name": "main",
"mode": "output",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c250",
"task_type_id": "a24a6ea4-ce75-4665-a070-57453082c250",
"extension": ".mp4",
"representation": "mp4",
"revision": 1,
"separator": "/"
}
Response examples (200)
{
"folder_path": "/project/asset/output",
"file_name": "main_v001.mp4"
}