Skip to content

Commit

Permalink
Merge pull request #37 from cielo24/uplevel_and_order_translation
Browse files Browse the repository at this point in the history
[DEV-769] Documentation for Uplevel, Translate and List Related jobs
  • Loading branch information
corygomez24 committed Jun 19, 2019
2 parents 1b7c48d + e36380a commit 9e4cb05
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/source/job_control/add_transcript_to_job.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ specify the Content-Length in the header. File size is limited to 10 gb.
+------------------+------------------+-----------------------------------------------------------+
| format | `Description` | The format of the transcription file |
| +------------------+-----------------------------------------------------------+
| | `Allowed Values` | String `text` or `srt` |
| | `Allowed Values` | String `text`, `srt`, `vtt`, `dfxp` |
| +------------------+-----------------------------------------------------------+
| | `Example` | ``format=text`` |
+------------------+------------------+-----------------------------------------------------------+
Expand Down
3 changes: 3 additions & 0 deletions api/source/job_control/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ All job control tasks return a task ID which can be queried at any time using ta
delete_job
job_info
job_list
list_related
add_media_to_job
add_transcript_to_job
add_embedded_media_to_job
get_media
get_transcoded_media
perform_transcription
order_translation
get_transcript
get_caption
get_elementlist
list_elementlists
aggregate_statistics
uplevel_job
75 changes: 75 additions & 0 deletions api/source/job_control/list_related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
list_related
========

Get both the leading job and a list of jobs related to the leading jobs

**HTTP Method**

.. http:get:: /api/job/list_related
**Query String Parameters** — Required

+------------------+------------------------------------------------------------------------------+
| Name | Details |
+==================+==================+===========================================================+
| job_id | `Description` | Unique identifier for either the leading job or related |
| +------------------+-----------------------------------------------------------+
| | `Allowed Values` | Hex Sring |
| +------------------+-----------------------------------------------------------+
| | `Example` | ``job_id=93n7dc5c7cce449fbk4h3nfo89m2be8w`` |
+------------------+------------------+-----------------------------------------------------------+
| api_token | `Description` | The API token used for this session |
| +------------------+-----------------------------------------------------------+
| | `Allowed Values` | Hex String |
| +------------------+-----------------------------------------------------------+
| | `Example` | ``api_token=7ca5dc5c7cce449fb0fff719307e8f5f`` |
+------------------+------------------+-----------------------------------------------------------+

**Responses**

+-----------+------------------------------------------------------------------------------------------+
| HTTP Code | Details |
+===========+===============+==========================================================================+
| 200 | `Description` | Success |
| +---------------+--------------------------------------------------------------------------+
| | `Contents` | .. code-block:: javascript |
| | | |
| | | JSON formatted Job List. |
| | | |
| | | .. container:: |
| | | |
| | | See :ref:`job-list-format-label` for details. |
| | | |
+-----------+---------------+--------------------------------------------------------------------------+
| 4xx | `Description` | User input error occurred |
| +---------------+--------------------------------------------------------------------------+
| | `Contents` | Error description (see :ref:`error-format-label` for details) |
+-----------+---------------+--------------------------------------------------------------------------+
| 5xx | `Description` | System error occurred |
| +---------------+--------------------------------------------------------------------------+
| | `Contents` | Error description (see :ref:`error-format-label` for details) |
+-----------+---------------+--------------------------------------------------------------------------+

**Example Requests**

.. sourcecode:: http

GET /api/job/list_related?api_token=7ca5dc5c7cce449fb0fff719307e8f5f&job_id=93n7dc5c7cce449fbk4h3nfo89m2be8w
Host: api.cielo24.com

**Example Response**

HTTP/1.1 200 OK
Content-Type: application/json

{
"related_jobs": [],
"leading_job": {
"job_status": "Pending",
"job_id": "99ac39bc9fe344bea6a8fdb75afccbda",
"current_priority": "STANDARD",
"media_length": "0:10:22.844807",
"current_fidelity": "HIGH",
"language": "fr:en,fr"
}
}
69 changes: 69 additions & 0 deletions api/source/job_control/order_translation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Order Translation
=================

Request that orders a Translation job for a previously completed Job.
The New Job ID and job target language will be returned upon completion.

**HTTP Method**

.. http:get:: /api/job/translate
**Query String Parameters** - Required

+------------------------+-------------------------------------------------------------------------------------+
| Name | Details |
+------------------------+------------------+------------------------------------------------------------------+
| api_token | `Description` | The API token used for this session |
| +------------------+------------------------------------------------------------------+
| | `Allowed Values` | Hex String |
| +------------------+------------------------------------------------------------------+
| | `Example` | ``api_token=7ca5dc5c7cce449fb0fff719307e8f5f`` |
+------------------------+------------------+------------------------------------------------------------------+
| job_id | `Description` | The ID of the job |
| +------------------+------------------------------------------------------------------+
| | `Allowed Values` | Hex String |
| +------------------+------------------------------------------------------------------+
| | `Example` | ``job_id=64bea283eff6475ea6596027a6ba0929`` |
+------------------------+------------------+------------------------------------------------------------------+
| target_languages | `Description` | The language(s) being ordered |
| +------------------+------------------------------------------------------------------+
| | `Allowed Values` | URL Encoded String (see allowed languages for language code) |
| +------------------+------------------------------------------------------------------+
| | `Example` | ``target_languages=fr%2Cde`` |
+------------------------+------------------+------------------------------------------------------------------+

