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: 2019-04
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
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
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
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
# create an instance of the API class
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
element = sysml_v2_api_client.Element() # Element |
try:
# Add a new element
api_response = api_instance.create_element(element)
pprint(api_response)
except ApiException as e:
print("Exception when calling ElementApi->create_element: %s\n" % e)
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
ElementApi | create_element | POST /element | Add a new element |
ElementApi | get_element | GET /element/{id} | Get element by its ID |
ElementApi | get_elements | GET /element | Get all elements |
ElementApi | get_elements_in_model | GET /element/model/{model_id} | Get all elements in the model |
ModelApi | create_model | POST /model | Add a new model |
ModelApi | get_model | GET /model/{id} | Get model by its ID |
ModelApi | get_models | GET /model | Get all models |
RelationshipApi | create_relationship | POST /relationship | Add a new relationship |
RelationshipApi | get_relationship | GET /relationship/{id} | Get relationship by its ID |
RelationshipApi | get_relationships | GET /relationship | Get all relationships |
RelationshipApi | get_relationships_by_element | GET /relationship/element/{element_id} | Get all relationships with the given element as either source or target |
RelationshipApi | get_relationships_by_source | GET /relationship/source/{source_id} | Get all relationships with the given element as the source |
RelationshipApi | get_relationships_by_target | GET /relationship/target/{target_id} | Get all relationships with the given element as the target |
All endpoints do not require authorization.