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 /api/rest/.

Here are some key concepts to know before manipulating the REST APIs in SysON:

  • Record: a Record represents any data that is consumed (input) or produced (output) by the Systems Modeling API and Services. A Record is an abstract concept from which other concrete concepts inherit. A Record has the following attributes:

    • id is the UUID assigned to the Record

    • resourceIdentifier is an URI for the record (This attribute is not supported in SysON)

    • alias is 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)

    • humanIdentifier is a human-friendly unique identifier for this record (This attribute is not supported in SysON)

    • description is a statement that provides details about the record (This attribute is not supported in SysON)

  • Project: a Project is a specialized Record that represents a container for other Records and an entry point for version management and data navigation. The Project record has the following attributes:

    • name is the name of the project.

    • identifiedData is 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)

    • commit is the set of all commits in the Project (This attribute is not supported in SysON)

    • commitReference is the set of all commit references in the Project (This attribute is not supported in SysON)

    • branch is the set of all the branches in the Project and a subset of commitReference (This attribute is not supported in SysON)

    • defaultBranch is the default branch in the Project and a subset of branch (This attribute is not supported in SysON)

    • tag is the set of all the tags in the Project and a subset of commitReference (This attribute is not supported in SysON)

    • usage is the set of Project Usage records representing all other Projects being used by the given Project (Project Usage.usedProject) (This attribute is not supported in SysON)

    • queries is 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)

    • created is 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.

Example: http://localhost:8080/api/rest/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 description optional parameter is not handled yet in SysON.

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 description and defaultBranch optional parameters are not handled yet in SysON.

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.

Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f/elements/2653e891-9146-4428-a5ce-e7137824bcc7

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.

Example: http://localhost:8080/api/rest/projects/41da7454-bd86-41b7-9bfd-b56fd431fa7f/elements/2653e891-9146-4428-a5ce-e7137824bcc7/relationships

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