API v2

Motivation

  • We need good REST API for Voedger

  • Old API must still be available until the new one is fully developed, so we can continue with AIR

Functional design

API Conventions

REST API Paths

Action
REST API Path

Authentication

POST /api/v2/apps/{owner}/{app}/auth/login

POST /api/v2/apps/{owner}/{app}/auth/refresh

Logins

POST /api/v2/apps/{owner}/{app}/users

POST /api/v2/apps/{owner}/{app}/users/change-password

Devices

POST /api/v2/apps/{owner}/{app}/devices

Docs and records

POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}

PATCH /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/{id}

DELETE /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/{id}

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/{id}

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/cdocs/{pkg}.{table}

BLOBs

POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/blobs/{fieldName}

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/{id}/blobs/{fieldName}

Temporary BLOBs

POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/tblobs

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/tblobs/{suuid}

Extensions

POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/commands/{pkg}.{command}

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/queries/{pkg}.{query}

Views

GET /api/v2/apps/{owner}/{app}/workspaces/{wsid}/views/{pkg}.{view}

Notifications

POST /api/v2/apps/{owner}/{app}/notifications

PUT /api/v2/apps/{owner}/{app}/notifications/{channelId}/workspaces/{wsid}/subscriptions/{pkg}.{view}

DELETE /api/v2/apps/{owner}/{app}/notifications/{channelId}/workspaces/{wsid}/subscriptions/{pkg}.{view}

Schemas

GET /api/v2/apps/{owner}/{app}/schemas

GET /api/v2/apps/{owner}/{app}/schemas/{pkg}.{workspace}/roles

GET /api/v2/apps/{owner}/{app}/schemas/{pkg}.{workspace}/roles/{pkg}.{role}

Limitations

  • The following functions should not be calle directly:

    • c.sys.CUD

    • q.sys.Collection

Addressed issues

See Also

Last updated

Was this helpful?