Create shots in a project from a CSV file. A line gives the episode, the sequence, the frames, the metadata and the task statuses of a shot. The route creates the missing episodes and sequences. Send the CSV file in a multipart form. The route finds the separator of the file. Each line is imported in order. If a line is not valid, the import stops. Without update=true, the lines of the entities that exist are skipped. You must be a manager of the project.
POST
/import/csv/projects/{project_id}/shots
curl
curl -X POST "http://api.example.com/import/csv/projects/a24a6ea4-ce75-4665-a070-57453082c25/shots?update=false" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/import/csv/projects/a24a6ea4-ce75-4665-a070-57453082c25/shots"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {
"update": false
}
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)
[
{
"id": "a24a6ea4-ce75-4665-a070-57453082c250",
"name": "SH010",
"project_id": "b24a6ea4-ce75-4665-a070-57453082c250",
"parent_id": "c24a6ea4-ce75-4665-a070-57453082c250",
"nb_frames": 120,
"description": "Shot description"
}
]
Response examples (400)
{
"error": true,
"message": "string",
"line_number": 42,
"imported_rows": 42
}