Use ThingWorx with InfluxDB Cloud

InfluxDB Cloud is a built-in component of ThingWorx on PTC Cloud in Azure. Therefore, PTC recommends using ThingWorx on PTC Cloud. Alternatively, use this guide to configure self-managed ThingWorx to use InfluxDB Cloud as a persistence provider.

To use InfluxDB Cloud as a persistence provider in ThingWorx

  1. Set up an InfluxDB Cloud account compatible with ThingWorx
  2. Set up PTC ThingWorx
  3. Use the InfluxDB 1.x compatibility API on InfluxDB Cloud

Set up an InfluxDB Cloud account compatible with ThingWorx

  1. Sign up for a Cloud account, and do the following when signing up:

    • Select an AWS or Google region to store your data. To deploy on Azure region, see use PTC Cloud.
    • Select a Usage-based plan by entering credit card information.
  2. Create a bucket with an infinite retention period (select Never for when to Delete Data), and then copy the new bucket ID and save for step 4.

    Tip: We recommend naming your bucket “thingworx”. In ThingWorx, this bucket name becomes the database name selected for the InfluxDB persistence provider configuration.

  3. Create an All-Access token in InfluxDB Cloud, and save the token string for step 4. To access this string in the UI, double-clicking the new token name, and copy the string at the top of the dialog.

  4. Create a DBRP mapping for your bucket by sending an HTTP POST request to the /api/v2/dbrps/ InfluxDB API endpoint.

    curl --request POST "${influxdb-cloud-url}/api/v2/dbrps" \
    --header 'Content-Type: application/json' \
    --header "Authorization: Token ${INFLUX_API_TOKEN}" \
    --data-raw "{
        \"bucketID\": \"${INFLUX_BUCKET_ID}\",
        \"orgID\": \"${INFLUX_ORG_ID}\",
        \"database\": \"${INFLUX_BUCKET}\",
        \"retention_policy\": \"${INFLUX_RETENTION_PERIOD}\",
        \"default\": true

    Replace the following:

  5. (Optional) We recommend creating a new Read/Write token with read/write access to the bucket that you set up in step 2. A read/write token is useful for non-admin users to access configuration settings in ThingWorx. Copy and save the new token string to set up PTC ThingWorx. (To do this, double-click the token in the UI, and copy the string at the top of the dialog.)

Set up PTC ThingWorx

  1. If you haven’t already, start at step 4 in Using InfluxDB as the Persistence Provider. (Steps 1-3 are covered in Set up an InfluxDB Cloud account compatible with ThingWorx.)

  2. For the persistence provider configuration settings, enter the following values:

    • Connection URL: Your InfluxDB Cloud region URL
    • Database Schema: Database name in the DBRP mapping set up in step 4 above.
    • Username: Login email address for your InfluxDB Cloud account.
    • Password: Token string–either All-Access created in step 3 or Read/Write created in step 5.

ThingWorx API requests

ThingWorx uses the InfluxDB 1.x compatibility API to access the InfluxDB v2 API on InfluxDB Cloud. ThingWorx includes the InfluxDB persistence provider configuration settings that you set up for PTC ThingWorx in your API requests.

Deleting data: The InfluxDB v1 API in InfluxDB Cloud supports a subset of delete operations, namely DROP MEASUREMENT and DELETE statements. In some edge cases, deletes take longer to appear in query results from InfluxDB Cloud (than InfluxDB open source). To delete specific fields, delete data from ThingWorx directly in InfluxDB Cloud using the InfluxDB v2 API.

Was this page helpful?

Thank you for your feedback!

Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Learn more
Contact InfluxData Sales

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following:

State of the InfluxDB Cloud Serverless documentation

InfluxDB Cloud Serverless documentation is a work in progress.

The new documentation for InfluxDB Cloud Serverless is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.

InfluxDB Cloud powered by TSM