BitCurb reporting uses Open Data Protocol (OData) to expose resources representing historical data throughout a single REST endpoint address https://portal.bitcurb.com/ReportData.svc/
The exposed entities are not related and multiple entities cannot be included inline in the response of you requests.
This endpoint is only accessible if the consumer is authenticated with valid BitCurb account.
The results sets cannot be joined at request and could be only consumed separately.
Below is a diagram of the relationship between entities available for REST consumption.

CrunchRuns

https://portal.bitcurb.com/ReportData.svc/CrunchRuns

Provides historical information about the execution of every rule. Both filter and matching rules are tracked and statistical information about their executions is stored.

Field Description can be blank
ID unique identifier of the entity row No
TenantID unique identifier of your account No
CrunchTemplateName The name of the template containing one or more rules for execution Yes
RuleBody definition of the rule that is executed No
VarianceExpression definition of the variance expression used for rule’s execution. It is applicable to matching rules only. Filtering rules don’t have variance defined Yes
ConsumerType the type of the consumer that invoked the rules’ execution.

possible values are:

  • API
  • Excel App
No
TemplateSourceType The type of the template that contains executed rule.

Possible values are:

  • N/A when API
  • Table
No
LeftCount the count of the rows passed for processing from the first side – $1 No
RightCount the count of the rows passed for processing from the first side – $2 No
TotalCount the total number of rows processed No
CreatedBy username of the user account, who triggered the rule’s execution No
CreatedTimeUTC datetime in UTC when the record is created No

 

CrunchRunDetails

https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails

Provides historical data about how each executed rule performed and what is the result of its execution.

Both filter and matching rules are tracked, and statistical information about their executions is stored.

When matching rule is executed, two records are created in CrunnchRunDetails. The first one represent the filtering part of the crunch process, and the second one will hold the statistics about what has been matched.

 

Field Description can be blank
ID unique identifier of the entity row No
TenantID unique identifier of your account No
CrunchHistoryID reference to the CrunchRuns entity No
IsFilter indicator if the rule is Filtering or Matching rule

possible values:

  • true – Filtering Rule
  • false – Matching Rule
No
LeftCount The count of the rows from the left side $1 after rule is executed. If filtering rule – then it contains the number of filtered items from the left site (i.e. result number). If crunch rule – then it contains the number of the items from the left side that are in a result group No
RightCount The count of the rows from the right side $2 after rule is executed. If filtering rule – then it contains the number of filtered items from the right site (i.e. result number). If crunch rule – then it contains the number of the items from the right side that are in a result group No
GroupCount The number of groups created as result of the rule’s execution. This is only available for Crunch rules Yes
VarianceCount The total number of variance items created as result of the rule’s execution. It represents the number of variances in all result groups. This is only available for Crunch rules Yes
TimeInMilliseconds the time that rule’s execution took to complete No
IsSuccessful indicator if the rule is successfully executed

possible values:

  • true – successfully executed rule
  • false – execution completed with error
No
CreatedTimeUTC datetime in UTC when the record is created No
CorrelationID guid identifier holding reference to logged error. you can reach out BitCurb support providing this identifier to get details about the error No

 

CrunchRunsGroups

https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups

Provides historical data about each group created as a result of executing matching rule.

Only matching rules are tracked and statistical information about their executions is stored.

Field Description Can be blank
ID unique identifier of the entity row No
TenantID unique identifier of your account No
CrunchHistoryID reference to the CrunchRuns entity No
GroupIdentifier guid identifier that is returned to the consumer after the rule has been processed successfully. No
VarianceValue the value for the variance item created for the current group record No
GroupElementIDs Concatenated list of all id that belong to the group. they are the same as those that are passed as input when rule is invoked No

 

If your account is under trial version only the last 10 rules executions for each of the entities will be available for reporting through the REST endpoint. To consume the full history of the executions you must have paid license.

Below is sample JSON Response:

1. CrunchRuns – Filtering rule


