Skip to content
This page was generated and translated with the assistance of AI. If you spot any inaccuracies, feel free to help improve it. Edit on GitHub

API Overview

Fenfa exposes a REST API for uploading builds, managing products, and querying analytics. All programmatic interactions -- from CI/CD uploads to admin panel operations -- go through this API.

Base URL

All API endpoints are relative to your Fenfa server URL:

https://your-domain.com

Authentication

Protected endpoints require an X-Auth-Token header. Fenfa uses two token scopes:

ScopeCan DoHeader
uploadUpload buildsX-Auth-Token: YOUR_UPLOAD_TOKEN
adminFull admin access (includes upload)X-Auth-Token: YOUR_ADMIN_TOKEN

Tokens are configured in config.json or via environment variables. See Configuration.

WARNING

Requests to protected endpoints without a valid token receive a 401 Unauthorized response.

Response Format

All JSON responses follow a unified structure:

Success:

json
{
  "ok": true,
  "data": { ... }
}

Error:

json
{
  "ok": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "variant_id is required"
  }
}

Error Codes

CodeHTTP StatusDescription
BAD_REQUEST400Invalid request parameters
UNAUTHORIZED401Missing or invalid auth token
FORBIDDEN403Token lacks required scope
NOT_FOUND404Resource not found
INTERNAL_ERROR500Server error

Endpoint Summary

Public Endpoints (No Auth)

MethodPathDescription
GET/products/:slugProduct download page (HTML)
GET/d/:releaseIDDirect file download
GET/ios/:releaseID/manifest.plistiOS OTA manifest
GET/udid/profile.mobileconfig?variant=:idUDID binding profile
POST/udid/callbackUDID callback (from iOS)
GET/udid/status?variant=:idUDID binding status
GET/healthzHealth check

Upload Endpoints (Upload Token)

MethodPathDescription
POST/uploadUpload a build file

Admin Endpoints (Admin Token)

MethodPathDescription
POST/admin/api/smart-uploadSmart upload with auto-detection
GET/admin/api/productsList products
POST/admin/api/productsCreate product
GET/admin/api/products/:idGet product with variants
PUT/admin/api/products/:idUpdate product
DELETE/admin/api/products/:idDelete product
POST/admin/api/products/:id/variantsCreate variant
PUT/admin/api/variants/:idUpdate variant
DELETE/admin/api/variants/:idDelete variant
GET/admin/api/variants/:id/statsVariant statistics
DELETE/admin/api/releases/:idDelete release
PUT/admin/api/apps/:id/publishPublish app
PUT/admin/api/apps/:id/unpublishUnpublish app
GET/admin/api/eventsQuery events
GET/admin/api/ios_devicesList iOS devices
POST/admin/api/devices/:id/register-appleRegister device with Apple
POST/admin/api/devices/register-appleBatch register devices
GET/admin/api/settingsGet settings
PUT/admin/api/settingsUpdate settings
GET/admin/api/upload-configGet upload configuration
GET/admin/api/apple/statusApple API status
GET/admin/api/apple/devicesApple-registered devices

Export Endpoints (Admin Token)

MethodPathDescription
GET/admin/exports/releases.csvExport releases
GET/admin/exports/events.csvExport events
GET/admin/exports/ios_devices.csvExport iOS devices

ID Format

All resource IDs use a prefix + random string format:

PrefixResource
prd_Product
var_Variant
rel_Release
app_App (legacy)

Detailed References

  • Upload API -- Upload endpoint with field reference and examples
  • Admin API -- Complete admin endpoint documentation

Released under the Apache-2.0 License.