Get all Elements from TWC API

Discussions about Teamwork Cloud and Teamwork Server functionalities

Moderator: Moderators

Get all Elements from TWC API

Postby btalbert-goldstein@draper.com » Mon Aug 02, 2021 10:31 am

I am trying to use the TWC API to determine if resources contain particular types of elements or diagrams. However the API does not seem to support accessing Elements without knowing their ID a priori. Is this true?

What I'd like to do is something like:
Code: Select all
GET: /osmc/resources/{resourceId}/elements/   

so that I can parse through those elements to find what I'm looking for.

There are many workspaces and many resources that I want to hunt through, and I was hoping there is a way to access all the element in a model. Is there some other way I can determine if particular types (or stereotypes) of elements are used using the API?
btalbert-goldstein@draper.com
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:0
Joined: Thu Apr 08, 2021 1:20 pm

Re: Get all Elements from TWC API

Postby philip.gates@ngc.com » Fri Sep 24, 2021 10:19 pm

How do you determine the <workspaceid> and the <resourceid> just from the user interface in cameo?
philip.gates@ngc.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Fri Sep 24, 2021 10:15 pm

Re: Get all Elements from TWC API

Postby matthew.daskilewicz@aero.org » Tue Jan 18, 2022 10:11 am

Did you ever find a solution for getting all elements? The best I can find is to call /osmc/resources/{resourceId}/revisiondiff to compare the most recent version with the 1st version, to get a list of all elementIDs that changed since then. But I think that will still leave out any elementId created in the first version and not modified since then. I haven't tested it though.
matthew.daskilewicz@aero.org
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Tue Jan 18, 2022 10:08 am


Return to Teamwork Cloud and Teamwork Server

Who is online

Users browsing this forum: No registered users and 0 guests