Skip to content

Transcoding & Packaging API Guide

This document guides how to use DoveRunner Transcoding & Packaging (T&P) service through HTTP API.

You can integrate T&P service with the following video tutorials and API sample code.


LanguageGitHub repository
TypeScripthttps://github.com/doverunner/tnp-request-sample-typescript
Pythonhttps://github.com/doverunner/tnp-request-sample-python
Javahttps://github.com/doverunner/tnp-request-sample-java

The specifications below are common to all T&P APIs described in this document.

When calling the T&P API, you need to set an authentication token issued by the process below.

Step 1: Generate the base64 encoded Authorization parameter

  1. Navigate to Base64 Enc/Dec page on DoveRunner DevConsole.
  2. While Encrypt option is selected, enter the EmailID:AccessKey value in the left text field.
  3. Base64 encoded output will be displayed as the screenshot below.
  4. Copy the output value to use in the next step.

You need to input the email address and AccessKey values for your DoveRunner service account.

Step 2: Use the parameter value to generate the Authorization token.

Call the token API URL with base64 encoded value in the Authorization request header.

ParameterFormatDescription
siteIdfour alphanumeric charactersYour DoveRunner Site ID shown on Console
NameDescription
AuthorizationBasic Auth : Basic base64encode(accountId:accessKey)

Sample Request

GET /api/token/DEMO HTTP/1.1
Authorization: basic authInfo
Host: tnp.pallycon.com
Field NameTypeInfo
error_codeStringerror code
error_messageStringerror message
data.tokenStringapi auth token

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 112
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"token" : "Bearer valid-token"
}
}

You can call the T&P API by setting the data issued through the token api in the authorization header.

Response Status

HTTP Status CodeDescription
Error codeDescription
401Incorrect JWT Token specification or user information not found
403You do not have permission to use the API.
200Success

Response Data Fields

KeytypeValue
error_codeString0000: Success / Other values indicate failure
error_messageStringError message
dataJsonApi result

Some of T&P APIs use region codes as below in the request and response data.

Region CodeRegion NameAWS Region Code
RG004Oregonus-west-2
RG011Seoulap-northeast-2
RG013Singaporeap-southeast-1

API to get TNP Integration Setting.

ParameterDescription
siteIdYour DoveRunner Site ID

Sample Request

GET /api/setting/DEMO HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.api.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectTNP Integration Information
data.site_idStringSite ID
data.regionStringRegion Code to proceed with TNP packaging
data.service_statusStringTNP Service Status (SE000:In Service, SE001: No Service)
data.trial_pack_cntNumberOn Trial, number of packaging jobs
data.site_keyStringEncryption key required for service site integration (check the DoveRunner Console’s ‘Site Settings’ page)
data.access_keyStringEncryption key used for additional integration such as packager, license token, etc. (check the DoveRunner Console’s ‘Site Settings’ page)

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 230
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"site_id" : "DEMO",
"region" : "RG011",
"service_status" : "SE000",
"trial_pack_cnt" : 0,
"site_key" : null,
"access_key" : null
}
}

API to update TNP Integration Setting.

ParameterDescription
siteIdYour DoveRunner Site ID
필드유형설명
siteIdYour DoveRunner Site ID
regionStringRegion Code to proceed with TNP packaging

Sample Request

PUT /api/setting/DEMO HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Content-Length: 76
Host: tnp.api.com
{
"site_id" : "DEMO",
"region" : "RG004"
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectTNP Integration Information
data.site_idStringSite ID
data.regionStringRegion Code to proceed with TNP packaging

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 156
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"site_id" : "DEMO",
"region" : "RG004"
}
}

The API used to create the Transcoding and Packaging Job

