Skip to content

Systems-Modeling/SysML-v2-API-Python-Client

Repository files navigation

sysml-v2-api-client

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

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 2021-03
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import sysml_v2_api_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sysml_v2_api_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.CommitApi(api_client)
    project_id = 'project_id_example' # str | ID of the project
commit_id = 'commit_id_example' # str | ID of the commit

    try:
        # Get commit by project and ID
        api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e)
    

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
CommitApi get_commit_by_project_and_id GET /projects/{projectId}/commits/{commitId} Get commit by project and ID
CommitApi get_commits_by_project GET /projects/{projectId}/commits Get commits by project
CommitApi get_head_commit_by_project GET /projects/{projectId}/head Get head commit by project
CommitApi post_commit_by_project POST /projects/{projectId}/commits Create commit by project
ElementApi get_element_by_project_commit_id GET /projects/{projectId}/commits/{commitId}/elements/{elementId} Get element by project, commit and ID
ElementApi get_elements_by_project_commit GET /projects/{projectId}/commits/{commitId}/elements Get elements by project and commit
ElementApi get_roots_by_project_commit GET /projects/{projectId}/commits/{commitId}/roots Get root elements by project and commit
ProjectApi get_project_by_id GET /projects/{projectId} Get project by ID
ProjectApi get_projects GET /projects Get projects
ProjectApi post_project POST /projects Create project
QueryApi get_queries_by_project GET /projects/{projectId}/queries Get queries by project
QueryApi get_query_by_project_and_id GET /projects/{projectId}/queries/{queryId} Get query by project and ID
QueryApi get_query_results_by_project_id_query GET /projects/{projectId}/query-results Get query results by project and query definition
QueryApi get_query_results_by_project_id_query_id GET /projects/{projectId}/queries/{queryId}/results Get query results by project and query
QueryApi get_query_results_by_project_id_query_post POST /projects/{projectId}/query-results Get query results by project and query definition via POST
QueryApi post_query_by_project POST /projects/{projectId}/queries Create query by project
RelationshipApi get_relationships_by_project_commit_related_element GET /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships Get relationships by project, commit, and related element

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

Python client software for the Systems Modeling API.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
LICENSE
GPL-3.0
LICENSE-GPL

Stars

Watchers

Forks

Packages

No packages published