Skip to main content

Spartera API Documentation

Project description

spartera-api-sdk

Auto-generated API documentation for REST services of the Spartera platform

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

  • API version: 1.25.0
  • Package version: 1.0.83
  • Generator version: 7.21.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

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/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 spartera_api_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 spartera_api_sdk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import spartera_api_sdk
from spartera_api_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.spartera.com
# See configuration.py for a list of all supported configuration parameters.
configuration = spartera_api_sdk.Configuration(
    host = "https://api.spartera.com"
)

# 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 spartera_api_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = spartera_api_sdk.APIKeysApi(api_client)
    company_id = 'company_id_example' # str | Unique identifier for the Company
    api_keys_input = spartera_api_sdk.ApiKeysInput() # ApiKeysInput | 
    page = 1 # int | Page number for pagination (optional) (default to 1)
    limit = 20 # int | Number of items per page (optional) (default to 20)
    sort_by = 'sort_by_example' # str | Field to sort by (optional)
    sort_order = desc # str | Sort order (ascending or descending) (optional) (default to desc)
    search = 'search_example' # str | Search term to filter results (optional)

    try:
        # Create single API key.     Returns the actual sk_ key (only time it's exposed) and api_key_id for future operations.
        api_response = api_instance.create_api_keys(company_id, api_keys_input, page=page, limit=limit, sort_by=sort_by, sort_order=sort_order, search=search)
        print("The response of APIKeysApi->create_api_keys:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling APIKeysApi->create_api_keys: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.spartera.com

Class Method HTTP request Description
APIKeysApi create_api_keys POST /companies/{company_id}/api-keys Create single API key. Returns the actual sk_ key (only time it's exposed) and api_key_id for future operations.
APIKeysApi create_api_keys_api_keys_revoke POST /companies/{company_id}/api-keys/{api_key_id}/revoke Explicitly revoke an API key with reason tracking. This is different from delete as it includes revocation metadata.
APIKeysApi delete_api_keys DELETE /companies/{company_id}/api-keys/{api_key_id} Delete (deactivate) single API key by api_key_id. Uses the api_key_id returned during creation for clean identification. Fixed to use correct primary key lookup.
APIKeysApi get_api_keys_by_id GET /companies/{company_id}/api-keys/{api_key_id} Get single API key by ID. Returns masked API key for security (sk_****1234).
APIKeysApi get_api_keys_by_id_api_keys_stats GET /companies/{company_id}/api-keys/{api_key_id}/stats Get usage statistics for a specific API key. Returns usage count, last used date, failed attempts, etc.
APIKeysApi list_api_keys GET /companies/{company_id}/api-keys Get all API keys for a company. Returns masked API keys for security (sk_****1234).
APIKeysApi update_api_keys PATCH /companies/{company_id}/api-keys/{api_key_id} Update an existing API key by ID. Can update metadata like name, expiration, rate limits, etc. Cannot update the actual key value (for security).
AlertsApi create_alerts POST /companies/{company_id}/users/{user_id}/alerts POST /companies/{company_id}/users/{user_id}/alerts
AlertsApi delete_alerts DELETE /companies/{company_id}/users/{user_id}/alerts/{alert_id} Delete single alert by ID
AlertsApi get_alerts_by_id GET /companies/{company_id}/users/{user_id}/alerts Get a list of all alerts for a specific user
AlertsApi get_alerts_by_id_asset_all GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id}/all Get all alerts for a specific asset
AlertsApi get_alerts_by_id_users GET /companies/{company_id}/users/{user_id}/alerts/{alert_id} Get single alert by ID
AlertsApi get_alerts_by_id_users_asset GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id} Get all alerts for a specific asset (by user)
AlertsApi update_alerts PATCH /companies/{company_id}/users/{user_id}/alerts/{alert_id} Update an existing alert by ID
AssetPriceHistoryApi create_asset_price_history POST /companies/{company_id}/assets/{asset_id}/prices Create a new price history record for an asset
AssetPriceHistoryApi create_asset_price_history_prices_calculate_credits POST /companies/{company_id}/assets/{asset_id}/prices/calculate_credits Calculate the credit equivalent for a given USD price without saving
AssetPriceHistoryApi create_asset_price_history_prices_discount POST /companies/{company_id}/assets/{asset_id}/prices/discount POST /companies/{company_id}/assets/{asset_id}/prices/discount
AssetPriceHistoryApi delete_asset_price_history DELETE /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Delete single price history record by ID
AssetPriceHistoryApi get_asset_price_history_by_id GET /companies/{company_id}/assets/{asset_id}/prices Get all price history records for a specific asset
AssetPriceHistoryApi get_asset_price_history_by_id_assets_prices GET /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Get single price history record by ID
AssetPriceHistoryApi get_asset_price_history_by_id_prices_active GET /companies/{company_id}/assets/{asset_id}/prices/active Get the currently active price for an asset
AssetPriceHistoryApi update_asset_price_history PATCH /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Update an existing price history record by ID
AssetUsecasesApi get_asset_usecases_by_id GET /asset_usecases/{auc_id} Get single asset use case by ID
AssetUsecasesApi list_asset_usecases GET /asset_usecases Get a list of all asset use cases
AssetsApi create_assets POST /companies/{company_id}/assets Create a new asset
AssetsApi create_assets_analyze POST /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi create_assets_scan_column POST /companies/{company_id}/assets/{asset_id}/scan_column Scan a column in the asset's table to retrieve distinct values Request Body: column (str): Column name to scan limit (int, optional): Maximum distinct values to return (default 1000, max 5000) Returns: Flask Response with scan results
AssetsApi create_assets_test POST /companies/{company_id}/assets/{asset_id}/test POST /companies/{company_id}/assets/{asset_id}/test
AssetsApi delete_assets DELETE /companies/{company_id}/assets/{asset_id} Delete single asset by ID
AssetsApi get_assets_by_id GET /companies/{company_id}/assets/{asset_id} Get single asset by ID
AssetsApi get_assets_by_id2 GET /companies/{company_id}/assets/{asset_id}/statistics Get statistics for a specific asset (public endpoint)
AssetsApi get_assets_by_id_analyze GET /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi get_assets_by_id_infoschema GET /companies/{company_id}/assets/{asset_id}/infoschema Get the information schema for a specific asset's table
AssetsApi get_assets_by_id_infoschema_save GET /companies/{company_id}/assets/{asset_id}/infoschema/save Retrieve and save an asset's information schema
AssetsApi get_assets_by_id_predicted_price GET /companies/{company_id}/assets/{asset_id}/predicted_price Get AI-predicted pricing for a specific asset
AssetsApi get_assets_by_id_statistics GET /companies/{company_id}/assets/statistics Get statistics for all assets the user has access to
AssetsApi get_assets_by_id_test GET /companies/{company_id}/assets/{asset_id}/test GET /companies/{company_id}/assets/{asset_id}/test
AssetsApi list_assets GET /companies/{company_id}/assets Get all assets for a specific company
AssetsApi list_assets_search GET /companies/{company_id}/assets/search Search and filter assets with advanced options Query Parameters: q: Search query string category: Filter by category sport: Filter by sport tag sort_by: Sort field (name
AssetsApi update_assets PATCH /companies/{company_id}/assets/{asset_id} Update an existing asset by ID
CloudProvidersApi get_cloud_providers_by_id GET /cloud-providers/{provider_id} Get single cloud provider by ID
CloudProvidersApi list_cloud_providers GET /cloud-providers Get a list of all cloud providers
CompaniesApi get_companies_by_id GET /companies/{company_id} Get details of the requestor's own company
CompaniesApi list_companies GET /companies/{company_id}/requests/plan Get the total number of requests allocated in the company's current subscription plan.
CompaniesApi list_companies_analytics_assets GET /companies/{company_id}/analytics/assets Get asset performance analytics. Query params: start_date, end_date, limit, sort_by, include
CompaniesApi list_companies_analytics_customers GET /companies/{company_id}/analytics/customers Get customer analytics including growth and segmentation. Query params: start_date, end_date, group_by, segment_by
CompaniesApi list_companies_analytics_dashboard GET /companies/{company_id}/analytics/dashboard Get comprehensive dashboard analytics for seller dashboard. Query params: start_date, end_date, period (day/week/month/quarter)
CompaniesApi list_companies_analytics_metrics GET /companies/{company_id}/analytics/metrics Get summary metrics (counts only). No date params needed — returns all-time totals. Performance: < 0.1s
CompaniesApi list_companies_analytics_sales GET /companies/{company_id}/analytics/sales Get sales over time analytics. Query params: start_date, end_date, group_by (day/week/month/quarter), metrics
CompaniesApi list_companies_objects GET /companies/{company_id}/objects Get all objects (connections, assets) of a single company
CompaniesApi list_companies_requests_usage GET /companies/{company_id}/requests/usage Get company request usage data for a specific month.
CompaniesApi update_companies PATCH /companies/{company_id} Update an existing company by ID
ConnectionsApi create_connections POST /companies/{company_id}/connections Create a new connection by ID
ConnectionsApi delete_connections DELETE /companies/{company_id}/connections/{connection_id} Delete single connection by ID
ConnectionsApi get_connections_by_id GET /companies/{company_id}/connections/{connection_id} Get single connection by ID
ConnectionsApi get_connections_by_id2 GET /companies/{company_id}/connections/{connection_id}/test Test the specified connection
ConnectionsApi get_connections_by_id_infoschema GET /companies/{company_id}/connections/{connection_id}/infoschema Retrieve the information schema for the specified connection
ConnectionsApi get_connections_by_id_sample_data GET /companies/{company_id}/connections/{connection_id}/sample-data Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
ConnectionsApi list_connections GET /companies/{company_id}/connections Get all connections for a specific company
ConnectionsApi update_connections PATCH /companies/{company_id}/connections/{connection_id} Update an existing connection by ID
EndpointsApi create_endpoints POST /companies/{company_id}/endpoints Create a new endpoint
EndpointsApi create_endpoints_keys POST /companies/{company_id}/endpoints/{endpoint_id}/keys POST /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi create_endpoints_scan_column POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
EndpointsApi delete_endpoints DELETE /companies/{company_id}/endpoints/{endpoint_id} Delete single endpoint by ID
EndpointsApi delete_endpoints_keys DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id} DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id}
EndpointsApi get_endpoints_by_id GET /companies/{company_id}/endpoints/{endpoint_id} Get single endpoint by ID
EndpointsApi get_endpoints_by_id_available_endpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints
EndpointsApi get_endpoints_by_id_connections_describe GET /companies/{company_id}/endpoints/../connections/{connection_id}/describe Get schema information for a connection Query parameters: include_fields: Whether to include field information (default: true) schemas: Optional comma-separated schemas to include tables: Optional comma-separated tables to include
EndpointsApi get_endpoints_by_id_execute GET /companies/{company_id}/endpoints/{endpoint_id}/execute Execute an endpoint with pagination support. Customer-facing route that returns paginated data. Query params: ?start=0&limit=100
EndpointsApi get_endpoints_by_id_keys GET /companies/{company_id}/endpoints/{endpoint_id}/keys GET /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi get_endpoints_by_id_recommendations GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
EndpointsApi get_endpoints_by_id_stats GET /companies/{company_id}/endpoints/{endpoint_id}/stats Get usage statistics for an endpoint Query parameters: days: Number of days to analyze (default: 30)
EndpointsApi get_endpoints_by_id_test GET /companies/{company_id}/endpoints/{endpoint_id}/test Test an endpoint with sample data Request body (optional): limit: Number of sample rows to return (default: 10)
EndpointsApi get_endpoints_by_id_url GET /companies/{company_id}/endpoints/{endpoint_id}/url GET /companies/{company_id}/endpoints/{endpoint_id}/url
EndpointsApi list_endpoints GET /companies/{company_id}/endpoints Get all endpoints for a specific company with pagination, filtering, and sorting
EndpointsApi update_endpoints PATCH /companies/{company_id}/endpoints/{endpoint_id} Update an existing endpoint by ID
FavoritesApi create_favorites POST /companies/{company_id}/users/{user_id}/favorites POST /companies/{company_id}/users/{user_id}/favorites
FavoritesApi delete_favorites DELETE /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Delete single favorite by ID (unfavorite an asset)
FavoritesApi get_favorites_by_id GET /companies/{company_id}/users/{user_id}/favorites Get a list of all favorites for a specific user
FavoritesApi get_favorites_by_id_users GET /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Get single favorite by ID
FavoritesApi get_favorites_by_id_users_category GET /companies/{company_id}/users/{user_id}/favorites/category/{category} Get all favorites for the specified user in a specific category
FavoritesApi get_favorites_by_id_users_check GET /companies/{company_id}/users/{user_id}/favorites/check/{asset_id} Check if the specified user has favorited a specific asset
FavoritesApi get_favorites_by_id_users_uncategorized GET /companies/{company_id}/users/{user_id}/favorites/uncategorized Get all favorites for the specified user that don't have a category
FavoritesApi update_favorites PATCH /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Update an existing favorite by ID
IndustriesApi get_industries_by_id GET /industries/{industry_id} Get single industry by ID
IndustriesApi list_industries GET /industries Get a list of all industries
IndustriesApi list_industries_active GET /industries/active Get a list of industries that have active marketplace products
JobFunctionsApi get_job_functions_by_id GET /job-functions/{function_id} Get single job function by ID
JobFunctionsApi list_job_functions GET /job-functions Get a list of all job functions
PostgenIntegrationsApi create_postgen_integrations POST /companies/{company_id}/postgen_integrations POST /companies/{company_id}/postgen_integrations
PostgenIntegrationsApi create_postgen_integrations_test POST /companies/{company_id}/postgen_integrations/test POST /companies/{company_id}/postgen_integrations/test
PostgenIntegrationsApi delete_postgen_integrations DELETE /companies/{company_id}/postgen_integrations/{integration_id} Delete single integration by ID. Also deletes credentials from GCP Secret Manager.
PostgenIntegrationsApi get_postgen_integrations_by_id GET /companies/{company_id}/postgen_integrations/{integration_id} Get single integration by ID.
PostgenIntegrationsApi list_postgen_integrations GET /companies/{company_id}/postgen_integrations Get a list of all postgen integrations for the company. All company users can view integrations.
PostgenIntegrationsApi update_postgen_integrations PATCH /companies/{company_id}/postgen_integrations/{integration_id} Update an existing integration by ID. Can update credentials, is_active status, etc.
PostsApi create_posts POST /companies/{company_id}/posts POST /companies/{company_id}/posts
PostsApi create_posts2 POST /companies/{company_id}/posts/{post_id}/publish/{integration_id} Publish a post to an external platform via an integration. Args: post_id: ID of the post to publish integration_id: ID of the integration to use (from postgen_integrations) Returns: Publication record with external_url and external_post_id
PostsApi create_posts_publish POST /companies/{company_id}/posts/{post_id}/publish Publish a post (make it publicly visible).
PostsApi create_posts_unpublish POST /companies/{company_id}/posts/{post_id}/unpublish Unpublish a post (make it private/draft again).
PostsApi create_posts_view POST /companies/{company_id}/posts/{post_id}/view Increment view count for a post. Public endpoint (no authentication required).
PostsApi delete_posts DELETE /companies/{company_id}/posts/{post_id} Delete single post by ID.
PostsApi get_posts_by_id GET /companies/{company_id}/posts/{post_id} Get single post by ID.
PostsApi get_posts_by_id_publications GET /companies/{company_id}/posts/{post_id}/publications Get all publications for a post. Shows where this post has been published to external platforms. Returns: Array of publication records with platform, URL, status
PostsApi list_posts GET /companies/{company_id}/posts Get a list of all posts for the user's company. Supports filtering, sorting, pagination.
PostsApi list_posts_summary GET /companies/{company_id}/posts/summary GET /companies/{company_id}/posts/summary
PostsApi update_posts PATCH /companies/{company_id}/posts/{post_id} Update an existing post by ID. Note: last_edited_at is automatically updated.
StorageEnginesApi get_storage_engines_by_id GET /cloud-providers/{provider_id}/storage-engines/{engine_id} Get single storage engine by ID
StorageEnginesApi list_storage_engines GET /cloud-providers/{provider_id}/storage-engines Get a list of all storage engines
UsersApi create_users POST /companies/{company_id}/users Create a new user
UsersApi create_users_google_oauth POST /companies/{company_id}/users/google-oauth POST /companies/{company_id}/users/google-oauth
UsersApi create_users_logout POST /companies/{company_id}/users/logout Logout current user by revoking their sessions
UsersApi delete_users DELETE /companies/{company_id}/users/{user_id} Delete single user by ID
UsersApi get_users_by_id GET /companies/{company_id}/users/{user_id} Get single user by ID
UsersApi list_users GET /companies/{company_id}/users Get a list of all users in a company
UsersApi list_users_me GET /me Get current authenticated user's profile.
UsersApi update_users PATCH /companies/{company_id}/users/{user_id} Update an existing user by ID

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Author