ParameterDescription
siteIdYour DoveRunner Site ID (four alphanumeric characters)
FieldTypeRequiredDescription
job_nameStringYesJob name
content_idStringYesContent id
inputObjectYesInput content information
input.storage_idStringYesInput storage id
input.filesArrayYesInput files information.
input.files.[].file_typeStringYesfile type : multi, video, audio
- multi : Use the video and audio track of the input file. Audio track information must be included.
- video: Use the video track of the input file. Audio track information is not used. multi and video cannot be used together in the same job.
- audio: Use the audio track of the input file. Audio track information must be included.
input.files.[].file_pathStringYesinput file path
input.files.[].audiosArrayaudio information(Required in case of multi or audio file_type)
input.files.[].audios.[].inObjectYesinput audio track
input.files.[].audios.[].in.trackNumberinput audio track index. default: 0
input.files.[].audios.[].remapObjectYesremapped audio track
input.files.[].audios.[].remap.trackNumberremapped audio track index. default: 0
input.subtitlesArraySubtitle
input.subtitles.[].file_pathStringYessubtitle file path
input.subtitles.[].languageStringYessubtitle language
outputObjectYesOutput task information
output.storage_idStringYesOutput storage id
output.pathStringYesOutput folder path
output.default_languageStringDefault language code of audio track
output.transcodingsArrayYesTranscoding
output.transcodings.[].track_idStringYestrack id
output.transcodings.[].track_typeStringYestrack type : video, audio
output.transcodings.[].track_nameStringtrack name : audio
output.transcodings.[].codecStringYesvideo/audio codec name (video: h264, h265. audio: aac, aac_lc,ac3,eac3 & heaac_v2)
In case of audio codec, the name should be as same as the source file has.
output.transcodings.[].heightNumberYesHeight of video
output.transcodings.[].widthNumberYesWidth of video
output.transcodings.[].bitrate_modeStringBitrate mode (cbr, vbr)
output.transcodings.[].bitrateNumberYesBitrate (CBR)(bps).
output.transcodings.[].min_bitrateNumberMinimum bitrate (bps). for vbr.
output.transcodings.[].max_bitrateNumberMaximum bitrate (bps). for vbr.
output.transcodings.[].crfNumberSet bitrate based on quality. Only available if VBR. Range : 0~63
output.transcodings.[].bandwidthNumberbandwidth of video
output.transcodings.[].sample_rateNumberSample rate of audio
output.transcodings.[].languageStringLanguage code(ISO 639-1, lowercase two-letter) of audio track
output.transcodings.[].sourcesArrayList of remapped audio tracks to use.
output.transcodings.[].sources.[].trackNumberremapped audio track index to use.
output.packagingObjectYesPackaging
output.packaging.dashBooleanoutput dash. Either dash or hls or cmaf is required. If you set this streaming format, the cmaf must have a false value.
output.packaging.hlsBooleanoutput hls. Either dash or hls is cmaf is required. If you set this streaming format, the cmaf must have a false value.
output.packaging.cmafBooleanoutput cmaf. Other streaming formats (dash,hls) or cmaf are required.
output.packaging.optionObjectpackaging option
output.packaging.option.min_buffer_timeNumberSpecifies, in seconds, a common duration used in the definition of the MPD Representation data rate. Minimum: 2
output.packaging.option.enable_average_bandwidth_mpdBooleanUse average bandwidth for each track in MPD. (default: false)
output.packaging.option.mp4_subtitleBooleanDeprecated
the output subtitle format can be set to Embedded MP4 with this parameter. If the parameter is omitted, the subtitle in Text VTT format is created by default. (default: false)
output.packaging.option.subtitle_format.dashStringAble to set subtitle format with option name(text_vtt, mp4_ttml, mp4_vtt). Only available when output DASH type is requested. (default: text_vtt)
output.packaging.option.subtitle_format.hlsStringAble to set subtitle format with option name(text_vtt, mp4_ttml, mp4_vtt). Only available when output HLS type is requested. (default: text_vtt)
output.packaging.option.subtitle_format.cmafStringAble to set subtitle format with option name(text_vtt, mp4_ttml). Only available when output CMAF type is requested. (default: text_vtt)
output.drmObjectDrm
output.drm.enabledBooleanDrm enable flag. default: false
output.drm.optionObjectDrm option
output.drm.option.multi_keyBooleanEnables multi-key packaging. default: false
output.drm.option.max_sd_heightNumberMax resolution to be packaged as SD track. default: 480
output.drm.option.max_hd_heightNumberMax resolution to be packaged as HD track. default: 1080
output.drm.option.max_uhd1_heightNumberMax resolution to be packaged as UHD track. default: 2160
output.drm.option.skip_audio_encryptionBooleanDisable audio track encryption. default: false(encrypt audio)
output.drm.option.clear_leadNumberUnencrypted section at the beginning (by second). default: 0
output.drm.option.generate_tracktype_manifestsBooleanCreate multiple manifest (playlist) files for multi-key packaging. For adaptive streams containing SD to UHD tracks, three manifests are created: SD_ONLY, SD_HD, and SD_UHD. default: false
output.forensic_watermarkingObjectForensic watermarking
output.forensic_watermarking.enabledBooleanForensic watermarking enable flag. default: false
output.job_noti_idStringUse the notification ID which has been configured already (Refer to SNS Creation) for TNP Job status update.
output.scale_option_typeStringscale option type(none, fit, fit_with_padding, fill_with_crop, stretch, stretch_with_par)

