# Rivendell Web Interface API

### Fred Gleason

## Data Types

Table 1. Data Types

TYPE | DESCRIPTION
--- | ---
DateTime | xs:dateTime format string: `YYYY`-`MM`-`DD`T`HH`:`MM`:`SS`[Z]|[+`HH`:`MM`]|[-`HH`:`MM`] If no timezone information is specified, all values will be assumed to be in the local timezone of the processing system.
Date | xs:date format string: `YYYY`-`MM`-`DD`[Z]|[+`HH`:`MM`]|[-`HH`:`MM`] If no timezone information is specified, all values will be assumed to be in the local timezone of the processing system.
Time | xs:time format string: `HH`:`MM`:`SS`[Z]|[+`HH`:`MM`]|[-`HH`:`MM`] If no timezone information is specified, all values will be assumed to be in the local timezone of the processing system.
String | Text data, encoded

## Authentication

With the exception of the CreateTicket command, all commands in this API must be authenticated by one of the following two methods:

### Username / Password

Table 2. Username/Password Authentication Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
LOGIN_NAME | Rivendell User Name | Mandatory
PASSWORD | Login Password | Mandatory

### Ticket

Table 3. Ticket Authentication Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
TICKET | 40 character ticket code, obtained from a previous CreateTicket call. | Mandatory

## Result Reporting

Commands that return an error or do not return specialized data types (e.g. audio data for the Export command) will return an XML document describing the result of the command, in the following format:

    <RDWebResult>
      <ResponseCode>resp_code</ResponseCode>
      <ErrorString>resp_string</ErrorString>
      <AudioConvertError>conv_error_code</AudioConvertError>
    </RDWebResult>

`resp_code`

  The HTTP result code, as defined in RFC2616

`resp_string`

  A text string describing the result, suitable for displaying in a UI

`conv_error_code`

  An extended error code from the audio converter routines. These values are defined in the `RDAudioConvert::ErrorCode` enumeration in `lib/rdaudioconvert.h`. This parameter is optional.

## AddCart

### Add a new cart

Command Code: `RDXPORT_COMMAND_ADDCART`

Required User Permissions: `Create Carts`

A `403` error will be returned if the requested cart number is not within the configured range for the specified group and 'Enforce Cart Range' is set in RDAdmin->ManageGroups.

Table 4. AddCart Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 12 | Mandatory
GROUP_NAME | Name of Group | Mandatory
TYPE | Cart type | Valid values are "audio" or "macro"
CART_NUMBER | Number of Cart | Optional, default is to use next available cart number for specified group

## AddCut

### Add a new cut to an existing cart

Command Code: `RDXPORT_COMMAND_ADDCUT`

Required User Permissions: `Edit Audio`

A `404` error will be returned if the requested cart number is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 5. AddCut Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 10 | Mandatory
CART_NUMBER | Number of Cart | Mandatory

## AddLog

### Add a new log

Command Code: `RDXPORT_COMMAND_ADDLOG`

Required User Permissions: `Create Log`

Table 6. AddLog Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 29 | Mandatory
LOG_NAME | Name of log to be created. | Mandatory
SERVICE_NAME | Name of the service to own the new log. | Mandatory

## AssignSchedCode

### Assign a scheduler code to an existing cart

Command Code: `RDXPORT_COMMAND_ASSIGNSCHEDCODE`

Required User Permissions: `Modify Carts`

A `404` error will be returned if the specified cart number is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 7. AssignSchedCode Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 25 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CODE | Scheduler Code to assign | Mandatory

## AudioInfo

### Get information about an entry in the audio store

Command Code: `RDXPORT_COMMAND_AUDIOINFO`

Required User Permissions: none

Table 8. AudioInfo Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 19 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory

## AudioStore

### Get information about the audio store

Command Code: `RDXPORT_COMMAND_AUDIOSTORE`

Required User Permissions: none

Table 9. AudioStore Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 23 | Mandatory

## CreateTicket

### Create an authorization ticket for a given user/client IP address

Command Code: `RDXPORT_COMMAND_CREATETICKET`

Required User Permissions: none

Table 10. CreateTicket Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 31 | Mandatory
LOGIN_NAME | Rivendell User Name | Mandatory
PASSWORD | Login Password | Mandatory

## DeleteAudio

### Delete PCM/MPEG data from the audio store

Command Code: `RDXPORT_COMMAND_DELETEAUDIO`

Required User Permissions: `Delete Carts`

