PUT imcc/v1/import/record/ π°
Submit record(s) to add/update, in user-defined XML form
IMCC will transform this into ImagenRecord(s) using the specified XSL (eXtensible Stylesheet Language) mapping file and add it to the database. . This call will expect the body of the call to have Content-Type "text/xml" or "application/xml".
Β
β οΈWarning:Β Each new record will create a job. Your media control centre is limited to 6000 jobs at any given time. When running large numbers of jobs, it is highly recommended that the jobc/count is used to count the current jobs and throttle at a safe level below 6000
Resource URLΒ
https://{MEDIACONTROLCENTRE_HOST}[:PORT]/imcc/v1/import/record/
Resource Information
| Response formats | XML |
| Requires authentication? | Yes |
| Required scope(s) | modifyUsersData |
Β
Β
Parameters
Arguments should be supplied as query parameters as shown below
Mapping
required
/imcc/v1/import/record/[Mapping file goes here]
Name of the mapping file to use to transform the XML body into ImagenRecord(s).Β
π‘Pro tip: NativeImagenXML is the default mapping file. If used the XML body must conform to Imagen XML schema
Β
workflow
optional
π‘Pro tip: Media will only be processed if a workflow is specified
searchfield
optional
matchMediaBy
optional
/imcc/v1/import/record/mapping_file?workflow=workflow&searchfield=guid&matchMediaBy=
If a media object already exists, this switch will allow or disallow the creation of a new media file, The name of the media object or ID can be used to find a match.
{serach parameter goes here},{Instruction goes here}:
Where a new media object will be allowed if a match is found
&matchMediaBy=id,allownew
Where a new media object will be disallowedΒ
&matchMediaBy=name,disallowNew
onlyProcessNew
optional
/imcc/v1/import/record/mapping_file?workflow=workflow&onlyProcessNew=1
If the Media file is the same as the existing media file, this boolean instruction will prevent new media from processingΒ
Where a new media object will be allowed if a match is found
&onlyProcessNew=0
Where a new media object will be disallowedΒ
&onlyProcessNew=1
lastModifiedField
optional
/imcc/v1/import/record/mapping_file?workflow=workflow&lastModifiedField=feedLastModified
This boolean instruction will set the last modified date of the media object with an XML element from the XML body
timeout
optional
Timeout in seconds to wait to see if the import will finish after which a progress response will be returned. If Timeout is not specified or is < 0 then this call is synchronous and will wait indefinitely for the import to finish.
guid
optional
GUID for the import task - if not specified then IMCC will generate one.
resourcegroup
optional
Resource group to use for ingest job. If not specified then IMCC will use its first one.
XML BodyΒ
required
Example
<?xml version="1.0" encoding="UTF-8"?>
<Records>
Β Β <ImagenRecord>
Β Β Β Β Β <Fields>
Β Β Β Β Β Β Β Β <Title>Test</Title>
Β Β Β Β Β Β Β Β <Summary>Test</Summary>
Β Β Β Β Β Β Β Β <SingleSelect>Test</SingleSelect>
Β Β Β Β Β Β Β Β <MultiSelect>Test,Test2,Test3</MultiSelect>
Β Β Β Β Β Β Β Β <Date>1900-01-01</Date>
Β Β Β Β Β Β Β Β <DateTime>1900-01-01Β 01:01:01</DateTime>
Β Β Β Β Β </Fields>
Β Β Β Β Β <MediaObjectΒ Version="3"Β ID="-1"Β MediaType="Video"Β IsClip="">Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
Β Β Β Β Β Β Β Β Β Β Β <Name></Name>Β Β Β Β Β Β Β Β Β Β Β
Β Β Β Β Β Β Β Β Β Β Β <MediaElementΒ MediaType="Video"Β Index="0"Β Umid="">
<!--Β Β MediaType="Video" MediaType="Audio" MediaType="Image" MediaType="Document" -->
Β Β Β Β Β Β Β Β Β Β Β Β Β Β <OriginalFile><![CDATA[https://[link to media]]></OriginalFile>
<!-- HTTP path to file -->
Β Β Β Β Β Β Β Β Β Β Β </MediaElement>
Β Β Β Β Β Β Β </MediaObject>
Β Β Β </ImagenRecord>
</Records>
Β
Example Response
Returns success or error responseΒ on failure.
Response on success
<?xml version="1.0" encoding="UTF-8"?>
<Response>
Β Β Β <DatabaseJobΒ GUID="8AEE10F5-AC1E-46cc-BE11-322256DC9AF4"Β State="2"Β Type="2">
Β Β Β Β Β Β Β <Progress>1.000000</Progress>
Β Β Β Β Β Β Β <Import>
Β Β Β Β Β Β Β Β Β Β Β Β <NumRecords>1</NumRecords>
Β Β Β Β Β Β Β Β Β Β Β <ImagenRecords>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <ImagenRecordΒ ID="2">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <MediaObjects>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <MediaObject ID="2"/>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </MediaObjects>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </ImagenRecord>
Β Β Β Β Β Β Β Β Β Β Β </ImagenRecords>
Β Β Β Β Β Β Β </Import>
Β Β Β </DatabaseJob>
</Response>
Response on failure
Β
Β