Chilkat Online Tools

unicodeC / Salesforce Platform APIs / Limits

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    int Max;
    int Remaining;
    int AnalyticsExternalDataSizeMBMax;
    int AnalyticsExternalDataSizeMBRemaining;
    int ConcurrentAsyncGetReportInstancesMax;
    int ConcurrentAsyncGetReportInstancesRemaining;
    int ConcurrentEinsteinDataInsightsStoryCreationMax;
    int ConcurrentEinsteinDataInsightsStoryCreationRemaining;
    int ConcurrentEinsteinDiscoveryStoryCreationMax;
    int ConcurrentEinsteinDiscoveryStoryCreationRemaining;
    int ConcurrentSyncReportRunsMax;
    int ConcurrentSyncReportRunsRemaining;
    int DailyAnalyticsDataflowJobExecutionsMax;
    int DailyAnalyticsDataflowJobExecutionsRemaining;
    int DailyAnalyticsUploadedFilesSizeMBMax;
    int DailyAnalyticsUploadedFilesSizeMBRemaining;
    int DailyApiRequestsMax;
    int DailyApiRequestsRemaining;
    int DailyAsyncApexExecutionsMax;
    int DailyAsyncApexExecutionsRemaining;
    int DailyAsyncApexTestsMax;
    int DailyAsyncApexTestsRemaining;
    int DailyBulkApiBatchesMax;
    int DailyBulkApiBatchesRemaining;
    int DailyBulkV2QueryFileStorageMBMax;
    int DailyBulkV2QueryFileStorageMBRemaining;
    int DailyBulkV2QueryJobsMax;
    int DailyBulkV2QueryJobsRemaining;
    int DailyDeliveredPlatformEventsMax;
    int DailyDeliveredPlatformEventsRemaining;
    int DailyDurableGenericStreamingApiEventsMax;
    int DailyDurableGenericStreamingApiEventsRemaining;
    int DailyDurableStreamingApiEventsMax;
    int DailyDurableStreamingApiEventsRemaining;
    int DailyEinsteinDataInsightsStoryCreationMax;
    int DailyEinsteinDataInsightsStoryCreationRemaining;
    int DailyEinsteinDiscoveryOptimizationJobRunsMax;
    int DailyEinsteinDiscoveryOptimizationJobRunsRemaining;
    int DailyEinsteinDiscoveryPredictAPICallsMax;
    int DailyEinsteinDiscoveryPredictAPICallsRemaining;
    int DailyEinsteinDiscoveryPredictionsByCDCMax;
    int DailyEinsteinDiscoveryPredictionsByCDCRemaining;
    int DailyEinsteinDiscoveryStoryCreationMax;
    int DailyEinsteinDiscoveryStoryCreationRemaining;
    int DailyFunctionsApiCallLimitMax;
    int DailyFunctionsApiCallLimitRemaining;
    int DailyGenericStreamingApiEventsMax;
    int DailyGenericStreamingApiEventsRemaining;
    int DailyScratchOrgsMax;
    int DailyScratchOrgsRemaining;
    int DailyStandardVolumePlatformEventsMax;
    int DailyStandardVolumePlatformEventsRemaining;
    int DailyStreamingApiEventsMax;
    int DailyStreamingApiEventsRemaining;
    int DailyWorkflowEmailsMax;
    int DailyWorkflowEmailsRemaining;
    int DataStorageMBMax;
    int DataStorageMBRemaining;
    int DurableStreamingApiConcurrentClientsMax;
    int DurableStreamingApiConcurrentClientsRemaining;
    int FileStorageMBMax;
    int FileStorageMBRemaining;
    int HourlyAsyncReportRunsMax;
    int HourlyAsyncReportRunsRemaining;
    int HourlyDashboardRefreshesMax;
    int HourlyDashboardRefreshesRemaining;
    int HourlyDashboardResultsMax;
    int HourlyDashboardResultsRemaining;
    int HourlyDashboardStatusesMax;
    int HourlyDashboardStatusesRemaining;
    int HourlyLongTermIdMappingMax;
    int HourlyLongTermIdMappingRemaining;
    int HourlyManagedContentPublicRequestsMax;
    int HourlyManagedContentPublicRequestsRemaining;
    int HourlyODataCalloutMax;
    int HourlyODataCalloutRemaining;
    int HourlyPublishedPlatformEventsMax;
    int HourlyPublishedPlatformEventsRemaining;
    int HourlyPublishedStandardVolumePlatformEventsMax;
    int HourlyPublishedStandardVolumePlatformEventsRemaining;
    int HourlyShortTermIdMappingMax;
    int HourlyShortTermIdMappingRemaining;
    int HourlySyncReportRunsMax;
    int HourlySyncReportRunsRemaining;
    int HourlyTimeBasedWorkflowMax;
    int HourlyTimeBasedWorkflowRemaining;
    int MassEmailMax;
    int MassEmailRemaining;
    int MonthlyEinsteinDiscoveryStoryCreationMax;
    int MonthlyEinsteinDiscoveryStoryCreationRemaining;
    int Package2VersionCreatesMax;
    int Package2VersionCreatesRemaining;
    int Package2VersionCreatesWithoutValidationMax;
    int Package2VersionCreatesWithoutValidationRemaining;
    int PermissionSetsMax;
    int PermissionSetsRemaining;
    int CreateCustomMax;
    int CreateCustomRemaining;
    int PrivateConnectOutboundCalloutHourlyLimitMBMax;
    int PrivateConnectOutboundCalloutHourlyLimitMBRemaining;
    int PublishCallbackUsageInApexMax;
    int PublishCallbackUsageInApexRemaining;
    int SingleEmailMax;
    int SingleEmailRemaining;
    int StreamingApiConcurrentClientsMax;
    int StreamingApiConcurrentClientsRemaining;

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

    http = CkHttpW_Create();

    // Adds the "Authorization: Bearer <access_token>" header.
    CkHttpW_putAuthToken(http,L"<access_token>");

    sbResponseBody = CkStringBuilderW_Create();
    success = CkHttpW_QuickGetSb(http,L"https://domain.com/services/data/v{{version}}/limits",sbResponseBody);
    if (success == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        CkStringBuilderW_Dispose(sbResponseBody);
        return;
    }

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",CkJsonObjectW_emit(jResp));

    respStatusCode = CkHttpW_getLastStatus(http);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpW_lastHeader(http));
        wprintf(L"Failed.\n");
        CkHttpW_Dispose(http);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    // 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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

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


    CkHttpW_Dispose(http);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

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}"
    }
  ]
}