Rest API/osmc/swagger

Other topics that do not fit in any of categories.

Moderator: Moderators

Rest API/osmc/swagger

Postby chris@2hb.com » Mon Jul 16, 2018 12:16 pm

I have been working with the TWC REST API in 18.5 and was wondering if anyone had done anything where I can pull just some information from each and every element on the trunk of the project.

I have the easy ones of

    workspaceId
    resourceId
    branchId

But was thinking of just doing some simple python to get a few things from each element

Was wondering if anyone has done anything similar I'd like
System assigned ID
Name
Description
Type(capability, program, project, etc.)
Relationships

I'm starting to understand the Rest API but any help would be appreciated. I'm hoping someone may have already done some of this.

My guess is I could just run CURL via python and pull out the information.
chris@2hb.com
Forum Beginner
Forum Beginner
 
Posts: 32
Posts Rating:1
Joined: Thu Dec 21, 2017 7:29 pm

Re: Rest API/osmc/swagger

Postby thvo » Wed Jul 18, 2018 11:30 am

Dear Chris,

If you want to pull all elements from a project, there is an example in Java available at https://bitbucket.org/theevora/nma-twc- ... src/master. Please see in modelloader directory.

For Python, I think it'd better to use Python to pull elements directly rather than use cURL because Python can perform HTTP request and most of the code is for parsing the result and traverse through a model hierarchy.

Best regards,
Theewara
thvo
Forum Newbie
Forum Newbie
 
Posts: 10
Posts Rating:1
Joined: Mon Jul 20, 2015 2:50 am

Re: Rest API/osmc/swagger

Postby chris@2hb.com » Wed Jul 18, 2018 12:49 pm

Thank you, we will tak a look at the bucket.
chris@2hb.com
Forum Beginner
Forum Beginner
 
Posts: 32
Posts Rating:1
Joined: Thu Dec 21, 2017 7:29 pm


Return to Other

Who is online

Users browsing this forum: No registered users and 0 guests

cron