**Query String Parameters** - Optional

+-------------------------+-----------------------------------------------------------------------------------------+
| Name | Details |
+=========================+=========================================================================================+
| approve_uplevel | .. raw:: html |
| | |
| | Mechanical, Premium, Caption Import Jobs must be upleveled before a Translation can be |
| | ordered. If ordering a translation on a Mechanical/Premium/Caption Import job |
| | this parameter becomes required |
| | |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | yes, no, t, f, true, false |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``approve_uplevel=yes`` |
+-------------------------+------------------+----------------------------------------------------------------------+

**Example Requests**

.. sourcecode:: http

GET /api/job/perform_transcription?v=1
&api_token=28beb5ecb23f498ea2e71efa49e0fd10
&job_id=f5b0a29c28804326ac6840863dfde14b
&target_languages=fr%2Cde
Host: api.cielo24.com

**Example Response**

.. sourcecode:: http

HTTP/1.1 201 CREATED
Content-Type: application/json

{"translation_job_ids": ["91aa19d058aa42b1ac98339a24a36503"], "message": "Child Translation Created for de. Child Translation already exists for fr"}
100 changes: 100 additions & 0 deletions api/source/job_control/uplevel_job.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Uplevel Job
===========

Request that orders Second Pass to be applied to a First Pass or Mechanical Job.
The New Job ID will be returned upon completion

**HTTP Method**

.. http:get:: /api/job/uplevel
**Query String Parameters** - Required

+------------------------+-------------------------------------------------------------------------------------+
| Name | Details |
+------------------------+------------------+------------------------------------------------------------------+
| api_token | `Description` | The API token used for this session |
| +------------------+------------------------------------------------------------------+
| | `Allowed Values` | Hex String |
| +------------------+------------------------------------------------------------------+
| | `Example` | ``api_token=7ca5dc5c7cce449fb0fff719307e8f5f`` |
+------------------------+------------------+------------------------------------------------------------------+
| job_id | `Description` | The ID of the job |
| +------------------+------------------------------------------------------------------+
| | `Allowed Values` | Hex String |
| +------------------+------------------------------------------------------------------+
| | `Example` | ``job_id=64bea283eff6475ea6596027a6ba0929`` |
+------------------------+------------------+------------------------------------------------------------------+

**Query String Parameters** - Optional

+-------------------------+-----------------------------------------------------------------------------------------+
| Name | Details |
+=========================+=========================================================================================+
| speaker_id | .. raw:: html |
| | |
| | Overrides account setting for choosing speaker_id workflow. |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | "yes" or "no" |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``speaker_id=yes`` |
+-------------------------+------------------+----------------------------------------------------------------------+
| priority | .. raw:: html |
| | |
| | Overrides the original Job's priority |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | STANDARD, CRITICAL, PRIORITY, HIGH, ECONOMY |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``priority=CRITICAL`` |
+-------------------------+------------------+----------------------------------------------------------------------+
| timing | .. raw:: html |
| | |
| | Overrides account setting for choosing timing workflow. |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | "yes" or "no" |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``timing=no`` |
+-------------------------+------------------+----------------------------------------------------------------------+
| requestor | .. raw:: html |
| | |
| | Adds Requestor ID or Name to the job metadata |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | URL Encoded String |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``requestor=batman999`` |
+-------------------------+------------------+----------------------------------------------------------------------+
| reference | .. raw:: html |
| | |
| | Adds Batch/Order Reference ID to the job metdata |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | URL Encoded String |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``reference=ea3cea0e6d5f4e1f9cc43d30781ee302`` |
+-------------------------+------------------+----------------------------------------------------------------------+
| caption_import_as_fp | .. raw:: html |
| | |
| | Boolean value for upleveling caption import workflow as first pass |
| | (default value is False) |
| +------------------+----------------------------------------------------------------------+
| | `Allowed Values` | yes, true, t, no, false, f |
| +------------------+----------------------------------------------------------------------+
| | `Example` | ``caption_import_as_fp=t`` |
+-------------------------+------------------+----------------------------------------------------------------------+

**Example Requests**

.. sourcecode:: http

GET /api/job/perform_transcription?v=1
&api_token=7ca5dc5c7cce449fb0fff719307e8f5f
&job_id=64bea283eff6475ea6596027a6ba0929
Host: api.cielo24.com

**Example Response**

.. sourcecode:: http

HTTP/1.1 201 CREATED
Content-Type: application/json

{"upleveled_job_id": "e79fe9efa9294cdeb14ee586248a557c", "upleveled_workflow": "MechFP 2nd Pass Only"}

0 comments on commit 9e4cb05

Please sign in to comment.