{"openapi":"3.1.0","info":{"title":"Billing","version":"2.3.1"},"servers":[{"url":"https://api.solace.cloud","description":"Solace PubSub+ Cloud US EAST Region"},{"url":"https://api.solacecloud.com.au","description":"Solace PubSub+ Cloud AU Region"},{"url":"https://api.solacecloud.eu","description":"Solace PubSub+ Cloud EU Region"},{"url":"https://api.solacecloud.sg","description":"Solace PubSub+ Cloud SG Region"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Usage"}],"paths":{"/api/v2/billing/usageSummary":{"get":{"tags":["Usage"],"summary":"Get the usage summary for your organization","description":"<blockquote class=\"callout callout_warn\"><p>This API endpoint has been deprecated. Please use <a href=https://api.solace.dev/cloud/reference/getusage>\"Get the usage summary for your organization\"</a> instead.</p></blockquote>\n<p>Get the usage summary between two points of time for the current organization.</p>\n<p>This API is available to customers subscribed to a <a href='https://docs.solace.com/Cloud/drawdown.htm'>drawdown billing</a> plan and reports usage for a single account (organization). If you have multiple accounts, you must run the API separately in each account. </p>\n\nThe time query results include the timestamp specified in '**startTime**' to the time before the specified '**endTime**'. For example, if you specify the '**startTime**' of ```2023-01-01T00:00:00Z``` and the '**endTime**' of ```2023-02-01T00:00:00Z```, the results include all of January 2023 and exclude any results from February.\n\nYour token must have one of the permissions listed in the Token Permissions.\n<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ <code>billing_usage_summary:get</code> ]","operationId":"getSummaryUsage","parameters":[{"name":"startTime","in":"query","description":"The timestamp of the start time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-01-01T00:00:00Z"}},{"name":"endTime","in":"query","description":"The timestamp of the end time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-02-01T00:00:00Z"}}],"responses":{"200":{"description":"OK.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SummaryUsageResponseEnvelope"}}}},"400":{"description":"Bad request.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"An authentication error occurred.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"You do not have permissions to perform this operation.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"404":{"description":"Not Found.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"deprecated":true}},"/api/v2/billing/usages":{"get":{"tags":["Usage"],"summary":"Get the usage summary for your organization","description":"<p>Get the usage summary between two points in time for the current organization.</p><p>This API is available to customers subscribed to a <a href='https://docs.solace.com/Cloud/drawdown.htm'>drawdown billing</a> plan and reports usage for a single account (organization). If you have multiple accounts, you must run the API separately in each account. </p>\n\nThe time query results include the timestamp specified in '**startTime**' to the time before the specified '**endTime**'. For example, if you specify the '**startTime**' of ```2023-01-01T00:00:00Z``` and the '**endTime**' of ```2023-02-01T00:00:00Z```, the results include all of January 2023 and exclude any results from February.\n\nYour token must have one of the permissions listed in the Token Permissions.\n<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ <code>billing_usage_summary:get</code> ]","operationId":"getUsage","parameters":[{"name":"pageSize","in":"query","description":"The number of product usage records to return on each page.","schema":{"type":"integer","default":100,"maximum":1000,"minimum":1}},{"name":"pageNumber","in":"query","description":"The page number to retrieve.","schema":{"type":"integer","default":1,"minimum":1}},{"name":"startTime","in":"query","description":"The timestamp of the start time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-01-01T00:00:00Z"}},{"name":"endTime","in":"query","description":"The timestamp of the end time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-02-01T00:00:00Z"}}],"responses":{"200":{"description":"OK.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsagesEnvelope"}}}},"400":{"description":"Bad request.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"An authentication error occurred.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"You do not have permissions to perform this operation.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"404":{"description":"Not Found.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/billing/usages/services":{"get":{"tags":["Usage"],"summary":"Get service usage for your organization","description":"<blockquote class=\"callout callout_warn\"><p>This API endpoint has been deprecated. Please use <a href=https://api.solace.dev/cloud/reference/getusageaggregates>\"Get usage aggregates for your organization\"</a> instead.</p></blockquote>\n<p>Get service usage for your organization between two points of time.</p>\n<p>This API is available to customers subscribed to a <a href='https://docs.solace.com/Cloud/drawdown.htm'>drawdown billing</a> plan and reports usage for a single account (organization). If you have multiple accounts, you must run the API separately in each account. </p>\n\nThe time query results include the timestamp specified in '**startTime**' to the time before the specified '**endTime**'. For example, if you specify the '**startTime**' of ```2023-01-01T00:00:00Z``` and the '**endTime**' of ```2023-02-01T00:00:00Z```, the results include all of January 2023 and exclude any results from February.\n\nYour token must have one of the permissions listed in the Token Permissions.\n<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ <code>billing_usage_summary:get</code> ]","operationId":"getServiceUsage","parameters":[{"name":"pageSize","in":"query","description":"The number of services with product usage records to get per page.","schema":{"type":"integer","default":100,"maximum":1000,"minimum":1}},{"name":"pageNumber","in":"query","description":"The page number to retrieve.","schema":{"type":"integer","default":1,"minimum":1}},{"name":"startTime","in":"query","description":"The timestamp of the start time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-01-01T00:00:00Z"}},{"name":"endTime","in":"query","description":"The timestamp of the end time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-02-01T00:00:00Z"}}],"responses":{"200":{"description":"OK.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ServiceUsageResponseEnvelope"}}}},"400":{"description":"Bad request.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"An authentication error occurred.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"You do not have permissions to perform this operation.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"404":{"description":"Not Found.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"deprecated":true}},"/api/v2/billing/usages/usageAggregates":{"get":{"tags":["Usage"],"summary":"Get usage aggregates for your organization","description":"<p>Get aggregate usage by service, environment, or environment type between two points in time for the current organization.</p><p>This API is available to customers subscribed to a <a href='https://docs.solace.com/Cloud/drawdown.htm'>drawdown billing</a> plan and reports usage for a single account (organization). If you have multiple accounts, you must run the API separately in each account. </p>\n\nThe time query results include the timestamp specified in '**startTime**' to the time before the specified '**endTime**'. For example, if you specify the '**startTime**' of ```2023-01-01T00:00:00Z``` and the '**endTime**' of ```2023-02-01T00:00:00Z```, the results include all of January 2023 and exclude any results from February.\n\nYour token must have one of the permissions listed in the Token Permissions.\n<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ <code>billing_usage_summary:get</code> ]","operationId":"getUsageAggregates","parameters":[{"name":"pageSize","in":"query","description":"The number of usage aggregates to return on each page.","schema":{"type":"integer","default":100,"maximum":1000,"minimum":1}},{"name":"pageNumber","in":"query","description":"The page number to retrieve.","schema":{"type":"integer","default":1,"minimum":1}},{"name":"aggregateBy","in":"query","description":"Which attribute to aggregate usage by. One of `service`, `environment`, `environmentType`.","required":true,"schema":{"type":"string","enum":["service","environment","environmentType"]}},{"name":"aggregateById","in":"query","description":"The ID of the resource of `aggregateBy` type (ex. `aggregateBy=service&aggregateById=abc` gets the usage for the broker service `abc`).","required":false,"schema":{"type":"string"}},{"name":"startTime","in":"query","description":"The timestamp of the start time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-01-01T00:00:00Z"}},{"name":"endTime","in":"query","description":"The timestamp of the end time of the query, in ISO 8601 date/time format.","required":true,"schema":{"type":"string","format":"date-time","example":"2023-02-01T00:00:00Z"}}],"responses":{"200":{"description":"OK.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageAggregationEnvelope"}}}},"400":{"description":"Bad request.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"An authentication error occurred.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"message":"You do not have permissions to perform this operation.","errorId":"618e2fb0-a198-4d9d-9219-13e51ef0ecec"}}}},"404":{"description":"Not Found.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"A user-friendly message that describes the error.","example":"An error occurred."},"errorId":{"type":"string","description":"The UUID (Universally Unique Identifier) that is logged with an appropriate stack trace for a WARN or ERROR log that allows support to better determine what cause the error.","example":"123e4567-e89b-12d3-a456-426655440000"},"meta":{"type":"object","additionalProperties":{"type":"object"},"description":"The metadata about the error. This provides additional information about the error that occurred.","example":"'object': { 'field': 'description' }"},"validationDetails":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"When applicable, these are the details of issues with the fields provided for the REST call.","example":"'name': ['Not unique']"}}},"NewProduct":{"type":"object","properties":{"type":{"type":"string","description":"The type of object for informational purposes.","readOnly":true},"productCode":{"type":"string","description":"The SKU for this product."},"displayName":{"type":"string","description":"The display name for this product."},"environmentType":{"type":"string","description":"The type of environment the usage was recorded in (`production`, `nonProduction`, or `account`)"},"totalHours":{"type":"number","format":"float","description":"The total number of hours the product has been running, to 6 decimal places","example":12.218889},"pcusPerYear":{"type":"integer","format":"int32","description":"The number of PubSub+ capacity units (PCUs) consumed by this product in one year."},"totalPcus":{"type":"number","format":"double","description":"The amount of PCUs that have been used for this product."}},"required":["displayName","environmentType","pcusPerYear","productCode","totalHours","totalPcus"]},"Product":{"type":"object","properties":{"productCode":{"type":"string","description":"The SKU for this product."},"displayName":{"type":"string","description":"The display name for this product."},"totalHours":{"type":"integer","format":"int32","description":"The total number of hours the product has been running."},"pcuRate":{"type":"integer","format":"int32","description":"The number of PubSub+ capacity units (PCUs) consumed by this product in one year."},"totalPcus":{"type":"number","format":"double","description":"The amount of PCUs which have been used for this product."}},"required":["displayName","productCode"]},"ServiceProduct":{"type":"object","properties":{"productCode":{"type":"string","description":"The SKU for this product."},"totalHours":{"type":"integer","format":"int32","description":"The total number of hours the product has been running."}},"required":["productCode"]},"ServiceUsage":{"type":"object","properties":{"serviceId":{"type":"string","description":"The identifier for the service."},"serviceName":{"type":"string","description":"The display name for the service."},"products":{"type":"array","description":"The products of the service.","items":{"$ref":"#/components/schemas/ServiceProduct"}}},"required":["serviceId","serviceName"]},"ServiceUsageResponse":{"type":"object","properties":{"type":{"type":"string","description":"The type of object for informational purposes.","readOnly":true},"orgId":{"type":"string","description":"The unique identifier for the account (organization)."},"startTime":{"type":"string","format":"date-time","description":"The start time for the query. The specified time is included in the query."},"endTime":{"type":"string","format":"date-time","description":"The end time for the query. The specified time is excluded from the query."},"services":{"type":"array","description":"The services of the organization.","items":{"$ref":"#/components/schemas/ServiceUsage"}}}},"ServiceUsageResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ServiceUsageResponse"},"meta":{"type":"object","additionalProperties":{"type":"object"},"description":"<p>The metadata about the response, which can include:</p><ul><li>Pagination data, such as page number, page size, etc. for GET operations that return large amount of response data. For more information, see <a href=\"./pagination\">Pagination</a>.</li><li>Timestamp information, such as current time, or the time create or update operation occurred for CREATE, PUT, POST operations.</li></ul>"},"included":{"type":"array","items":{"type":"object"}}}},"SummaryUsageResponseEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UsagesResponse"},"meta":{"type":"object","additionalProperties":{"type":"object"},"description":"<p>The metadata about the response, which can include:</p><ul><li>Pagination data, such as page number, page size, etc. for GET operations that return large amount of response data. For more information, see <a href=\"./pagination\">Pagination</a>.</li><li>Timestamp information, such as current time, or the time create or update operation occurred for CREATE, PUT, POST operations.</li></ul>"},"included":{"type":"array","items":{"type":"object"}}}},"UsageAggregationContainer":{"type":"object","properties":{"id":{"type":"string","description":"ID of the aggregation type."},"type":{"type":"string","description":"The type of aggregation (as passed in by aggregateBy)."},"attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Attributes for the given resource. Varies based on type (ex. name for service)."},"usages":{"type":"array","description":"The products of the organization.","items":{"$ref":"#/components/schemas/NewProduct"}}},"required":["id","type"]},"UsageAggregationEnvelope":{"type":"object","description":"Envelope for usage aggregation response data","example":"{\n    \"data\": [\n        {\n            \"id\": \"account\",\n            \"type\": \"environmentType\",\n            \"attributes\": {},\n            \"usages\": [\n                {\n                    \"productCode\": \"CM-CUSTOMER-PRIVATE-REGION-S\",\n                    \"displayName\": \"Customer Controlled Region\",\n                    \"environmentType\": \"account\",\n                    \"totalHours\": 1488.0,\n                    \"pcusPerYear\": 150,\n                    \"totalPcus\": 25.479453\n                }\n                {\n                    \"productCode\": \"CM-MESSAGE-SPOOL-EXPANSION-S\",\n                    \"displayName\": \"PS+ Message Spool Expansion 1K Units\",\n                    \"environmentType\": \"account\",\n                    \"totalHours\": 609.265556,\n                    \"pcusPerYear\": 16,\n                    \"totalPcus\": 1.112814\n                }\n            ]\n        },\n        {\n            \"id\": \"nonProduction\",\n            \"type\": \"environmentType\",\n            \"attributes\": {},\n            \"usages\": [\n                {\n                    \"productCode\": \"CM-PUBSUB+SERVICE-STD-100-SA-S\",\n                    \"displayName\": \"Standard 100 Standalone Service\",\n                    \"environmentType\": \"nonProduction\",\n                    \"totalHours\": 773.516389,\n                    \"pcusPerYear\": 20,\n                    \"totalPcus\": 1.76602\n                },\n                {\n                    \"productCode\": \"CM-PUBSUB+SERVICE-ENT-250-HA-S\",\n                    \"displayName\": \"Enterprise 250 HA Service\",\n                    \"environmentType\": \"nonProduction\",\n                    \"totalHours\": 125.161667,\n                    \"pcusPerYear\": 55,\n                    \"totalPcus\": 0.785833\n                }\n            ]\n        },\n        {\n            \"id\": \"production\",\n            \"type\": \"environmentType\",\n            \"attributes\": {},\n            \"usages\": [\n                {\n                    \"productCode\": \"CM-PUBSUB+SERVICE-ENT-250-HA-S\",\n                    \"displayName\": \"Enterprise 250 HA Service\",\n                    \"environmentType\": \"production\",\n                    \"totalHours\": 6329.193056,\n                    \"pcusPerYear\": 55,\n                    \"totalPcus\": 39.738085\n                },\n                {\n                    \"productCode\": \"CM-PUBSUB+MICRO-INTEGRATIONS-SINGLE-S\",\n                    \"displayName\": \"Micro-Integration - Single\",\n                    \"environmentType\": \"production\",\n                    \"totalHours\": 271.772778,\n                    \"pcusPerYear\": 10,\n                    \"totalPcus\": 0.310243\n                },\n                {\n                    \"productCode\": \"CM-PUBSUB+SERVICE-STD-100-SA-S\",\n                    \"displayName\": \"Standard 100 Standalone Service\",\n                    \"environmentType\": \"production\",\n                    \"totalHours\": 6359.108333,\n                    \"pcusPerYear\": 20,\n                    \"totalPcus\": 14.518513\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"pagination\": {\n            \"pageNumber\": 1,\n            \"pageSize\": 1000,\n            \"count\": 3,\n            \"nextPage\": null,\n            \"totalPages\": 1\n        }\n    }\n}","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageAggregationContainer"}},"meta":{"type":"object","additionalProperties":{"type":"object"},"description":"<p>The metadata about the response, which can include:</p><ul><li>Pagination data, such as page number, page size, etc. for GET operations that return large amount of response data. For more information, see <a href=\"./pagination\">Pagination</a>.</li><li>Timestamp information, such as current time, or the time create or update operation occurred for CREATE, PUT, POST operations.</li></ul>"},"included":{"type":"array","items":{"type":"object"}}}},"UsagesEnvelope":{"type":"object","description":"Envelope for summary usage response data","example":"{\n  \"data\": [\n    {\n      \"productCode\": \"CM-PUBSUB+SERVICE-STD-100-SA-S\",\n      \"environmentType\": \"nonProduction\",\n      \"displayName\": \"Standard 100 Standalone Service\",\n      \"pcusPerYear\": 20,\n      \"totalHours\": 50,\n      \"totalPcus\": 0.114155\n    },\n    {\n      \"productCode\": \"CM-PUBSUB+SERVICE-STD-100-HA-S\",\n      \"environmentType\": \"nonProduction\",\n      \"displayName\": \"Standard 100 HA Service\",\n      \"pcusPerYear\": 50,\n      \"totalHours\": 10,\n      \"totalPcus\": 0.057078\n    },\n    {\n      \"productCode\": \"CM-PUBSUB+SERVICE-STD-100-SA-S\",\n      \"environmentType\": \"production\",\n      \"displayName\": \"Standard 100 Standalone Service\",\n      \"pcusPerYear\": 20,\n      \"totalHours\": 20.000001,\n      \"totalPcus\": 0.045662\n    }\n  ],\n  \"meta\": {\n    \"stats\": {\n      \"nonProductionPcus\": 0.171233,\n      \"productionPcus\": 0.045662,\n      \"accountPcus\": 0\n    },\n    pagination: {\n        pageNumber: 1,\n        pageSize: 100,\n        count: 3,\n        nextPage: null,\n        totalPages: 1\n    }\n  }\n}","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NewProduct"}},"meta":{"type":"object","additionalProperties":{"type":"object"},"description":"<p>The metadata about the response, which can include:</p><ul><li>Pagination data, such as page number, page size, etc. for GET operations that return large amount of response data. For more information, see <a href=\"./pagination\">Pagination</a>.</li><li>Timestamp information, such as current time, or the time create or update operation occurred for CREATE, PUT, POST operations.</li></ul>"},"included":{"type":"array","items":{"type":"object"}}}},"UsagesResponse":{"type":"object","properties":{"type":{"type":"string","description":"The type of object for informational purposes.","readOnly":true},"organizationName":{"type":"string","description":"The name of the organization."},"orgId":{"type":"string","description":"The unique identifier for the account (organization)."},"startTime":{"type":"string","format":"date-time","description":"The start time for the query. The specified time is included in the query."},"endTime":{"type":"string","format":"date-time","description":"The end time for the query. The specified time is excluded from the query."},"products":{"type":"array","description":"The products of the organization.","items":{"$ref":"#/components/schemas/Product"}},"totalPcus":{"type":"number","format":"double"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}