Table 11. DeleteAudio Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 3 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory

## DeleteLog

### Delete a log

Command Code: `RDXPORT_COMMAND_DELETELOG`

Required User Permissions: `Delete Log`

Table 12. DeleteLog Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 30 | Mandatory
LOG_NAME | Name of log to be deleted. | Mandatory

## EditCart

### Write metadata changes for an existing cart into the database

Command Code: `RDXPORT_COMMAND_EDITCART`

Required User Permissions: `Modify Carts`

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms, or if it is attempted to assign the cart to such a group.

A `409` error will be returned if the requested cart's number falls outside the valid range for the requested GROUP_NAME.

If the tags for an 'optional' field are omitted, then the respective parameter on the target cart will be left unchanged.

Table 13. EditCart Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 14 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
INCLUDE_CUTS | Include cut data in return, 0 = no, 1 = yes | Optional, default is 0
GROUP_NAME | Set Rivendell group | Optional
TITLE | Set Title | Optional
ARTIST | Set Artist | Optional
ALBUM | Set Album | Optional
YEAR | Set Year | Optional
LABEL | Set Record Label | Optional
CLIENT | Set Client | Optional
AGENCY | Set Agency | Optional
PUBLISHER | Set Publisher | Optional
COMPOSER | Set Composer | Optional
USER_DEFINED | Set User Defined | Optional
USER_CODE | Set User Code | Optional
ENFORCE_LENGTH | Set Enforce Length State | Optional, Numeric, 0 = No, 1 = Yes
FORCED_LENGTH | Set Forced Length | Optional, in milliseconds
ASYNCHRONOUS | Set Asynchronous | Optional, Numeric, 0 = No, 1 = Yes
OWNER | Set Owner | Optional
NOTES | Set Notes Text | Optional

## EditCut

### Write metadata changes for an existing cut into the database

Command Code: `RDXPORT_COMMAND_EDITCUT`

Required User Permissions: `Edit Audio`

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

If the tags for an 'optional' field are omitted, then the respective parameter on the target cart will be left unchanged.

Table 14. EditCut Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 15 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory
EVERGREEN | Set the Evergreen Falg, valid values are 0 = no, 1 = yes | Optional
DESCRIPTION | Set Description | Optional
OUTCUE | Set Outcue | Optional
ISRC | Set International Standard Recording Code | Optional
ISCI | Set Internatinal Standardized Commercial Identifier | Optional
START_DATETIME | Set Start Date/Time | Optional, RFC-822 format
END_DATETIME | Set End Date/Time | Optional, RFC-822 format
MON | Set Monday daypart flag | Optional, 0 = no, 1 = yes
TUE | Set Tuesday daypart flag | Optional, 0 = no, 1 = yes
WED | Set Wedensday daypart flag | Optional, 0 = no, 1 = yes
THU | Set Thursday daypart flag | Optional, 0 = no, 1 = yes
FRI | Set Friday daypart flag | Optional, 0 = no, 1 = yes
SAT | Set Saturday daypart flag | Optional, 0 = no, 1 = yes
SUN | Set Sunday daypart flag | Optional, 0 = no, 1 = yes
START_DAYPART | Set Start daypart time | Optional, RFC-822 format
END_DAYPART | Set End daypart time | Optional, RFC-822 format
WEIGHT | Set rotation weight | Optional, numeric
START_POINT | Set Start Marker position | Optional, mS from absolute start of audio data
END_POINT | Set End Marker position | Optional, mS from absolute start of audio data
FADEUP_POINT | Set Fadeup Marker position | Optional, mS from absolute start of audio data
FADEDOWN_POINT | Set Fadedown Marker position | Optional, mS from absolute start of audio data
SEGUE_START_POINT | Set Segue Start Marker position | Optional, mS from absolute start of audio data
SEGUE_END_POINT | Set Segue End Marker position | Optional, mS from absolute start of audio data
HOOK_START_POINT | Set Hook Start Marker position | Optional, mS from absolute start of audio data
HOOK_END_POINT | Set Hook End Marker position | Optional, mS from absolute start of audio data
TALK_START_POINT | Set Talk Start Marker position | Optional, mS from absolute start of audio data
TALK_END_POINT | Set Talk End Marker position | Optional, mS from absolute start of audio data

## Export

### Export audio data from the audio store

Command Code: `RDXPORT_COMMAND_EXPORT`

Required User Permissions: none

