Skip to main content
POST
/
subscriptions
/
{platformType}
Create subscriptions (bulk)
curl --request POST \
  --url https://{host}/subscriptions/{platformType} \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "subscriptionName": "My Weekly Cloud Feed",
    "description": "Finance BU, prod apps; weekly",
    "owner": "",
    "active": "true",
    "webhook": {
      "uri": "https://hooks.example/teams",
      "authType": "basic",
      "authValue": "user:pass"
    },
    "tagReferences": [
      {
        "tagID": "business_unit",
        "operator": "equals",
        "values": [
          "Finance"
        ]
      }
    ],
    "propertyReferences": [
      {
        "propertyID": "serviceType",
        "operator": "equals",
        "values": [
          "Virtual Machine"
        ]
      }
    ],
    "suppressionReferences": [
      {
        "suppressionID": "no-m3",
        "operator": "like",
        "values": [
          "m3*"
        ],
        "revokeBy": "1735689600000"
      }
    ],
    "returnStructure": {
      "showAliases": true,
      "fields": [
        "name",
        "region",
        "currentType",
        "recommendedType",
        "savingsEstimate",
        "rptHref"
      ]
    },
    "schedule": {
      "frequency": "WEEKLY",
      "at": "08:30"
    }
  }
]
'
import requests

url = "https://{host}/subscriptions/{platformType}"

payload = [
{
"subscriptionName": "My Weekly Cloud Feed",
"description": "Finance BU, prod apps; weekly",
"owner": "",
"active": "true",
"webhook": {
"uri": "https://hooks.example/teams",
"authType": "basic",
"authValue": "user:pass"
},
"tagReferences": [
{
"tagID": "business_unit",
"operator": "equals",
"values": ["Finance"]
}
],
"propertyReferences": [
{
"propertyID": "serviceType",
"operator": "equals",
"values": ["Virtual Machine"]
}
],
"suppressionReferences": [
{
"suppressionID": "no-m3",
"operator": "like",
"values": ["m3*"],
"revokeBy": "1735689600000"
}
],
"returnStructure": {
"showAliases": True,
"fields": ["name", "region", "currentType", "recommendedType", "savingsEstimate", "rptHref"]
},
"schedule": {
"frequency": "WEEKLY",
"at": "08:30"
}
}
]
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
subscriptionName: 'My Weekly Cloud Feed',
description: 'Finance BU, prod apps; weekly',
owner: '',
active: 'true',
webhook: {uri: 'https://hooks.example/teams', authType: 'basic', authValue: 'user:pass'},
tagReferences: [{tagID: 'business_unit', operator: 'equals', values: ['Finance']}],
propertyReferences: [{propertyID: 'serviceType', operator: 'equals', values: ['Virtual Machine']}],
suppressionReferences: [
{
suppressionID: 'no-m3',
operator: 'like',
values: ['m3*'],
revokeBy: '1735689600000'
}
],
returnStructure: {
showAliases: true,
fields: [
'name',
'region',
'currentType',
'recommendedType',
'savingsEstimate',
'rptHref'
]
},
schedule: {frequency: 'WEEKLY', at: '08:30'}
}
])
};

