Introduction
Welcome to the Mesh API Documentation - your comprehensive guide to integrating with the Mesh platform.
What is Mesh API?
The Mesh API is a modern, gRPC-based API organized into business domains including Identity & Access Management, Trading Services, Compliance Services, Wallet Management, and Issuance Hub.
To jump to the complete list of available services go to API Reference.
Quick Start
Get started with the Mesh API using the API User Service.
1. Create an API User and Credentials
- Log into Mesh as an administrator and go to the API Users tab on the administration page. Then click the Create API User button on the table header.
- Enter a display name for the API User and select one or more roles (for the coming example to work select at least the IAM Viewer Role). These roles will be assigned to the API User in the group that will own it - the top level group of the client that you are logged in as. Select Create API user to complete the creation.
See Group Ownership Structure for more information on group structures in Mesh.
- On successful creation a dialog opens with the new API User's credentials. Download or copy them. They are required to authenticate SDKs to use the Mesh API.
Keep your API credentials file secure! Never commit this credentials file to version control!
- The new API User is inactive on creation. Select its row in the table and click on the Activate button in the table header to activate it so that it is ready for use.
2. Credentials Setup
Mesh API SDKs are configured to automatically discover your credentials.
For this to work, create a mesh
subdirectory in your platform's application data/configuration directory and
place your credentials.json
file inside it.
The application data/configuration directory differs by platform:
- Linux:
~/.config/mesh/credentials.json
- macOS:
~/Library/Application Support/mesh/credentials.json
- Windows:
C:\Users\<user>\AppData\Roaming\mesh\credentials.json
Credential file location can also be indicated by environment variable:
export MESH_API_CREDENTIALS=/path/to/your/credentials.json
For more information about authentication see Authentication.
3. SDK Installation
Install the SDK for your preferred language:
- Go
- Python
- Java
go get github.com/meshtrade/api/go
pip install meshtrade
To include this SDK in your Maven project, add the following dependency to your pom.xml
file:
<dependency>
<groupId>co.meshtrade</groupId>
<artifactId>api</artifactId>
<version>LATEST</version>
</dependency>
Important: Always use a specific version number (e.g., 1.2.3) instead of LATEST to ensure your build is stable and reproducible. You can find the latest version on the co.meshtrade.api Maven Central repository page.
4. Your First API Request
As a first API request to confirm that everything is working call the SearchApiUsers API to retrieve your new API Key:
- Go
- Python
- Java
package main
import (
"context"
"log"
api_userv1 "github.com/meshtrade/api/go/iam/api_user/v1"
)
func main() {
// 1. Construct API User Service
service, err := api_userv1.NewApiUserService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()
// 2. Call Search API Users Method
response, err := service.SearchApiUsers(
context.Background(),
&api_userv1.SearchApiUsersRequest{DisplayName: "New Key"},
)
if err != nil {
log.Fatalf("SearchApiUsers failed: %v", err)
}
// 3. Use response
log.Printf("SearchApiUsers successful: %+v", response)
}
from meshtrade.iam.api_user.v1 import (
ApiUserService,
SearchApiUsersRequest,
)
def main():
# 1. Construct API User Service
service = ApiUserService()
# 2. Call Search API Users Method
with service:
response = service.search_api_users(SearchApiUsersRequest(display_name="New Key"))
# 3. Use response
print("SearchApiUsers successful:", response)
if __name__ == "__main__":
main()
import co.meshtrade.api.iam.api_user.v1.ApiUserService;
import co.meshtrade.api.iam.api_user.v1.Service.SearchApiUsersRequest;
import co.meshtrade.api.iam.api_user.v1.Service.SearchApiUsersResponse;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
// 1. Construct API User Service
try (ApiUserService service = new ApiUserService()) {
// 2. Call Search API Users Method
SearchApiUsersResponse response = service.searchApiUsers(
SearchApiUsersRequest.newBuilder().setDisplayName("New Key").build(),
Optional.empty());
// 3. Use response
System.out.println("SearchApiUsers successful: " + response);
} catch (Exception e) {
System.err.println("SearchApiUsers failed: " + e.getMessage());
e.printStackTrace();
}
}
}
This will only work if:
- Either IAM Admin or IAM Viewer role was assigned to the API User on creation
- The API User is Active
- API Credentials are discoverable
Next Steps
Now that you have a working connection to the Mesh API, explore these key concepts.
It is recommended that you have read through and understood these concepts before starting to use the API.
📋 Learn About Service Structure
Understand how our APIs are organized and the common patterns used across all services.
👉 Service Structure Guide - Learn about resource-oriented design, standard verbs, and API patterns
🏢 Group Ownership Structure
Learn how groups provide ownership and isolation boundaries for your resources.
👉 Group Ownership Guide - Understand multi-tenancy, resource isolation, and group management
🔐 Permissions Structure
Discover our schema-driven authorization system and role-based access control.
👉 Roles & Permissions Guide - Master RBAC, roles, and permission management
📚 Additional Resources
- API Reference - Complete API documentation
- Roadmap - Upcoming features and improvements
Ready to build something amazing with Mesh API? Let's get started!