Ana içeriğe atla

Overview

All Management API endpoints (except the test endpoint) require authentication using a Personal API Access Token. This token is used instead of username/password for API requests.

Obtaining a Token

There are two ways to obtain a Personal API Access Token:
  1. From Management Console (recommended for first-time setup)
  2. From Management API (for programmatic token creation)

Method 1: From Management Console

1

Log in to the Apinizer Management Console

Access the Management Console with your credentials.
2

Navigate to My Profile

Click on the Quick Menu (user icon) → My Profile.
3

Go to Personal API Access Tokens Section

Scroll to the Personal API Access Tokens section.
4

Create API Token

Click Create API Token.
5

Fill in Token Details

Token Name: A descriptive name for your tokenExpiration: Choose expiration type
  • Never Expires - Token never expires
  • Select from Calendar - Choose a specific expiration date
6

Create and Copy Token

Click Create and copy the token immediately - it will not be shown again.

Method 2: From Management API

Endpoint

Request

Headers

Request Body (URL Encoded)

Response

Success Response (200 OK)

Error Response (401 Unauthorized)

cURL Example

Full JSON Body Example

This endpoint uses application/x-www-form-urlencoded format, not JSON.

Using the Token

Include the token in the Authorization header of all API requests:

Example Request

Token Security

  • Never commit tokens to version control
  • Store tokens securely (use environment variables or secret management)
  • Rotate tokens regularly
  • Revoke unused tokens from the Management Console

Token Expiration

  • Tokens can be configured to never expire or expire at a specific date
  • Expired tokens will return 401 Unauthorized responses
  • Create a new token when your token expires

Revoking Tokens

Tokens can be revoked from the Management Console:
1

Navigate to My Profile

Go to My ProfilePersonal API Access Tokens.
2

Find the Token

Locate the token you want to revoke.
3

Revoke Token

Click Revoke. Once revoked, the token cannot be used for API requests.

Permissions

Tokens inherit the permissions of the user who created them. The Management API uses a project-based permission system with categories and actions. For detailed information about the permission system, see Overview Details - Permissions.

Permission Categories

  • API_MANAGEMENT: API Proxy, Policy, API Proxy Group, and Endpoint operations
  • SECRETS: Certificate, Key, Keystore, JWK, and Environment Variable operations
  • IDENTITY: Credential and RLCL operations
  • CONNECTIONS: Connection operations
  • GLOBAL_SETTINGS: IP Group operations

Permission Actions

  • MANAGE: Full management access (create, update, delete)
  • DEPLOY_UNDEPLOY: Deploy and undeploy operations
  • EXPORT_IMPORT: Export and import operations

Special Permissions

  • System Admin (sysAdmin): Required for certain administrative operations (reports, system-wide environment listing)
  • Project Admin: For some operations, having project admin role is sufficient instead of specific category permissions

Permission Matrix

The following table provides a comprehensive overview of permissions required for each endpoint:

Permission Control System

GET Methods

  • Permission Check: Uses hasAnyPermissionInProject
  • Note: Detailed permission control is currently a technical debt

POST/PUT/DELETE/PATCH Methods

  • Permission Check: Uses hasPermissionInProject(user, category, action, projectId)
  • Asset Category and Action Mapping:
    • CREATE/UPDATE/DELETE → MANAGE
    • DEPLOY/UNDEPLOY → DEPLOY_UNDEPLOY
    • EXPORT/IMPORT → EXPORT_IMPORT

Endpoint Permission Matrix

API Proxy Operations

API Proxy Group Operations

Policy Operations

Certificate Operations

Key Operations

Keystore Operations

JWK Operations

Environment Variable Operations

Connection Operations

Credential Operations

RLCL Operations

IP Group Operations

Environment Operations

Report Operations

Special Cases

Role-Based Controls

  • Geolocation Settings: Admin role required (role-based)
  • Reports: Admin or Analyzer role required (role-based)
  • Projects: Token only (no project-based permission check)
  • Test Endpoints: Healthcheck endpoint requires no authentication

Conditional Permission Checks

  • API Proxy Create/Update: If deployment is requested, additional DEPLOY_UNDEPLOY permission is required
  • Policy Operations: If deployment is requested, additional DEPLOY_UNDEPLOY permission is required
  • API Proxy Delete: Requires DEPLOY_UNDEPLOY permission for undeployment

Notes

  1. GET Methods: Detailed permission control is currently a technical debt. Currently uses hasAnyPermissionInProject (any permission in project).
  2. POST/PUT/DELETE/PATCH Methods: Uses hasPermissionInProject(user, category, action, projectId) for permission checks.
  3. Deployment Operations: Some operations (deploy, undeploy) require additional permission checks.
  4. Admin/Analyzer Roles: Some endpoints use role-based controls instead of category/action permissions.

Troubleshooting

401 Unauthorized

  • Verify the token is correct (no extra spaces)
  • Check if the token has expired
  • Ensure the token hasn’t been revoked
  • Verify the Authorization header format: Bearer {token}

Invalid Token Format

  • Ensure you’re using Bearer prefix (with space)
  • Check for typos in the token
  • Verify the token was copied completely

Next Steps