{
  "opencollection": "1.0.0",
  "info": {
    "name": "MongoDB Atlas Administration Access Tracking Query Shape Insights API",
    "version": "2.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://cloud.mongodb.com/api/oauth/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Query Shape Insights",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Return Query Statistic Summaries",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/clusters/:clusterName/queryShapeInsights/summaries",
            "params": [
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups."
              },
              {
                "name": "clusterName",
                "value": "",
                "type": "path",
                "description": "Human-readable label that identifies the cluster."
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Date and time from which to retrieve query shape statistics. This parameter expresses its value in the number of milliseconds that have elapsed since the [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time).\n\n- If you don't specify the **until** parameter, the endpoint returns data covering from the **since** value and the current time.\n- If you specify neither the **since** nor the **until** parameters, the endpoint returns data from the previous 24 hours."
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Date and time up until which to retrieve query shape statistics. This parameter expresses its value in the number of milliseconds that have elapsed since the [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time).\n\n- If you specify the **until** parameter, you must specify the **since** parameter.\n- If you specify neither the **since** nor the **until** parameters, the endpoint returns data from the previous 24 hours."
              },
              {
                "name": "processIds",
                "value": "",
                "type": "query",
                "description": "Process IDs from which to retrieve query shape statistics. A `processId` is a combination of host and port that serves the MongoDB process. The host must be the hostname, FQDN, IPv4 address, or IPv6 address of the host that runs the MongoDB process (`mongod` or `mongos`). The port must be the IANA port on which the MongoDB process listens for requests. To include multiple `processId`, pass the parameter multiple times delimited with an ampersand (`&`) between each `processId`."
              },
              {
                "name": "namespaces",
                "value": "",
                "type": "query",
                "description": "Namespaces from which to retrieve query shape statistics. A namespace consists of one database and one collection resource written as `.`: `<database>.<collection>`. To include multiple namespaces, pass the parameter multiple times delimited with an ampersand (`&`) between each namespace. Omit this parameter to return results for all namespaces."
              },
              {
                "name": "commands",
                "value": "",
                "type": "query",
                "description": "Retrieve query shape statistics matching specified MongoDB commands. To include multiple commands, pass the parameter multiple times delimited with an ampersand (`&`) between each command. The currently supported parameters are find, distinct, and aggregate. Omit this parameter to return results for all supported commands."
              },
              {
                "name": "nSummaries",
                "value": "",
                "type": "query",
                "description": "Maximum number of query statistic summaries to return."
              },
              {
                "name": "series",
                "value": "",
                "type": "query",
                "description": "Query shape statistics data series to retrieve. A series represents a specific metric about query execution. To include multiple series, pass the parameter multiple times delimited with an ampersand (`&`) between each series. Omit this parameter to return results for all available series."
              },
              {
                "name": "queryShapeHashes",
                "value": "",
                "type": "query",
                "description": "A list of SHA256 hashes of desired query shapes, output by MongoDB commands like `$queryStats` and $explain or slow query logs. To include multiple series, pass the parameter multiple times delimited with an ampersand (`&`) between each series. Omit this parameter to return results for all available series."
              },
              {
                "name": "envelope",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body."
              },
              {
                "name": "pretty",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response body should be in the prettyprint format."
              }
            ]
          },
          "docs": "Returns a list of query shape statistics summaries for a given cluster. Query shape statistics provide performance insights about MongoDB queries, helping users identify problematic query patterns and potential optimizations."
        },
        {
          "info": {
            "name": "Return Query Shape Details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/clusters/:clusterName/queryShapeInsights/:queryShapeHash/details",
            "params": [
              {
                "name": "envelope",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body."
              },
              {
                "name": "pretty",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response body should be in the prettyprint format."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups."
              },
              {
                "name": "clusterName",
                "value": "",
                "type": "path",
                "description": "Human-readable label that identifies the cluster."
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Date and time from which to retrieve query shape statistics. This parameter expresses its value in the number of milliseconds that have elapsed since the [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time).\n\n- If you don't specify the **until** parameter, the endpoint returns data covering from the **since** value and the current time.\n- If you specify neither the **since** nor the **until** parameters, the endpoint returns data from the previous 24 hours."
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Date and time up until which to retrieve query shape statistics. This parameter expresses its value in the number of milliseconds that have elapsed since the [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time).\n\n- If you specify the **until** parameter, you must specify the **since** parameter.\n- If you specify neither the **since** nor the **until** parameters, the endpoint returns data from the previous 24 hours."
              },
              {
                "name": "processIds",
                "value": "",
                "type": "query",
                "description": "Process IDs from which to retrieve query shape statistics. A `processId` is a combination of host and port that serves the MongoDB process. The host must be the hostname, FQDN, IPv4 address, or IPv6 address of the host that runs the MongoDB process (`mongod` or `mongos`). The port must be the IANA port on which the MongoDB process listens for requests. To include multiple `processIds`, pass the parameter multiple times delimited with an ampersand (`&`) between each `processId`."
              },
              {
                "name": "queryShapeHash",
                "value": "",
                "type": "path",
                "description": "A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow query logs."
              }
            ]
          },
          "docs": "Returns the metadata and statistics summary for a given query shape hash."
        },
        {
          "info": {
            "name": "Return All Query Shapes",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/clusters/:clusterName/queryShapes",
            "params": [
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups."
              },
              {
                "name": "clusterName",
                "value": "",
                "type": "path",
                "description": "Human-readable label that identifies the cluster."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "The status of query shapes to retrieve. Only REJECTED status is supported. If omitted, defaults to REJECTED."
              },
              {
                "name": "envelope",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body."
              },
              {
                "name": "includeCount",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response returns the total number of items (`totalCount`) in the response."
              },
              {
                "name": "itemsPerPage",
                "value": "",
                "type": "query",
                "description": "Number of items that the response returns per page."
              },
              {
                "name": "pageNum",
                "value": "",
                "type": "query",
                "description": "Number of the page that displays the current set of the total objects that the response returns."
              },
              {
                "name": "pretty",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response body should be in the prettyprint format."
              }
            ]
          },
          "docs": "Returns a list of query shapes for one cluster. Query shapes may be filtered by their status; at present, this endpoint supports only the REJECTED status."
        },
        {
          "info": {
            "name": "Return One Query Shape",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/clusters/:clusterName/queryShapes/:queryShapeHash",
            "params": [
              {
                "name": "envelope",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body."
              },
              {
                "name": "pretty",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response body should be in the prettyprint format."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups."
              },
              {
                "name": "clusterName",
                "value": "",
                "type": "path",
                "description": "Human-readable label that identifies the cluster."
              },
              {
                "name": "queryShapeHash",
                "value": "",
                "type": "path",
                "description": "A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow query logs."
              }
            ]
          },
          "docs": "Returns the details for a single query shape. This endpoint only returns query shapes with REJECTED status. If the specified query shape hash does not correspond to a rejected query shape, a 404 Not Found error is returned."
        },
        {
          "info": {
            "name": "Update Query Shape Rejection Status",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://cloud.mongodb.com/api/atlas/v2/groups/:groupId/clusters/:clusterName/queryShapes/:queryShapeHash",
            "params": [
              {
                "name": "envelope",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body."
              },
              {
                "name": "pretty",
                "value": "",
                "type": "query",
                "description": "Flag that indicates whether the response body should be in the prettyprint format."
              },
              {
                "name": "groupId",
                "value": "",
                "type": "path",
                "description": "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups."
              },
              {
                "name": "clusterName",
                "value": "",
                "type": "path",
                "description": "Human-readable label that identifies the cluster."
              },
              {
                "name": "queryShapeHash",
                "value": "",
                "type": "path",
                "description": "A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow query logs."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the rejection status of a query shape. Use this endpoint to reject a query shape (preventing it from executing on the cluster) or to unreject a previously rejected query shape (allowing it to execute again). This operation is idempotent: rejecting an already rejected query shape or unrejecting an already unrejected query shape will return 200 OK."
        }
      ]
    }
  ],
  "bundled": true
}