指定されたクエリシェイプハッシュのメタデータと統計の概要を返します。
プロジェクトを識別する一意の 24 桁の 16 進数文字列。 認証済みユーザーがアクセスできるすべてのプロジェクトを取得するには、 /groups エンドポイントを使用します。
注: グループとプロジェクトは同義語です。そのため、グループ ID はプロジェクト ID と同じです。既存のグループの場合、グループ/プロジェクト ID は同じままです。リソースおよび対応するエンドポイントでは、グループという用語が使用されます。
形式は次のパターンと一致する必要があります: ^([a-f0-9]{24})$。
クラスターを識別する人間が判読できるラベル。
形式は次のパターンと一致する必要があります: ^[a-zA-Z0-9][a-zA-Z0-9-]*$。
クエリシェイプの SHA256 ハッシュは、 $queryStats や $explain などのMongoDBコマンドまたは低速クエリ ログによって出力されます。
形式は次のパターンと一致する必要があります: ^([a-fA-F0-9]{64})$。
アプリケーションがレスポンスを envelope JSON オブジェクトにラップするかどうかを示すフラグ。一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。結果のリストを返すエンドポイントは、結果オブジェクトをエンベロープとして使用します。アプリケーションは、レスポンス本体にステータス パラメータを追加します。
デフォルト値はfalseです。
レスポンス本体を pretty-print 形式にするかどうかを示すフラグ。
デフォルト値はfalseです。
クエリシェイプ統計を取得する日時。このパラメータは、 UNIXエポック から経過したミリ秒数で値を表します。
の最小値は 1199145600000 です。
クエリシェイプ統計を取得する日時。このパラメータは、 UNIXエポック から経過したミリ秒数で値を表します。
の最小値は 1199145600000 です。
クエリシェイプ統計を取得する ProcessId。 ProcessId は、 MongoDBプロセスを提供するホストとポートの組み合わせです。ホストは、 MongoDBプロセス(mongod または mongos)を実行するホストのホスト名、FQDN、IPv4 アドレス、または IPv6 アドレスである必要があります。ポートはMongoDBプロセスがリクエストをリッスンする IANA ポートである必要があります。複数のプロセス ID を含めるには、各プロセス ID の間をアンパサンド (&) で区切って、パラメーターを複数回渡します。
10 要素以下各 の形式は次のパターンと一致する必要があります: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$。
atlas api queryShapeInsights getGroupClusterQueryShapeInsightDetails --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)
func main() {
ctx := context.Background()
clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")
// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))
if err != nil {
log.Fatalf("Error: %v", err)
}
params = &sdk.GetGroupClusterQueryShapeInsightDetailsApiParams{}
sdkResp, httpResp, err := client.QueryShapeInsightsApi.
GetGroupClusterQueryShapeInsightDetailsWithParams(ctx, params).
Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2025-03-12+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/{queryShapeHash}/details?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest \
--header "Accept: application/vnd.atlas.2025-03-12+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/{queryShapeHash}/details?pretty=true"
{
"firstSeen": {
"applicationName": "string",
"driverName": "string",
"driverVersion": "string",
"timestamp": 42
},
"lastSeen": {
"applicationName": "string",
"driverName": "string",
"driverVersion": "string",
"timestamp": 42
},
"queryStats": {
"avgWorkingMillis": 42.0,
"bytesRead": 42.0,
"command": "find",
"docsExamined": 42.0,
"docsExaminedRatio": 42.0,
"docsReturned": 42.0,
"execCount": 42.0,
"keysExamined": 42.0,
"keysExaminedRatio": 42.0,
"lastExecMicros": 42.0,
"namespace": "string",
"p50ExecMicros": 42.0,
"p90ExecMicros": 42.0,
"p99ExecMicros": 42.0,
"queryShape": "string",
"queryShapeHash": "string",
"totalTimeToResponseMicros": 42.0,
"totalWorkingMillis": 42.0
}
}
{
"error": 400,
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"reason": "Bad Request",
"errorCode": "VALIDATION_ERROR"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"error": 404,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"reason": "Not Found",
"errorCode": "RESOURCE_NOT_FOUND"
}
{
"error": 429,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Too Many Requests",
"errorCode": "RATE_LIMITED"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}