Creating PartMtl through the REST API

Hi all, wishing you a good day.

I used to work on Vantage’s ODBC, and I’m familiar with the way things were done back then, but now everything is going through the REST API, and I’m a bit off my rockers.

So, in the old system, you would insert a row in the PartMtl table, with all the trimmings, and life was good.

I’m trying to find what the equivalent is nowadays in the REST world. The use case is very basic (and, showing my progress so far):

  1. Make sure a Part exists (get or create) :heavy_check_mark:
  2. Make sure a PartRev exists (get or create) :heavy_check_mark:
  3. Add a bunch of PartMtl to that PartRev :x:

In the API’s PartSvc, are PartSubs the same as PartMtl, just a different name, or are they something else entirely?

Thank you

Use tracing. Add a part mtl manually and then review the trace, this will reveal the BO and methods used.


Hello Luc,

You’ll need to mimic the way you would do it manually at the screen. A user cannot add materials directly to a part and/or rev in V8+. They need to go through the Engineering Workbench. Turn on tracing, Checkout a reve (or create one), add PartMtl through the Workbench, check in your Rev and you’ll see what Business Objects are used and then just mimic that pattern.

Mark W.

1 Like

Thanks Mark,

I need to brush up on EWB from a user standpoint, then I’ll be able to understand how to “mimick” its sequence of operations in the REST API.

I haven’t been involved in such projects since the days of Vantage :confused:


EWB roughly goes like this:

  • Create a group
  • Checkout or add a revision for the part
  • Add/Update/Delete Parts and/or operations (These tables are the same as the source tables bit begin with ECO)
  • Approve the Revision
  • Check In

Turning on the trace and running this sequence will show you what to do. You may also find the BLTester helpful. This tool has been around since the V8 days and let’s you manipulate calls in real-time and shows you the required parameters and result sets.

Mark W.

Any success using the REST API?

I have had success importing BOMs from CAD using the REST API.

First, use the PartSvc to create the Part and Revision if necessary.

  1. Create Part - PartSvc (OData Post)
  2. Create Part Rev - PartSvc/PartRev (OData Post)

After Part and Revision are created, use EngWorkBenchSvc to perform the steps normally done in Engineering Workbench. Some use the Custom Methods, some OData. I’ve found OData to be simpler to deal with because you don’t need to work with an entire dataset, but some commands are only possible via the Custom Methods.

  1. Create ECO Group - EngWorkBenchSvc (OData - Post)
  2. Check Out Revision - EngWorkBenchSvc (Custom Methods - CheckOut )
  3. Create/Update/Delete ECOMtl - EngWorkBenchSvc (OData - Post / Patch / Delete)
  4. Approve Revision- EngWorkBenchSvc (Custom Methods - ApproveAll)
  5. Check In Revision- EngWorkBenchSvc (Custom Methods - CheckIn)

Obviously there is a ton of detail missing here, but it is definitely possible.


Thanks Andrew! Huge help!

Sorry to necro this post but any chance you can share some examples of how you did this @andrew.johnson?

I seem to be having difficulting with the ECOGroup.