Documentation

API Reference :: notificationprofiles

GET

Get notification profile information

  • customerid - optional string - customerid of the subaccount you want to get a notification profile list for.
  • id - optional string - Notification profile id of the notification profile you want to get. If absent, the call will return a list of notification profiles. Getting a specific notification profile belonging to a subaccount requires customerid to be set.

Request example:

curl -X GET 'https://api.nodeping.com/api/1/notificationprofiles'

Response example:

{
  "201205050153W2Q4C-P-3QJWG": {
    "type": "notificationprofile",
    "customer_id": "201205050153W2Q4C",
    "name": "Example Profile",
    "notifications": [
        {"Y59XV":
            {"schedule":"Days",
             "delay":2}
        },
        {"201205050153W2Q4C-G-KPMVA":
            {"schedule":"All",
             "delay":0}
        }
    ]
  }
}

POST and PUT

Create (POST) or update (PUT) a notification profile

  • customerid - optional string - customerid of the subaccount to which the notification profile belongs.
  • id - required string on update - the notification profile id you want to modify
  • name - required string used as a label for the notification profile.
  • notifications - required JSON string - array of objects containing the contact or group id, delay, and scheduling for notifications. The IDs can be obtained by listing the account contacts and groups. The format for the data is:
    [
      {"contactkey1":
        {"delay":0,
         "schedule":"schedule1"
        }
      },
      {"contactkey2":
        {"delay":5,
         "schedule":"schedule2"
        }
      }
    ]
    
    You must send the entire notification array on update.
curl -X POST -d'json={"notifications":[{"A4597":{"schedule":"All","delay":0}},{"Y59XV":{"schedule":"Days","delay":2}}],"name":"An Example Profile"}' 'https://api.nodeping.com/api/1/notificationprofiles'

Response example:

{
    "_id": "201205050153W2Q4C-P-1ZIYU",
    "type": "notification profile",
    "customer_id": "201205050153W2Q4C",
    "name": "An Example Profile",
    "notifications": [
        {"A4597":
            {"schedule":"All",
             "delay":0}
        },
        {"Y59XV":
            {"schedule":"Days",
             "delay":2}
        }
    ]
}

DELETE

Delete a notification profile

  • customerid - optional string - customerid of the subaccount to which the notification profile belongs. Not needed if the notification profile belongs to your primary account.
  • id - required string - Notification profile id of the notification profile you want to delete.

Request example:

curl -X DELETE 'https://api.nodeping.com/api/1/notificationprofiles/201205050153W2Q4C-P-1ZIYU'

Response example:

{"ok":true,"id":"201205050153W2Q4C-P-1ZIYU"}

If you have any questions, get in touch at support@nodeping.com, or use our Contact form.