support@spartera.com

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

spartera_api_sdk-1.0.83.tar.gz (139.0 kB view details)

Uploaded Source

Built Distribution

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

spartera_api_sdk-1.0.83-py3-none-any.whl (322.1 kB view details)

Uploaded Python 3

File details

Details for the file spartera_api_sdk-1.0.83.tar.gz.

File metadata

  • Download URL: spartera_api_sdk-1.0.83.tar.gz
  • Upload date:
  • Size: 139.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for spartera_api_sdk-1.0.83.tar.gz
Algorithm Hash digest
SHA256 4fdcc42dd309ccc35955931d54f0cdaac4d63ff67e8b6c91facd45e624ab65e7
MD5 2beafb4a2d014d53f9bda27ad3a969b8
BLAKE2b-256 ff60d5ff628234f092287eae29a023f496d146744ae9ee12c8db66b736553a16

See more details on using hashes here.

File details

Details for the file spartera_api_sdk-1.0.83-py3-none-any.whl.

File metadata

File hashes

Hashes for spartera_api_sdk-1.0.83-py3-none-any.whl
Algorithm Hash digest
SHA256 56f8f1d808fbb8cb65b5426b84812284655e636323f51abfec8a93fcd71d992f
MD5 e2275421ae289b328b72d8c00521379a
BLAKE2b-256 24c67ac460a56c65633836ed3dbc91053126029ba2bcacccf3586bba8ee3c390

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