TWC REST API - Create Element

Discussions about Teamwork Cloud and Teamwork Server functionalities

Moderator: Moderators

TWC REST API - Create Element

Postby scott.wardlaw@boeing.com » Mon Feb 24, 2020 11:37 am

We are having trouble creating elements using the TeamWork Cloud REST API for 19.0 SP2.

We can pull projects, artifacts, and elements fine, but we are not able to create elements. I do not understand what elementID is needed in the POST request:
/osmc/resources/{resourceId}/elements/{elementId}

The response from TWC is always: 404 reason: EObject f30af868-1a1f-4019-8843-58077b772ebe not found ... where the EObject id is different every time.

The body of our request is:
{
"@type": "uml:Class",
"kerml:esiData": { "name": "Test Element", "owner": "09652f51-91d2-49c0-8e6d-05764017b2ee" },
"kerml:nsURI": "http://www.nomagic.com/magicdraw/UML/2.5.1"
}

Please help me understand how to find the EObject / ecore elementID.

Thanks!
Scott
scott.wardlaw@boeing.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Mon Feb 27, 2017 1:03 pm

Re: TWC REST API - Create Element

Postby lonniev@gmail.com » Fri Jul 31, 2020 7:04 am

I've started to explore TWC's REST API through its exposed Swagger API documentation. I can authenticate and request back the top-level information about workspaces and resources.

Has anyone figured out yet the translation from a model element's TWC server element Id and that of its Project's element Id and version to the corresponding identifiers in the osmc REST APIs?

I can spend some time with Postman to discover the clues - but if anyone has figured it out or found the documentation, please share tips here.
lonniev@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 12
Posts Rating:0
Joined: Mon Oct 15, 2018 1:56 pm


Return to Teamwork Cloud and Teamwork Server

Who is online

Users browsing this forum: No registered users and 0 guests