Table 15. Export Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 1 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory
FORMAT | Encoding format of exported data | Mandatory, 0 = PCM16 WAV, 2 = MPEG L2 native, 3 = MPEG L3 native, 4 = FLAC, 5 = OggVorbis, 6 = MPEG L2 WAV, 7 = PCM24 WAV
CHANNELS | Number of audio channels | Mandatory
SAMPLE_RATE | Sample rate | Mandatory, in samples/sec
BIT_RATE | Bit rate | Mandatory, set to '0' for PCM or VBR
QUALITY | Quality Level | Mandatory, used only by OggVorbis, set to '0' for others
START_POINT | Start point of audio export | Mandatory, mS from absolute start of stored audio
END_POINT | End point of audio export | Mandatory, mS from absolute start of stored audio
NORMALIZATION_LEVEL | Normalization leve, in dBFS | Mandatory, 0 = No normalization
ENABLE_METADATA | Include metadata in export | Mandatory, 0 = no, 1 = yes

## ExportPeaks

### Export audio peak data from the audio store

Command Code: `RDXPORT_COMMAND_EXPORT`

Required User Permissions: none

A `404` error will be returned if the requested cart is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 16. ExportPeaks Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 16 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory

## Import

### Import audio data into the audio store

Command Code: `RDXPORT_COMMAND_IMPORT`

Required User Permissions: `Edit Audio`

A `404` error will be returned if the requested cart is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms or if the system is configured to require unique titles and a non-unique title is provided in the TITLE field.

NOTE: The method must be called with 'multipart/form-data' encoding.

If the CREATE field is set to '1', a valid GROUP_NAME specified and both CART_NUMBER and CUT_NUMBER fields are set to zero, the system will attempt to create a new cart/cut in the specified group. If successful, the cart and cut numbers will be returned as part of the RDWebResult return.

Table 17. Import Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 2 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory
CHANNELS | Number of audio channels | Mandatory
NORMALIZATION_LEVEL | Normalization level, in dBFS | Mandatory, 0 = no normalization
AUTOTRIM_LEVEL | Autotrim level, in dBFS | Mandatory, 0 = no autotrim
USE_METADATA | Apply source metadata to cart | Mandatory, 0 = No, 1 = Yes
CREATE | Create cart/cut if it does not exist | Optional, 0 = No, 1 = Yes
GROUP_NAME | Add newly created cart/cut to specified group. | Optional
TITLE | The TITLE value for the imported audio. This will override any value found in in-file metadata. | Optional
FILENAME | Binary file data | Mandatory

## ListCart

### Return information about a specified cart

Command Code: `RDXPORT_COMMAND_LISTCART`

Required User Permissions: none

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 18. ListCart Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 7 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
INCLUDE_CUTS | Include cut information in return | Optional, 0 = no, 1 = yes, default is 1

## ListCarts

### Return information about a set of carts

Command Code: `RDXPORT_COMMAND_LISTCARTS`

Required User Permissions: none

Only those carts that belong to groups authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms will be returned.

Table 19. ListCarts Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 6 | Mandatory
GROUP_NAME | Limit returns to members of specified group | Optional, default is to search all available carts
INCLUDE_CUTS | Include cut information in return | Optional, 0 = no, 1 = yes, default is 1
FILTER | Limit returns to carts containing specified space-separated keyword(s) | Optional, default is to apply no filtering
TYPE | Limit returns to carts of the specified type | Optional, valid values are 'audio' or 'macro'

## ListCartSchedCodes

### Return information about all scheduler codes assigned to a cart

Command Code: `RDXPORT_COMMAND_LISTCARTSCHEDCODES`

Required User Permissions: none

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 20. ListCartSchedCodes Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 27 | Mandatory
CART_NUMBER | Number of Cart | Mandatory

## ListCut

### Return information about a specified cut

Command Code: `RDXPORT_COMMAND_LISTCUT`

Required User Permissions: none

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 21. ListCut Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 8 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CUT_NUMBER | Number of Cut | Mandatory

## ListCuts

### Return information about all cuts belonging to a cart

Command Code: `RDXPORT_COMMAND_LISTCUTS`

Required User Permissions: none

A `404` error will be returned if the requested cart belongs to a group that is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 22. ListCuts Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 9 | Mandatory
CART_NUMBER | Number of Cart | Mandatory

## ListGroup

### Return information about a specified group

Command Code: `RDXPORT_COMMAND_LISTGROUP`

Required User Permissions: none

