{
  "opencollection": "1.0.0",
  "info": {
    "name": "PureCloud Platform Agent Assistants Usage API",
    "version": "v2"
  },
  "items": [
    {
      "info": {
        "name": "Usage",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Query for OAuth client API usage",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v2/oauth/clients/:clientId/usage/query",
            "params": [
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "Client ID"
              }
            ]
          },
          "docs": "After calling this method, you will then need to poll for the query results based on the returned execution Id"
        },
        {
          "info": {
            "name": "Get a summary of OAuth client API usage",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/oauth/clients/:clientId/usage/summary",
            "params": [
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "Client ID"
              },
              {
                "name": "days",
                "value": "",
                "type": "query",
                "description": "Previous number of days to query"
              }
            ]
          },
          "docs": "After calling this method, you will then need to poll for the query results based on the returned execution Id"
        },
        {
          "info": {
            "name": "Get the results of a usage query",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/oauth/clients/:clientId/usage/query/results/:executionId",
            "params": [
              {
                "name": "executionId",
                "value": "",
                "type": "path",
                "description": "ID of the query execution"
              },
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "Client ID"
              }
            ]
          },
          "docs": "Get the results of a usage query"
        },
        {
          "info": {
            "name": "Query organization API Usage - ",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v2/usage/query"
          },
          "docs": "After calling this method, you will then need to poll for the query results based on the returned execution Id"
        },
        {
          "info": {
            "name": "Get the results of a usage query",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/usage/query/:executionId/results",
            "params": [
              {
                "name": "executionId",
                "value": "",
                "type": "path",
                "description": "ID of the query execution"
              }
            ]
          },
          "docs": "Get the results of a usage query"
        },
        {
          "info": {
            "name": "Search organization API Usage",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v2/usage/simplesearch"
          },
          "docs": "After calling this method, you will then need to poll for the query results based on the returned execution Id. The number of records is limited to 20,000 results"
        },
        {
          "info": {
            "name": "Get the results of a usage search. Number of records to be returned is limited to 20,000 results.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/usage/simplesearch/:executionId/results",
            "params": [
              {
                "name": "executionId",
                "value": "",
                "type": "path",
                "description": "ID of the search execution"
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "The cursor that points to the end of the set of entities that has been returned"
              },
              {
                "name": "pageSize",
                "value": "",
                "type": "query",
                "description": "The max number of entities to be returned per request. Maximum page size of 1000"
              }
            ]
          },
          "docs": "Get the results of a usage search. Number of records to be returned is limited to 20,000 results."
        },
        {
          "info": {
            "name": "Query your client's public api usage.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v2/usage/client/:clientId/aggregates/query/jobs",
            "params": [
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              }
            ]
          },
          "docs": "After calling this method, you will need to save the queryExecutionId from the response and use it in a call to the results endpoint to get the results"
        },
        {
          "info": {
            "name": "Get the status and results of the usage query",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/usage/client/:clientId/aggregates/query/jobs/:jobId",
            "params": [
              {
                "name": "clientId",
                "value": "",
                "type": "path",
                "description": "clientId"
              },
              {
                "name": "jobId",
                "value": "",
                "type": "path",
                "description": "jobId"
              },
              {
                "name": "pageSize",
                "value": "",
                "type": "query",
                "description": "Page size of the results. Max is 1000."
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "The cursor that points to the end of the set of entities that has been returned."
              }
            ]
          },
          "docs": "Get the status and results of the usage query"
        },
        {
          "info": {
            "name": "Query your organization's public api usage.",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v2/usage/aggregates/query/jobs"
          },
          "docs": "After calling this method, you will need to save the queryExecutionId from the response and use it in a call to the results endpoint to get the results"
        },
        {
          "info": {
            "name": "Get the status and results of the usage query",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v2/usage/aggregates/query/jobs/:jobId",
            "params": [
              {
                "name": "jobId",
                "value": "",
                "type": "path",
                "description": "jobId"
              },
              {
                "name": "pageSize",
                "value": "",
                "type": "query",
                "description": "Page size of the results. Max is 1000."
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "The cursor that points to the end of the set of entities that has been returned."
              }
            ]
          },
          "docs": "Get the status and results of the usage query"
        }
      ]
    }
  ],
  "bundled": true
}