Sample Request

POST /api/job/DEMO HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Content-Length: 1541
Host: tnp.pallycon.com
{
"job_name" : "jobName",
"content_id" : "test-cid",
"input" : {
"storage_id" : "input-storage-id",
"files" : [ {
"file_type" : "multi",
"file_path" : "input/input-file1.mp4",
"audios" : [ {
"in" : {
"track" : 0
},
"remap" : {
"track" : 0
}
} ]
} ],
"subtitles" : [ {
"file_path" : "input/subtitle/en.vtt",
"language" : "eng"
} ]
},
"output" : {
"storage_id" : "output-storage-id",
"path" : "output",
"transcodings" : [ {
"track_id" : "video1",
"track_type" : "video",
"codec" : "h264",
"height" : 1080,
"width" : 1920,
"bitrate_mode" : "cbr",
"bitrate" : 10000,
"frame_rate" : 23.98
}, {
"track_id" : "audio1",
"track_type" : "audio",
"track_name" : "english",
"codec" : "h264",
"bitrate_mode" : "cbr",
"bitrate" : 128000,
"language" : "en",
"sources" : [
{
"track": 0
}
]
} ],
"packaging" : {
"dash" : true,
"hls" : false,
"cmaf" : false,
"option" : {
"min_buffer_time" : 2,
"enable_average_bandwidth_mpd" : false,
"subtitle_format": {
"dash": "text_vtt"
}
}
},
"drm" : {
"enabled" : true,
"option" : {
"multi_key" : false,
"max_sd_height" : 0,
"max_hd_height" : 0,
"max_uhd1_height" : 0,
"skip_audio_encryption" : false,
"clear_lead" : 0,
"generate_tracktype_manifests" : false
}
},
"forensic_watermarking" : {
"enabled" : true
},
"job_noti_id":1,
"scale_option_type":"fit_with_padding"
}
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
data.job_idNumbercreated job id

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 96
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"job_id" : 123
}
}

Use this API to search the Job List

ParameterDescription
siteIdYour DoveRunner Site ID
ParameterTypeDescription
fromStringSearch parameter for job registration time. (YYYY-MM-DD)
toStringSearch parameter for job registration time. (YYYY-MM-DD)
job_nameStringSearch job name.
regionStringSearch region code.
page_unitNumberNumber of max result per page. default : 25, max: 1000.
page_indexNumberIndex of result page. default : 1
job_idNumberSearch job id.
job_id_operatorStringSearch Operator of job id. (eq, gt, goe, lt, loe)
content_idStringSearch content id.
streaming_formatArraySearch streaming format : dash / hls / cmaf / dash,hls
job_statusArraySearch job status by list.
job_typeArraySearch job type by list. drm / forensic_watermark / drm,forensic_watermark
codecStringSearch transcoding video codec. : h264 / h265 / h264,h2655
time_zoneStringSearch timezone. default : +00:00

Sample Request

