X⁵/RX400 Ticket API Documentation
Index
2.3 Deleting a Ticket
2.4 De-/Assigning a Ticket
2.5 Status Calls
3.2.5 A FTPS source example - coming soon...
3.4.1 Defining the media content
3.5.1 Using an existing raw file
3.5.2.1 Text Block
3.5.2.2 Picture Block
3.5.2.3 Barcode Block
1 Introduction
1.1 General function
X⁵/RX400 is the first copy system that knows:
- which data is stored
- at which location
- on which media
- at what time
X⁵/RX400 is the only storage media production system which is able to simultaneously copy individual data onto SSD, USB, CF, MicroSD etc. Just in time copy technology reliably ensures the availability of the right storage media at the right time and the right place.
The X⁵/RX400 Copy System is a development of X-Net Technologies GmbH. It is controlled by the OpenRC - DriveCopy software system, also fully developed by X-Net Technologies GmbH. Typically OpenRC X⁵/RX400 Drivecopy jobs are defined by so called tickets which are in fact JSON files. Therefor X-Net has implemented a special JSON scheme which gets parsed and executed by the OpenRC X⁵/RX400 Drivecopy. It is provided by X-Net Technologies GmbH / Austria and can be changed under the X-Net Closed Source License (X-Net XSL). The source code is available for customers purchasing the X⁵/RX400 Copy System.
This enables our customers to define dynamic and in-time media productions for a smooth integration into their production progress. In the following chapters the structure of a JSON file is described in detail and illustrated with examples.
Note: This is a general description of OpenRC X⁵/RX400 Drivecopy ticket API (Application Programming Interface). Tickets are a highly customer specific thing and there can be a lot of changes and enhancements that can be found in additional documents. Please consult these documentation for more information on your adaption of the OpenRC framework.
This can also result in tickets that don't work as expected from this specification. Please refer to the additional documentation, ask your project leader or consult X-Net support!
1.2 About endpoint
To get Information about a RX400 System you can do a call to its about API endpoint. It will provide you with information about Disk usage, serialnumber, serviceid, licence status and device versions.
GET http://<server>:80/api/about/
{"about":
{"status": true,
"license_active": true,
"serial": "RX400-01001",
"disc_usage":
{
"system":
{
"percent_full": 44.24, "total_size": "19.52 GB", "data_size": "8.64 GB"},
"ssd": {"percent_full": 3.37, "total_size": "457.45 GB", "data_size": "15.43 GB"}
},
"status_display": "Online",
"license_display": "Valid"
},
"device_version": "1.2",
"versions": {"Webinterface": "3.12.0D44", "Service": "3.8.0D13", "Worm": "1.1.0", "Updater": "1.1.0", "Devicemanager": "1.2.0D8"},
"device_variant": "RAS38M Rimage RX400 MedX",
"service_id": "tqfy2"
}
FAQ
What decisions need to be made promptly during implementation?
The most important decisions are defining datasources and ticketing system. Ask yourself where the RX400 system should take its data from. Do you want to push your data onto the RX400 shared storage space and handle storage management on there or do you want the RX400 to pull data from one or more datasources you can define in the ticket? Can you make sure that these datasources are reachable from the RX400 via network? From which system should your Tickets come from? Can that system ensure all data is available in the network before the ticket is send to the RX400?
Which port will have to be used and must be allowed in the firewall?
Port 80 must be available.
What is the difference between a Job and a Ticket?
A Ticket is a description of the process that the RX400 needs to execute in order to fulfill the production of a data medium. It consists of a special JSON scheme which contains information about the data sources, data targets, checksum checks, amount of written media, type of media, event handler, label information and more. This information is parsed and executed by the OpenRC X⁵/RX400 Drivecopy system.
A Job is an instance of execution of a provided Ticket. It contains a tickets, adds a status to it, makes it repeatable and more.
What is the minimal setup for a RX400 system?
The RX400 has demo tickets included. For those please refer the settings. If you want to send external tickets continue reading.
A minimal setup for the RX400 consist of a RX400 Kit, a RX400 comparable USB Stick, a Network and a second Device in this network. If no ticket authorization is set, the second device can send a valid ticket via curl to the RX400. First activate the shared storage space on the RX400, refer to the setting menu for this. Access the RX400 smb share via the RX400 devices IP. Provide data in the share. Write a ticket and define your path as /storage/<your_file_path>/ as "/storage" refers to the local shared storage space. Send the ticket and check if you get a positive response. Wait until your ticket is available on the RX400 device.
How do I use test data?
In the settings you can open the demo ticket options and select a ticket you want to create.
What preparations have to be made before sending a ticket?
All Datasources refered in the ticket must be available for the RX400.
2 Sending a ticket
Tickets can be sent to the X⁵/RX400 Master REST-API via a HTTP POST call. The JSON ticket data has to be sent as the body of the call.
There's also a tool called send.py that sends a local file (from the server) to the X⁵/RX400 Master.
2.1 Sending to the REST-API
To send a ticket to the X⁵/RX400 Master API a HTTP POST request with the json ticket data as its body has to be sent.
Usually the ticket will be sent via the webinterface API endpoint:
http://<server>:80/api/ticket/new/
Alternatively the ticket can be sent directly to the internal Master Service API:
http://<server>:5675/api/ticket/new
The response is a json dictionary. A "status" key describes wether the call was successful.
If it was successsful the assignes ticket id is returned:
{'status': True, 'id': <new ticket id (integer)>}
If an error occured while parsing and processing the ticket the error messages are returned in a dictionary containing the errors as a list and grouped by parsing module:
{'status': False, 'errors': {'db': ['missing or invalid data']}}
2.3 Stopping a Ticket
POST http://<server>:80/api/ticket/{id}/stop/
Request Parameter | ||
Parameter name | Example | Description |
id | 1 | Ticket ID |
2.4 Deleting a Ticket
http://<server>:80/api/ticket/{id}/delete/
Request Parameter | ||
Parameter name | Example |
Description |
id | 1 | Ticket ID |
2.5 De-/Assigning a Ticket
Assigning a Ticket
After a job has been started, it must be assigned to a slot in order to be written to the media placed in given slot. Slot and Ticket ID must be provided as query Parameters.
POST http://<server>:80/api/assign/ticket/
Request Parameter | ||
Parameter name | Example |
Description |
ticket_id | 1 | ID of Ticket to be assigned |
slot_id | 4 | ID of Slot to be assigned |
Slots are numbered from left to right starting with slot_id 1.