APIs
1. SysML v2 Standard REST APIs
|
The SysML v2 API is not fully available yet, we are working on it. For interoperability with SysON, the provided file exchange format is also a solution. |
SysON’s vision includes a dedicated commitment to interoperability, with a future-oriented perspective on supporting standard APIs for seamless connections with a diverse array of modeling resources.
While the implementation of standard APIs is an aspect under consideration for future development, SysON aims to offer a foundation for fluid collaboration between different tools within the Model-Based Systems Engineering - MBSE landscape.
As SysON progresses, these future developments in interoperability will further solidify its role as a collaborative platform, fostering an interconnected environment for MBSE practitioners.
The ongoing commitment to incorporating standard REST APIs and SysML v2 textual specifications underscores SysON’s dedication to providing users with a versatile and interoperable modeling solution.
The whole list of REST APIs is available on the OMG website, in the SystemsModelingAPI section.
|
All REST APIs start by |
Here are some key concepts to know before manipulating the REST APIs in SysON:
-
Record: aRecordrepresents any data that is consumed (input) or produced (output) by the Systems Modeling API and Services. ARecordis an abstract concept from which other concrete concepts inherit. ARecordhas the following attributes:-
idis the UUID assigned to theRecord -
resourceIdentifieris an URI for the record (This attribute is not supported in SysON) -
aliasis a collection of other identifiers for this record, especially if the record was created or represented in other software applications and systems (This attribute is not supported in SysON) -
humanIdentifieris a human-friendly unique identifier for this record (This attribute is not supported in SysON) -
descriptionis a statement that provides details about the record (This attribute is not supported in SysON)
-
-
Project: aProjectis a specializedRecordthat represents a container for otherRecordsand an entry point for version management and data navigation. TheProjectrecord has the following attributes:-
nameis the name of the project. -
identifiedDatais a derived attribute that is the set of Data Identity records corresponding to the Data contained in the project (This attribute is not supported in SysON) -
commitis the set of all commits in theProject(This attribute is not supported in SysON) -
commitReferenceis the set of all commit references in theProject(This attribute is not supported in SysON) -
branchis the set of all the branches in theProjectand a subset of commitReference (This attribute is not supported in SysON) -
defaultBranchis the default branch in theProjectand a subset of branch (This attribute is not supported in SysON) -
tagis the set of all the tags in theProjectand a subset of commitReference (This attribute is not supported in SysON) -
usageis the set ofProjectUsage records representing all otherProjectsbeing used by the givenProject(ProjectUsage.usedProject) (This attribute is not supported in SysON) -
queriesis the set of Query records owned by the project. Each Query record represents a saved query for the given project. See Query for details. (This attribute is not supported in SysON) -
createdis the creation timestamp for the project, in ISO8601DateTIme format (This attribute is not supported in SysON)
-
Below is the list of REST APIs supported in SysON:
-
Project related operations:
| Method | Signature | Endpoint | Documentation |
|---|---|---|---|
GET |
getProjectById(projectId : UUID) : Project [0..1] |
/projects/{projectId} |
Get project with the given id (projectId). |
Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f |
|||
GET |
getProjects() : Project [0..*] |
/projects |
Get all projects. |
POST |
createProject(name : String, description : String [0..1]) : Project |
/projects?name={name} |
Create a new project with the given name and description (optional). |
Example: http://localhost:8080/api/rest/projects?name=MyProject. The |
|||
DELETE |
deleteProject(projectId : UUID) : Project |
/projects/{projectId} |
Delete the project with the given id (projectId). |
Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f |
|||
PUT |
updateProject( projectId : UUID, name : String [0..1], description : String [0..1], defaultBranch : Branch [0..1] ) : Project |
/projects/{projectId} |
Update the project with the given id (projectId). |
Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f?name=MyProjectWithNewName.
The |
|||
GET |
getElements( projectId : UUID ) : Element [0..*] |
projects/{projectId}/commits/{commitId}/elements |
Get all the elements in a given project at the given commit. There are no commits in Sirius Web so you can use the same Id as the projectId for the commitId. |
Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f/elements |
|||
GET |
getElementById( projectId : UUID, elementId : UUID ) : Element |
projects/{projectId}/commits/{commitId}/elements/{elementId} |
Get element with the given id (elementId) in the given project at the given commit. There are no commits in Sirius Web so you can use the same Id as the projectId for the commitId. |
GET |
getRelationshipsByRelatedElement( projectId : UUID, elementId : UUID ) : Relationship [0..*] |
projects/{projectId}/commits/{commitId}/elements/{elementId}/relationships |
Get relationships that are incoming, outgoing, or both relative to the given related element. There are no commits in Sirius Web so you can use the same Id as the projectId for the commitId. |
GET |
getRootElements( projectId : UUID ) : Element [0..*] |
projects/{projectId}/commits/{commitId}/roots |
Get all the root elements in the given project at the given commit. There are no commits in Sirius Web so you can use the same Id as the projectId for the commitId. |
Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f/roots |
|||