1. Help Center Home
  2. API
  3. Project Playbooks
  4. API Playbook: DM2/PDI Notifications

API Playbook: DM2/PDI Notifications

Overview

Customers on our new CIMcloud platform (cimstaging/mycimstaging URLs) will need to notify DM2/PDI of a new method to send Notification payloads to their CIMcloud websites.

This method uses the new CIMcloud API Framework to GET/POST data.  Our API Framework Technical Overview article covers this in extensive detail; however, we will cover only the portions relevant to DM2 Notifications in this article.

Note: {sitename} should be replaced with your site’s name for all requests in this article.  This is the value used in tasks and precedes your main cimstaging and mycimstaging URLs

Notable Changes (versus the previous method)

  • The URL format of HTTP Requests have changed
    • New Format
      • https://api.cimcloud.com/{sitename}
    • Old Format
      • https://{push_server}.webstorepackage.com/data_push_v14.asp?ws_id={ws_id}&iea_key={iea_key}
  • An Authentication token of type bearer is required to send (POST) or GET data via the new CIMcloud API Framework
  • The body of all requests must be in a JSON format

Please see our API Framework Technical Overview article for an extensive list of limitations and details.

Sending Notification Payloads

Generate an Authentication Token

  1. Head to {sitename}.mycimstaging.com/api_app_authorizations_man.asp
  2. Click on the “DM2 Notifications” authorization
  3. Find your authentication credentials
    1. Follow the steps under “New CIMCloud platform (worker portal)” in the link above
  4. Generate an authentication token
    1. This will generate a bearer token to allow requests to the notifications URL
    2. This must be passed for any GET or POST requests

Call the Notifications Endpoint

  1. Using the POST Requests section as a reference, call the notifications endpoint
    1. Endpoint is: https://api.cimcloud.com/{sitename}/notifications/
    2. Don’t forget to include your Bearer Token as a header in your request
  2. Example Body
{
"ref_id": "TEST-API-NOTIFICATIONS",
"status": true,
"nm": "WSP100",
"ds": "<a href='#' target='_blank'>Click to view as a PDF</a>",
"pdf_url": "#",
"create_date": "2024-01-01T12:00:00.000",
"type": "TEST",
"a_id": "A3D5BD98716245EB8C86E3EBE92CF7F6",
"opt1": null,
"opt2": null,
"opt3": null,
"opt4": null,
"opt5": null,
"date": "2024-01-01T12:00:00.000"
}

What to send to DM2/PDI

  • New formatted URL
    • https://api.cimcloud.com/{sitename}
  • Authentication Payload
    • AuthKey
    • AuthUserName
    • AuthPassword

Other Notables

  • You can see if your site has the new API Framework installed hitting the URL below (replacing {sitename} with your site name)
    • https://api.cimcloud.com/{sitename}/healthcheck/canary
  • By default:
    • You can POST to all fields in the notifications table
    • There is no IP check (the authentication token replaces this)
  • CIMCloud has no method to recover your App Authorization Password (AuthPassword) value
    • This value is hashed once the page is submitted, so this must be stored locally.  DM2 will need to change the value on their end if the value is updated
  • Download Example Postman Collection Notifications Template Here

 

Was this article helpful

Related Articles

Subscribe to receive email updates of what's new in the CIMcloud Help Center.