Management API Overview
On this page
The SingleStore Management API provides a REST-based interface for provisioning, configuring, operating, and managing cloud resources within SingleStore Helios.
This RESTful API allows you to perform the following operations:
-
Cluster groups: Create, update, or delete cluster groups, request information on available cluster groups, list the cluster groups
-
Clusters: Create, update, suspend, resume, or delete clusters, request information on clusters, list the clusters, get the outbound allowlist for a cluster
-
Projects: List the projects accessible to a user
-
Private connections: Create, update, or delete private connections, request information on private connections
-
Flow: Create or terminate a Flow instance, request information on a Flow instance, list the Flow instances
-
Invitations: Invite a user, revoke an invitation, list the open invitations, request information on an invitation
-
Teams: Create, update, or delete a team for the current organisation, request information on a team, list the teams
-
Users: Add an existing user to the current organization, delete a user, request information on a user, list the users
-
Roles: Create, update, or delete a custom role, request information on a role, list the roles
-
Jobs: Create, update, or delete a job, request information on jobs, list the jobs
-
Stage:
-
Create, update, or delete a folder in a Stage, request information on a folder
-
Upload, download, modify, or delete a file in a Stage
-
-
Files: Create, upload, update, download, or delete a file in the personal, shared, or model space, list the files, request information on a file
-
Secrets: Create, update, or delete a secret, request information on a secret, list the secrets
-
Audit logs: Request Control Plane audit log entries
-
Organizations: Request information on current organization
-
Billing: Get raw compute and storage usage information for your organization
-
Shared Edition (Shared Tier):
-
Create or delete a Shared Edition deployment (starter cluster), request information on a starter cluster, list the starter clusters
-
Create, update, or delete a user in a Shared Edition deployment
-
-
Cloud workload identity and delegated entities: Request information on the cloud workload identity of a cluster, add or remove delegated entities, list the configured delegated entities
-
Regions: List the regions for a user
The Management API supports HTTP Bearer authentication, which must be used in conjunction with SSL (HTTPS) for secure communication over the network.
You can also interface with the Management API from SingleStore Notebooks using the Fusion SQL commands.
Authorization
The Management API authenticates requests using a unique, hex-encoded alphanumeric key.
When a user is a member of multiple organizations, they can have multiple API keys, one for each organization.
Generate an API Key
Follow these instructions to generate API keys:
-
On the Cloud Portal, in the navigation pane, select your organization.
-
In the navigation pane, select Configuration > API keys > Active Keys > Create API key.
-
Specify a name and expiration date for the API key, and select Create.
Important
The API key is displayed only once.
Revoke an API Key
To revoke an API key, navigate to the API keys section under Configuration on the Cloud Portal.
API keys that are not manually revoked expire on the expiration date defined while creating the API key.
Control Access to the API
SingleStore recommends using IP Allowlist to secure inbound access to clusters using the Management API.
To allow an IP address, login to the Cloud Portal.
By default, IP Allowlist is set to Allow access from anywhere, which allows access to anyone with the API key.
Access the Management API
SingleStore’s Management API supports HTTP Bearer authentication.
Authorization: Bearer 28790ecd46256d9024e7b21a737493b2ed2872e6883808a87843d1ce9839d0d3While making API calls through an HTTP client (such as cURL), you can pass the API key using the -H parameter:
curl -X 'GET' \'api_endpoint_url' \-H 'accept: application/json' \-H 'Authorization: Bearer <API_key>'
Clusters
A Cluster is an independent logical deployment of compute resources which can be used to run a workload in lieu of a cluster.
Each cluster is a part of a cluster group, which allows configuration and management of clusters.
Connect to a Cluster
Once a cluster becomes active, use the cluster endpoint to establish a SQL connection in conjunction with the admin user and password (password for the cluster group).
singlestore -h svc-xxxx-1-dml.aws-cancentral-1.svc.singlestore.com -u admin --password='QUNL@S|(})jZX1VDOp%*EMzm'
Attach a Database
After connecting to a cluster endpoint, execute the CREATE DATABASE command to create the specified database and attach it to the cluster in the read-write mode.
Refer to Attach a Database to a Cluster for more information.
Detach a Database
Refer to Detach a Database from a Cluster for more information.
Manage the API using Golang Client
The singlestore-go repository is a collection of SingleStore Golang SDKs.management package in the Golang SDK can be used to interact with the Management API.
To import the SDK, add the following line to your *. file:
import "github.com/singlestore-labs/singlestore-go/management"
For more information, see Management API Golang SDK documentation.Management API Golang client.
References
In this section
Last modified: