No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Package version: 1.0.0
- Generator version: 7.10.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/footprintai/restcol
Python 3.7+
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 openapi_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 openapi_client
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import openapi_client
from openapi_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 = openapi_client.Configuration(
host = "http://localhost"
)
# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.CollectionApi(api_client)
project_id = 'project_id_example' # str |
body = openapi_client.RestColServiceCreateCollectionBody() # RestColServiceCreateCollectionBody |
try:
# Add collection endpoint, a collection is a set of documents with scheme-free.
api_response = api_instance.rest_col_service_create_collection(project_id, body)
print("The response of CollectionApi->rest_col_service_create_collection:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling CollectionApi->rest_col_service_create_collection: %s\n" % e)
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
CollectionApi | rest_col_service_create_collection | POST /v1/projects/{projectId}/collections | Add collection endpoint, a collection is a set of documents with scheme-free. |
CollectionApi | rest_col_service_delete_collection | DELETE /v1/projects/{projectId}/collections/{collectionId} | |
CollectionApi | rest_col_service_get_collection | GET /v1/projects/{projectId}/collections/{collectionId} | |
CollectionApi | rest_col_service_list_collections | GET /v1/projects/{projectId}/collections | list collections endpoint |
DocumentApi | rest_col_service_create_document | POST /v1/projects/{projectId}/newdoc | |
DocumentApi | rest_col_service_create_document2 | POST /v1/projects/{projectId}/collections/{collectionId}:newdoc | |
DocumentApi | rest_col_service_delete_document | DELETE /v1/projects/{projectId}/collections/{collectionId}/docs/{documentId} | DeleteDocument endpoint is a generic endpoint for deleting a specific data |
DocumentApi | rest_col_service_get_document | GET /v1/projects/{projectId}/collections/{collectionId}/docs/{documentId} | GetDocument endpoint is a generic endpoint for retrieving data across multiple collections |
DocumentApi | rest_col_service_query_document | GET /v1/projects/{projectId}/collections/{collectionId}/docs | |
DocumentApi | rest_col_service_query_documents_stream | GET /v1/projects/{projectId}/collections/{collectionId}/docs:stream | |
SwaggerApi | rest_col_service_get_swagger_doc | GET /v1/projects/{projectId}/apidoc | Return API Doc in Swagger |
SwaggerApi | rest_col_service_get_swagger_doc2 | GET /v1/projects/{projectId}/collections/{collectionId}/apidoc | Return API Doc in Swagger |
- ApiCollectionMetadata
- ApiCollectionType
- ApiCreateCollectionResponse
- ApiCreateDocumentResponse
- ApiDataFormat
- ApiDataMetadata
- ApiGetCollectionResponse
- ApiGetDocumentResponse
- ApiHttpBody
- ApiQueryDocumentResponse
- ApiSchemaField
- ApiSchemaFieldDataType
- ProtobufAny
- ProtobufNullValue
- RestColServiceCreateCollectionBody
- RestColServiceCreateDocumentBody
- RpcStatus
- StreamResultOfApiGetDocumentResponse
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header