GET /api/job/DEMO?from=2022-05-01&to=2022-05-13&job_name=test-job&region=RG011&page_unit=20&page_index=1&job_id=123&content_id=test-content-id&security=forensic_watermark&streaming_format=dash&time_zone=%2B00%3A00 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringError code
error_messageStringError message
time_zoneStringTimezone
total_countNumbertotal count
dataArrayJob list
data.[].job_idNumberJob ID
data.[].job_nameStringJob name
data.[].content_idStringContent id
data.[].job_statusStringJob status code
data.[].drmBooleanUse DRM
data.[].forensic_watermarkBooleanUse Forensic watermark
data.[].dashBooleanPackaging Dash
data.[].hlsBooleanpackaging Hls
data.[].cmafBooleanpackaging CMAF
data.[].regionStringJob registration region
data.[].reg_timeStringJob registration time.
data.[].start_timeStringStart time for the job
data.[].update_timeStringLast update time for the job

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 933
{
"error_code" : "0000",
"error_message" : "Success.",
"time_zone" : "+00:00",
"total_count" : 3,
"data" : [ {
"job_id" : 1,
"job_name" : "test job 1",
"content_id" : "test cid 1",
"job_status" : "TP100200",
"drm" : true,
"forensic_watermark" : true,
"dash" : true,
"hls" : true,
"cmaf": false,
"codec": "h264"
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
}, {
"job_id" : 2,
"job_name" : "test job 2",
"content_id" : "test cid 2",
"job_status" : "TP500",
"drm" : true,
"forensic_watermark" : false,
"dash" : true,
"hls" : false,
"cmaf": false,
"codec": "h265"
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
}, {
"job_id" : 3,
"job_name" : "test job 3",
"content_id" : "test cid 3",
"job_status" : "TP700200",
"drm" : true,
"forensic_watermark" : true,
"dash" : true,
"hls" : true,
"cmaf": false,
"codec": "h264"
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
} ]
}

This API is used to Get the Job details

ParameterDescription
siteIdYour DoveRunner Site ID
jobIdJob ID
ParameterRequiredDescription
time_zoneYesSearch timezone. default: +00:00

Sample Request

