User Data Tutorial
When integrating Hybrik with another system, you may want to supply custom data (your own job identifier or media file metadata, for example) that can be referenced when the job has finished. user_data
is a JavaScript object that is completely defined by you. You add this parameter to your job and it is returned verbatim in the job result.
Your user_data
can be simple or complicated, it just cannot exceed the max payload size of 1 Kib
.
user_data
is defined at the root level of your job.
{
"definitions": {
...
},
"name": "Hybrik API Example - Job user data",
"user_data": {
"some string": "This is my own string in my user_data!",
"some object": {
"my_id":10101,
"my_val":9292992,
"my_obj": { "a":1,"b":2,"c":3}
},
"some array": [
4,18,15,"hello world",16,23,42
],
"some_null": null,
"billing_id": 12345
},
"payload": {
"elements": [
{
...
Job Result
Inside of the job result file you will see that the object you specified is returned
{
"errors": [],
"job": {
"id": 124567,
...
"status": "completed",
"render_status": "completed",
"task_count": 1,
"progress": 100,
"name": "User Data Example",
"first_started": "2020-01-10T16:02:29.000Z",
"last_completed": "2020-01-10T16:02:39.000Z",
"user_data": {
"some string": "This is my own string in my user_data!",
"some object": {
"my_id": 10101,
"my_val": 9292992,
"my_obj": {
"a": 1,
"b": 2,
"c": 3
}
},
"some array": [
4,
18,
15,
"hello world",
16,
23,
42
],
"some_null": null,
"billing_id": 12345
}
},
...
Notes
user_data
has no impact on any other aspect of a job, it is not accessible anywhere else in the jobuser_data
can be returned with SNS notifications. See our Tutorial on SNS topics for more information.- The max supported payload is
1 KiB