Set frame_in, frame_out and nb_frames of the shots of a project from a timeline file. Send the file in a multipart form. The route can read all the formats of OpenTimelineIO, for example OTIO or EDL. The naming convention gives the name of each shot of the file. The route creates the missing shots. You must be a manager of the project.
Query parameters
-
Template of the shot names in the file. You can also send it as a form field.
Default value is
${project_name}_${sequence_name}-${shot_name}. -
Make a difference between upper case and lower case in the names. You can also send it as a form field.
Default value is
true.
POST
/import/otio/projects/{project_id}
curl
curl -X POST "http://api.example.com/import/otio/projects/a24a6ea4-ce75-4665-a070-57453082c25?naming_convention=%24%7Bproject_name%7D_%24%7Bsequence_name%7D-%24%7Bshot_name%7D&match_case=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/import/otio/projects/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {
"naming_convention": "${project_name}_${sequence_name}-${shot_name}",
"match_case": true
}
payload = None
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (201)
{
"updated_shots": [
{
"id": "a24a6ea4-ce75-4665-a070-57453082c250",
"name": "SH010",
"project_id": "b24a6ea4-ce75-4665-a070-57453082c250",
"nb_frames": 120,
"data": {
"frame_in": 1001,
"frame_out": 1120
}
}
],
"created_shots": [
{
"id": "c24a6ea4-ce75-4665-a070-57453082c250",
"name": "SH020",
"project_id": "b24a6ea4-ce75-4665-a070-57453082c250",
"nb_frames": 96,
"data": {
"frame_in": 2001,
"frame_out": 2096
}
}
]
}