{
   "d": [
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(40L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(40L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID": "40",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName": "Phone Filtering",
         "RuleBody": "$1.status != \"Discontinued\" AND ISBLANK($1.internal_memory_mb) == FALSE AND ISBLANK($1.primary_camera_mp) == FALSE AND TONUMBER($1.internal_memory_mb) >= 8192 \nAND TONUMBER($1.primary_camera_mp) >= 8",
         "VarianceExpression": "",
         "ConsumerType": "API",
         "TemplateSourceType": null,
         "LeftCount": 3,
         "RightCount": 0,
         "TotalCount": 3,
         "CreatedBy": "petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc": "/Date(1508269518930)/"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(39L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(39L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID": "39",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName": "Phone Filtering",
         "RuleBody": "$1.status != \"Discontinued\" AND ISBLANK($1.stand_by_hours) == FALSE AND ISBLANK($1.talk_time_hours) == FALSE \nAND TONUMBER($1.stand_by_hours) >= 400 AND TONUMBER($1.talk_time_hours) >= 10",
         "VarianceExpression": "",
         "ConsumerType": "API",
         "TemplateSourceType": null,
         "LeftCount": 106,
         "RightCount": 0,
         "TotalCount": 106,
         "CreatedBy": "petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc": "/Date(1508269518833)/"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(38L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(38L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID": "38",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName": "Phone Filtering",
         "RuleBody": "$1.status != \"Discontinued\" AND FIND(\"Dual SIM\", $1.sim) >= 1 AND $1.card_slot != \"No\"",
         "VarianceExpression": "",
         "ConsumerType": "API",
         "TemplateSourceType": null,
         "LeftCount": 566,
         "RightCount": 0,
         "TotalCount": 566,
         "CreatedBy": "petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc": "/Date(1508269518710)/"
      }
   ]
}

 

2. CrunchRunDetails – Filtering Rule


{
   "d": [
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(52L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(52L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "52",
         "CrunchHistoryID": "40",
         "IsFilter": true,
         "LeftCount": 2,
         "RightCount": 0,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "14",
         "IsSuccessful": true,
         "CreatedTimeUtc": "/Date(1508269518930)/",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(51L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(51L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "51",
         "CrunchHistoryID": "39",
         "IsFilter": true,
         "LeftCount": 3,
         "RightCount": 0,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "44",
         "IsSuccessful": true,
         "CreatedTimeUtc": "/Date(1508269518833)/",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(50L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(50L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "50",
         "CrunchHistoryID": "38",
         "IsFilter": true,
         "LeftCount": 106,
         "RightCount": 0,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "492",
         "IsSuccessful": true,
         "CreatedTimeUtc": "/Date(1508269518710)/",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      }
   ]
}

 

3. CrunchRunGroups – Filtering Rule – response will be always empty

{"d":[]}

4. CrunchRuns – Matching rule

{
   "d": 
   	[{"__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(80L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(80L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID":"80",
         "TenantID":"df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName":"Bank Reconciliation",
         "RuleBody":"$1.AccountIdentification == $2.AccountIdentification AND $1.TransactionValueDate == $2.TransactionValueDate AND \r\n $1.TransactionType == $2.TransactionType AND FIND($2.AccountServingInstitution, $1.AccountServingInstitution) >= 1",
         "VarianceExpression":"",
         "ConsumerType":"API",
         "TemplateSourceType":null,
         "LeftCount":4,
         "RightCount":7,
         "TotalCount":11,
         "CreatedBy":"petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc":"Date(1508192282293)"
      },
      {
	"__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(81L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(81L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID":"81",
         "TenantID":"df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName":"Bank Reconciliation",
         "RuleBody":"$1.AccountIdentification == $2.AccountIdentification AND $1.TransactionValueDate == $2.TransactionValueDate AND $1.TransactionType == $2.TransactionType AND $1.AccountServingInstitution == $2.AccountServingInstitution",
         "VarianceExpression":"< 20.0000",
         "ConsumerType":"API",
         "TemplateSourceType":null,
         "LeftCount":3,
         "RightCount":5,
         "TotalCount":8,
         "CreatedBy":"petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc":"Date(1508192282293)"
      },
      {
	"__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(82L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRuns(82L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryViewModel"
         },
         "ID":"82",
         "TenantID":"df57ddfc-5da3-4e98-8fee-77093cf2c2a1",
         "CrunchTemplateName":"Bank Reconciliation",
         "RuleBody":"$1.AccountServingInstitution == $2.AccountServingInstitution AND $1.Amount == $2.Amount",
         "VarianceExpression":"",
         "ConsumerType":"API",
         "TemplateSourceType":null,
         "LeftCount":2,
         "RightCount":3,
         "TotalCount":5,
         "CreatedBy":"petya.gaytanska@bitcurb.com",
         "CreatedTimeUtc":"Date(1508192282293)"
     }
]
}
 

5. CrunchRunsDetails – Matching Rule


{
   "d": [    
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(124L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(124L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "124",
         "CrunchHistoryID": "82",
         "IsFilter": false,
         "LeftCount": 2,
         "RightCount": 2,
         "GroupCount": 2,
         "VarianceCount": 0,
         "TimeInMilliseconds": "7",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282480)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(123L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(123L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "123",
         "CrunchHistoryID": "82",
         "IsFilter": true,
         "LeftCount": 2,
         "RightCount": 2,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "3",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282480)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(122L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(122L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "122",
         "CrunchHistoryID": "81",
         "IsFilter": false,
         "LeftCount": 1,
         "RightCount": 2,
         "GroupCount": 1,
         "VarianceCount": 1,
         "TimeInMilliseconds": "10",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282403)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(121L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(121L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "121",
         "CrunchHistoryID": "81",
         "IsFilter": true,
         "LeftCount": 1,
         "RightCount": 2,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "7",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282403)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(120L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(120L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "120",
         "CrunchHistoryID": "80",
         "IsFilter": false,
         "LeftCount": 1,
         "RightCount": 2,
         "GroupCount": 1,
         "VarianceCount": 0,
         "TimeInMilliseconds": "47",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282293)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(119L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsDetails(119L)",
            "type": "BitCurb.Rest.Reports.CrunchHistoryDetailsViewModel"
         },
         "ID": "119",
         "CrunchHistoryID": "80",
         "IsFilter": true,
         "LeftCount": 2,
         "RightCount": 4,
         "GroupCount": null,
         "VarianceCount": null,
         "TimeInMilliseconds": "495",
         "IsSuccessful": true,
         "CreatedTimeUtc": "Date(1508192282293)",
         "CorrelationID": "00000000-0000-0000-0000-000000000000",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      }
   ]
}

 

6. CrunchRunGroups – Matching Rule


{
   "d": [
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(38L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(38L)",
            "type": "BitCurb.Rest.Reports.CrunchGroupHistoryViewModel"
         },
         "ID": "38",
         "CrunchHistoryID": "82",
         "GroupIdentifier": "009ba390-48fd-4d41-881d-6f1dc3fafa7b",
         "VarianceValue": "0",
         "GroupElementIDs": "11,7",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(37L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(37L)",
            "type": "BitCurb.Rest.Reports.CrunchGroupHistoryViewModel"
         },
         "ID": "37",
         "CrunchHistoryID": "82",
         "GroupIdentifier": "59a506f5-ce15-4f67-9d36-19a5f8a7e304",
         "VarianceValue": "0",
         "GroupElementIDs": "10,6",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(36L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(36L)",
            "type": "BitCurb.Rest.Reports.CrunchGroupHistoryViewModel"
         },
         "ID": "36",
         "CrunchHistoryID": "81",
         "GroupIdentifier": "02dca6f3-650d-4bc0-95ef-df0ce9a2a635",
         "VarianceValue": "16.8900",
         "GroupElementIDs": "9,3,4",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      },
      {
         "__metadata": {
            "id": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(35L)",
            "uri": "https://portal.bitcurb.com/ReportData.svc/CrunchRunsGroups(35L)",
            "type": "BitCurb.Rest.Reports.CrunchGroupHistoryViewModel"
         },
         "ID": "35",
         "CrunchHistoryID": "80",
         "GroupIdentifier": "2705be57-4d82-4526-a116-928a03bf1722",
         "VarianceValue": "0",
         "GroupElementIDs": "8,1,2",
         "TenantID": "df57ddfc-5da3-4e98-8fee-77093cf2c2a1"
      }
   ]
}

 

7. Response errors: In case of error when consuming the report API, the response you will get will be with code 500 (Internal Server Error). The error message will provide Correlation Id to follow up with our support

<error><code/><message xml:lang="en-US">An unexpected error occurred! Please use the correlation ID to contact our support! Correlation Id: a0937bff-4705-4349-9c2c-1f73b94f383f. Support email: support@bitcurb.com.</message></error>

8. Unauthorized user or user who is not assigned to licence

You will get 401 error code if you try to consume the report service for a user, who has not been assigned into licence or user who is not valid or active.

You can use the Correlation ID and email address to follow up.

You can get sample reports consumer application from our GitHub repository.