Skip to main content

Flexo MMS Layer 1 Service API

Project description

flexo-layer1

RESTful API for the Flexo MMS Layer 1 Service. Manages Orgs, Repos, branches, locks, commits, diffs, scratches, collections, artifacts, groups, and policies. Backed by a SPARQL 1.1 quad-store. Uses Linked Data Platform (LDP) and Graph Store Protocol (GSP) conventions.

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

  • API version: 0.3.0
  • Package version: 0.3.0
  • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

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 flexo_layer1

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 flexo_layer1

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import flexo_layer1
from flexo_layer1.rest import ApiException
from pprint import pprint

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

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearerAuth
configuration = flexo_layer1.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with flexo_layer1.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = flexo_layer1.FlexoLayer1Api(api_client)
    org_id = 'my-org' # str | 
    repo_id = 'my-repo' # str | 
    branch_id = 'main' # str | 
    body = prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
insert data {
  <urn:some:uri> rdf:type <urn:my:type> .
}
 # str | SPARQL Update request.

    try:
        # Commit a SPARQL Update to a branch's model
        api_response = api_instance.commit_model(org_id, repo_id, branch_id, body)
        print("The response of FlexoLayer1Api->commit_model:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling FlexoLayer1Api->commit_model: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:8080

Class Method HTTP request Description
FlexoLayer1Api commit_model POST /orgs/{orgId}/repos/{repoId}/branches/{branchId}/update Commit a SPARQL Update to a branch's model
FlexoLayer1Api create_artifact POST /orgs/{orgId}/repos/{repoId}/artifacts Upload a new artifact
FlexoLayer1Api create_branch PUT /orgs/{orgId}/repos/{repoId}/branches/{branchId} Create a branch
FlexoLayer1Api create_branch_via_post POST /orgs/{orgId}/repos/{repoId}/branches Create a new branch
FlexoLayer1Api create_collection POST /orgs/{orgId}/collections Create a new collection
FlexoLayer1Api create_group POST /groups Create a new group
FlexoLayer1Api create_lock PUT /orgs/{orgId}/repos/{repoId}/locks/{lockId} Create a lock
FlexoLayer1Api create_lock_via_post POST /orgs/{orgId}/repos/{repoId}/locks Create a new lock
FlexoLayer1Api create_or_replace_collection PUT /orgs/{orgId}/collections/{collectionId} Create or replace a collection
FlexoLayer1Api create_or_replace_group PUT /groups/{groupId} Create or replace a group
FlexoLayer1Api create_or_replace_org PUT /orgs/{orgId} Create or replace an organization
FlexoLayer1Api create_or_replace_policy PUT /policies/{policyId} Create or replace a policy
FlexoLayer1Api create_or_replace_repo PUT /orgs/{orgId}/repos/{repoId} Create or replace a repository
FlexoLayer1Api create_or_replace_scratch PUT /orgs/{orgId}/repos/{repoId}/scratches/{scratchId} Create or replace a scratch
FlexoLayer1Api create_org POST /orgs Create a new organization
FlexoLayer1Api create_policy POST /policies Create a new policy
FlexoLayer1Api create_repo POST /orgs/{orgId}/repos Create a new repository
FlexoLayer1Api create_scratch POST /orgs/{orgId}/repos/{repoId}/scratches Create a new scratch
FlexoLayer1Api delete_branch DELETE /orgs/{orgId}/repos/{repoId}/branches/{branchId} Delete a branch (not implemented)
FlexoLayer1Api delete_lock DELETE /orgs/{orgId}/repos/{repoId}/locks/{lockId} Delete a lock
FlexoLayer1Api get_artifact GET /orgs/{orgId}/repos/{repoId}/artifacts/{artifactId} Read an artifact
FlexoLayer1Api get_artifacts GET /orgs/{orgId}/repos/{repoId}/artifacts List all artifacts
FlexoLayer1Api get_branch GET /orgs/{orgId}/repos/{repoId}/branches/{branchId} Read a branch
FlexoLayer1Api get_branch_graph GET /orgs/{orgId}/repos/{repoId}/branches/{branchId}/graph Read a branch's model graph
FlexoLayer1Api get_branches GET /orgs/{orgId}/repos/{repoId}/branches List all branches
FlexoLayer1Api get_collection GET /orgs/{orgId}/collections/{collectionId} Read a collection
FlexoLayer1Api get_collection_graph GET /orgs/{orgId}/collections/{collectionId}/graph Read the collection's union graph
FlexoLayer1Api get_collections GET /orgs/{orgId}/collections List all collections
FlexoLayer1Api get_commit GET /orgs/{orgId}/repos/{repoId}/commits/{commitId} Read a commit
FlexoLayer1Api get_commits GET /orgs/{orgId}/repos/{repoId}/commits List all commits
FlexoLayer1Api get_group GET /groups/{groupId} Read a group
FlexoLayer1Api get_groups GET /groups List all groups
FlexoLayer1Api get_lock GET /orgs/{orgId}/repos/{repoId}/locks/{lockId} Read a lock
FlexoLayer1Api get_lock_graph GET /orgs/{orgId}/repos/{repoId}/locks/{lockId}/graph Read a lock's model graph
FlexoLayer1Api get_locks GET /orgs/{orgId}/repos/{repoId}/locks List all locks
FlexoLayer1Api get_org GET /orgs/{orgId} Read an organization
FlexoLayer1Api get_orgs GET /orgs List all Orgs
FlexoLayer1Api get_repo GET /orgs/{orgId}/repos/{repoId} Read a repository
FlexoLayer1Api get_repo_graph GET /orgs/{orgId}/repos/{repoId}/graph Read repository metadata graph
FlexoLayer1Api get_repos GET /orgs/{orgId}/repos List all Repos
FlexoLayer1Api get_scratch GET /orgs/{orgId}/repos/{repoId}/scratches/{scratchId} Read a scratch
FlexoLayer1Api get_scratch_graph GET /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/graph Read a scratch graph
FlexoLayer1Api get_scratches GET /orgs/{orgId}/repos/{repoId}/scratches List all scratches
FlexoLayer1Api head_artifact HEAD /orgs/{orgId}/repos/{repoId}/artifacts/{artifactId} State of an artifact
FlexoLayer1Api head_artifacts HEAD /orgs/{orgId}/repos/{repoId}/artifacts State of all artifacts
FlexoLayer1Api head_branch HEAD /orgs/{orgId}/repos/{repoId}/branches/{branchId} State of a branch
FlexoLayer1Api head_branch_graph HEAD /orgs/{orgId}/repos/{repoId}/branches/{branchId}/graph State of a branch's model graph
FlexoLayer1Api head_branches HEAD /orgs/{orgId}/repos/{repoId}/branches State of all branches
FlexoLayer1Api head_collection HEAD /orgs/{orgId}/collections/{collectionId} State of a collection
FlexoLayer1Api head_collection_graph HEAD /orgs/{orgId}/collections/{collectionId}/graph State of the collection's union graph
FlexoLayer1Api head_collections HEAD /orgs/{orgId}/collections State of all collections
FlexoLayer1Api head_commit HEAD /orgs/{orgId}/repos/{repoId}/commits/{commitId} State of a commit
FlexoLayer1Api head_commits HEAD /orgs/{orgId}/repos/{repoId}/commits State of all commits
FlexoLayer1Api head_group HEAD /groups/{groupId} State of a group
FlexoLayer1Api head_groups HEAD /groups State of all groups
FlexoLayer1Api head_lock HEAD /orgs/{orgId}/repos/{repoId}/locks/{lockId} State of a lock
FlexoLayer1Api head_lock_graph HEAD /orgs/{orgId}/repos/{repoId}/locks/{lockId}/graph State of a lock's model graph
FlexoLayer1Api head_locks HEAD /orgs/{orgId}/repos/{repoId}/locks State of all locks
FlexoLayer1Api head_org HEAD /orgs/{orgId} State of an organization
FlexoLayer1Api head_orgs HEAD /orgs State of all Orgs
FlexoLayer1Api head_repo HEAD /orgs/{orgId}/repos/{repoId} State of a repository
FlexoLayer1Api head_repo_graph HEAD /orgs/{orgId}/repos/{repoId}/graph State of repository metadata graph
FlexoLayer1Api head_repos HEAD /orgs/{orgId}/repos State of all Repos
FlexoLayer1Api head_scratch HEAD /orgs/{orgId}/repos/{repoId}/scratches/{scratchId} State of a scratch
FlexoLayer1Api head_scratch_graph HEAD /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/graph State of a scratch graph
FlexoLayer1Api head_scratches HEAD /orgs/{orgId}/repos/{repoId}/scratches State of all scratches
FlexoLayer1Api load_branch_graph PUT /orgs/{orgId}/repos/{repoId}/branches/{branchId}/graph Load (overwrite) a branch's model graph
FlexoLayer1Api load_scratch_graph PUT /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/graph Load (overwrite) a scratch graph
FlexoLayer1Api query_collection_inspect_post POST /orgs/{orgId}/collections/{collectionId}/query/inspect SPARQL query against a collection with inspection (via body)
FlexoLayer1Api query_collection_post POST /orgs/{orgId}/collections/{collectionId}/query SPARQL query against a collection (via body)
FlexoLayer1Api query_lock_inspect_post POST /orgs/{orgId}/repos/{repoId}/locks/{lockId}/query/inspect SPARQL query against a lock with inspection (via body)
FlexoLayer1Api query_lock_post POST /orgs/{orgId}/repos/{repoId}/locks/{lockId}/query SPARQL query against a lock (via body)
FlexoLayer1Api query_model_inspect_post POST /orgs/{orgId}/repos/{repoId}/branches/{branchId}/query/inspect SPARQL query against a branch's model with inspection (via body)
FlexoLayer1Api query_model_post POST /orgs/{orgId}/repos/{repoId}/branches/{branchId}/query SPARQL query against a branch's model (via body)
FlexoLayer1Api query_repo_inspect_post POST /orgs/{orgId}/repos/{repoId}/query/inspect SPARQL query against a repository with inspection (via body)
FlexoLayer1Api query_repo_post POST /orgs/{orgId}/repos/{repoId}/query SPARQL query against a repository (via body)
FlexoLayer1Api query_scratch_inspect_post POST /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/query/inspect SPARQL query against a scratch with inspection (via body)
FlexoLayer1Api query_scratch_post POST /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/query SPARQL query against a scratch (via body)
FlexoLayer1Api squash_commits POST /orgs/{orgId}/repos/{repoId}/squash Squash a linear commit range between two locks
FlexoLayer1Api update_branch PATCH /orgs/{orgId}/repos/{repoId}/branches/{branchId} Update branch metadata
FlexoLayer1Api update_commit PATCH /orgs/{orgId}/repos/{repoId}/commits/{commitId} Update commit metadata
FlexoLayer1Api update_lock PATCH /orgs/{orgId}/repos/{repoId}/locks/{lockId} Update lock metadata
FlexoLayer1Api update_org PATCH /orgs/{orgId} Update an organization
FlexoLayer1Api update_repo PATCH /orgs/{orgId}/repos/{repoId} Update a repository
FlexoLayer1Api update_scratch POST /orgs/{orgId}/repos/{repoId}/scratches/{scratchId}/update Apply a SPARQL Update to a scratch graph
FlexoLayer1Api update_scratch_metadata PATCH /orgs/{orgId}/repos/{repoId}/scratches/{scratchId} Update scratch metadata

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexo_layer1-0.3.0.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flexo_layer1-0.3.0-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file flexo_layer1-0.3.0.tar.gz.

File metadata

  • Download URL: flexo_layer1-0.3.0.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for flexo_layer1-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5498c23cb18f5d65049c13e3267dbef379080b76f41b63938fbfcb963aebfaef
MD5 9466ac09d66e66d895cb9c43ceae137a
BLAKE2b-256 29c9cf61612ec91385d6b3b46b52bd8a95a638350771d82fcc2c67c32147f114

See more details on using hashes here.

File details

Details for the file flexo_layer1-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: flexo_layer1-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for flexo_layer1-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49096c5057a66f32626d06fd31503bc7f74e11d83431f82a1b24b8effaa65df3
MD5 93924b947d40639134034e7cbcc72019
BLAKE2b-256 f71a117dc13a5f0d1c03859c01e65942baf55e6c75253c990a9a6a31db49044b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page