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

/imcc/v1/import/record/mapping_file?workflow=[Workflow goes here]
Sets the imagen 'Workflow Name' or ID
 

💡Pro tip: Media will only be processed if a workflow is specified

 

searchfield

optional

/imcc/v1/import/record/mapping_file?workflow=workflow&searchfield=guid
To update a record using a search term (instead of using the recordID) add the field name to the arguments in your API call. The matching field name in your import XML will be used to search for a match in your database. 
 

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