GET /api/job/DEMO/1?time_zone=%2B00%3A00 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
time_zoneStringTimezone
dataObjectJob Information
data.job_idNumberJob Id
data.job_nameStringJob name
data.job_statusStringJob status code
data.regionStringRegion code
data.content_idStringContent id
data.inputObjectInput content information
data.input.storage_idStringInput storage id
data.input.filesArrayInput files information.
data.input.files.[].file_typeStringfile type : multi, video, audio
- multi : Use the video and audio track of the input file. Audio track information must be included.
- video: Use the audio track of the input file. Audio track information is not used. Multi and video cannot be used together in the same job.
- audio: Use the audio track of the input file. Audio track information must be included.
data.input.files.[].file_pathStringinput file path
data.input.files.[].audiosArrayaudio information
data.input.files.[].audios.[].in.trackNumberinput audio track index
data.input.files.[].audios.[].remap.trackNumberremapped audio track index
data.input.subtitlesArraySubtitle
data.input.subtitles.[].file_pathStringsubtitle file path
data.input.subtitles.[].languageStringsubtitle language
data.outputObjectOutput task information
data.output.storage_idStringOutput storage id
data.output.pathStringOutput folder path
data.output.default_languageStringDefault language code of audio track
data.output.transcodingsArrayTranscoding
data.output.transcodings.[].track_idStringtrack id
data.output.transcodings.[].track_typeStringtrack type : video, audio
data.output.transcodings.[].track_nameStringtrack name : audio
data.output.transcodings.[].codecStringvideo/audio codec name (video: h264, h265. audio: aac, aac_lc,ac3,eac3 & heaac_v2)
data.output.transcodings.[].heightNumberHeight of video
data.output.transcodings.[].widthNumberWidth of video
data.output.transcodings.[].bitrate_modeStringBitrate mode (cbr, vbr)
data.output.transcodings.[].bitrateNumberBitrate (bps).
data.output.transcodings.[].min_bitrateNumberMinimum bitrate (bps). for vbr.
data.output.transcodings.[].max_bitrateNumberMaximum bitrate (bps). for vbr.
data.output.transcodings.[].frame_rateNumberFrame rate of video
data.output.transcodings.[].crfNumberBitrate based on quality. Only available if VBR. Range : 0~63
data.output.transcodings.[].bandwidthNumberbandwidth of video
data.output.transcodings.[].sample_rateNumberSample rate of audio
data.output.transcodings.[].languageStringLanguage code(ISO 639-1, lowercase two-letter) of audio track
data.output.transcodings.[].sourcesArrayList of remapped audio tracks to use.
data.output.transcodings.[].sources.[].trackNumberremapped audio track index to use.
data.output.packagingObjectPackaging
data.output.packaging.dashBooleanoutput dash. Either dash or hls or cmaf is required. If you set this streaming format, the cmaf must have a false value.
data.output.packaging.hlsBooleanoutput hls. Either dash or hls or cmaf is required. If you set this streaming format, the cmaf must have a false value.
data.output.packaging.cmafBooleanoutput cmaf. Other streaming formats (dash,hls) or cmaf are required.
data.output.packaging.optionObjectpackaging option
data.output.packaging.option.min_buffer_timeNumberSpecifies, in seconds, a common duration used in the definition of the MPD Representation data rate. Minimum: 2
data.output.packaging.option.enable_average_bandwidth_mpdBooleanUse average bandwidth for each track in MPD. (default: false)
output.packaging.option.mp4_subtitleBooleanDeprecated
the output subtitle format can be set to Embedded MP4 with this parameter. If the parameter is omitted, the subtitle in Text VTT format is created by default. (default: false)
output.packaging.option.subtitle_format.dashStringAble to set subtitle format with option name(text_vtt, mp4_ttml, mp4_vtt). Only available when output DASH type is requested. (default: text_vtt)
output.packaging.option.subtitle_format.hlsStringAble to set subtitle format with option name(text_vtt, mp4_ttml, mp4_vtt). Only available when output HLS type is requested. (default: text_vtt)
output.packaging.option.subtitle_format.cmafStringAble to set subtitle format with option name(text_vtt, mp4_ttml). Only available when output CMAF type is requested. (default: text_vtt)
data.output.drmObjectDrm
data.output.drm.enabledBooleanDrm enable flag. default: false
data.output.drm.optionObjectDrm option
data.output.drm.option.multi_keyBooleanEnables multi-key packaging. default: false
data.output.drm.option.max_sd_heightNumberMax resolution to be packaged as SD track. default: 480
data.output.drm.option.max_hd_heightNumberMax resolution to be packaged as HD track. default: 1080
data.output.drm.option.max_uhd1_heightNumberMax resolution to be packaged as UHD track. default: 2160
data.output.drm.option.skip_audio_encryptionBooleanDisable audio track encryption. default: false(encrypt audio)
data.output.drm.option.clear_leadNumberUnencrypted section at the beginning (by second). default: 0
data.output.drm.option.generate_tracktype_manifestsBooleanCreate multiple manifest (playlist) files for multi-key packaging. For adaptive streams containing SD to UHD tracks, three manifests are created: SD_ONLY, SD_HD, and SD_UHD. default: false
data.output.forensic_watermarkingObjectForensic watermarking
data.output.forensic_watermarking.enabledBooleanForensic watermarking enable flag. default: false
data.output.job_noti_idStringThe notification ID set for the TNP Job.
data.reg_timeStringJob registration time
data.start_timeStringJob start time
data.update_timeStringLast update time for the job

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1542
{
"error_code" : "0000",
"error_message" : "Success.",
"time_zone" : "+00:00",
"data" : {
"job_name" : "jobName",
"content_id" : "test-cid",
"input" : {
"storage_id" : "12312312312312312312312312312312",
"files" : [ {
"file_type" : "multi",
"file_path" : "del-short-hevc.mp4",
"audios" : [ {
"in" : {
"track" : 0
},
"remap" : {
"track" : 0
}
} ]
} ]
},
"output" : {
"storage_id" : "32132132132132132132131231232132",
"path" : "saas-pack",
"transcodings" : [ {
"track_id" : "video1",
"track_type" : "video",
"codec" : "H265",
"height" : 1080,
"width" : 1920,
"bitrate" : 2500,
"frame_rate" : 23.98
}, {
"track_id" : "video2",
"track_type" : "video",
"codec" : "H264",
"height" : 720,
"width" : 1080,
"bitrate" : 1500,
"frame_rate" : 23.98
}, {
"track_id" : "audio1",
"track_type" : "audio",
"codec" : "aac",
"sources" : [ {
"track" : 0
} ]
} ],
"packaging" : {
"dash" : true,
"hls" : true,
"cmaf" : false
},
"drm" : {
"enabled" : true
},
"forensic_watermarking" : {
"enabled" : true
}
"job_noti_id":1
},
"job_id" : 1,
"region" : "RG011",
"job_status" : "TP100100",
"start_time" : "2022-05-20T17:03:41",
"reg_time" : "2022-05-20T17:02:17"
}
}

The below API is used to stop the T&P job

