Extract metadata from DXF files, import into Core Content and search on added metadata

Options
Phil Cox
Phil Cox E mod
edited September 29, 2023 in Articles #1

Like the previous article however this time the target will be Core Content and just like the previous article, where the target was xECM. The purpose of this article is to show and share knowledge on how easy it is to make Engineering Drawings, in this example, DXF ( Drawing Exchange Format ) files searchable by extracting metadata like Part Number or Part Description from the file and then adding this data when importing into Core Content.

The image below shows a service client created and accompanying secret for a ClientID that starts with cd7590xxxxxxx.

In postman we use the same client_id and client_secret to authenticate into otdsauth.ot2.opentext.eu. On success we receive back a token called "access_token"

Once we have access we can now start to upload our content and apply the appropriate metadata to it. With xECM this was done with one REST API call. With Core Content we need to do this with two calls. The first into contentservice.ot2.opentext.eu Content Storage Service API https://developer.opentext.com/coresaas/products/corecontent/apis/corecontentstorage and then once that has completed the next call into cms.ot2.opentext.eu Content Metadata Service API https://developer.opentext.com/coresaas/products/corecontent/apis/corecontentmetadata

Now we have our file in CSS we need our second call to make the file visible in Core Content by making a call to CMS.

Here is where we made the traits or metadata. Note the ccm1_engineering_ujfbd as we will need this for the trait definition call in the next step.

Using the call below we get back in return all the trait definitions that we will use in the next step. Extra_Description is defined as extra_description5 and so on for all the other definitions

So in postman a similar call would look like the following

For our project, the call looks like the following. Note the blob_id in the POST payload is the returned value of download href we had earlier.

Like before we extracted metadata from the DXF files and now we upload and apply that metadata. The results are below. All 11 files uploaded with correct metadata applied.

Now when we search for a term like NOZZLE our results list is the 6 drawings that contain that term.

I hope this helps you to be able to upload files into Core Content by using REST API's.

#GoBeyond Always Be Learning

Phil ****

Comments