A `404` error will be returned if the requested group is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 23. ListGroup Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 5 | Mandatory
GROUP_NAME | Name of group | Mandatory

## ListGroups

### Return information about all available groups

Command Code: `RDXPORT_COMMAND_LISTGROUPS`

Required User Permissions: none

The set of returned groups will be tailored according to what the specified Rivendell user is authorized to see in RDAdmin->ManageUsers->AssignGroupPerms.

Table 24. ListGroups Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 4 | Mandatory

## ListLog

### Return a listing of the specified log

Command Code: `RDXPORT_COMMAND_LISTLOG`

Required User Permissions: none

Table 25. ListLog Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 22 | Mandatory
NAME | The name of the log | Mandatory

## ListLogs

### Return information about one or more logs

Command Code: `RDXPORT_COMMAND_LISTLOGS`

Required User Permissions: none

Table 26. ListLogs Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 20 | Mandatory
SERVICE_NAME | Limit returns to logs that are owned by specified service | Optional. Default is to return all logs.
LOG_NAME | Return the log with this name. | Optional. Default is to return all logs.
TRACKABLE | Limit returns to logs that contain one or more voicetrack slots | Optional, valid values 0=no, 1=yes. Default is to return all logs.
FILTER | Limit returns to logs that contain the specified string in the `Name`, `Description` or `Service` fields. | Optional. Default is to return all logs.
RECENT | Limit returns to the 14 most recently created logs. | Optional, valid values 0=no, 1=yes. Default is to return all logs.

## ListSchedulerCodes

### Return information about all available scheduler codes

Command Code: `RDXPORT_COMMAND_LISTSCHEDCODES`

Required User Permissions: none

Table 27. ListSchedCodes Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 24 | Mandatory

## ListServices

### Return information about all available services

Command Code: `RDXPORT_COMMAND_LISTSERVICES`

Required User Permissions: none

Table 28. ListServices Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 21 | Mandatory
TRACKABLE | Limits returns to services that have a valid voicetracking configuration | Optional, valid values 0=no, 1=yes. Default is to return all services

## ListSystemSettings

### Return information about system-wide settings

Command Code: `RDXPORT_COMMAND_LISTSYSTEMSETTINGS`

Required User Permissions: none

Table 29. ListSystemSettings Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 33 | Mandatory

## Rehash

### Generate a SHA-1 hash for a cut and write it to the database

Command Code: `RDXPORT_COMMAND_REHASH`

Required User Permissions: None

Table 30. Rehash Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 32 | Mandatory
CART_NUMBER | Number of cart | Mandatory
CUT_NUMBER | Number of cut | Mandatory

## RemoveCart

### Remove a cart from the Library

Command Code: `RDXPORT_COMMAND_REMOVECART`

Required User Permissions: `Delete Cart`

Table 31. RemoveCart Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 13 | Mandatory
CART_NUMBER | Number of cart | Mandatory

## RemoveCut

### Remove an existing cut from a cart

Command Code: `RDXPORT_COMMAND_REMOVECUT`

Required User Permissions: `Edit Audio`

Table 32. RemoveCut Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 11 | Mandatory
CART_NUMBER | Number of cart | Mandatory
CUT_NUMBER | Number of cut | Mandatory

## SaveLog

### Save a log to the Rivendell Database

Command Code: `RDXPORT_COMMAND_SAVELOG`

Required User Permissions: none

