Download the PHP package spartera/api-sdk without Composer

On this page you can find all versions of the php package spartera/api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-sdk

SparteraApiSdk

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

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

Then run composer install

Manual Installation

Download the files and include autoload.php:

Getting Started

Please follow the installation procedure and then run the following:

API Endpoints

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

Class Method HTTP request Description
APIKeysApi createApiKeys 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 createApiKeysApiKeysRevoke 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 deleteApiKeys 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 getApiKeysById GET /companies/{company_id}/api-keys/{api_key_id} Get single API key by ID. Returns masked API key for security (sk_****1234).
APIKeysApi getApiKeysByIdApiKeysStats 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 listApiKeys GET /companies/{company_id}/api-keys Get all API keys for a company. Returns masked API keys for security (sk_****1234).
APIKeysApi updateApiKeys 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 createAlerts POST /companies/{company_id}/users/{user_id}/alerts POST /companies/{company_id}/users/{user_id}/alerts
AlertsApi deleteAlerts DELETE /companies/{company_id}/users/{user_id}/alerts/{alert_id} Delete single alert by ID
AlertsApi getAlertsById GET /companies/{company_id}/users/{user_id}/alerts Get a list of all alerts for a specific user
AlertsApi getAlertsByIdAssetAll GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id}/all Get all alerts for a specific asset
AlertsApi getAlertsByIdUsers GET /companies/{company_id}/users/{user_id}/alerts/{alert_id} Get single alert by ID
AlertsApi getAlertsByIdUsersAsset GET /companies/{company_id}/users/{user_id}/alerts/asset/{asset_id} Get all alerts for a specific asset (by user)
AlertsApi updateAlerts PATCH /companies/{company_id}/users/{user_id}/alerts/{alert_id} Update an existing alert by ID
AssetPriceHistoryApi createAssetPriceHistory POST /companies/{company_id}/assets/{asset_id}/prices Create a new price history record for an asset
AssetPriceHistoryApi createAssetPriceHistoryPricesCalculateCredits POST /companies/{company_id}/assets/{asset_id}/prices/calculate_credits Calculate the credit equivalent for a given USD price without saving
AssetPriceHistoryApi createAssetPriceHistoryPricesDiscount POST /companies/{company_id}/assets/{asset_id}/prices/discount POST /companies/{company_id}/assets/{asset_id}/prices/discount
AssetPriceHistoryApi deleteAssetPriceHistory DELETE /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Delete single price history record by ID
AssetPriceHistoryApi getAssetPriceHistoryById GET /companies/{company_id}/assets/{asset_id}/prices Get all price history records for a specific asset
AssetPriceHistoryApi getAssetPriceHistoryByIdAssetsPrices GET /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Get single price history record by ID
AssetPriceHistoryApi getAssetPriceHistoryByIdPricesActive GET /companies/{company_id}/assets/{asset_id}/prices/active Get the currently active price for an asset
AssetPriceHistoryApi updateAssetPriceHistory PATCH /companies/{company_id}/assets/{asset_id}/prices/{aph_id} Update an existing price history record by ID
AssetUsecasesApi getAssetUsecasesById GET /asset_usecases/{auc_id} Get single asset use case by ID
AssetUsecasesApi listAssetUsecases GET /asset_usecases Get a list of all asset use cases
AssetsApi createAssets POST /companies/{company_id}/assets Create a new asset
AssetsApi createAssetsAnalyze POST /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi createAssetsScanColumn 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 createAssetsTest POST /companies/{company_id}/assets/{asset_id}/test POST /companies/{company_id}/assets/{asset_id}/test
AssetsApi deleteAssets DELETE /companies/{company_id}/assets/{asset_id} Delete single asset by ID
AssetsApi getAssetsById GET /companies/{company_id}/assets/{asset_id} Get single asset by ID
AssetsApi getAssetsById2 GET /companies/{company_id}/assets/{asset_id}/statistics Get statistics for a specific asset (public endpoint)
AssetsApi getAssetsByIdAnalyze GET /analyze/{company_handle}/assets/{asset_slug} Process (analyze) an asset with dynamic rate limiting applied via decorator.
AssetsApi getAssetsByIdInfoschema GET /companies/{company_id}/assets/{asset_id}/infoschema Get the information schema for a specific asset's table
AssetsApi getAssetsByIdInfoschemaSave GET /companies/{company_id}/assets/{asset_id}/infoschema/save Retrieve and save an asset's information schema
AssetsApi getAssetsByIdPredictedPrice GET /companies/{company_id}/assets/{asset_id}/predicted_price Get AI-predicted pricing for a specific asset
AssetsApi getAssetsByIdStatistics GET /companies/{company_id}/assets/statistics Get statistics for all assets the user has access to
AssetsApi getAssetsByIdTest GET /companies/{company_id}/assets/{asset_id}/test GET /companies/{company_id}/assets/{asset_id}/test
AssetsApi listAssets GET /companies/{company_id}/assets Get all assets for a specific company
AssetsApi listAssetsSearch 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 recent popular trending) limit: Number of results (default 20, max 100) offset: Offset for pagination include_recommended: Include recommendations (true/false) include_schema: Include asset_schema in response (true/false, default false)
AssetsApi updateAssets PATCH /companies/{company_id}/assets/{asset_id} Update an existing asset by ID
CloudProvidersApi getCloudProvidersById GET /cloud-providers/{provider_id} Get single cloud provider by ID
CloudProvidersApi listCloudProviders GET /cloud-providers Get a list of all cloud providers
CompaniesApi getCompaniesById GET /companies/{company_id} Get details of the requestor's own company
CompaniesApi listCompanies GET /companies/{company_id}/requests/plan Get the total number of requests allocated in the company's current subscription plan.
CompaniesApi listCompaniesAnalyticsAssets GET /companies/{company_id}/analytics/assets Get asset performance analytics. Query params: start_date, end_date, limit, sort_by, include
CompaniesApi listCompaniesAnalyticsCustomers GET /companies/{company_id}/analytics/customers Get customer analytics including growth and segmentation. Query params: start_date, end_date, group_by, segment_by
CompaniesApi listCompaniesAnalyticsDashboard 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 listCompaniesAnalyticsMetrics GET /companies/{company_id}/analytics/metrics Get summary metrics (counts only). No date params needed — returns all-time totals. Performance: < 0.1s
CompaniesApi listCompaniesAnalyticsSales 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 listCompaniesObjects GET /companies/{company_id}/objects Get all objects (connections, assets) of a single company
CompaniesApi listCompaniesRequestsUsage GET /companies/{company_id}/requests/usage Get company request usage data for a specific month.
CompaniesApi updateCompanies PATCH /companies/{company_id} Update an existing company by ID
ConnectionsApi createConnections POST /companies/{company_id}/connections Create a new connection by ID
ConnectionsApi deleteConnections DELETE /companies/{company_id}/connections/{connection_id} Delete single connection by ID
ConnectionsApi getConnectionsById GET /companies/{company_id}/connections/{connection_id} Get single connection by ID
ConnectionsApi getConnectionsById2 GET /companies/{company_id}/connections/{connection_id}/test Test the specified connection
ConnectionsApi getConnectionsByIdInfoschema GET /companies/{company_id}/connections/{connection_id}/infoschema Retrieve the information schema for the specified connection
ConnectionsApi getConnectionsByIdSampleData 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 listConnections GET /companies/{company_id}/connections Get all connections for a specific company
ConnectionsApi updateConnections PATCH /companies/{company_id}/connections/{connection_id} Update an existing connection by ID
EndpointsApi createEndpoints POST /companies/{company_id}/endpoints Create a new endpoint
EndpointsApi createEndpointsKeys POST /companies/{company_id}/endpoints/{endpoint_id}/keys POST /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi createEndpointsScanColumn POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
EndpointsApi deleteEndpoints DELETE /companies/{company_id}/endpoints/{endpoint_id} Delete single endpoint by ID
EndpointsApi deleteEndpointsKeys DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id} DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id}
EndpointsApi getEndpointsById GET /companies/{company_id}/endpoints/{endpoint_id} Get single endpoint by ID
EndpointsApi getEndpointsByIdAvailableEndpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints GET /companies/{company_id}/endpoints/{endpoint_id}/available-endpoints
EndpointsApi getEndpointsByIdConnectionsDescribe 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 getEndpointsByIdExecute 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 getEndpointsByIdKeys GET /companies/{company_id}/endpoints/{endpoint_id}/keys GET /companies/{company_id}/endpoints/{endpoint_id}/keys
EndpointsApi getEndpointsByIdRecommendations GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
EndpointsApi getEndpointsByIdStats 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 getEndpointsByIdTest 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 getEndpointsByIdUrl GET /companies/{company_id}/endpoints/{endpoint_id}/url GET /companies/{company_id}/endpoints/{endpoint_id}/url
EndpointsApi listEndpoints GET /companies/{company_id}/endpoints Get all endpoints for a specific company with pagination, filtering, and sorting
EndpointsApi updateEndpoints PATCH /companies/{company_id}/endpoints/{endpoint_id} Update an existing endpoint by ID
FavoritesApi createFavorites POST /companies/{company_id}/users/{user_id}/favorites POST /companies/{company_id}/users/{user_id}/favorites
FavoritesApi deleteFavorites DELETE /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Delete single favorite by ID (unfavorite an asset)
FavoritesApi getFavoritesById GET /companies/{company_id}/users/{user_id}/favorites Get a list of all favorites for a specific user
FavoritesApi getFavoritesByIdUsers GET /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Get single favorite by ID
FavoritesApi getFavoritesByIdUsersCategory GET /companies/{company_id}/users/{user_id}/favorites/category/{category} Get all favorites for the specified user in a specific category
FavoritesApi getFavoritesByIdUsersCheck GET /companies/{company_id}/users/{user_id}/favorites/check/{asset_id} Check if the specified user has favorited a specific asset
FavoritesApi getFavoritesByIdUsersUncategorized GET /companies/{company_id}/users/{user_id}/favorites/uncategorized Get all favorites for the specified user that don't have a category
FavoritesApi updateFavorites PATCH /companies/{company_id}/users/{user_id}/favorites/{favorite_id} Update an existing favorite by ID
IndustriesApi getIndustriesById GET /industries/{industry_id} Get single industry by ID
IndustriesApi listIndustries GET /industries Get a list of all industries
IndustriesApi listIndustriesActive GET /industries/active Get a list of industries that have active marketplace products
JobFunctionsApi getJobFunctionsById GET /job-functions/{function_id} Get single job function by ID
JobFunctionsApi listJobFunctions GET /job-functions Get a list of all job functions
PostgenIntegrationsApi createPostgenIntegrations POST /companies/{company_id}/postgen_integrations POST /companies/{company_id}/postgen_integrations
PostgenIntegrationsApi createPostgenIntegrationsTest POST /companies/{company_id}/postgen_integrations/test POST /companies/{company_id}/postgen_integrations/test
PostgenIntegrationsApi deletePostgenIntegrations DELETE /companies/{company_id}/postgen_integrations/{integration_id} Delete single integration by ID. Also deletes credentials from GCP Secret Manager.
PostgenIntegrationsApi getPostgenIntegrationsById GET /companies/{company_id}/postgen_integrations/{integration_id} Get single integration by ID.
PostgenIntegrationsApi listPostgenIntegrations GET /companies/{company_id}/postgen_integrations Get a list of all postgen integrations for the company. All company users can view integrations.
PostgenIntegrationsApi updatePostgenIntegrations PATCH /companies/{company_id}/postgen_integrations/{integration_id} Update an existing integration by ID. Can update credentials, is_active status, etc.
PostsApi createPosts POST /companies/{company_id}/posts POST /companies/{company_id}/posts
PostsApi createPosts2 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 createPostsPublish POST /companies/{company_id}/posts/{post_id}/publish Publish a post (make it publicly visible).
PostsApi createPostsUnpublish POST /companies/{company_id}/posts/{post_id}/unpublish Unpublish a post (make it private/draft again).
PostsApi createPostsView POST /companies/{company_id}/posts/{post_id}/view Increment view count for a post. Public endpoint (no authentication required).
PostsApi deletePosts DELETE /companies/{company_id}/posts/{post_id} Delete single post by ID.
PostsApi getPostsById GET /companies/{company_id}/posts/{post_id} Get single post by ID.
PostsApi getPostsByIdPublications 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 listPosts GET /companies/{company_id}/posts Get a list of all posts for the user's company. Supports filtering, sorting, pagination.
PostsApi listPostsSummary GET /companies/{company_id}/posts/summary GET /companies/{company_id}/posts/summary
PostsApi updatePosts PATCH /companies/{company_id}/posts/{post_id} Update an existing post by ID. Note: last_edited_at is automatically updated.
StorageEnginesApi getStorageEnginesById GET /cloud-providers/{provider_id}/storage-engines/{engine_id} Get single storage engine by ID
StorageEnginesApi listStorageEngines GET /cloud-providers/{provider_id}/storage-engines Get a list of all storage engines
UsersApi createUsers POST /companies/{company_id}/users Create a new user
UsersApi createUsersGoogleOauth POST /companies/{company_id}/users/google-oauth POST /companies/{company_id}/users/google-oauth
UsersApi createUsersLogout POST /companies/{company_id}/users/logout Logout current user by revoking their sessions
UsersApi deleteUsers DELETE /companies/{company_id}/users/{user_id} Delete single user by ID
UsersApi getUsersById GET /companies/{company_id}/users/{user_id} Get single user by ID
UsersApi listUsers GET /companies/{company_id}/users Get a list of all users in a company
UsersApi listUsersMe GET /me Get current authenticated user's profile.
UsersApi updateUsers PATCH /companies/{company_id}/users/{user_id} Update an existing user by ID

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

Tests

To run the tests, use:

Author

[email protected]

About this package

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


All versions of api-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package spartera/api-sdk contains the following files

Loading the files please wait ...