Skip to Content
DPSAPI Reference

API Reference

DPS has two API surfaces on https://api.duabaforge.com:

  • Cloud functions at /parse/functions/<name> — what the dashboard calls. Business logic lives in Parse Cloud Functions, called with a signed-in user’s session.
  • REST under /api/v1 — for automation (CI, build scripts), authenticated with a deploy token instead of a session.

Cloud functions

Making requests

curl -X POST https://api.duabaforge.com/parse/functions/getCurrentUser \ -H "X-Parse-Application-Id: <DPS app id>" \ -H "X-Parse-Session-Token: <session token>" \ -H "Content-Type: application/json" \ -d '{}'
import Parse from 'parse'; Parse.initialize('<DPS app id>', '<DPS JavaScript key>'); Parse.serverURL = 'https://api.duabaforge.com/parse'; await Parse.User.logIn(email, password); const projects = await Parse.Cloud.run('listProjects');

To check a subscription from your own app, use the typed @duabalabs/dps-client rather than raw calls.

Authentication

Almost every function needs a session token (X-Parse-Session-Token), obtained by signing in (loginWithEmail, or Parse.User.logIn). The functions check your access themselves.

Roles on an app. Your role on an app comes from the project: its owner (or the app’s creator), or your role as a team or organisation member.

ActionRoles allowed
Readowner, admin, developer, viewer
Write, build, publish, manage signing credentialsowner, admin, developer
Secrets, delete, billingowner, admin

Below owner and admin, secret values (keys, database URIs, passwords) come back masked.

Errors

Errors use Parse’s format:

{ "code": 141, "error": "…" }
CodeMeaning
101Object not found, or invalid credentials
102Invalid query (for example, filtering on a protected field)
119Operation forbidden — your role doesn’t allow it
141Cloud function error
142Validation failed

Rate limits

Limits are per IP address and cover sign-in and account operations only:

EndpointLimit
loginWithEmail, /parse/login10 failed attempts per 15 minutes
registerUser, /parse/users10 per hour
/parse/requestPasswordReset, /parse/verificationEmailRequest20 per 10 minutes

Going over returns HTTP 429.

Common functions

Account

FunctionPurpose
loginWithEmailSign in with email and password
registerUserCreate an account — public sign-ups are currently closed
getCurrentUserThe signed-in user

Organisations

FunctionPurpose
createOrganization, getOrganization, updateOrganization, deleteOrganizationManage an organisation
listOrganizationsOrganisations you belong to
inviteOrganizationMember, removeOrganizationMember, listOrganizationMembersMembers

Projects

FunctionPurpose
createProject, getProject, updateProject, deleteProjectManage a project
listProjectsProjects you can see

Apps

FunctionPurpose
dps_createApp, dps_getApp, dps_updateApp, dps_deleteAppManage an app
listAppsApps in a project

Plans and subscriptions

FunctionPurpose
dps_tiers_listThe plans and their limits (Pricing)
dps_subscriptions_checkWhether an email has an active subscription for an app (appId, email). Nothing records subscriptions in DPS today, so it answers active: false — check a subscription with Sellub instead

DPS has no checkout or payment functions — payments are taken through Sellub.

REST API (deploy tokens)

Create a token under Account settings → Deploy tokens in the dashboard. A token is shown once; it starts with dps_. Send it as a bearer token:

curl https://api.duabaforge.com/api/v1/whoami \ -H "Authorization: Bearer dps_xxxxxxxx"

Each token carries scopes, and can be limited to one project or one app.

EndpointScopePurpose
GET /api/v1/whoami—The token’s identity and scopes
POST /api/v1/artifacts/upload-urlartifact:uploadStart an upload; returns an artifactId and a presigned URL to PUT the file to
POST /api/v1/artifacts/{id}/finalizeartifact:uploadFinish an upload with its SHA-256 and size; DPS verifies it
POST /api/v1/artifacts/registerartifact:uploadRegister a build hosted elsewhere, by URL
GET /api/v1/artifactsartifact:readList an app’s artifacts
POST /api/v1/releasesrelease:createCreate a release from artifacts
GET /api/v1/releasesrelease:readList releases
POST /api/v1/releases/{id}/publishrelease:publishPublish a release to a store
POST /api/v1/releases/{id}/rollbackrelease:rollbackRoll a release back
POST /api/v1/repo/validaterepo:readCheck whether the app’s repo is ready for managed builds
GET /api/v1/repo/statusrepo:readThe last check’s result
POST /api/v1/builds/dispatchbuild:triggerStart a managed build in the app’s repo
GET /api/v1/server-app/repo/statusrepo:readA Server App repo’s last compatibility check
POST /api/v1/server-app/repo/validaterepo:readCheck a Server App repo
POST /api/v1/server-app/metadata/extractrepo:readWhat DPS reads from the repo (classes, functions, routes)
POST /api/v1/server-app/repo/scaffoldrepo:writeCommit DPS’s Server App files to the repo (on a migration branch by default)
GET /api/v1/server-app/frontend-bindingrepo:readThe URLs and public keys a web or mobile client needs

A token can carry repo:write only if its maker may change the app (owner, admin or developer).

The build workflow DPS writes into your repo uses the same token (as the DPS_TOKEN secret) — see Mobile builds & releases.

Last updated on