Table 33. ListLogs Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 28 | Mandatory.
LOG_NAME | Save the log to this name. If it does not already exist, it will be created. | Mandatory. String, 64 characters max.
SERVICE_NAME | The name of the Service to which the log belongs. | Mandatory. String, 10 characters max.
DESCRIPTION | The Description field. | Mandatory. String, 64 characters max.
PURGE_DATE | The date on which the log should be automatically deleted. | Mandatory. Date.
AUTO_REFRESH | Enable/disable auto-refresh. | Mandatory. Boolean.
START_DATE | The Start Date. | Mandatory. Date.
END_DATE | The End Date. | Mandatory. Date.
LINE_QUANTITY | The number of log line entries in this call. | Mandatory. Positive integer.
LINE`num`_ID | Integer Id. | Mandatory. Unique positive integer.
LINE`num`_TYPE | Event type. | Mandatory. One of the following key words:
`Audio`
`Chain`
`Macro`
`Marker`
`Track`
`MusicLink`
`TrafficLink`
LINE`num`_CART_NUMBER | Cart number for Audio or Macro events. | Mandatory. Positive integer in the range 0 - 999999.
LINE`num`_START_TIME | Event start time. | Mandatory. Integer, expressing milliseconds past midnight.
LINE`num`_GRACE_TIME | Event start time. | Mandatory. Integer, expressing milliseconds.
LINE`num`_TIME_TYPE | Start time type. | Mandatory. One of the following key words:
`Hard`
`Relative`
LINE`num`_TRANS_TYPE | Event transition type. | Mandatory. One of the following key words:
`Play`
`Segue`
`Stop`
LINE`num`_START_POINT | Start point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_END_POINT | End point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_SEGUE_START_POINT | Segue start point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_SEGUE_END_POINT | Segue end point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_FADEUP_POINT | FadeUp point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_FADEUP_GAIN | Gain for FadeUp events. | Mandatory. 1/100 dBFS.
LINE`num`_FADEDOWN_POINT | FadeDown point for one-off (voice-tracked) play-outs. | Mandatory. Positive integer, or -1 if not defined.
LINE`num`_FADEDOWN_GAIN | Gain for FadeDown events. | Mandatory. 1/100 dBFS.
LINE`num`_DUCK_UP_GAIN | Duck Up level for one-off (voice-tracked) play-outs. | Mandatory. Negative integer, or 0 if not defined.
LINE`num`_DUCK_DOWN_GAIN | Duck Down level for one-off (voice-tracked) play-outs. | Mandatory. Negative integer, or 0 if not defined.
LINE`num`_COMMENT | Marker and Track event body text. | Mandatory. String, max length 255.
LINE`num`_LABEL | Marker and Track event label text. | Mandatory. String, max length 64.
LINE`num`_ORIGIN_USER | User name for one-off (voice-tracked) events. | Mandatory. String, max length 255.
LINE`num`_ORIGIN_DATETIME | Date/time stamp for one-off (voice-tracked) events. | Mandatory. DateTime value.
LINE`num`_EVENT_LENGTH | Link event length, in mS. | Mandatory. Integer.
LINE`num`_LINK_EVENT_NAME | Link event name. | Mandatory. String, max length 64.
LINE`num`_LINK_START_TIME | Link event start time, in mS past midnight. | Mandatory. Integer.
LINE`num`_LINK_LENGTH | Link event length, in mS. | Mandatory. Integer.
LINE`num`_LINK_START_SLOP | Link event start slop, in mS. | Mandatory. Integer.
LINE`num`_LINK_END_SLOP | Link event end slop, in mS. | Mandatory. Integer.
LINE`num`_LINK_ID | Link event id. | Mandatory. Integer.
LINE`num`_LINK_EMBEDDED | Link event embedded flag. | Mandatory. Boolean.
LINE`num`_EXT_START_TIME | External data start time. | Mandatory. Time value.
LINE`num`_EXT_LENGTH | External data length. | Mandatory. Integer.
LINE`num`_EXT_CART_NAME | External data cart name. | Mandatory. String, max length 32.
LINE`num`_EXT_DATA | External data data field. | Mandatory. String, max length 32.
LINE`num`_EXT_EVENT_ID | External data event id. | Mandatory. String, max length 32.
LINE`num`_EXT_ANNC_TYPE | External data announcement type. | Mandatory. String, max length 8.

## TrimAudio

### Return a time pointer to the first or last instance of a particular level in a cut.

Command Code: `RDXPORT_COMMAND_TRIMAUDIO`

Required User Permissions: `Edit Audio`

A `404` error will be returned if the requested cart is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 34. TrimAudio Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 17 | Mandatory
CART_NUMBER | Number of cart | Mandatory
CUT_NUMBER | Number of cut | Mandatory
TRIM_LEVEL | Level in 1/100 dB, relative to Rivendell reference level (-16 dBFS) | Mandatory

## UnassignSchedCode

### Unassign a scheduler code from an existing cart

Command Code: `RDXPORT_COMMAND_UNASSIGNSCHEDCODE`

Required User Permissions: `Modify Carts`

A `404` error will be returned if the specified cart number is not authorized for the specified Rivendell user in RDAdmin->ManageUsers->AssignGroupPerms.

Table 35. UnassignSchedCode Call Fields

FIELD NAME | MEANING | REMARKS
--- | --- | ---
COMMAND | 26 | Mandatory
CART_NUMBER | Number of Cart | Mandatory
CODE | Scheduler Code to assign | Mandatory