ParameterDescription
siteIdYour DoveRunner Site ID
jobIdJob ID

Sample Request

PUT /api/job/DEMO/1/stop HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectJob Information
data.job_idNumberJob Id

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 94
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"job_id" : 1
}
}

API to restart the job.

ParameterDescription
siteIdYour DoveRunner Site ID
jobIdJob ID

Sample Request

PUT /api/job/DEMO/1/restart HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectJob Information
data.job_idNumberJob Id

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 94
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"job_id" : 1
}
}

API to create the storage ID

ParameterDescription
siteIdYour DoveRunner Site ID
FieldTypeRequiredDescription
storage_nameStringYesName of the storage
aws_bucketStringYesName of S3 bucket
io_typeStringYesStorage input/output type
access_key_idStringYesS3 access key id
secret_keyStringYesS3 secret key
regionStringYesRegion code
descriptionStringStorage description

Sample Request

POST /api/storage/DEMO HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Content-Length: 295
Host: tnp.pallycon.com
{
"storage_name" : "test-input-storage",
"aws_bucket" : "watermark-input-seoul",
"io_type" : "input",
"access_key_id" : "valid-test-storage-access-key-id",
"secret_key" : "valid-in-test-storage-secret-key",
"region" : "RG011",
"description" : "This storage is test input bucket."
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
data.storage_idStringcreated storage id

Sample Response

| HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 115
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"storage_id" : "input-storage-id"
}
}

API to search in the Storage List

ParameterDescription
siteIdYour DoveRunner Site ID
ParameterDescription
fromSearch parameter for storage registration time. (YYYY-MM-DD)
toSearch parameter for storage registration time. (YYYY-MM-DD)
storage_nameSearch storage name.
regionSearch storage region code.
page_unitNumber of max result per page. default : 25, max: 1000.
page_indexIndex of result page. default : 1
time_zoneSearch timezone. default: +00:00

Sample Request

GET /api/storage/DEMO?from=2022-05-01&to=2022-05-13&storage_name=test-storage&region=RG011&page_unit=20&page_index=1&time_zone=%2B00%3A00 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringError code
error_messageStringError message
time_zoneStringTimezone
dataArrayStorage list
data.[].storage_idStringStorage id
data.[].storage_nameStringStorage name
data.[].aws_bucketStringBucket name
data.[].io_typeStringinput / output
data.[].regionStringStorage region
data.[].reg_timeStringStorage registration time YYYY-MM-DD’T’hh-mm-ss
data.[].update_timeStringLast update time YYYY-MM-DD’T’hh-mm-ss

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 775
{
"error_code" : "0000",
"error_message" : "Success.",
"time_zone" : "+00:00",
"data" : [ {
"storage_id" : "e42e5fc74bee455db0fc2d79038dbabb",
"storage_name" : "test storage 1",
"aws_bucket" : "test bucket 1",
"io_type" : "input",
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
}, {
"storage_id" : "50273cb8e91242f3ad6b9dd49faf8f03",
"storage_name" : "test storage 2",
"aws_bucket" : "test bucket 2",
"io_type" : "input",
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
}, {
"storage_id" : "69798b703f3c46b996a1335a54c3fa0e",
"storage_name" : "test storage 3",
"aws_bucket" : "test bucket 3",
"io_type" : "input",
"region" : "RG011",
"reg_time" : "2022-05-20T00:00:00"
} ]
}

API to get the storage details

ParameterDescription
siteIdYour DoveRunner Site ID
storageIdStorage id
ParameterDescription
time_zoneSearch timezone. default: +00:00

Sample Request

GET /api/storage/DEMO/12312312312312312312312312312312?time_zone=%2B00%3A00 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
time_zoneStringTimezone
dataObjectStorage Information
data.storage_idStringStorage Id
data.storage_nameStringStorage name
data.io_typeStringStorage input/output type
data.aws_bucketStringBucket name
data.regionStringRegion code
data.access_key_idStringStorage access key id
data.secret_keyStringstorage secret key
data.descriptionStringStorage Description
data.reg_timeStringStorage registration time (YYYY-MM-DD’T’hh-mm-ss)
data.update_timeStringLast update time

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 547
{
"error_code" : "0000",
"error_message" : "Success.",
"time_zone" : "+00:00",
"data" : {
"storage_id" : "12312312312312312312312312312312",
"storage_name" : "test-input-storage",
"io_type" : "input",
"aws_bucket" : "watermark-input-seoul",
"region" : "RG011",
"access_key_id" : "valid-test-storage-access-key-id",
"secret_key" : "valid-in-test-storage-secret-key",
"description" : "This storage is test input bucket.",
"update_time" : "2022-05-26T05:43:01",
"reg_time" : "2022-05-25T05:43:01"
}
}

