Syndeia Cloud 3.3 now has an official Python2/3 client to Intercax’s Syndeia Cloud v3.3 REST API.
Syndeia Cloud REST API - Python SDK
Official Python2/3 client to Intercax’s Syndeia Cloud v3.3 REST API.
This Python package is automatically generated by the OpenAPI Generator project:
API version: 3.3
Package version: 3.3.0.2
Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements
(Ana)conda Package Manager
Python 2.7 and 3.4+ (natively or via Conda)
Connection details of Intercax Syndeia Cloud v3.3 server
Credentials to access Intercax Syndeia Cloud v3.3 server
Installation & Uninstallation
Currently only available via conda (wheel and egg can be made available upon request)
conda install
If you do not have the Conda package manager, first get it by installing Anaconda or Miniconda (see details here)
To install via a conda channel:
conda install syndeia_cloud_33x_client_sdk
To install into a specific environment:
conda install -name myenv syndeia_cloud_33x_client_sdk
To install from a local file (ie: if you downloaded the package directly):
conda install /some/path/syndeia_cloud_33x_client_sdk-3.3.0.2-py_0.tar.bz2 # ex: for v3.3.0.2, update as appropriate
conda uninstall
To uninstall the package:
conda uninstall syndeia_cloud_33x_client_sdk conda clean -t # to ensure any old cached tarballs are cleared out
Usage
The general pattern is to:
Instantiate the configuration (once) with the Syndeia Cloud URL, your username, and password (see STEPs 2-3 in Quickstart below)
Instantiate the API client using the configuration from previous step (see STEP 4 in Quickstart below)
Use the API client object to instantiate other main API classes, such as:
AuthAPI for sign-in and other authentication calls (see STEP 5 in Quickstart below).
UserAPI for create, read, update, delete operations on users
RepositoryAPI for create, read, update, delete operations on repositories (see STEP 6 in Quickstart below)
ContainerAPI for create, read, update, delete operations on containers (see STEP 7 in Quickstart below)
ArtifactAPI for create, read, update, delete operations on artifacts (see STEP 8 in Quickstart below)
RelationAPI for create, read, update, delete operations on relations (see STEP 9 in Quickstart below)
(Strictly speaking, steps 6+ are optional but it will show you how to make sample calls to some of the core endpoint concepts, ie: Repositories, Containers, Artifacts, and Relations)
For more information on the Python API functions, see Documentation for API Endpoints and Documentation for Models.
For an interactive way to explore the REST API, see the Swagger UI at: http(s)://mySyndeiaCloudServer.domain.tld:port/docs/swagger-ui/index.html?url=/assets/swagger/swagger.json, ex: <https://mySyndeiaServer.domain.com:9443/docs/swagger-ui/index.html?url=/assets/swagger/swagger.json>
Usage in Jupyter Notebook
Jupyter Noterbook / Lab is an interactive computing environment spun off of iPython that allows one to execute a variety of languages in an interactive fashion for scientific computing & data analysis. The interactive environment is similar to the commercial product MATLAB.
To use the Syndeia Cloud python3 client SDK in Jupyter Notebook:
Ensure that you have already installed the SDK (see conda install section above) & JupyterLab/Notebook (
conda install jupyterlab
orconda install notebook
).Launch JupyterLab/Notebook (ex: via Anaconda-Navigator or the CLI) and open the provided example iPython Notebook file (
syndeia_cloud_3.3.0_client_sdk_example.ipynb
) from the accompanyingsyndeia_cloud_33x_client_sdk...-py_0_docs
package:Edit the 3rd cell to specify your deployment’s Syndeia Cloud’s
configuration.host
andconfiguration.username
values as described in the comments.Click in the side area of the editing area and select all cells via Command-A (on Mac) or CTRL-A (on Windows)
Run the selected cells by hitting Shift-Enter.
You will be prompted for your specified user’s password, enter it in.
After submitting it, you should get results similar to the below for some of the cells ( the exact results will differ depending on what data you have, if any, on the server)
If one of the outputs is too verbose, you can encapsulate results in a scrollable area by R-clicking the side area next to a cell and selecting Enable Scrolling for Outputs to make navigating the Jupyter notebook easier.
Authorization
Syndeia Cloud 3.3 currently supports Basic Auth + an LDAP(S) authentication provider
Syndeia Cloud 3.3 repositories currently support Basic + OAuth
UserSecurity
Type: API key
API key parameter name: X-Auth-Token
Location: HTTP header
Quickstart
Please refer to the Quickstart section in the documentation included with the SDK
Documentation for API Endpoints
All URIs are relative to http://<your_SC_server_FQDN>
Class | Method | HTTP request | Description |
ArtifactApi |
| POST /artifacts | Create a new artifact |
ArtifactApi |
| DELETE /artifacts/{key} | Delete an artifact given the artifact key |
ArtifactApi |
| POST /artifacts/external/id | Get an artifact given the artifact external id |
ArtifactApi |
| GET /artifacts/{key} | Get an artifact given the artifact key |
ArtifactApi |
| GET /artifacts/{key}/versions/{version} | Get an artifact given the artifact key and version |
ArtifactApi |
| GET /artifacts/{key}/versions | Get all versions of an artifact given the artifact key |
ArtifactApi |
| GET /artifacts | Get all artifacts |
ArtifactApi |
| PUT /artifacts/{key} | Update artifact given the artifact key |
ArtifactTypeApi |
| POST /types/artifact | Create a new Artifact type |
ArtifactTypeApi |
| DELETE /types/artifact/{key} | Delete an Artifact type given the Artifact type key |
ArtifactTypeApi |
| POST /types/artifact/external/id | Get an artifact type given the artifact type external id |
ArtifactTypeApi |
| GET /types/artifact/{key} | Get an Artifact type given the Artifact type key |
ArtifactTypeApi |
| GET /types/artifact/{key}/attribdefs/{id} | Get an attribute definition of an artifact type given the artifact type key and attribute definition id |
ArtifactTypeApi |
| GET /types/artifact | Get all artifact types |
ArtifactTypeApi |
| PUT /types/artifact/{key} | Update an Artifact type given the Artifact key |
AuthApi |
| GET /signUp/superuser | Sign-up super user |
AuthApi |
| POST /signUp | Create a new user (sign-up) |
AuthApi |
| POST /account/disable | Disable internal user |
AuthApi |
| POST /account/enable | Enable internal user |
AuthApi |
| POST /password/reset | Reset user password |
AuthApi |
| POST /signIn | Sign-in a user |
AuthApi |
| POST /authenticate/{provider} | Authenticate user through Auth Provider e.g LDAP |
AuthApi |
| GET /signOut | Sign-out a user |
AuthApi |
| POST /password/change | Change user password |
ContainerApi |
| POST /containers | Create a new container |
ContainerApi |
| DELETE /containers/{key} | Delete a container given the container key |
ContainerApi |
| POST /containers/external/id | Get a container given the container external id |
ContainerApi |
| GET /containers/{key} | Get a container given the container key |
ContainerApi |
| GET /containers | Get all containers |
ContainerApi |
| PUT /containers/{key} | Update a container given the container key |
ContainerTypeApi |
| POST /types/container | Create a new Container type |
ContainerTypeApi |
| DELETE /types/container/{key} | Delete a Container type given the container type key |
ContainerTypeApi |
| POST /types/container/external/id | Get a container type given the container type external id |
ContainerTypeApi |
| GET /types/container/{key} | Get a Container type given the Container type key |
ContainerTypeApi |
| GET /types/container/{key}/attribdefs/{id} | Get a attribute definition of container type given the container type key and attribute definition id |
ContainerTypeApi |
| GET /types/container | Get all container types |
ContainerTypeApi |
| PUT /types/container/{key} | Update a Container type given the Container key |
GraphApi |
| POST /graph/query/raw | Get result of a graph query |
RelationApi |
| POST /relations | Create a new relation |
RelationApi |
| DELETE /relations/{key} | Delete a relation given the relation key |
RelationApi |
| POST /relations/external/id | Get a relation given the relation external id |
RelationApi |
| GET /relations/{key} | Get a relation given the relation key |
RelationApi |
| GET /relations/{key}/versions/{version} | Get a relation given the relation key and version |
RelationApi |
| GET /relations/{key}/versions | Get all versions of a relation given the relation key |
RelationApi |
| GET /relations | Get all relations |
RelationApi |
| PUT /relations/{key} | Update relation given the relation key |
RelationTypeApi |
| POST /types/relation | Create a new Relation type |
RelationTypeApi |
| DELETE /types/relation/{key} | Delete a Relation type given the Relation type key |
RelationTypeApi |
| POST /types/relation/external/id | Get a relation type given the relation type external id |
RelationTypeApi |
| GET /types/relation/{key} | Get a Relation type given the Relation type key |
RelationTypeApi |
| GET /types/relation/{key}/attribdefs/{id} | Get an attribute definition of relation type given the relation type key and attribute definition id |
RelationTypeApi |
| GET /types/relation | Get all relation types |
RelationTypeApi |
| PUT /types/relation/{key} | Update a Relation type given the Relation key |
RepositoryApi |
| POST /repositories | Create a new repository |
RepositoryApi |
| DELETE /repositories/{key} | Delete a repository given the repository key |
RepositoryApi |
| GET /repositories | Get all repositories |
RepositoryApi |
| POST /repositories/external/id | Get a repository given the repository external id |
RepositoryApi |
| GET /repositories/{key} | Get a repository given the repository key |
RepositoryApi |
| PUT /repositories/{key} | Update a repository given the repository key |
RepositoryTypeApi |
| POST /types/repository | Create a new repository type |
RepositoryTypeApi |
| DELETE /types/repository/{key} | Delete a repository type given the repository type key |
RepositoryTypeApi |
| POST /types/repository/external/id | Get a repository type given the repository type external id |
RepositoryTypeApi |
| GET /types/repository/{key} | Get a repository type given the repository type key |
RepositoryTypeApi |
| GET /types/repository/{key}/attribdefs/{id} | Get a attribute definition of repository type given the repository type key and attribute definition id |
RepositoryTypeApi |
| GET /types/repository | Get all repository types |
RepositoryTypeApi |
| PUT /types/repository/{key} | Update a repository type given the repository key |
UserApi |
| DELETE /users/{key} | Delete a user given the user key |
UserApi |
| GET /users/{key} | Get a user given the user key |
UserApi |
| GET /users/username/{username} | Get a user given the user name |
UserApi |
| GET /users | Get all users |
UserApi |
| PUT /users/{key} | Update a user given the user key |
Authors
Intercax DevTeam,
OpenAPI
2020-04-13T11:05:51 ET, brian