---
title: /operations/jobs/data_sync_object_counts
slug: amberflo-api/operationsjobsdatasyncobjectcounts
docTags: 
createdAt: 2024-11-07T15:10:16.969Z
---

{
  "id": "sol-ld45tuvIpCjZuntSW",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/operations/jobs/data_sync_object_counts",
    "servers": [
      {
        "url": "https://app.amberflo.io/operations/jobs/data_sync_object_counts"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "operations.query_tool.data_sync_object_counts.DataSyncObjectCountsParams.in",
          "schema": [
            {
              "name": "type",
              "kind": "required",
              "type": "string",
              "description": "The type of query to run",
              "example": "",
              "default": "data_sync_object_counts"
            },
            {
              "name": "accountId",
              "kind": "optional",
              "type": "string",
              "description": "The account ID to get object counts for",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/operations.query_tool.data_sync_object_counts.DataSyncObjectCountsParams.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "operations.jobs.JobApiResult.out",
            "schema": [
              {
                "name": "jobId",
                "kind": "required",
                "type": "string",
                "description": "id for the submitted job",
                "example": ""
              },
              {
                "name": "job",
                "kind": "required",
                "type": "object",
                "description": "Information pertaining the job request",
                "modelRef": "#/components/schemas/operations.jobs.Job.out",
                "customType": "operations.jobs.Job.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "operations.jobs.scripts.RunBillingJobParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunBillingJobParams.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "The type of query to run",
                        "example": "",
                        "default": "billing_app"
                      },
                      {
                        "name": "timeRange",
                        "kind": "required",
                        "type": "object",
                        "description": "Time period for which to compute the usage.",
                        "modelRef": "#/components/schemas/common.TimeRange.out",
                        "customType": "common.TimeRange.out",
                        "schema": [
                          {
                            "name": "startTimeInSeconds",
                            "kind": "required",
                            "type": "integer<int64>",
                            "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                            "example": 0
                          },
                          {
                            "name": "endTimeInSeconds",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                            "example": 0
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "operations.query_tool.data_sync_object_counts.DataSyncObjectCountsParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.query_tool.data_sync_object_counts.DataSyncObjectCountsParams.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "The type of query to run",
                        "example": "",
                        "default": "data_sync_object_counts"
                      },
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "description": "The account ID to get object counts for",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunCustomAggregationParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunCustomAggregationParams.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "The type of query to run",
                        "example": "",
                        "default": "run_custom_aggregation"
                      },
                      {
                        "name": "timeRange",
                        "kind": "required",
                        "type": "object",
                        "description": "Time period for which to compute the usage.",
                        "modelRef": "#/components/schemas/common.TimeRange.out",
                        "customType": "common.TimeRange.out",
                        "schema": [
                          {
                            "name": "startTimeInSeconds",
                            "kind": "required",
                            "type": "integer<int64>",
                            "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                            "example": 0
                          },
                          {
                            "name": "endTimeInSeconds",
                            "kind": "optional",
                            "type": "integer<int64>",
                            "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "description": "`accountId` specific for jobs.",
                        "example": ""
                      },
                      {
                        "name": "meterApiName",
                        "kind": "required",
                        "type": "string",
                        "description": "`meterApiName` as defined in [Meter API](ref:post_meters).",
                        "example": ""
                      },
                      {
                        "name": "customAggregationSpecId",
                        "kind": "required",
                        "type": "string",
                        "description": "The ID of the custom aggregation spec",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunDailyHourlyAggregationParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunDailyHourlyAggregationParams.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "The type of query to run",
                        "example": "",
                        "default": "run_daily_hourly_aggregation"
                      },
                      {
                        "name": "timeRange",
                        "kind": "required",
                        "type": "object",
                        "description": "Time period for which to compute the usage.",
                        "modelRef": "#/components/schemas/common.TimeRange.out",
                        "customType": "common.TimeRange.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "accountId",
                        "kind": "optional",
                        "type": "string",
                        "description": "`accountId` specific for jobs.",
                        "example": ""
                      },
                      {
                        "name": "meterApiName",
                        "kind": "required",
                        "type": "string",
                        "description": "`meterApiName` as defined in [Meter API](ref:post_meters).",
                        "example": ""
                      },
                      {
                        "name": "aggregationType",
                        "kind": "optional",
                        "type": "string",
                        "description": "The type of aggregation to use, such as sum, count, avg, max, etc. Optional parameter",
                        "modelRef": "#/components/schemas/com.amberflo.service.common.aggregation.AggregationType.out",
                        "customType": "com.amberflo.service.common.aggregation.AggregationType.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunHourlyAggregationParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunHourlyAggregationParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunIngestSnapshotParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunIngestSnapshotParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunItemInvoiceParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunItemInvoiceParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunLockedProductInvoiceParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunLockedProductInvoiceParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunMarketplacePaymentsParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunMarketplacePaymentsParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunUsageCostsParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunUsageCostsParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  },
                  {
                    "name": "operations.jobs.scripts.RunUsageJobParams.out",
                    "description": "",
                    "modelRef": "#/components/schemas/operations.jobs.scripts.RunUsageJobParams.out",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Max depth limit reached"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string",
                "description": "Status of the job",
                "modelRef": "#/components/schemas/operations.jobs.JobStatus.out",
                "customType": "operations.jobs.JobStatus.out",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/operations.jobs.JobApiResult.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "X6gg9gloQy-R52u347cNE",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/operations/jobs/data_sync_object_counts \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"type\": \"data_sync_object_counts\"\n     }'"
        },
        {
          "id": "iNJd_pTLMuVI1InTXprKu",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"type\": \"data_sync_object_counts\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/operations/jobs/data_sync_object_counts\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "3LbD2Ut0ZtEz2b2r5Htqj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/operations/jobs/data_sync_object_counts\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"type\": \"data_sync_object_counts\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "J4RNlitXr2PHtabHXBKfR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/operations/jobs/data_sync_object_counts\"\n\npayload = json.dumps({\n   \"type\": \"data_sync_object_counts\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "X6gg9gloQy-R52u347cNE"
    },
    "results": {
      "languages": [
        {
          "id": "NLSe0KOiBB8KSpxvxIP5l",
          "language": "200",
          "code": "// Successful request\n{\n  \"jobId\": \"\",\n  \"job\": {},\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "NLSe0KOiBB8KSpxvxIP5l"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}