-
Notifications
You must be signed in to change notification settings - Fork 10
The API is currently under active development and has not been officially released
All responses have a content type of application/json
.
Represents a Transporter GUI job. Here's an example for a queued, upload job:
{
"id": 112,
"type": "upload"
"state": "queued",
"options": {
"package": "/some/package.itmsp",
"delete": false,
"username": "fofinha123",
"password": "shhhhh!",
"shortname": "sshaw",
"batch": null
},
"result": null,
"exceptions": null,
"created_at": "2016-11-19T20:01:07.373Z",
"updated_at": "2016-11-19T20:01:07.373Z",
"priority": "normal",
"account_id": 12,
"disable_notification": false
}
Here's one for a failed verify job:
{
"id": 105,
"type": "verify",
"state": "failure",
"options": {
"package": "/Users/sshaw/Desktop/982345323555.itmsp",
"batch": true,
"verify_assets": false,
"username": "user@example.com",
"password": "123",
"shortname": "shorty"
},
"result": null,
"exceptions": "Feature is missing a checksum (5011), Playlist already exits for this UPC (3005), Bad chapter timecode (4009), Preorder date must be before available date (4019)",
"created_at": "2016-09-04T00:54:24.205Z",
"updated_at": "2016-09-25T02:48:06.575Z",
"priority": "normal",
"account_id": 15,
"disable_notification": false
}
-
id
- job's id -
type
- one oflookup
,providers
,schema
,status
,upload
,verify
,version
-
state
- one ofqueued
,running
,success
,failure
-
options
- arguments passed toiTMSTransporter
, this varies based on the job's type, see Endpoints below -
result
- the results of a successful job, this varies based on the job type -
exceptions
- why the job failed -
disable_notification
- email notification's are enabled/disabled for the job
Error responses with a non-HTTP 2XX status are considered errors.
With the exception of a HTTP 422 (see below) error responses contain a single property error
,
whose value contains the error message:
{"error":"Not found"}
With HTTP 422 response, each property is a request property and its value is an array that contains the reasons why the give property was invalid. For example:
{
"account_id": [
"unknown"
],
"package": [
"must end with \".itmsp\""
]
}
The property base
(not shown) refers to the request itself and not a specific property.
Certain jobs accept a priority, this specifies the priority in which they'll be processed by itmsworker
.
Valid priorities are: normal
, high
, low
, next
.
A priority of next
will put the job at the front of the queue (well, assuming there isn't another
job with next
priority in front of it).
Create a job to retrieve the metadata for a previously uploaded package.
- Endpoint:
/api/lookup
- Method:
POST
-
package_id
: The type of identifier used to lookup the metadata, must bevendor_id
orapple_id
-
package_id_value
: The identifier -
account_id
: The Transporter GUI ID of the account to use to request the package's -
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities.
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/lookup' -d '{
"package_id": "vendor_id",
"package_id_value": "X123999",
"account_id": 12
}
'
Create a job that will retrieve a list of providers for which account_id
has permission to deliver content.
- Endpoint:
/api/providers
- Method:
POST
-
account_id
: The Transporter GUI ID of the account to use to request the package's -
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities.
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/providers' -d '{
"account_id": 12
}
'
Create a job to retrieve a metadata schema.
- Endpoint:
/api/schema
- Method:
POST
-
version_name
: Type of schema, eitherfilm
ortv
. -
version_number
: Schema version -
type
: Schema type, eitherstrict
ortransitional
-
account_id
: The Transporter GUI ID of the account to use to request the package's status -
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities.
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/schema' -d '{
"version_name": "film",
"version_number": "5.9",
"type": "strict",
"account_id": 12
}
'
Create a job to check an previous upload's status.
- Endpoint:
/api/status
- Method:
POST
-
vendor_id
: ID of the package to perform a status request on -
account_id
: The Transporter GUI ID of the account to use to request the package's status -
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities.
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/status' -d '{
"vendor_id": "X123999",
"account_id": 12
}
'
Create an upload package job.
- Endpoint:
/api/upload
- Method:
POST
All paths must be accessible by the worker process.
-
package
: Absolute path of the package to upload -
disable_notification
: optional, disable email notifications for this job only -
rate
: Optional, transfer rate in kbps -
batch
: Optional, batch upload, defaults tofalse
-
success
: Optional, absolute path of a directory to move package to if the upload succeeds -
failure
: Optional, absolute path of a directory to move package to if the upload fails -
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities. -
account_id
: The Transporter GUI ID of the account to use to upload the package -
delete
: Optional, defaults tofalse
: -
transport
: Optional, defaults to ITMSTrasnporter's default
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/upload' -d '{
"package": "/path/to/package.itmsp",
"account_id": 12,
"transport": "Aspera"
}
'
Create a package verification job.
- Endpoint:
/api/verify
- Method:
POST
-
package
: Absolute path of the package to upload, must be accessible by the worker process -
account_id
: The Transporter GUI ID of the account to use to request the package's status -
batch
: Optional, batch verification, defaults tofalse
-
verify_assets
: Optional, verify assets (normally only the metadata is verified), defaults tofalse
-
priority
: Optional, job priority, defaults to"normal"
. See Job Priorities.
See Response Objects.
curl -i -H 'content-type: application/json' -XPOST 'http://localhost:3000/api/verify' -d '{
"package": "/path/to/package.itmsp",
"account_id": 12
}
'
Made by ScreenStaring