API to update the storage details

ParameterDescription
siteIdYour DoveRunner Site ID
storageIdStorage id
FieldTypeDescription
storage_nameStringStorage name
access_key_idStringS3 access key id
secret_keyStringS3 secret key
aws_bucketStringS3 bucket name
io_typeStringinput / output
descriptionStringStorage description

Sample Request

PUT /api/storage/DEMO/12312312312312312312312312312312 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Content-Length: 217
Host: tnp.pallycon.com
{
"storage_name" : "test-input-storage",
"aws_bucket" : "watermark-input-seoul",
"io_type" : "input",
"access_key_id" : "valid-test-storage-access-key-id",
"secret_key" : "valid-in-test-storage-secret-key"
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectStorage Information
data.storage_idStringStorage Id

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 131
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"storage_id" : "12312312312312312312312312312312"
}
}

API to delete storage ID

ParameterDescription
siteIdYour DoveRunner Site ID
storageIdStorage ID

Sample Request

DELETE /api/storage/DEMO/12312312312312312312312312312312 HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectStorage Information
data.storage_idStringStorage Id

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 131
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"storage_id" : "12312312312312312312312312312312"
}
}

API to delete multiple storage IDs at once.

ParameterDescription
siteIdYour DoveRunner Site ID
storage_idsArray

Sample Request

DELETE /api/storage/DEMO HTTP/1.1
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Content-Length: 118
Host: tnp.pallycon.com
{
"site_id" : "DEMO",
"storage_ids" : [ "12312312312312312312312312312312", "12312312312312312312312312312313" ]
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectStorage Information
data.site_idStringSite id
data.storage_idsArrayStorage Id list

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 196
{
"error_code" : "0000",
"error_message" : "Success.",
"data" : {
"site_id" : "DEMO",
"storage_ids" : [ "12312312312312312312312312312312", "12312312312312312312312312312313" ]
}
}

TNP API supports AWS SNS (Simple Notification Service) to get updates on the TNP Job status. Currently the following 4 APIs are supported:

  1. AWS SNS Job Notification creation
  2. Notification Update
  3. Notification Search
  4. Notification Delete

API to create Job notification

ParameterDescription
siteIdYour DoveRunner Site ID
FieldTypeRequiredDescription
noti_nameStringYesSNS notification name (maximum 50 characters English case, numbers, special characters (-)(_)(.)) supported
noti_typeStringYesNotification type to be mentioned, at present only SNS is supported
url_end_pointStringYesURL address to receive notifications (currently only AWS ARN type addresses are supported)
aws_access.access_keyStringYesPlease mention your aws sns access key
aws_access.secret_keyStringYesPlease mention your aws sns secret key
alarm_statusObjectYesType of alarm notification status to be set
alarm_status.queuedBooleanIf set to true, whenever job is queued, notification would be sent (default: false)
alarm_status.progressingBooleanIf set to true, whenever job enters progress from queued state, notification would be sent (default: false)
alarm_status.completeBooleanIf set to true, whenever job is completed, notification would be sent (default: false)
alarm_status.errorBooleanIf set to true, whenever job encounters an error, notification would be sent (default: false)
alarm_status.stoppedBooleanIf set to true, whenever job is stopped, notification would be sent (default: false)

Sample Request

POST https://tnp.pallycon.com/api/noti/job/{SiteID}
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
{
"noti_name" :"noti_test",
"noti_type" : "SNS",
"url_end_point" : "arn:aws:sns:us-west-2:73041xxxxx:PallyCon_TNP_SNS",
"aws_access" :
{
"access_key" : "AK1252GDTP5xxxxx",
"secret_key" : "WwMma1EVkcMBhlCmXxxxxxxx1"
},
"alarm_status" :
{
"queued" : false,
"progressing" : false,
"stopped" : true,
"error" : true,
"complete" : true
}
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectJob Notification information
data.noti_idNumberNotification ID

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"error_code": "0000",
"error_message": "Success.",
"data": {
"noti_id": 1
}
}

API to modify/update already created notification

ParameterDescription
siteIdYour DoveRunner Site ID
notiidNotification ID to be updated
FieldTypeRequiredDescription
noti_nameStringSNS notification name (maximum 50 characters English case, numbers, special characters (-)(_)(.)) supported
noti_typeStringNotification type to be mentioned, at present only SNS is supported
url_end_pointStringURL address to receive notifications (currently only AWS ARN type addresses are supported)
aws_access.access_keyStringPlease mention your aws sns access key
aws_access.secret_keyStringPlease mention your aws sns secret key
alarm_statusObjectType of alarm notification status to be set
alarm_status.queuedBooleanYesIf set to true, whenever job is queued, notification would be sent (default: false)
alarm_status.progressingBooleanYesIf set to true, whenever job enters progress from queued state, notification would be sent (default: false)
alarm_status.completeBooleanYesIf set to true, whenever job is completed, notification would be sent (default: false)
alarm_status.errorBooleanYesIf set to true, whenever job encounters an error, notification would be sent (default: false)
alarm_status.stoppedBooleanYesIf set to true, whenever job is stopped, notification would be sent (default: false)

Sample Request

PUT https://tnp.pallycon.com/api/noti/job/{{SitID}}/{{notiid}}
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
{
"noti_name" :"noti_test",
"noti_type" : "SNS",
"url_end_point" : "arn:aws:sns:us-west-2:73041xxx:PallyCon_TNP_SNS",
"aws_access" :
{
"access_key" : "AK1252GDTP5xxxxx",
"secret_key" : "WwMma1EVkcMBhlCmXxxxxxxx1"
},
"alarm_status" :
{
"queued" : false,
"progressing" : false,
"stopped" : true,
"error" : true,
"complete" : true
}
}
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectJob Notification information
data.noti_idNumberNotification ID

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"error_code": "0000",
"error_message": "Success.",
"data": {
"noti_id": 1
}
}

