Chilkat Online Tools

Xojo / Salesforce Platform APIs / Limits

Back to Collection Items

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http
Dim success As Boolean

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://domain.com/services/data/v{{version}}/limits",sbResponseBody)
If (success = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

Dim jResp As New Chilkat.JsonObject
success = jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

System.DebugLog("Response Body:")
System.DebugLog(jResp.Emit())

Dim respStatusCode As Int32
respStatusCode = http.LastStatus
System.DebugLog("Response Status Code = " + Str(respStatusCode))
If (respStatusCode >= 400) Then
    System.DebugLog("Response Header:")
    System.DebugLog(http.LastHeader)
    System.DebugLog("Failed.")
    Return
End If

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "ActiveScratchOrgs": {
//     "Max": 3,
//     "Remaining": 3
//   },
//   "AnalyticsExternalDataSizeMB": {
//     "Max": 40960,
//     "Remaining": 40960
//   },
//   "ConcurrentAsyncGetReportInstances": {
//     "Max": 200,
//     "Remaining": 200
//   },
//   "ConcurrentEinsteinDataInsightsStoryCreation": {
//     "Max": 5,
//     "Remaining": 5
//   },
//   "ConcurrentEinsteinDiscoveryStoryCreation": {
//     "Max": 2,
//     "Remaining": 2
//   },
//   "ConcurrentSyncReportRuns": {
//     "Max": 20,
//     "Remaining": 20
//   },
//   "DailyAnalyticsDataflowJobExecutions": {
//     "Max": 60,
//     "Remaining": 60
//   },
//   "DailyAnalyticsUploadedFilesSizeMB": {
//     "Max": 51200,
//     "Remaining": 51200
//   },
//   "DailyApiRequests": {
//     "Max": 15000,
//     "Remaining": 14999
//   },
//   "DailyAsyncApexExecutions": {
//     "Max": 250000,
//     "Remaining": 250000
//   },
//   "DailyAsyncApexTests": {
//     "Max": 540,
//     "Remaining": 540
//   },
//   "DailyBulkApiBatches": {
//     "Max": 15000,
//     "Remaining": 15000
//   },
//   "DailyBulkV2QueryFileStorageMB": {
//     "Max": 976562,
//     "Remaining": 976562
//   },
//   "DailyBulkV2QueryJobs": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyDeliveredPlatformEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyDurableGenericStreamingApiEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyDurableStreamingApiEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyEinsteinDataInsightsStoryCreation": {
//     "Max": 1000,
//     "Remaining": 1000
//   },
//   "DailyEinsteinDiscoveryOptimizationJobRuns": {
//     "Max": 25,
//     "Remaining": 25
//   },
//   "DailyEinsteinDiscoveryPredictAPICalls": {
//     "Max": 50000,
//     "Remaining": 50000
//   },
//   "DailyEinsteinDiscoveryPredictionsByCDC": {
//     "Max": 500000,
//     "Remaining": 500000
//   },
//   "DailyEinsteinDiscoveryStoryCreation": {
//     "Max": 100,
//     "Remaining": 100
//   },
//   "DailyFunctionsApiCallLimit": {
//     "Max": 50000,
//     "Remaining": 50000
//   },
//   "DailyGenericStreamingApiEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyScratchOrgs": {
//     "Max": 6,
//     "Remaining": 6
//   },
//   "DailyStandardVolumePlatformEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyStreamingApiEvents": {
//     "Max": 10000,
//     "Remaining": 10000
//   },
//   "DailyWorkflowEmails": {
//     "Max": 405,
//     "Remaining": 405
//   },
//   "DataStorageMB": {
//     "Max": 5,
//     "Remaining": 5
//   },
//   "DurableStreamingApiConcurrentClients": {
//     "Max": 20,
//     "Remaining": 20
//   },
//   "FileStorageMB": {
//     "Max": 20,
//     "Remaining": 20
//   },
//   "HourlyAsyncReportRuns": {
//     "Max": 1200,
//     "Remaining": 1200
//   },
//   "HourlyDashboardRefreshes": {
//     "Max": 200,
//     "Remaining": 200
//   },
//   "HourlyDashboardResults": {
//     "Max": 5000,
//     "Remaining": 5000
//   },
//   "HourlyDashboardStatuses": {
//     "Max": 999999999,
//     "Remaining": 999999999
//   },
//   "HourlyLongTermIdMapping": {
//     "Max": 100000,
//     "Remaining": 100000
//   },
//   "HourlyManagedContentPublicRequests": {
//     "Max": 50000,
//     "Remaining": 50000
//   },
//   "HourlyODataCallout": {
//     "Max": 1000,
//     "Remaining": 1000
//   },
//   "HourlyPublishedPlatformEvents": {
//     "Max": 50000,
//     "Remaining": 50000
//   },
//   "HourlyPublishedStandardVolumePlatformEvents": {
//     "Max": 1000,
//     "Remaining": 1000
//   },
//   "HourlyShortTermIdMapping": {
//     "Max": 100000,
//     "Remaining": 100000
//   },
//   "HourlySyncReportRuns": {
//     "Max": 500,
//     "Remaining": 500
//   },
//   "HourlyTimeBasedWorkflow": {
//     "Max": 50,
//     "Remaining": 50
//   },
//   "MassEmail": {
//     "Max": 10,
//     "Remaining": 10
//   },
//   "MonthlyEinsteinDiscoveryStoryCreation": {
//     "Max": 500,
//     "Remaining": 500
//   },
//   "Package2VersionCreates": {
//     "Max": 6,
//     "Remaining": 6
//   },
//   "Package2VersionCreatesWithoutValidation": {
//     "Max": 500,
//     "Remaining": 500
//   },
//   "PermissionSets": {
//     "Max": 1500,
//     "Remaining": 1498,
//     "CreateCustom": {
//       "Max": 1000,
//       "Remaining": 998
//     }
//   },
//   "PrivateConnectOutboundCalloutHourlyLimitMB": {
//     "Max": 0,
//     "Remaining": 0
//   },
//   "PublishCallbackUsageInApex": {
//     "Max": 5242880,
//     "Remaining": 5242880
//   },
//   "SingleEmail": {
//     "Max": 15,
//     "Remaining": 15
//   },
//   "StreamingApiConcurrentClients": {
//     "Max": 20,
//     "Remaining": 20
//   }
// }

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

Dim Max As Int32
Max = jResp.IntOf("ActiveScratchOrgs.Max")
Dim Remaining As Int32
Remaining = jResp.IntOf("ActiveScratchOrgs.Remaining")
Dim AnalyticsExternalDataSizeMBMax As Int32
AnalyticsExternalDataSizeMBMax = jResp.IntOf("AnalyticsExternalDataSizeMB.Max")
Dim AnalyticsExternalDataSizeMBRemaining As Int32
AnalyticsExternalDataSizeMBRemaining = jResp.IntOf("AnalyticsExternalDataSizeMB.Remaining")
Dim ConcurrentAsyncGetReportInstancesMax As Int32
ConcurrentAsyncGetReportInstancesMax = jResp.IntOf("ConcurrentAsyncGetReportInstances.Max")
Dim ConcurrentAsyncGetReportInstancesRemaining As Int32
ConcurrentAsyncGetReportInstancesRemaining = jResp.IntOf("ConcurrentAsyncGetReportInstances.Remaining")
Dim ConcurrentEinsteinDataInsightsStoryCreationMax As Int32
ConcurrentEinsteinDataInsightsStoryCreationMax = jResp.IntOf("ConcurrentEinsteinDataInsightsStoryCreation.Max")
Dim ConcurrentEinsteinDataInsightsStoryCreationRemaining As Int32
ConcurrentEinsteinDataInsightsStoryCreationRemaining = jResp.IntOf("ConcurrentEinsteinDataInsightsStoryCreation.Remaining")
Dim ConcurrentEinsteinDiscoveryStoryCreationMax As Int32
ConcurrentEinsteinDiscoveryStoryCreationMax = jResp.IntOf("ConcurrentEinsteinDiscoveryStoryCreation.Max")
Dim ConcurrentEinsteinDiscoveryStoryCreationRemaining As Int32
ConcurrentEinsteinDiscoveryStoryCreationRemaining = jResp.IntOf("ConcurrentEinsteinDiscoveryStoryCreation.Remaining")
Dim ConcurrentSyncReportRunsMax As Int32
ConcurrentSyncReportRunsMax = jResp.IntOf("ConcurrentSyncReportRuns.Max")
Dim ConcurrentSyncReportRunsRemaining As Int32
ConcurrentSyncReportRunsRemaining = jResp.IntOf("ConcurrentSyncReportRuns.Remaining")
Dim DailyAnalyticsDataflowJobExecutionsMax As Int32
DailyAnalyticsDataflowJobExecutionsMax = jResp.IntOf("DailyAnalyticsDataflowJobExecutions.Max")
Dim DailyAnalyticsDataflowJobExecutionsRemaining As Int32
DailyAnalyticsDataflowJobExecutionsRemaining = jResp.IntOf("DailyAnalyticsDataflowJobExecutions.Remaining")
Dim DailyAnalyticsUploadedFilesSizeMBMax As Int32
DailyAnalyticsUploadedFilesSizeMBMax = jResp.IntOf("DailyAnalyticsUploadedFilesSizeMB.Max")
Dim DailyAnalyticsUploadedFilesSizeMBRemaining As Int32
DailyAnalyticsUploadedFilesSizeMBRemaining = jResp.IntOf("DailyAnalyticsUploadedFilesSizeMB.Remaining")
Dim DailyApiRequestsMax As Int32
DailyApiRequestsMax = jResp.IntOf("DailyApiRequests.Max")
Dim DailyApiRequestsRemaining As Int32
DailyApiRequestsRemaining = jResp.IntOf("DailyApiRequests.Remaining")
Dim DailyAsyncApexExecutionsMax As Int32
DailyAsyncApexExecutionsMax = jResp.IntOf("DailyAsyncApexExecutions.Max")
Dim DailyAsyncApexExecutionsRemaining As Int32
DailyAsyncApexExecutionsRemaining = jResp.IntOf("DailyAsyncApexExecutions.Remaining")
Dim DailyAsyncApexTestsMax As Int32
DailyAsyncApexTestsMax = jResp.IntOf("DailyAsyncApexTests.Max")
Dim DailyAsyncApexTestsRemaining As Int32
DailyAsyncApexTestsRemaining = jResp.IntOf("DailyAsyncApexTests.Remaining")
Dim DailyBulkApiBatchesMax As Int32
DailyBulkApiBatchesMax = jResp.IntOf("DailyBulkApiBatches.Max")
Dim DailyBulkApiBatchesRemaining As Int32
DailyBulkApiBatchesRemaining = jResp.IntOf("DailyBulkApiBatches.Remaining")
Dim DailyBulkV2QueryFileStorageMBMax As Int32
DailyBulkV2QueryFileStorageMBMax = jResp.IntOf("DailyBulkV2QueryFileStorageMB.Max")
Dim DailyBulkV2QueryFileStorageMBRemaining As Int32
DailyBulkV2QueryFileStorageMBRemaining = jResp.IntOf("DailyBulkV2QueryFileStorageMB.Remaining")
Dim DailyBulkV2QueryJobsMax As Int32
DailyBulkV2QueryJobsMax = jResp.IntOf("DailyBulkV2QueryJobs.Max")
Dim DailyBulkV2QueryJobsRemaining As Int32
DailyBulkV2QueryJobsRemaining = jResp.IntOf("DailyBulkV2QueryJobs.Remaining")
Dim DailyDeliveredPlatformEventsMax As Int32
DailyDeliveredPlatformEventsMax = jResp.IntOf("DailyDeliveredPlatformEvents.Max")
Dim DailyDeliveredPlatformEventsRemaining As Int32
DailyDeliveredPlatformEventsRemaining = jResp.IntOf("DailyDeliveredPlatformEvents.Remaining")
Dim DailyDurableGenericStreamingApiEventsMax As Int32
DailyDurableGenericStreamingApiEventsMax = jResp.IntOf("DailyDurableGenericStreamingApiEvents.Max")
Dim DailyDurableGenericStreamingApiEventsRemaining As Int32
DailyDurableGenericStreamingApiEventsRemaining = jResp.IntOf("DailyDurableGenericStreamingApiEvents.Remaining")
Dim DailyDurableStreamingApiEventsMax As Int32
DailyDurableStreamingApiEventsMax = jResp.IntOf("DailyDurableStreamingApiEvents.Max")
Dim DailyDurableStreamingApiEventsRemaining As Int32
DailyDurableStreamingApiEventsRemaining = jResp.IntOf("DailyDurableStreamingApiEvents.Remaining")
Dim DailyEinsteinDataInsightsStoryCreationMax As Int32
DailyEinsteinDataInsightsStoryCreationMax = jResp.IntOf("DailyEinsteinDataInsightsStoryCreation.Max")
Dim DailyEinsteinDataInsightsStoryCreationRemaining As Int32
DailyEinsteinDataInsightsStoryCreationRemaining = jResp.IntOf("DailyEinsteinDataInsightsStoryCreation.Remaining")
Dim DailyEinsteinDiscoveryOptimizationJobRunsMax As Int32
DailyEinsteinDiscoveryOptimizationJobRunsMax = jResp.IntOf("DailyEinsteinDiscoveryOptimizationJobRuns.Max")
Dim DailyEinsteinDiscoveryOptimizationJobRunsRemaining As Int32
DailyEinsteinDiscoveryOptimizationJobRunsRemaining = jResp.IntOf("DailyEinsteinDiscoveryOptimizationJobRuns.Remaining")
Dim DailyEinsteinDiscoveryPredictAPICallsMax As Int32
DailyEinsteinDiscoveryPredictAPICallsMax = jResp.IntOf("DailyEinsteinDiscoveryPredictAPICalls.Max")
Dim DailyEinsteinDiscoveryPredictAPICallsRemaining As Int32
DailyEinsteinDiscoveryPredictAPICallsRemaining = jResp.IntOf("DailyEinsteinDiscoveryPredictAPICalls.Remaining")
Dim DailyEinsteinDiscoveryPredictionsByCDCMax As Int32
DailyEinsteinDiscoveryPredictionsByCDCMax = jResp.IntOf("DailyEinsteinDiscoveryPredictionsByCDC.Max")
Dim DailyEinsteinDiscoveryPredictionsByCDCRemaining As Int32
DailyEinsteinDiscoveryPredictionsByCDCRemaining = jResp.IntOf("DailyEinsteinDiscoveryPredictionsByCDC.Remaining")
Dim DailyEinsteinDiscoveryStoryCreationMax As Int32
DailyEinsteinDiscoveryStoryCreationMax = jResp.IntOf("DailyEinsteinDiscoveryStoryCreation.Max")
Dim DailyEinsteinDiscoveryStoryCreationRemaining As Int32
DailyEinsteinDiscoveryStoryCreationRemaining = jResp.IntOf("DailyEinsteinDiscoveryStoryCreation.Remaining")
Dim DailyFunctionsApiCallLimitMax As Int32
DailyFunctionsApiCallLimitMax = jResp.IntOf("DailyFunctionsApiCallLimit.Max")
Dim DailyFunctionsApiCallLimitRemaining As Int32
DailyFunctionsApiCallLimitRemaining = jResp.IntOf("DailyFunctionsApiCallLimit.Remaining")
Dim DailyGenericStreamingApiEventsMax As Int32
DailyGenericStreamingApiEventsMax = jResp.IntOf("DailyGenericStreamingApiEvents.Max")
Dim DailyGenericStreamingApiEventsRemaining As Int32
DailyGenericStreamingApiEventsRemaining = jResp.IntOf("DailyGenericStreamingApiEvents.Remaining")
Dim DailyScratchOrgsMax As Int32
DailyScratchOrgsMax = jResp.IntOf("DailyScratchOrgs.Max")
Dim DailyScratchOrgsRemaining As Int32
DailyScratchOrgsRemaining = jResp.IntOf("DailyScratchOrgs.Remaining")
Dim DailyStandardVolumePlatformEventsMax As Int32
DailyStandardVolumePlatformEventsMax = jResp.IntOf("DailyStandardVolumePlatformEvents.Max")
Dim DailyStandardVolumePlatformEventsRemaining As Int32
DailyStandardVolumePlatformEventsRemaining = jResp.IntOf("DailyStandardVolumePlatformEvents.Remaining")
Dim DailyStreamingApiEventsMax As Int32
DailyStreamingApiEventsMax = jResp.IntOf("DailyStreamingApiEvents.Max")
Dim DailyStreamingApiEventsRemaining As Int32
DailyStreamingApiEventsRemaining = jResp.IntOf("DailyStreamingApiEvents.Remaining")
Dim DailyWorkflowEmailsMax As Int32
DailyWorkflowEmailsMax = jResp.IntOf("DailyWorkflowEmails.Max")
Dim DailyWorkflowEmailsRemaining As Int32
DailyWorkflowEmailsRemaining = jResp.IntOf("DailyWorkflowEmails.Remaining")
Dim DataStorageMBMax As Int32
DataStorageMBMax = jResp.IntOf("DataStorageMB.Max")
Dim DataStorageMBRemaining As Int32
DataStorageMBRemaining = jResp.IntOf("DataStorageMB.Remaining")
Dim DurableStreamingApiConcurrentClientsMax As Int32
DurableStreamingApiConcurrentClientsMax = jResp.IntOf("DurableStreamingApiConcurrentClients.Max")
Dim DurableStreamingApiConcurrentClientsRemaining As Int32
DurableStreamingApiConcurrentClientsRemaining = jResp.IntOf("DurableStreamingApiConcurrentClients.Remaining")
Dim FileStorageMBMax As Int32
FileStorageMBMax = jResp.IntOf("FileStorageMB.Max")
Dim FileStorageMBRemaining As Int32
FileStorageMBRemaining = jResp.IntOf("FileStorageMB.Remaining")
Dim HourlyAsyncReportRunsMax As Int32
HourlyAsyncReportRunsMax = jResp.IntOf("HourlyAsyncReportRuns.Max")
Dim HourlyAsyncReportRunsRemaining As Int32
HourlyAsyncReportRunsRemaining = jResp.IntOf("HourlyAsyncReportRuns.Remaining")
Dim HourlyDashboardRefreshesMax As Int32
HourlyDashboardRefreshesMax = jResp.IntOf("HourlyDashboardRefreshes.Max")
Dim HourlyDashboardRefreshesRemaining As Int32
HourlyDashboardRefreshesRemaining = jResp.IntOf("HourlyDashboardRefreshes.Remaining")
Dim HourlyDashboardResultsMax As Int32
HourlyDashboardResultsMax = jResp.IntOf("HourlyDashboardResults.Max")
Dim HourlyDashboardResultsRemaining As Int32
HourlyDashboardResultsRemaining = jResp.IntOf("HourlyDashboardResults.Remaining")
Dim HourlyDashboardStatusesMax As Int32
HourlyDashboardStatusesMax = jResp.IntOf("HourlyDashboardStatuses.Max")
Dim HourlyDashboardStatusesRemaining As Int32
HourlyDashboardStatusesRemaining = jResp.IntOf("HourlyDashboardStatuses.Remaining")
Dim HourlyLongTermIdMappingMax As Int32
HourlyLongTermIdMappingMax = jResp.IntOf("HourlyLongTermIdMapping.Max")
Dim HourlyLongTermIdMappingRemaining As Int32
HourlyLongTermIdMappingRemaining = jResp.IntOf("HourlyLongTermIdMapping.Remaining")
Dim HourlyManagedContentPublicRequestsMax As Int32
HourlyManagedContentPublicRequestsMax = jResp.IntOf("HourlyManagedContentPublicRequests.Max")
Dim HourlyManagedContentPublicRequestsRemaining As Int32
HourlyManagedContentPublicRequestsRemaining = jResp.IntOf("HourlyManagedContentPublicRequests.Remaining")
Dim HourlyODataCalloutMax As Int32
HourlyODataCalloutMax = jResp.IntOf("HourlyODataCallout.Max")
Dim HourlyODataCalloutRemaining As Int32
HourlyODataCalloutRemaining = jResp.IntOf("HourlyODataCallout.Remaining")
Dim HourlyPublishedPlatformEventsMax As Int32
HourlyPublishedPlatformEventsMax = jResp.IntOf("HourlyPublishedPlatformEvents.Max")
Dim HourlyPublishedPlatformEventsRemaining As Int32
HourlyPublishedPlatformEventsRemaining = jResp.IntOf("HourlyPublishedPlatformEvents.Remaining")
Dim HourlyPublishedStandardVolumePlatformEventsMax As Int32
HourlyPublishedStandardVolumePlatformEventsMax = jResp.IntOf("HourlyPublishedStandardVolumePlatformEvents.Max")
Dim HourlyPublishedStandardVolumePlatformEventsRemaining As Int32
HourlyPublishedStandardVolumePlatformEventsRemaining = jResp.IntOf("HourlyPublishedStandardVolumePlatformEvents.Remaining")
Dim HourlyShortTermIdMappingMax As Int32
HourlyShortTermIdMappingMax = jResp.IntOf("HourlyShortTermIdMapping.Max")
Dim HourlyShortTermIdMappingRemaining As Int32
HourlyShortTermIdMappingRemaining = jResp.IntOf("HourlyShortTermIdMapping.Remaining")
Dim HourlySyncReportRunsMax As Int32
HourlySyncReportRunsMax = jResp.IntOf("HourlySyncReportRuns.Max")
Dim HourlySyncReportRunsRemaining As Int32
HourlySyncReportRunsRemaining = jResp.IntOf("HourlySyncReportRuns.Remaining")
Dim HourlyTimeBasedWorkflowMax As Int32
HourlyTimeBasedWorkflowMax = jResp.IntOf("HourlyTimeBasedWorkflow.Max")
Dim HourlyTimeBasedWorkflowRemaining As Int32
HourlyTimeBasedWorkflowRemaining = jResp.IntOf("HourlyTimeBasedWorkflow.Remaining")
Dim MassEmailMax As Int32
MassEmailMax = jResp.IntOf("MassEmail.Max")
Dim MassEmailRemaining As Int32
MassEmailRemaining = jResp.IntOf("MassEmail.Remaining")
Dim MonthlyEinsteinDiscoveryStoryCreationMax As Int32
MonthlyEinsteinDiscoveryStoryCreationMax = jResp.IntOf("MonthlyEinsteinDiscoveryStoryCreation.Max")
Dim MonthlyEinsteinDiscoveryStoryCreationRemaining As Int32
MonthlyEinsteinDiscoveryStoryCreationRemaining = jResp.IntOf("MonthlyEinsteinDiscoveryStoryCreation.Remaining")
Dim Package2VersionCreatesMax As Int32
Package2VersionCreatesMax = jResp.IntOf("Package2VersionCreates.Max")
Dim Package2VersionCreatesRemaining As Int32
Package2VersionCreatesRemaining = jResp.IntOf("Package2VersionCreates.Remaining")
Dim Package2VersionCreatesWithoutValidationMax As Int32
Package2VersionCreatesWithoutValidationMax = jResp.IntOf("Package2VersionCreatesWithoutValidation.Max")
Dim Package2VersionCreatesWithoutValidationRemaining As Int32
Package2VersionCreatesWithoutValidationRemaining = jResp.IntOf("Package2VersionCreatesWithoutValidation.Remaining")
Dim PermissionSetsMax As Int32
PermissionSetsMax = jResp.IntOf("PermissionSets.Max")
Dim PermissionSetsRemaining As Int32
PermissionSetsRemaining = jResp.IntOf("PermissionSets.Remaining")
Dim CreateCustomMax As Int32
CreateCustomMax = jResp.IntOf("PermissionSets.CreateCustom.Max")
Dim CreateCustomRemaining As Int32
CreateCustomRemaining = jResp.IntOf("PermissionSets.CreateCustom.Remaining")
Dim PrivateConnectOutboundCalloutHourlyLimitMBMax As Int32
PrivateConnectOutboundCalloutHourlyLimitMBMax = jResp.IntOf("PrivateConnectOutboundCalloutHourlyLimitMB.Max")
Dim PrivateConnectOutboundCalloutHourlyLimitMBRemaining As Int32
PrivateConnectOutboundCalloutHourlyLimitMBRemaining = jResp.IntOf("PrivateConnectOutboundCalloutHourlyLimitMB.Remaining")
Dim PublishCallbackUsageInApexMax As Int32
PublishCallbackUsageInApexMax = jResp.IntOf("PublishCallbackUsageInApex.Max")
Dim PublishCallbackUsageInApexRemaining As Int32
PublishCallbackUsageInApexRemaining = jResp.IntOf("PublishCallbackUsageInApex.Remaining")
Dim SingleEmailMax As Int32
SingleEmailMax = jResp.IntOf("SingleEmail.Max")
Dim SingleEmailRemaining As Int32
SingleEmailRemaining = jResp.IntOf("SingleEmail.Remaining")
Dim StreamingApiConcurrentClientsMax As Int32
StreamingApiConcurrentClientsMax = jResp.IntOf("StreamingApiConcurrentClients.Max")
Dim StreamingApiConcurrentClientsRemaining As Int32
StreamingApiConcurrentClientsRemaining = jResp.IntOf("StreamingApiConcurrentClients.Remaining")

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/limits

Postman Collection Item JSON

{
  "name": "Limits",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          "// Visualizer that renders a Chart.js graph with the Salesforce API limits consumption",
          "const template = `<script src=\"https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js\"></script>",
          "<canvas id=\"myChart\" width=\"400\" height=\"800\"></canvas>",
          "<script>",
          "pm.getData((err, chartData) => {",
          "    const getTooltipFooter = (tooltipItems) => {",
          "        const index = tooltipItems[0].dataIndex;",
          "        return 'Consumed '+ chartData.consumed[index] +' out of '+ chartData.max[index];",
          "    };",
          "",
          "    const ctx = document.getElementById('myChart').getContext('2d');",
          "    const myChart = new Chart(ctx, {",
          "        type: 'bar',",
          "        data: {",
          "            labels: chartData.labels,",
          "            datasets: [",
          "                {",
          "                    label: '% Consumed',",
          "                    data: chartData.consumedPercent,",
          "                    backgroundColor: 'rgba(255, 99, 132, 1)',",
          "                    borderColor: 'rgba(255, 99, 132, 1)',",
          "                    borderWidth: 1",
          "                }",
          "            ]",
          "        },",
          "        options: {",
          "            indexAxis: 'y',",
          "            responsive: true,",
          "            scales: {",
          "                x: {",
          "                    beginAtZero: true,",
          "                    ticks: {",
          "                        callback: (value, index, values) => value + '%'",
          "                    },",
          "                    max: 100",
          "                }",
          "            },",
          "            interaction: {",
          "                intersect: false,",
          "                mode: 'y'",
          "            },",
          "            plugins: {",
          "                tooltip: {",
          "                    callbacks: {",
          "                        footer: getTooltipFooter,",
          "                        label: (tooltipItems) => tooltipItems.raw + '%'",
          "                    }",
          "                },",
          "                title: {",
          "                    display: true,",
          "                    text: 'API Limits Consumption'",
          "                },",
          "                legend: {",
          "                    display: false",
          "                }",
          "            }",
          "        }",
          "    });",
          "});",
          "</script>`;",
          "",
          "// Format API response into chart data",
          "const responseJson = pm.response.json();",
          "const chartData = {",
          "    labels: [],",
          "    consumed: [],",
          "    consumedPercent: [],",
          "    max: []",
          "};",
          "Object.keys(responseJson).forEach((limitName) => {",
          "    const { Max, Remaining } = responseJson[limitName];",
          "    const consumed = Max - Remaining;",
          "    let percent = 0;",
          "    if (Max !== 0) {",
          "        percent = (consumed / Max) * 100;",
          "        percent = percent",
          "            .toString()",
          "            .match(/^-?\\d+(?:\\.\\d{0,2})?/)[0];",
          "    }",
          "    chartData.labels.push(limitName);",
          "    chartData.consumed.push(consumed);",
          "    chartData.consumedPercent.push(percent);",
          "    chartData.max.push(Max);",
          "});",
          "// Render vizualizer",
          "pm.visualizer.set(template, chartData);"
        ],
        "type": "text/javascript",
        "packages": {}
      }
    }
  ],
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/limits",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "limits"
      ]
    },
    "description": "Lists information about limits in your org. For each limit, this resource returns the maximum allocation and the remaining allocation based on usage. This resource is available in REST API version 29.0 and later for API users with the View Setup and Configuration permission"
  },
  "response": [
    {
      "name": "Limits",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/limits",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "limits"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Tue, 26 Sep 2023 13:19:11 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "Sforce-Limit-Info",
          "value": "api-usage=1/15000"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"ActiveScratchOrgs\": {\n        \"Max\": 3,\n        \"Remaining\": 3\n    },\n    \"AnalyticsExternalDataSizeMB\": {\n        \"Max\": 40960,\n        \"Remaining\": 40960\n    },\n    \"ConcurrentAsyncGetReportInstances\": {\n        \"Max\": 200,\n        \"Remaining\": 200\n    },\n    \"ConcurrentEinsteinDataInsightsStoryCreation\": {\n        \"Max\": 5,\n        \"Remaining\": 5\n    },\n    \"ConcurrentEinsteinDiscoveryStoryCreation\": {\n        \"Max\": 2,\n        \"Remaining\": 2\n    },\n    \"ConcurrentSyncReportRuns\": {\n        \"Max\": 20,\n        \"Remaining\": 20\n    },\n    \"DailyAnalyticsDataflowJobExecutions\": {\n        \"Max\": 60,\n        \"Remaining\": 60\n    },\n    \"DailyAnalyticsUploadedFilesSizeMB\": {\n        \"Max\": 51200,\n        \"Remaining\": 51200\n    },\n    \"DailyApiRequests\": {\n        \"Max\": 15000,\n        \"Remaining\": 14999\n    },\n    \"DailyAsyncApexExecutions\": {\n        \"Max\": 250000,\n        \"Remaining\": 250000\n    },\n    \"DailyAsyncApexTests\": {\n        \"Max\": 540,\n        \"Remaining\": 540\n    },\n    \"DailyBulkApiBatches\": {\n        \"Max\": 15000,\n        \"Remaining\": 15000\n    },\n    \"DailyBulkV2QueryFileStorageMB\": {\n        \"Max\": 976562,\n        \"Remaining\": 976562\n    },\n    \"DailyBulkV2QueryJobs\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyDeliveredPlatformEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyDurableGenericStreamingApiEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyDurableStreamingApiEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyEinsteinDataInsightsStoryCreation\": {\n        \"Max\": 1000,\n        \"Remaining\": 1000\n    },\n    \"DailyEinsteinDiscoveryOptimizationJobRuns\": {\n        \"Max\": 25,\n        \"Remaining\": 25\n    },\n    \"DailyEinsteinDiscoveryPredictAPICalls\": {\n        \"Max\": 50000,\n        \"Remaining\": 50000\n    },\n    \"DailyEinsteinDiscoveryPredictionsByCDC\": {\n        \"Max\": 500000,\n        \"Remaining\": 500000\n    },\n    \"DailyEinsteinDiscoveryStoryCreation\": {\n        \"Max\": 100,\n        \"Remaining\": 100\n    },\n    \"DailyFunctionsApiCallLimit\": {\n        \"Max\": 50000,\n        \"Remaining\": 50000\n    },\n    \"DailyGenericStreamingApiEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyScratchOrgs\": {\n        \"Max\": 6,\n        \"Remaining\": 6\n    },\n    \"DailyStandardVolumePlatformEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyStreamingApiEvents\": {\n        \"Max\": 10000,\n        \"Remaining\": 10000\n    },\n    \"DailyWorkflowEmails\": {\n        \"Max\": 405,\n        \"Remaining\": 405\n    },\n    \"DataStorageMB\": {\n        \"Max\": 5,\n        \"Remaining\": 5\n    },\n    \"DurableStreamingApiConcurrentClients\": {\n        \"Max\": 20,\n        \"Remaining\": 20\n    },\n    \"FileStorageMB\": {\n        \"Max\": 20,\n        \"Remaining\": 20\n    },\n    \"HourlyAsyncReportRuns\": {\n        \"Max\": 1200,\n        \"Remaining\": 1200\n    },\n    \"HourlyDashboardRefreshes\": {\n        \"Max\": 200,\n        \"Remaining\": 200\n    },\n    \"HourlyDashboardResults\": {\n        \"Max\": 5000,\n        \"Remaining\": 5000\n    },\n    \"HourlyDashboardStatuses\": {\n        \"Max\": 999999999,\n        \"Remaining\": 999999999\n    },\n    \"HourlyLongTermIdMapping\": {\n        \"Max\": 100000,\n        \"Remaining\": 100000\n    },\n    \"HourlyManagedContentPublicRequests\": {\n        \"Max\": 50000,\n        \"Remaining\": 50000\n    },\n    \"HourlyODataCallout\": {\n        \"Max\": 1000,\n        \"Remaining\": 1000\n    },\n    \"HourlyPublishedPlatformEvents\": {\n        \"Max\": 50000,\n        \"Remaining\": 50000\n    },\n    \"HourlyPublishedStandardVolumePlatformEvents\": {\n        \"Max\": 1000,\n        \"Remaining\": 1000\n    },\n    \"HourlyShortTermIdMapping\": {\n        \"Max\": 100000,\n        \"Remaining\": 100000\n    },\n    \"HourlySyncReportRuns\": {\n        \"Max\": 500,\n        \"Remaining\": 500\n    },\n    \"HourlyTimeBasedWorkflow\": {\n        \"Max\": 50,\n        \"Remaining\": 50\n    },\n    \"MassEmail\": {\n        \"Max\": 10,\n        \"Remaining\": 10\n    },\n    \"MonthlyEinsteinDiscoveryStoryCreation\": {\n        \"Max\": 500,\n        \"Remaining\": 500\n    },\n    \"Package2VersionCreates\": {\n        \"Max\": 6,\n        \"Remaining\": 6\n    },\n    \"Package2VersionCreatesWithoutValidation\": {\n        \"Max\": 500,\n        \"Remaining\": 500\n    },\n    \"PermissionSets\": {\n        \"Max\": 1500,\n        \"Remaining\": 1498,\n        \"CreateCustom\": {\n            \"Max\": 1000,\n            \"Remaining\": 998\n        }\n    },\n    \"PrivateConnectOutboundCalloutHourlyLimitMB\": {\n        \"Max\": 0,\n        \"Remaining\": 0\n    },\n    \"PublishCallbackUsageInApex\": {\n        \"Max\": 5242880,\n        \"Remaining\": 5242880\n    },\n    \"SingleEmail\": {\n        \"Max\": 15,\n        \"Remaining\": 15\n    },\n    \"StreamingApiConcurrentClients\": {\n        \"Max\": 20,\n        \"Remaining\": 20\n    }\n}"
    }
  ]
}