Getting Started¶
This guide will help you get started with the Totis API. You'll learn how to authenticate, create a workspace, and upload your first build.
Prerequisites¶
Before you begin, you'll need:
- A Totis account
- Your client credentials (email and password)
Step 1: Obtain an Access Token¶
First, authenticate to get an access token:
curl -X POST https://api.usetotis.com/api/v1/login/oauth/access_token \
-d "grant_type=password" \
-d "[email protected]" \
-d "password=your-password"
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "refresh-token-here"
}
Step 2: Create a Workspace¶
Create your first workspace to organize your projects:
curl -X POST https://api.usetotis.com/api/v1/workspace \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workspaceName": "My Company"
}'
Step 3: Create a Project¶
Within your workspace, create a project for your application:
curl -X PUT https://api.usetotis.com/api/v1/workspace/my-company/project \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "iOS App",
"repository": "https://github.com/mycompany/ios-app"
}'
Step 4: Create a Build¶
Now you can create a build entry:
curl -X POST https://api.usetotis.com/api/v1/workspace/my-company/project/ios-app/build \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"version": "1.0.0",
"buildNumber": "100",
"platform": "IOS",
"buildType": "RELEASE",
"commitHash": "abc123"
}'
Step 5: Upload Build Files¶
To upload files to your build, first get a signed URL:
curl -X POST https://api.usetotis.com/api/v1/workspace/my-company/project/ios-app/build/BUILD_ID/sign \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "app.ipa"
}'
Then upload your file to the returned signed URL and confirm the upload:
curl -X POST https://api.usetotis.com/api/v1/workspace/my-company/project/ios-app/build/BUILD_ID/upload \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '"SIGNED_TOKEN"'
Next Steps¶
- Learn more about Authentication
- Explore the API Reference
- Understand Permissions