Documentation
  • 👋Welcome to Documentation
  • 📖Glossary
  • ❓FAQs
  • General
    • Getting set up
      • Single-user organization
      • Multi-user organization
    • Supported Document Types
  • Platform Walkthrough
    • Dashboard
    • Queue
    • Configuration
    • Supervision
  • User guide How Tos
    • User Management
      • How to invite a new user to the platform?
      • How can I manage existing users?
    • Processes
      • How to create a supervised process or use the template?
      • How to create a custom process?
    • Supervision
      • How to add, assign, and remove annotations?
      • How to edit the value of the extraction?
      • How to open and edit a table mask?
      • How to open, edit, or remove the extracted table?
      • How to export your data via Supervision?
      • How to copy values and tables?
    • Upload
    • Converters
    • Data points definition
    • Data Export
    • Table Data Extraction
    • Enrichment
    • Generating new API key
  • Integrations
    • Zapier Integration
      • Quickstart
      • Alphamoon as a Trigger
      • Alphamoon as an Action
    • Google Sheets - Export
  • Features
    • Continuous Learning (Beta)
    • Document Splitting
  • API
    • Introduction
    • Quickstart
    • Organization API keys (Beta)
    • Process API keys (Beta)
    • Authenticating
    • Versioning
    • Get results
    • Get OCR results
    • Get processes
    • Get process types
    • Get collections
    • Metadata
      • Setting metadata value
    • Upload File
    • Export
    • Download original files
    • Delete collection
    • Reset process configuration
  • Resources
    • 💻Alphamoon Website
Powered by GitBook
On this page
  • Create a process API key
  • List the process API keys
  • Process API scopes
  • Collections & images
  • Files & documents
  • Results
  • Processes
  • Destinations
  • Exports
  • Users administration
  1. API

Process API keys (Beta)

Learn how to create and list your process API keys

PreviousOrganization API keys (Beta)NextAuthenticating

Last updated 11 months ago

The following endpoints are available in the v0.4 Alphamoon Workspace REST API (BETA).

To use the following endpoints, a user needs to get the process_id from one of the following sources:

  • endpoint

  • Create process endpoint

  • URL e.g. https://workspace.alphamoon.ai/queue/2080d36bf94c4147b2e543104342fc2f

Create a process API key

The following endpoint enables you to create a new process API key:

POST /api/v0.4/processes/{process-id}/api-keys

Parameters

Name
Type
Description

process_id*

string

ID of the process for which you want to create a new API key

Request body example:

{
  "name": "TEST API key",
  "exp": "2024-07-17T07:54:02.687Z",
  "scopes": [
    "workspace.collection:create"
  ]
}

Make sure you:

  • Enter the name of your API key,

  • Set the API key expiration date (we recommend changing the API key every 3 to 6 months),

{
  "id": "688874d9d9064c23bf78bf3ec93cbd2d",
  "name": "TEST API key",
  "orgId": "USER:google-oauth2|123456789123456789123",
  "scopes": [
    "workspace.collection:create"
  ],
  "status": "Active",
  "createdAt": "2024-05-17T07:54:17Z",
  "exp": "2024-07-17T07:54:02Z",
  "key": "your_api_key_here",
  "processId": "93580f176efb48cda64f25cba74d8ca4"
}
{
  "action": "The client should not repeat this request without modification.",
  "detail": "Please see the 'errors' field for details.",
  "errors": [
    {
      "location": "body: priority",
      "message": "field required",
      "type": "request_validation_error"
    }
  ],
  "instance": "30e18f59-7c88-4e25-9bed-61863b2abf4b",
  "status": 400,
  "timestamp": "2021-11-09T17:43:36Z",
  "title": "The server cannot process the request due to a client error.",
  "type": "RequestValidationError"
}

See the example:

curl -X 'POST' \
  'https://workspace.alphamoon.ai/api/v0.4/processes/93580f176efb48cda64f25cba74d8ca4/api-keys' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "TEST API key",
  "exp": "2024-07-17T07:54:02.687Z",
  "scopes": [
    "workspace.collection:create"
  ]
}'
{
  "id": "688874d9d9064c23bf78bf3ec93cbd2d",
  "name": "TEST API key",
  "orgId": "USER:google-oauth2|123456789123456789123",
  "scopes": [
    "workspace.collection:create"
  ],
  "status": "Active",
  "createdAt": "2024-05-17T07:54:17Z",
  "exp": "2024-07-17T07:54:02Z",
  "key": "your_api_key_here",
  "processId": "93588f176efb48cda64f25cba74d8ca4"
}

