Replies: 2 comments 4 replies
-
|
Hello, The REST API section of the official documentation should help on this, especially the cookbook part. Regards, |
Beta Was this translation helpful? Give feedback.
-
|
Hello, Here is an example on how to create a simple PartDefinition in a simple project containing one model with only one Package. Test on simple SysMLv2 project (id = 44ba0783-8476-442a-9ab3-b6c26e251734) with only one element: a Package named Package1 with elementId = b2426313-e795-47e8-a2b2-7e29adb12a56 All following requests can be executed in Postman or every other tool allowing to execute HTTP REST APIs.
2.1) Execute the /commits POST request, allowing to create the OwningMembership: http://localhost:8080/api/rest/projects/44ba0783-8476-442a-9ab3-b6c26e251734/commits with the following raw JSON body: The JSON response: 2.2) Execute the /elements GET request, allowing to get the "elementId" of the new OwningMembership that will be the container of our new PartDefinition: 2.3) Now we have the "elementId" of our new OwningMembership, we can create a new PartDefinition under it. Execute the /commits POST request, allowing to create the PartDefinition: http://localhost:8080/api/rest/projects/44ba0783-8476-442a-9ab3-b6c26e251734/commits with the following raw JSON body: The JSON response:
Hope it will help you! Regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I hope this message finds you well.
I am currently working with SysML v2 Rest API and seeking guidance on a couple of foundational tasks:
If there are recommended methods, code examples, or documentation references for these operations - especially for programmatic approaches via the REST API I would greatly appreciate your help.
Thank you in advance for your support!
Beta Was this translation helpful? Give feedback.
All reactions