Skip to content

Repository files navigation

sysml-v2-api-client

SysML v2 API and Services

  • API version: 1.0.0

REST/HTTP binding (PSM) for the SysML v2 standard API.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

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>2020-09</version>
<scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "org.omg.sysml:sysml-v2-api-client:2020-09"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

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

Getting Started

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

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.CommitApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
CommitApiapiInstance = newCommitApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectUUIDcommitId = newUUID(); // UUID | ID of the committry {
Commitresult = apiInstance.getCommitByProjectAndId(projectId, commitId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling CommitApi#getCommitByProjectAndId");
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

ClassMethodHTTP requestDescription
CommitApigetCommitByProjectAndIdGET /projects/{projectId}/commits/{commitId}Get commit by project and ID
CommitApigetCommitsByProjectGET /projects/{projectId}/commitsGet commits by project
CommitApigetHeadCommitByProjectGET /projects/{projectId}/headGet head commit by project
CommitApipostCommitByProjectPOST /projects/{projectId}/commitsCreate commit by project
ElementApigetElementByProjectCommitIdGET /projects/{projectId}/commits/{commitId}/elements/{elementId}Get element by project, commit and ID
ElementApigetElementsByProjectCommitGET /projects/{projectId}/commits/{commitId}/elementsGet elements by project and commit
ElementApigetRootsByProjectCommitGET /projects/{projectId}/commits/{commitId}/rootsGet root elements by project and commit
ProjectApigetProjectByIdGET /projects/{projectId}Get project by ID
ProjectApigetProjectsGET /projectsGet projects
ProjectApipostProjectPOST /projectsCreate project
QueryApigetQueriesByProjectGET /projects/{projectId}/queriesGet queries by project
QueryApigetQueryByProjectAndIdGET /projects/{projectId}/queries/{queryId}Get query by project and ID
QueryApigetQueryResultsByProjectIdQueryGET /projects/{projectId}/query-resultsGet query results by project and query definition
QueryApigetQueryResultsByProjectIdQueryIdGET /projects/{projectId}/queries/{queryId}/resultsGet query results by project and query
QueryApigetQueryResultsByProjectIdQueryPostPOST /projects/{projectId}/query-resultsGet query results by project and query definition via POST
QueryApipostQueryByProjectPOST /projects/{projectId}/queriesCreate query by project
RelationshipApigetRelationshipsByProjectCommitRelatedElementGET /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationshipsGet relationships by project, commit, and related element

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization. Authentication schemes defined for the API:

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