Skip to main content

Access the REST API

Turn on the REST API, generate an API key for the user the integration runs as, and make your first authenticated request.

Prerequisites​

  • Requires the API module in your iGrafx license. In Admin → License, License Management lists it as API under Platform Modules.
  • To change the REST API settings, you need the Access Support Features and Edit Server Settings server permissions.
  • To generate an API key, you need the Manage Users and Groups server permission.
  • The caller, the user whose credentials the integration uses, needs the Access REST API server permission and a license for what each endpoint does. Create a dedicated API user whose permissions and licenses match only what the integration needs.
  • To open the API documentation, a user needs the Access Support Features server permission.

Steps​

  1. Go to Admin → Support → REST API.

    The REST API page under Admin, Support, with the API documentation link and the Allow access via API Key toggle

  2. Turn on Allow access via API Key. On-premises, turn on Enable API first.

  3. Generate an API key for the integration's user:

    1. Go to Admin → User Management, and click Edit on the user.
    2. Under API Keys, click Generate API Key, then copy the key. The key is displayed only once.

    The API Keys section of a user's edit page, with the Generate API Key button

    Treat the key like a password. It grants everything that user can do.

  4. Send the key in the X-AUTH-APIKEY header on each request:

    curl -H "X-AUTH-APIKEY: YOUR_KEY_HERE" https://your-igrafx-host/api/info/version

Verify​

A call to GET /api/info/version returns the platform version. The response confirms that the API is on, your authentication works, and that user can reach the API.

Troubleshooting​

If a call fails, check the response status:

  • 401 or 403: authentication failed. Check that the API key is valid and not deleted, and that it's sent in the X-AUTH-APIKEY header, spelled exactly.
  • 400: the request was rejected. Check the request body for valid JSON, including the quote escaping. Where the call takes a query, check it for valid iGrafx Query Language (IQL).

A successful call returns 200 with a JSON body.

A test call in the API documentation returns 401​

The iGrafx Platform API Documentation link opens the API documentation at /apidoc/index.html. The address /apidoc/jsondoc-ui.html redirects there.

A test call from the API documentation uses the credentials you enter in its Available authorizations dialog. When a test call returns 401, authorize with an API key:

  1. In the Available authorizations dialog, select the API key tab.
  2. Paste the key into Value, and click Authorize.

The Basic tab takes your username and the password stored for your account in the iGrafx Platform database. An account that signs in through single sign-on (SSOSSO An authentication scheme that lets users sign in once with an identity provider and access Process360 Live without re-entering credentials.), or that comes from Active Directory, LDAP, or SCIM, has no platform password. For such an account, use the API key tab.