Skip to content
 
 

Repository files navigation

sysml-v2-api-client

Systems Modeling API and Services

  • API version: 1.0
    • Generator version: 7.13.0-SNAPSHOT

REST/HTTP platform specific model (PSM) for the Systems Modeling API and Services

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.omg.sysml</groupId>
  <artifactId>sysml-v2-api-client</artifactId>
  <version>20250201</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'sysml-v2-api-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'sysml-v2-api-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.omg.sysml:sysml-v2-api-client:20250201"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/sysml-v2-api-client-20250201.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import org.omg.sysml.ApiClient;
import org.omg.sysml.ApiException;
import org.omg.sysml.Configuration;
import org.omg.sysml.model.*;
import org.omg.sysml.api.BranchApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");

    BranchApi apiInstance = new BranchApi(defaultClient);
    UUID projectId = UUID.randomUUID(); // UUID | ID of the project
    UUID branchId = UUID.randomUUID(); // UUID | ID of the branch
    try {
      Branch result = apiInstance.deleteBranchByProjectAndId(projectId, branchId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling BranchApi#deleteBranchByProjectAndId");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
BranchApi deleteBranchByProjectAndId DELETE /projects/{projectId}/branches/{branchId} Delete branch by project and ID
BranchApi getBranchesByProject GET /projects/{projectId}/branches Get branches by project
BranchApi getBranchesByProjectAndId GET /projects/{projectId}/branches/{branchId} Get branch by project and ID
BranchApi postBranchByProject POST /projects/{projectId}/branches Create branch by project
CommitApi getChangeByProjectCommitId GET /projects/{projectId}/commits/{commitId}/changes/{changeId} Get change by project, commit and ID
CommitApi getChangesByProjectCommit GET /projects/{projectId}/commits/{commitId}/changes Get changes by project and commit
CommitApi getCommitByProjectAndId GET /projects/{projectId}/commits/{commitId} Get commit by project and ID
CommitApi getCommitsByProject GET /projects/{projectId}/commits Get commits by project
CommitApi postCommitByProject POST /projects/{projectId}/commits Create commit by project
DiffMergeApi diff GET /projects/{projectId}/commits/{compareCommitId}/diff Diff a base commit and compare commit
DiffMergeApi merge POST /projects/{projectId}/branches/{targetBranchId}/merge Merge source commit(s) into a target branch
ElementApi getElementByProjectCommitId GET /projects/{projectId}/commits/{commitId}/elements/{elementId} Get element by project, commit and ID
ElementApi getElementsByProjectCommit GET /projects/{projectId}/commits/{commitId}/elements Get elements by project and commit
ElementApi getProjectUsageByProjectCommitElement GET /projects/{projectId}/commits/{commitId}/elements/{elementId}/projectUsage Get ProjectUsage that originates the provided element
ElementApi getRootsByProjectCommit GET /projects/{projectId}/commits/{commitId}/roots Get root elements by project and commit
MetaApi getDatatypeById GET /meta/datatypes/{datatypeId} Get datatype by ID
MetaApi getDatatypes GET /meta/datatypes Get datatypes
ProjectApi deleteProjectById DELETE /projects/{projectId} Delete project by ID
ProjectApi getProjectById GET /projects/{projectId} Get project by ID
ProjectApi getProjects GET /projects Get projects
ProjectApi postProject POST /projects Create project
ProjectApi putProjectById PUT /projects/{projectId} Update project by ID
QueryApi deleteQueryByProjectAndId DELETE /projects/{projectId}/queries/{queryId} Delete query by project and ID
QueryApi getQueriesByProject GET /projects/{projectId}/queries Get queries by project
QueryApi getQueryByProjectAndId GET /projects/{projectId}/queries/{queryId} Get query by project and ID
QueryApi getQueryResultsByProjectIdQuery GET /projects/{projectId}/query-results Get query results by project and query definition
QueryApi getQueryResultsByProjectIdQueryId GET /projects/{projectId}/queries/{queryId}/results Get query results by project and query
QueryApi getQueryResultsByProjectIdQueryPost POST /projects/{projectId}/query-results Get query results by project and query definition via POST
QueryApi postQueryByProject POST /projects/{projectId}/queries Create query by project
QueryApi putQueryByProjectAndId PUT /projects/{projectId}/queries/{queryId} Update project by project and ID
RelationshipApi getRelationshipsByProjectCommitRelatedElement GET /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships Get relationships by project, commit, and related element
TagApi deleteTagByProjectAndId DELETE /projects/{projectId}/tags/{tagId} Delete tag by project and ID
TagApi getTagByProjectAndId GET /projects/{projectId}/tags/{tagId} Get tag by project and ID
TagApi getTagsByProject GET /projects/{projectId}/tags Get tags by project
TagApi postTagByProject POST /projects/{projectId}/tags Create tag by project

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

Java client software for the Systems Modeling API.

Resources

Stars

17 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages