Skip to content

clevermaps/cm-python-openapi-sdk

Repository files navigation

cm-python-openapi-sdk

CleverMaps REST API provides access to location intelligence and geospatial analytics platform.

Main capabilities include:

  • Project and user access management
  • Multidimensional data model and metrics management
  • Data upload and exports
  • Ad-hoc analysis of geospatial data
  • Full text and geographic search
  • Configuration of CleverMaps Studio visualizations

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.13.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://docs.clevermaps.io

Requirements.

Python 3.9+

Installation & Usage

pip install

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

pip install git+https://github.com/clevermaps/cm-python-openapi-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/clevermaps/cm-python-openapi-sdk.git)

Then import the package:

import cm_python_openapi_sdk

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 cm_python_openapi_sdk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import cm_python_openapi_sdk
from cm_python_openapi_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = cm_python_openapi_sdk.Configuration(
    host = "https://staging.dev.clevermaps.io/rest"
)

# 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: bearerAuth
configuration = cm_python_openapi_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with cm_python_openapi_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cm_python_openapi_sdk.AccountsApi(api_client)
    account_id = 'account_id_example' # str | Id of the account
    account_onboarding_parameters = {"introShown":["/rest/projects/qkn86k5upo4m9b27/md/views/td9uijp62o8sa27b","/rest/projects/kfdkssvg7rjeri1c/md/views/ul81ijptko8s453t"],"tipsShown":["basicVisualization","extBlockRanking"]} # AccountOnboardingParameters |  (optional)

    try:
        # Change account onboarding
        api_instance.change_onboarding(account_id, account_onboarding_parameters=account_onboarding_parameters)
    except ApiException as e:
        print("Exception when calling AccountsApi->change_onboarding: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://staging.dev.clevermaps.io/rest

Class Method HTTP request Description
AccountsApi change_onboarding PUT /accounts/{accountId}/onboarding Change account onboarding
AccountsApi change_preferences PUT /accounts/{accountId}/preferences Change account preferences
AccountsApi create_pipedrive_account POST /accounts/pipedrive Create pipedrive account and save ID to Cognito profile
AccountsApi delete_account_by_id DELETE /accounts/{accountId} Delete account.
AccountsApi get_account_by_account_id GET /accounts/{accountId} Get account by accountId
AccountsApi get_account_by_email GET /accounts Find if account with email exists.
AccountsApi get_current_account GET /accounts/current Get current account.
AttributeStylesApi create_attribute_style POST /projects/{projectId}/md/attributeStyles Creates new attribute style
AttributeStylesApi delete_attribute_style_by_id DELETE /projects/{projectId}/md/attributeStyles/{id} Deletes attribute style by id
AttributeStylesApi get_all_attribute_styles GET /projects/{projectId}/md/attributeStyles Returns paged collection of all Attribute Styles in a project
AttributeStylesApi get_attribute_style_by_id GET /projects/{projectId}/md/attributeStyles/{id} Gets attribute style by id
AttributeStylesApi get_attribute_style_by_name GET /projects/{projectId}/md/attributeStyles/{name} Gets attribute style by name
AttributeStylesApi update_attribute_style_by_id PUT /projects/{projectId}/md/attributeStyles/{id} Updates attribute style by id
AuditLogApi get_audit_log_event GET /auditlog/{eventId} Get audit log event by eventId
AuditLogApi get_audit_logs GET /auditlog Get audit logs for project
AuthenticationApi get_token POST /oauth/token Get bearer token
AvailableDatasetsApi available_datasets POST /projects/{projectId}/dwh/{dwhClusterId}/availableDatasets
CachesApi get_cache GET /projects/{projectId}/dwh/{dwhClusterId}/caches/{dwhMaterializedCacheId}
DashboardsApi create_dashboard POST /projects/{projectId}/md/dashboards Creates new dashboard
DashboardsApi delete_dashboard_by_id DELETE /projects/{projectId}/md/dashboards/{id} Deletes dashboard by id
DashboardsApi get_all_dashboards GET /projects/{projectId}/md/dashboards Returns paged collection of all Dashboards in a project
DashboardsApi get_dashboard_by_id GET /projects/{projectId}/md/dashboards/{id} Gets dashboard by id
DashboardsApi get_dashboard_by_name GET /projects/{projectId}/md/dashboards/{name} Gets dashboard by name
DashboardsApi update_dashboard_by_id PUT /projects/{projectId}/md/dashboards/{id} Updates dashboard by id
DataDumpApi get_data_dump GET /projects/{projectId}/dwh/data/dumps/{dumpId} Get data dump file
DataPermissionsApi create_data_permission POST /projects/{projectId}/md/dataPermissions Creates new data permission
DataPermissionsApi delete_data_permission_by_id DELETE /projects/{projectId}/md/dataPermissions/{id} Deletes data permission by id
DataPermissionsApi get_all_data_permissions GET /projects/{projectId}/md/dataPermissions Returns paged collection of all data permissions in a project
DataPermissionsApi get_data_permission_by_id GET /projects/{projectId}/md/dataPermissions/{id} Gets data permission by id
DataPermissionsApi get_data_permission_by_name GET /projects/{projectId}/md/dataPermissions/{name} Gets data permission by name
DataPermissionsApi update_data_permission_by_id PUT /projects/{projectId}/md/dataPermissions/{id} Updates data permission by id
DataSourcesApi get_all_data_sources GET /projects/{projectId}/md/dataSources Return list of all unique data sources specified in datasets of a project
DataUploadApi complete_multipart_upload PUT /projects/{projectId}/dwh/data/uploads/{id} Complete multipart upload
DataUploadApi data_upload POST /projects/{projectId}/dwh/data/uploads Upload CSV file to dataset
DatasetsApi create_dataset POST /projects/{projectId}/md/datasets Creates new dataset
DatasetsApi delete_dataset_by_id DELETE /projects/{projectId}/md/datasets/{id} Deletes dataset by id
DatasetsApi generate_dataset_from_csv POST /projects/{projectId}/md/datasets/generateDataset Generate dataset from CSV
DatasetsApi get_all_datasets GET /projects/{projectId}/md/datasets Returns paged collection of all datasets in a project
DatasetsApi get_dataset_by_id GET /projects/{projectId}/md/datasets/{id} Gets dataset by id
DatasetsApi get_dataset_by_name GET /projects/{projectId}/md/datasets/{name} Gets dataset by name
DatasetsApi update_dataset_by_id PUT /projects/{projectId}/md/datasets/{id} Updates dataset by id
DateRangesApi accept_date_ranges POST /projects/{projectId}/dwh/{dwhClusterId}/dateRanges Accept date ranges
DateRangesApi get_date_ranges GET /projects/{projectId}/dwh/{dwhClusterId}/dateRanges/{dwhCacheId} Get date ranges
ExplainApi explain POST /projects/{projectId}/dwh/{dwhClusterId}/explain Explain query
ExportApi get_exported_data GET /projects/{projectId}/export/{exportId} Get exported data
ExportsApi create_export POST /projects/{projectId}/md/exports Creates new export
ExportsApi delete_export_by_id DELETE /projects/{projectId}/md/exports/{id} Deletes export by id
ExportsApi get_all_exports GET /projects/{projectId}/md/exports Returns paged collection of all Exports in a project
ExportsApi get_export_by_id GET /projects/{projectId}/md/exports/{id} Gets export by id
ExportsApi get_export_by_name GET /projects/{projectId}/md/exports/{name} Gets export by name
ExportsApi update_export_by_id PUT /projects/{projectId}/md/exports/{id} Updates export by id
GeosearchApi geographic_search GET /geosearch Geographic search
IndicatorDrillsApi create_indicator_drill POST /projects/{projectId}/md/indicatorDrills Creates new Indicator Drill.
IndicatorDrillsApi delete_indicator_drill_by_id DELETE /projects/{projectId}/md/indicatorDrills/{id} Deletes indicator drill by id
IndicatorDrillsApi get_all_indicator_drills GET /projects/{projectId}/md/indicatorDrills Returns paged collection of all Indicator Drills in a project.
IndicatorDrillsApi get_indicator_drill_by_id GET /projects/{projectId}/md/indicatorDrills/{id} Gets indicator drill by id
IndicatorDrillsApi get_indicator_drill_by_name GET /projects/{projectId}/md/indicatorDrills/{name} Gets indicator drill by name
IndicatorDrillsApi update_indicator_drill_by_id PUT /projects/{projectId}/md/indicatorDrills/{id} Updates indicator drill by id
IndicatorsApi create_indicator POST /projects/{projectId}/md/indicators Creates new Indicator.
IndicatorsApi delete_indicator_by_id DELETE /projects/{projectId}/md/indicators/{id} Deletes indicator by id
IndicatorsApi get_all_indicators GET /projects/{projectId}/md/indicators Returns paged collection of all Indicators in a project.
IndicatorsApi get_indicator_by_id GET /projects/{projectId}/md/indicators/{id} Gets indicator by id
IndicatorsApi get_indicator_by_name GET /projects/{projectId}/md/indicators/{name} Gets indicator by name
IndicatorsApi update_indicator_by_id PUT /projects/{projectId}/md/indicators/{id} Updates indicator by id
InvitationsApi create_invitation POST /projects/{projectId}/invitations Create new invitation to the project for a user.
InvitationsApi delete_invitation DELETE /projects/{projectId}/invitations/{invitationId} Delete invitation.
InvitationsApi get_invitation_by_id GET /projects/{projectId}/invitations/{invitationId} Get detail of an invitation.
InvitationsApi get_invitations GET /projects/{projectId}/invitations Get list of project invitations.
InvitationsApi update_invitation PUT /projects/{projectId}/invitations/{invitationId} Update invitation.
IsochroneApi get_isochrone GET /isochrone Get isochrone
JobsApi get_job_status GET /jobs/{jobId} Get job status
JobsApi get_jobs_history GET /jobs/history Get jobs history
JobsApi submit_job_execution POST /jobs Submit job execution
MapsApi create_map POST /projects/{projectId}/md/maps Creates new Map.
MapsApi delete_map_by_id DELETE /projects/{projectId}/md/maps/{id} Deletes map by id
MapsApi get_all_maps GET /projects/{projectId}/md/maps Returns paged collection of all Maps in a project.
MapsApi get_map_by_id GET /projects/{projectId}/md/maps/{id} Gets map by id
MapsApi get_map_by_name GET /projects/{projectId}/md/maps/{name} Gets map by name
MapsApi update_map_by_id PUT /projects/{projectId}/md/maps/{id} Updates map by id
MarkerSelectorsApi create_marker_selector POST /projects/{projectId}/md/markerSelectors Creates new Marker Selector.
MarkerSelectorsApi delete_marker_selector_by_id DELETE /projects/{projectId}/md/markerSelectors/{id} Deletes marker selector by id
MarkerSelectorsApi get_all_marker_selectors GET /projects/{projectId}/md/markerSelectors Returns paged collection of all Marker Selectors in a project.
MarkerSelectorsApi get_marker_selector_by_id GET /projects/{projectId}/md/markerSelectors/{id} Gets marker selector by id
MarkerSelectorsApi get_marker_selector_by_name GET /projects/{projectId}/md/markerSelectors/{name} Gets marker selector by name
MarkerSelectorsApi update_marker_selector_by_id PUT /projects/{projectId}/md/markerSelectors/{id} Updates marker selector by id
MarkersApi create_marker POST /projects/{projectId}/md/markers Creates new Marker.
MarkersApi delete_marker_by_id DELETE /projects/{projectId}/md/markers/{id} Deletes marker by id
MarkersApi get_all_markers GET /projects/{projectId}/md/markers Returns paged collection of all Markers in a project.
MarkersApi get_marker_by_id GET /projects/{projectId}/md/markers/{id} Gets marker by id
MarkersApi get_marker_by_name GET /projects/{projectId}/md/markers/{name} Gets marker by name
MarkersApi update_marker_by_id PUT /projects/{projectId}/md/markers/{id} Updates marker by id
MembersApi add_project_member POST /projects/{projectId}/members Add new project member and assign a role.
MembersApi delete_membership DELETE /projects/{projectId}/members/{membershipId} Deletes membership of user in project.
MembersApi get_membership_by_id GET /projects/{projectId}/members/{membershipId} Get detail of user membership in project by membership id.
MembersApi get_project_members GET /projects/{projectId}/members Get list of project members.
MembersApi update_membership PUT /projects/{projectId}/members/{membershipId} Update membership by changing role or status in project.
MetricRangesApi accept_metric_ranges POST /projects/{projectId}/dwh/{dwhClusterId}/metricRanges Accept metric ranges
MetricRangesApi get_metric_ranges GET /projects/{projectId}/dwh/{dwhClusterId}/metricRanges/{dwhCacheId} Get metric ranges
MetricValuesDistributionApi accept_metric_values_distributions POST /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions
MetricValuesDistributionApi get_metric_values_distributions GET /projects/{projectId}/dwh/{dwhClusterId}/metricValuesDistributions/{dwhCacheId}
MetricsApi create_metric POST /projects/{projectId}/md/metrics Creates new metric.
MetricsApi delete_metric_by_id DELETE /projects/{projectId}/md/metrics/{id} Deletes metric by id
MetricsApi get_all_metrics GET /projects/{projectId}/md/metrics Returns paged collection of all Metrics in a project.
MetricsApi get_metric_by_id GET /projects/{projectId}/md/metrics/{id} Gets metric by id
MetricsApi get_metric_by_name GET /projects/{projectId}/md/metrics/{name} Gets metric by name
MetricsApi update_metric_by_id PUT /projects/{projectId}/md/metrics/{id} Updates metric by id
OrganizationsApi create_organization POST /organizations Creates a new organization.
OrganizationsApi delete_organization DELETE /organizations/{organizationId} Delete an organization.
OrganizationsApi get_organization_by_id GET /organizations/{organizationId} Get organization detail.
OrganizationsApi get_organizations GET /organizations Get all organizations available for authenticated user.
OrganizationsApi update_organization PUT /organizations/{organizationId} Update organization.
OverlapsApi accept_overlaps POST /projects/{projectId}/dwh/{dwhClusterId}/overlaps Accept overlaps
OverlapsApi get_overlaps GET /projects/{projectId}/dwh/{dwhClusterId}/overlaps/{dwhCacheId} Get overlaps
ProjectInvitationApi accept_project_invitation POST /invitations/{invitationHash} Accept invitation.
ProjectInvitationApi get_invitation GET /invitations/{invitationHash} Get detail of an invitation.
ProjectSettingsApi create_project_settings POST /projects/{projectId}/md/projectSettings Creates new project settings
ProjectSettingsApi delete_project_settings_by_id DELETE /projects/{projectId}/md/projectSettings/{id} Deletes project settings by id
ProjectSettingsApi get_all_project_settings GET /projects/{projectId}/md/projectSettings Returns paged collection of all Project Settings objects in a project. This page will always contain only one object.
ProjectSettingsApi get_project_settings_by_id GET /projects/{projectId}/md/projectSettings/{id} Gets project settings by id
ProjectSettingsApi get_project_settings_by_name GET /projects/{projectId}/md/projectSettings/{name} Gets projectSettings by name
ProjectSettingsApi update_project_settings_by_id PUT /projects/{projectId}/md/projectSettings/{id} Updates project settings by id
ProjectsApi create_project POST /projects Create new project
ProjectsApi delete_project DELETE /projects/{projectId} Delete project.
ProjectsApi get_all_projects GET /projects Get list of projects for authenticated account.
ProjectsApi get_project_by_id GET /projects/{projectId} Get project by given project id.
ProjectsApi update_project PUT /projects/{projectId} Update the project.
PropertyValuesApi accept_property_values POST /projects/{projectId}/dwh/{dwhClusterId}/propertyValues Accept property values
PropertyValuesApi get_property_values GET /projects/{projectId}/dwh/{dwhClusterId}/propertyValues/{dwhCacheId} Get property values
PropertyValuesDistributionApi accept_property_values_distribution POST /projects/{projectId}/dwh/{dwhClusterId}/propertyValuesDistributions
PropertyValuesDistributionApi get_property_values_distribution GET /projects/{projectId}/dwh/{dwhClusterId}/propertyValuesDistributions/{dwhCacheId}
QueriesApi accept_queries POST /projects/{projectId}/dwh/{dwhClusterId}/queries Accept queries
QueriesApi get_queries GET /projects/{projectId}/dwh/{dwhClusterId}/queries/{dwhCacheId} Get queries
SearchApi full_text_search GET /projects/{projectId}/search Full text search on all internal project data.
VectorTilesApi get_vector_tile GET /projects/{projectId}/dwh/{dwhClusterId}/tiles/{datasetName}/{z}/{x}/{y}.vector.pbf
ViewsApi create_view POST /projects/{projectId}/md/views Creates new view
ViewsApi delete_view_by_id DELETE /projects/{projectId}/md/views/{id} Deletes view by id
ViewsApi get_all_views GET /projects/{projectId}/md/views Returns collection of all views in a project
ViewsApi get_view_by_id GET /projects/{projectId}/md/views/{id} Gets view by id
ViewsApi get_view_by_name GET /projects/{projectId}/md/views/{name} Gets view by name
ViewsApi update_view_by_id PUT /projects/{projectId}/md/views/{id} Updates view by id

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Author

[email protected]

About

Low-level python SDK for the CleverMaps platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages