Get the next revision number for an output file based on entity, output type, task type, and name. Used for automatic revision numbering.
POST
/data/entities/{entity_id}/output-files/next-revision
curl
curl -X POST "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-files/next-revision" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "main",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"task_type_id": "b35b7fb5-df86-5776-b181-68564193d36"
}'
import requests
url = "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-files/next-revision"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"name": "main",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"task_type_id": "b35b7fb5-df86-5776-b181-68564193d36"
}
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
curl \
--request POST 'http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-files/next-revision' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"name":"main","output_type_id":"a24a6ea4-ce75-4665-a070-57453082c25","task_type_id":"b35b7fb5-df86-5776-b181-68564193d36"}'
Request examples
{
"name": "main",
"output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"task_type_id": "b35b7fb5-df86-5776-b181-68564193d36"
}
Response examples (200)
{
"next_revision": 3
}