Back

Ignition API Essential Guide

Aug 14, 20246 minute read

What type of API does Ignition provide?

Ignition primarily supports HTTP-based APIs, which allows for RESTful API calls. It can also work with SOAP APIs through third-party libraries. There is no explicit mention of native support for newer API types like GraphQL or gRPC in the provided search results.

The choice of API type to use with Ignition would typically depend on the requirements of the specific project and the APIs supported by the systems Ignition needs to interact with.

Does the Ignition API have webhooks?

Based on the search results provided, it does not appear that the official Ignition API has built-in webhook functionality. However, there are some key points to consider:

  1. While Ignition does not have native webhook support, it is possible to implement webhook-like functionality using scripts and HTTP requests.

  2. Developers have created custom solutions to send data from Ignition to external services using webhooks:

    • One approach is to use Gateway Tag Change Scripts to trigger HTTP POST requests when tag values change.

    • Another method involves using notification pipelines and script blocks to send alarm event notifications to services like Slack via webhooks.

  3. The implementation typically involves:

    • Setting up a webhook URL in the external service (e.g. Slack)
    • Creating a script in Ignition that constructs the payload and sends an HTTP POST request to the webhook URL when certain events occur.
  4. While not native webhooks, these custom implementations allow you to send data from Ignition to external services based on events like:

    • Tag value changes
    • Alarm events
    • Custom triggers defined in scripts
  5. The exact events you can "subscribe" to depend on how you implement the custom webhook-like functionality. Common use cases include:

    • Sending notifications when tag values change
    • Alerting external systems about alarm events
    • Triggering external workflows based on Ignition data or events
  6. It's worth noting that while these custom solutions can achieve webhook-like behavior, they are not the same as a built-in webhook API that external services could subscribe to directly.

In summary, while Ignition does not have official webhook support in its API, developers have found ways to implement similar functionality using scripts and HTTP requests. The events you can react to depend on how you structure your custom implementation.

Rate Limits and other limitations

Based on the search results provided, I could not find any specific information about the API rate limits for the Ignition API. The search results mainly contain general information about Ignition's platform, modules, and documentation, but do not mention any rate limiting details for their API.

However, I can provide some general information about API rate limits and best practices:

Key Points to Consider

  1. API rate limits are typically implemented to ensure fair usage and prevent abuse of the API.

  2. Rate limits can be based on various factors such as:

    • Requests per second
    • Requests per minute
    • Requests per hour
    • Requests per day
  3. Different endpoints within an API may have different rate limits.

  4. Rate limits are often tied to API keys or user accounts.

Best Practices

  1. Check the official Ignition API documentation for specific rate limit information.

  2. Contact Ignition's support or sales team if you need clarification on their API rate limits.

  3. Implement proper error handling in your code to deal with potential rate limit errors.

  4. Consider implementing a backoff strategy if you encounter rate limit errors.

  5. If you require higher rate limits for your application, reach out to Ignition to discuss your needs.

General API Rate Limit Handling

While not specific to Ignition, here are some general practices for handling API rate limits:

  1. Look for rate limit information in API responses. Many APIs include headers like:

    X-RateLimit-Limit: 1000
    X-RateLimit-Remaining: 998
    
  2. If you encounter a rate limit error, it's typically returned with an HTTP status code of 429 (Too Many Requests).

  3. Implement proper error handling to catch and respond to rate limit errors in your application.

Since the search results don't provide specific information about Ignition API rate limits, I recommend contacting Ignition directly or consulting their official API documentation for accurate and up-to-date information on their rate limiting policies.

Latest API Version

Based on the search results provided, I can answer your question about the most recent version of the Ignition API:

The most recent version of the Ignition API package is 8.1.42, released on June 24, 2024 [3].

Key points to consider:

  1. This version is available as a Python package that can be installed using pip [3].

  2. It requires Python 2.7.18 [3].

  3. The package allows developers to get code completion for Ignition Scripting API functions in their IDE of choice [3].

  4. It can be installed using the command: python2 -m pip install ignition-api [3].

While this is the most recent version of the API package, it's important to note that Ignition itself may have more recent versions. The search results don't provide information about the latest Ignition platform version, only about the API package.

Best practices:

  1. Always check the official Inductive Automation website for the most up-to-date information on Ignition versions and compatibility.

  2. When using the API package, ensure your Python environment is compatible (Python 2.7.18).

  3. Keep your Ignition installation and API package updated to benefit from the latest features and bug fixes.

How to get a Ignition developer account and API Keys?

To get a developer account for Ignition to create an API integration, here are the key steps:

  1. Sign up for an Ignition account:

    • Go to the Inductive Automation website (inductiveautomation.com)
    • Create an account or log in if you already have one
  2. Download the Ignition Module SDK:

    • The Module SDK is available in the downloads section of the Inductive Automation website
    • This provides the tools and APIs needed for module development
  3. Set up your development environment:

    • Install Java and an IDE like Eclipse
    • Familiarize yourself with the Module SDK contents and sample projects
  4. Request API access:

    • Contact Inductive Automation support to request API access for your account
    • You may need to provide details on your intended integration
  5. Get your API credentials:

    • Once approved, you'll receive an API key to authenticate your requests
    • Store this securely as it will be needed to make API calls
  6. Review the API documentation:

    • Study the REST API documentation provided by Inductive Automation
    • This covers authentication, available endpoints, request/response formats, etc.
  7. Start developing your integration:

    • Use the Module SDK and API docs to build your integration
    • Test thoroughly in a development environment before deploying

What can you do with the Ignition API?

Based on the search results provided, here's a list of data models that can be interacted with using the Ignition API, along with what is possible for each:

  1. Tag Data Model:

    • Select tag data for sending to cloud services (AWS, Google Cloud Platform, Azure)
    • Publish tag change events as MQTT messages
    • Create and manage tags for various data points in the system
  2. Database Models:

    • Connect to and interact with SQL databases
    • Automatically generate and populate database tables with records received via MQTT
  3. Device Models:

    • Interact with PLCs and field devices
    • Communicate with edge-of-network devices via MQTT
  4. Alarm Models:

    • Create and manage alarms
    • Clear alarms through web services
  5. User-Defined Types (UDTs):

    • Create custom data models using UDTs
    • Publish models and instances referencing Ignition UDTs into IIoT data infrastructure
  6. Web Service Models:

    • Consume RESTful and SOAP web services
    • Create custom web services to provide data to other systems
    • Generate WSDL files for SOAP services
  7. Security Models:

    • Implement various security models (OAuth 2, API Key, HTTP, OpenID Connect)
  8. Visualization Models:

    • Create mobile-responsive industrial applications using HTML5
    • Build HMI interfaces
  9. Reporting Models:

    • Generate and manage reports
  10. Scheduling Models:

    • Edit production schedules through web services
  11. IIoT Data Models:

    • Create data pipelines for IIoT data
    • Implement MQTT/Sparkplug data models for industrial data management
  12. Business Logic Models:

    • Implement complex workflows using the Business Connector
    • Create custom-configured Web Services

These data models can be interacted with through various Ignition modules and features, allowing for comprehensive system integration, data acquisition, visualization, and control across industrial automation applications.