This guide explains how to access StreamShark's API documentation, and use the API. It covers access requirements, authentication, and recommended tools
Access Requirements
Before viewing the API documentation:
Login to StreamShark
-
Navigate to Account Details section
Navigate to API Keys section
-
Note down the following:
API Endpoint
API Username
API Secret Key
API Documentation
StreamShark exposes interactive API docs through the URL structure below:
https://<API_Endpoint>/api2/service/v<Version_Number>/users/<API_Username>/apidocs
Replace all the variables in the URL which are wrapped around <> with the API information you noted in the above step
e.g. https://secure.metacdn.com/api2/service/v1/users/user1/apidocs
Refer to the table below to understand the variables
URL Variable |
Description |
Example |
|---|---|---|
API_Endpoint |
Base URL used to access the API. It identifies the environment you are targeting |
secure.metacdn.com |
Version_Number |
Represents the API version |
1 |
API_Username |
Identifier used when accessing docs and calling endpoints |
user1 |
Once you have created and accessed the API documentation url, you will be prompted to enter a username and password
Please enter your API Username as the username and API Secret Key as your password. From there, you will be able to see the API documentation
The API is currently in active development. Features, endpoints, and documentation may change without prior notice
Using the API
Base URL
All API endpoints are built upon the structure of the base url below, refer to the table in API Documentation section to understand these url variables:
https://<API_Endpoint>/api2/service/v<Version_Number>
Using Endpoints
To call an endpoint, combine:
Base URL, and
Endpoint path from the documentation.
For example, if the documentation lists the endpoint /users/{username}/events
You would call:
https://<API_Endpoint>/api2/service/v<Version_Number>/users/<API_Username>/events
e.g. https://secure.metacdn.com/api2/service/v1/users/user1/events
Please refer to the documentation for more information specific for each endpoint to avoid incorrect paths or payloads
The API documentation includes:
The complete list of endpoints
Supported HTTP methods (GET, POST, PUT, DELETE)
Request parameters and field definitions
Required and optional query parameters
Request body examples
Response structures
Error codes
Endpoint specific caveats or limitations
Authentication
All endpoints require Basic Auth before you can make requests
Use your API username and API Secret Key you noted before as credentials in the Authorization header
Authorization: Basic <base64-credentials>
Making Requests
Request Format
Requests should follow standard REST conventions:
GET – retrieve data
POST – create or submit data
PUT/PATCH – update existing data
DELETE – remove data
All request bodies must be valid JSON unless otherwise specified
Error Handling
You may encounter errors such as:
Status |
Meaning |
How to Handle |
|---|---|---|
400 Bad Request |
Invalid input |
Correct request payload |
401 Unauthorized |
Invalid/expired token |
Refresh credentials |
403 Forbidden |
No permission |
Request access |
404 Not Found |
Endpoint or resource missing |
Verify path |
500 Internal Server Error |
Service failure |
Retry or escalate |
Always validate your request payloads before submission
Recommended Tools
To interact with the API efficiently, we recommend using the following tools. These tools support authenticated requests, JSON payload construction, and automation
Postman
Postman is the recommended tool for building and executing API requests
Official Postman Learning Center:
Documentation | Postman Docs
cURL
cURL is a lightweight command-line option for making quick API requests
Official cURL Manual:
curl - How To Use
Example:
curl -X GET "https://<API_Endpoint>/api2/service/v<Version_Number>/users/<API_Username>/events" \ -H "Authorization: Basic <base64-credentials>"
Notes
Some endpoints may be added, modified, or deprecated during the API development cycle
Always check the latest documentation to confirm endpoint stability and compatibility