API to search Job notifications

ParameterDescription
siteIdYour DoveRunner Site ID

Sample Request

GET https://tnp.pallycon.com/api/noti/job/{SiteID}
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
time_zoneStringTimezone
total_countNumberTotal Count
dataArrayJob Notification List

The Data Array details are as follows:

FieldTypeDescription
noti_idNumberNotification ID
site_idStringSite ID
noti_nameStringSNS notification name
noti_typeStringAWS SNS
url_end_pointStringURL address to receive notifications
alarm_statusObjectType of alarm notification status
alarm_status.queuedBooleanThe status of job queued notification
alarm_status.progressingBooleanThe status of job in progress state notification
alarm_status.completeBooleanThe status of job completed notification
alarm_status.errorBooleanThe status of error notification
alarm_status.stoppedBooleanThe status of Job stopped state notification
reg_timeStringNotification created date & time
update_timeStringNotification updated date & time

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"error_code": "0000",
"error_message": "Success.",
"time_zone": "+00:00",
"total_count": 1,
"data": [
{
"noti_id": 1,
"site_id": "YOUR_SITE_ID",
"noti_name": "noti_test",
"noti_type": "SNS",
"url_end_point": "arn:aws:sns:us-west-2:73041xxx:PallyCon_TNP_SNS",
"access_key": "AK1252GDTP5xxxxx",
"alarm_status": {
"queued": true,
"progressing": true,
"complete": true,
"error": true,
"stopped": true
},
"update_time": "2024-08-05T11:02:05",
"reg_time": "2024-08-05T10:18:58"
}
]
}

API to delete Job notification

ParameterDescription
siteIdYour DoveRunner Site ID
notiIdNotification ID to be deleted

Sample Request

DELETE https://tnp.pallycon.com/api/noti/job/{SiteID}/{notiId}
Authorization: Bearer valid_token
Content-Type: application/json;charset=UTF-8
Host: tnp.pallycon.com
FieldTypeDescription
error_codeStringerror code
error_messageStringerror message
dataObjectJob Notification information
data.noti_idNumberNotification ID

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"error_code": "0000",
"error_message": "Success.",
"data": {
"noti_id": 1
}
}