API Reference
Complete REST API documentation for CodePush Multi-Tenant server
REST API Documentation
Comprehensive API reference for integrating with CodePush Multi-Tenant server.
Base URL
https://your-codepush-server.com/api/v1
Authentication
All API requests require authentication using an access token in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKEN
POST /auth/tokens
Create a new access token for CLI or programmatic access.
{ "friendlyName": "My CLI Token", "ttl": 86400000 }
{ "accessToken": "abc123...", "friendlyName": "My CLI Token", "expires": "2024-01-01T00:00:00Z" }
GET /auth/tokens
List all access tokens for the authenticated user.
DELETE /auth/tokens/:tokenName
Revoke a specific access token.
GET /apps
Get all applications for the authenticated user's organization.
{ "apps": [ { "name": "MyApp-iOS", "platform": "ios", "deployments": ["Production", "Staging"], "collaborators": [ { "email": "user@example.com", "permission": "Owner" } ] } ] }
POST /apps
Create a new application.
{ "name": "MyApp-iOS", "platform": "ios" }
{ "app": { "name": "MyApp-iOS", "platform": "ios", "deployments": ["Production", "Staging"] } }
DELETE /apps/:appName
Delete an application and all its deployments.
PATCH /apps/:appName
Update application properties.
{ "name": "MyApp-iOS-Renamed" }
GET /apps/:appName/deployments
Get all deployments for a specific application.
{ "deployments": [ { "name": "Production", "key": "deployment-key-123", "package": { "appVersion": "1.0.0", "description": "Bug fixes and improvements", "label": "v1", "packageHash": "abc123...", "blobUrl": "https://...", "size": 1024000, "releaseMethod": "Upload", "uploadTime": 1640995200000 } } ] }
POST /apps/:appName/deployments
Create a new deployment for an application.
{ "name": "Staging" }
DELETE /apps/:appName/deployments/:deploymentName
Delete a deployment.
PATCH /apps/:appName/deployments/:deploymentName
Update deployment properties.
POST /apps/:appName/deployments/:deploymentName/release
Release a new package to a deployment.
package: [binary file] packageInfo: { "appVersion": "1.0.0", "description": "Bug fixes and improvements", "isMandatory": false, "rollout": 100 }
GET /apps/:appName/deployments/:deploymentName/releases
Get release history for a deployment.
{ "releases": [ { "label": "v1", "appVersion": "1.0.0", "description": "Bug fixes and improvements", "isMandatory": false, "rollout": 100, "size": 1024000, "uploadTime": 1640995200000, "metrics": { "totalActive": 1000, "downloaded": 950, "installed": 900, "failed": 5 } } ] }
PATCH /apps/:appName/deployments/:deploymentName/releases/:label
Update release properties (rollout percentage, mandatory status).
{ "rollout": 50, "isMandatory": true }
GET /apps/:appName/collaborators
Get all collaborators for an application.
POST /apps/:appName/collaborators
Add a collaborator to an application.
{ "email": "user@example.com", "permission": "Collaborator" }
DELETE /apps/:appName/collaborators/:email
Remove a collaborator from an application.
Error Responses
All endpoints return standardized error responses:
{ "error": { "code": "InvalidParameter", "message": "The specified parameter is invalid", "details": { "parameter": "appName", "reason": "Name already exists" } } }
HTTP Status Codes
200
- Success201
- Created400
- Bad Request401
- Unauthorized403
- Forbidden404
- Not Found409
- Conflict500
- Internal Server Error
Rate Limiting
API requests are rate limited to:
- 1000 requests per hour for authenticated users
- 60 requests per hour for unauthenticated requests
Rate limit headers are included in responses:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640998800
Webhooks
Configure webhooks to receive notifications about deployment events:
{ "event": "deployment.released", "app": "MyApp-iOS", "deployment": "Production", "release": { "label": "v1", "appVersion": "1.0.0", "description": "Bug fixes and improvements" }, "timestamp": "2024-01-01T00:00:00Z" }