LogoLogo
LoginGo to website
English
  • Plattform
  • API
English
  • Introduction
  • Authentication
  • Organization
  • Workspace
  • Solution
  • Dataset
Bereitgestellt von GitBook
Auf dieser Seite
  • Personal Access Keys
  • How do they work?
  • Authentication Process
  • Bearer Token Authentication

War das hilfreich?

Als PDF exportieren

Authentication

Here you can find information about the authentication process for the Polyteia API.

VorherigeIntroductionNächsteOrganization

Zuletzt aktualisiert vor 5 Tagen

War das hilfreich?

Personal Access Keys

Personal access keys are used to authenticate requests to the Polyteia API. For more information about personal access keys and how to create them, please refer to the section of the Polyteia documentation.

How do they work?

When you create a personal access key, it basically impersonates your account. When you use it to authenticate a request, the request will be made as if it was made by your account. Your personal access key is like your account's password. It has the same permissions as your account. If you have access to a resource, your personal access key will also have access to that resource.

Authentication Process

Bearer Token Authentication

All API requests must be authenticated using a Bearer token in the Authorization header.

Parameters

  • Authorization (required): The Bearer token in the format Bearer <your_access_token>

  • Content-Type (required): Must be set to application/json

Make sure to save your personal access key token in a secure location. Once you leave the page, you will not be able to see it again. If you lose it, you will need to create a new one. If someone gets access to your personal access key token, they will be able to impersonate your account and make requests to the API. So, please be careful and save it in a secure location. If you ever think that your personal access key token is compromised, you can delete it and create a new one.

Example

curl -X POST 'https://app.polyteia.com/api' \
    -header "Content-Type: application/json" \
    -header "Authorization: Bearer <your_access_token>" \ // your personal access key token
    --data '{
        "command": "create_dataset",
        "params": {
            "name": "Customers List",
            "solution_id": "sol_cv33u4n0i6q45p93i930",
            "description": "Customers list 4",
            "source": "https://example.com/dataset.csv",
            "slug": "customers_list"
        }
    }'

Response

  • 200 OK: Request was successful

  • 401 Unauthorized: Invalid or missing authentication token

  • 403 Forbidden: Token is valid but doesn't have required permissions

All API endpoints require authentication. Make sure to include the Authorization header in every request.

Personal Access Keys