List the process API keys

Use the endpoint below to get the list of the process API keys:

GET /api/v0.4/processes/{process-id}/api-keys

Parameters

Name
Type
Description

process_id*

string

ID of the process for which you want to list your API keys

offset

query

The number of elements to skip

limit

query

The maximum number of elements to return at once

{
  "apiKeys": [
    {
      "id": "688874d9d9064c23bf78bf3ec93cbd2d",
      "name": "TEST API key",
      "orgId": "USER:google-oauth2|123456789123456789123",
      "scopes": [
        "workspace.collection:create"
      ],
      "status": "Active",
      "createdAt": "2024-05-17T07:54:17Z",
      "exp": "2024-07-17T07:54:02Z"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 100,
    "total": 1
  },
  "processId": "93580f176efb48cda64f25cba74d8ca4"
}
{
  "action": "The client should not repeat this request without modification.",
  "detail": "Please see the 'errors' field for details.",
  "errors": [
    {
      "location": "body: priority",
      "message": "field required",
      "type": "request_validation_error"
    }
  ],
  "instance": "30e18f59-7c88-4e25-9bed-61863b2abf4b",
  "status": 400,
  "timestamp": "2021-11-09T17:43:36Z",
  "title": "The server cannot process the request due to a client error.",
  "type": "RequestValidationError"
}

See the example:

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.4/processes/93580f176efb48cda64f25cba74d8ca4/api-keys?offset=0&limit=100' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'
{
  "apiKeys": [
    {
      "id": "688874d9d9064c23bf78bf3ec93cbd2d",
      "name": "TEST API key",
      "orgId": "USER:google-oauth2|123456789123456789123",
      "scopes": [
        "workspace.collection:create"
      ],
      "status": "Active",
      "createdAt": "2024-05-17T07:54:17Z",
      "exp": "2024-07-17T07:54:02Z"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 100,
    "total": 1
  },
  "processId": "93580b176efb48cda64f25cba74d8ca4"
}

Process API scopes

Collections & images

The following API scopes allow users to manage collections of files in Alphamoon, including uploading, organizing, deleting, and updating existing collections.

Scope
Description

"workspace.collection:create"

Grants access to create new collections of files in the process.

"workspace.collection:read"

Lists collections in the process and display collections.

"workspace.collection:update"

Grants access to update collections of files.

"workspace.collection:delete"

Grants access to delete collections of files in the process.

"workspace.collection_editor:override"

Grants access to make changes to existing collections in the given process.

Files & documents

The API scopes below provide access to file management features. These scopes allow users to upload new files to the platform as well as download them from Alphamoon to users device.

Scope
Description

"workspace.file:upload"

Grants access to upload files to the given process.

"workspace.file:download"

Grants access to download files uploaded to the process to the user's device.

Results

Results API scopes enable access to the processed extraction results of uploaded documents. Users can retrieve, review, update, and delete the results, as well as create new ones when necessary.

Scope
Description

"workspace.result:read"

Grants access to read the extraction result.

"workspace.result:update"

Grants access to edit the extraction result (e.g. adding or deleting extractions).

Processes

Processes API scopes encompass the coordination and oversight of document processing workflows, enabling users to view, update, and delete processes, as well as manage them.

Scope
Description

"workspace.process:read"

"workspace.process:update"

Grants access to edit the process and its configuration.

"workspace.process:delete"

Grants access to delete the given process.

"workspace.process.api_key:manage"

Grants access to create process API keys.

Destinations

Destinations API scopes enable the configuration and management of data destinations. Users can specify where results are sent, ensuring they reach the appropriate systems or storage locations.

Scope
Description

"workspace.destination:create"

Grants access to configure data destinations in the process.

"workspace.destination:read"

Grants access to view the data destinations in the process.

"workspace.destination:delete"

Grants access to delete the data destinations in the process.

Exports

Exports API scopes provide functionality for exporting processed data, including options for defining export formats, and deleting existing exports if necessary.

Scope
Description

"workspace.export:create"

Grants access to create new exports in the process.

"workspace.export:delete"

Grants access to delete created exports in the process.

Users administration

Users Administration API scopes allow Admins to create, modify, and control user access to ensure secure and efficient work with Alphamoon.

Scope
Description

"workspace.admin.user:read"

Grants access to view user's details.

"workspace.admin.user:invite"

Grants access to inviting new users to Alphamoon.

"workspace.admin.user:manage"

Grants access to manage Alphamoon users.

See next:

Enter the .

Grants access to view the given process (e.g. enter the , ).

Get process
es
process API scopes
Queue
Supervision