fetch('https://{host}/subscriptions/{platformType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/subscriptions/{platformType}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'subscriptionName' => 'My Weekly Cloud Feed',
'description' => 'Finance BU, prod apps; weekly',
'owner' => '',
'active' => 'true',
'webhook' => [
'uri' => 'https://hooks.example/teams',
'authType' => 'basic',
'authValue' => 'user:pass'
],
'tagReferences' => [
[
'tagID' => 'business_unit',
'operator' => 'equals',
'values' => [
'Finance'
]
]
],
'propertyReferences' => [
[
'propertyID' => 'serviceType',
'operator' => 'equals',
'values' => [
'Virtual Machine'
]
]
],
'suppressionReferences' => [
[
'suppressionID' => 'no-m3',
'operator' => 'like',
'values' => [
'm3*'
],
'revokeBy' => '1735689600000'
]
],
'returnStructure' => [
'showAliases' => true,
'fields' => [
'name',
'region',
'currentType',
'recommendedType',
'savingsEstimate',
'rptHref'
]
],
'schedule' => [
'frequency' => 'WEEKLY',
'at' => '08:30'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{host}/subscriptions/{platformType}"

payload := strings.NewReader("[\n {\n \"subscriptionName\": \"My Weekly Cloud Feed\",\n \"description\": \"Finance BU, prod apps; weekly\",\n \"owner\": \"\",\n \"active\": \"true\",\n \"webhook\": {\n \"uri\": \"https://hooks.example/teams\",\n \"authType\": \"basic\",\n \"authValue\": \"user:pass\"\n },\n \"tagReferences\": [\n {\n \"tagID\": \"business_unit\",\n \"operator\": \"equals\",\n \"values\": [\n \"Finance\"\n ]\n }\n ],\n \"propertyReferences\": [\n {\n \"propertyID\": \"serviceType\",\n \"operator\": \"equals\",\n \"values\": [\n \"Virtual Machine\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"no-m3\",\n \"operator\": \"like\",\n \"values\": [\n \"m3*\"\n ],\n \"revokeBy\": \"1735689600000\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": true,\n \"fields\": [\n \"name\",\n \"region\",\n \"currentType\",\n \"recommendedType\",\n \"savingsEstimate\",\n \"rptHref\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"WEEKLY\",\n \"at\": \"08:30\"\n }\n }\n]")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{host}/subscriptions/{platformType}")
.header("Content-Type", "application/json")
.body("[\n {\n \"subscriptionName\": \"My Weekly Cloud Feed\",\n \"description\": \"Finance BU, prod apps; weekly\",\n \"owner\": \"\",\n \"active\": \"true\",\n \"webhook\": {\n \"uri\": \"https://hooks.example/teams\",\n \"authType\": \"basic\",\n \"authValue\": \"user:pass\"\n },\n \"tagReferences\": [\n {\n \"tagID\": \"business_unit\",\n \"operator\": \"equals\",\n \"values\": [\n \"Finance\"\n ]\n }\n ],\n \"propertyReferences\": [\n {\n \"propertyID\": \"serviceType\",\n \"operator\": \"equals\",\n \"values\": [\n \"Virtual Machine\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"no-m3\",\n \"operator\": \"like\",\n \"values\": [\n \"m3*\"\n ],\n \"revokeBy\": \"1735689600000\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": true,\n \"fields\": [\n \"name\",\n \"region\",\n \"currentType\",\n \"recommendedType\",\n \"savingsEstimate\",\n \"rptHref\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"WEEKLY\",\n \"at\": \"08:30\"\n }\n }\n]")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/subscriptions/{platformType}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"subscriptionName\": \"My Weekly Cloud Feed\",\n \"description\": \"Finance BU, prod apps; weekly\",\n \"owner\": \"\",\n \"active\": \"true\",\n \"webhook\": {\n \"uri\": \"https://hooks.example/teams\",\n \"authType\": \"basic\",\n \"authValue\": \"user:pass\"\n },\n \"tagReferences\": [\n {\n \"tagID\": \"business_unit\",\n \"operator\": \"equals\",\n \"values\": [\n \"Finance\"\n ]\n }\n ],\n \"propertyReferences\": [\n {\n \"propertyID\": \"serviceType\",\n \"operator\": \"equals\",\n \"values\": [\n \"Virtual Machine\"\n ]\n }\n ],\n \"suppressionReferences\": [\n {\n \"suppressionID\": \"no-m3\",\n \"operator\": \"like\",\n \"values\": [\n \"m3*\"\n ],\n \"revokeBy\": \"1735689600000\"\n }\n ],\n \"returnStructure\": {\n \"showAliases\": true,\n \"fields\": [\n \"name\",\n \"region\",\n \"currentType\",\n \"recommendedType\",\n \"savingsEstimate\",\n \"rptHref\"\n ]\n },\n \"schedule\": {\n \"frequency\": \"WEEKLY\",\n \"at\": \"08:30\"\n }\n }\n]"

response = http.request(request)
puts response.read_body
[
  {
    "subscriptionRef": "<string>",
    "subscriptionName": "<string>",
    "description": "<string>",
    "owner": "<string>",
    "outputType": "<string>",
    "webhook": {
      "uri": "<string>",
      "authType": "<string>",
      "authValue": "<string>"
    },
    "propertyReferences": [
      {
        "propertyID": "<string>",
        "operator": "<string>",
        "values": [
          "<string>"
        ]
      }
    ],
    "tagReferences": [
      {
        "tagID": "<string>",
        "operator": "<string>",
        "values": [
          "<string>"
        ]
      }
    ],
    "suppressionReferences": [
      {
        "suppressionID": "<string>",
        "operator": "<string>",
        "values": [
          "<string>"
        ],
        "revokeBy": "<string>"
      }
    ],
    "returnStructure": {
      "showAliases": false,
      "fields": [
        "<string>"
      ]
    },
    "schedule": {
      "frequency": "<string>",
      "at": "<string>"
    },
    "webhookStatus": "<string>",
    "lastTriggered": "<string>",
    "message": "<string>",
    "status": 123
  }
]

Path Parameters

platformType
enum<string>
required

Technology platform (cloud or containers).

Available options:
cloud,
containers

Body

application/json
Minimum array length: 1
subscriptionName
string

Unique per platform if global; unique per owner if private.

owner
string

"" for global (admin only) or username for private; non-admins default to their username.

description
string
outputType
enum<string>
default:application/json

Only supported output type.

Available options:
application/json
active
enum<string>
default:false

true=active; false=dormant (no scheduled posts; on-demand still available).

Available options:
true,
false
webhook
object

Webhook destination for delivering subscription notifications.

propertyReferences
object[]
tagReferences
object[]
suppressionReferences
object[]
returnStructure
object
schedule
object

If omitted, notifications typically trigger nightly after analysis/reporting.

Response

Created (batch result)

subscriptionRef
string
required

Unique ID assigned to the subscription.

subscriptionName
string
required
description
string
owner
string

Empty for global; username for private.

outputType
string
active
enum<string>
Available options:
true,
false
webhook
object

Webhook destination for delivering subscription notifications.

propertyReferences
object[]
tagReferences
object[]
suppressionReferences
object[]
returnStructure
object
schedule
object

If omitted, notifications typically trigger nightly after analysis/reporting.

webhookStatus
string

Success | Failure of last push to webhook (with timestamp).

lastTriggered
string

On-Demand Success/Failure or Scheduled Success/Failure with timestamp.

message
string

Error/status message (on error).

status
integer

HTTP-like status code (200, 204, 400, 401, 404, 415, 500).