[{"data":1,"prerenderedAt":846},["ShallowReactive",2],{"doc-guides\u002Ftesting-api-swagger":3,"content-query-OYLUYurpKU":4},null,{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"sidebar_position":11,"body":12,"_type":840,"_id":841,"_source":842,"_file":843,"_stem":844,"_extension":845},"\u002Fdocs\u002Fguides\u002Ftesting-api-swagger","guides",false,"","Testing APIs with Swagger UI","Use the interactive API explorer at \u002Fapi-docs to try CredVault public endpoints with your API key.",1,{"type":13,"children":14,"toc":828},"root",[15,23,29,36,41,56,70,88,104,110,175,181,251,263,269,313,320,428,434,454,491,510,516,521,590,595,633,639,780,786,822],{"type":16,"tag":17,"props":18,"children":20},"element","h1",{"id":19},"testing-apis-with-swagger-ui",[21],{"type":22,"value":9},"text",{"type":16,"tag":24,"props":25,"children":26},"p",{},[27],{"type":22,"value":28},"CredVault ships an interactive OpenAPI explorer (Swagger UI). You can call real endpoints from the browser, see responses, and copy working request shapes — no client code required.",{"type":16,"tag":30,"props":31,"children":33},"h2",{"id":32},"open-the-api-explorer",[34],{"type":22,"value":35},"Open the API explorer",{"type":16,"tag":24,"props":37,"children":38},{},[39],{"type":22,"value":40},"Go to:",{"type":16,"tag":24,"props":42,"children":43},{},[44],{"type":16,"tag":45,"props":46,"children":47},"strong",{},[48],{"type":16,"tag":49,"props":50,"children":54},"a",{"href":51,"rel":52},"https:\u002F\u002Fcredvault.net\u002Fapi-docs",[53],"nofollow",[55],{"type":22,"value":51},{"type":16,"tag":24,"props":57,"children":58},{},[59,61,68],{"type":22,"value":60},"Or from any CredVault page, open ",{"type":16,"tag":62,"props":63,"children":65},"code",{"className":64},[],[66],{"type":22,"value":67},"\u002Fapi-docs",{"type":22,"value":69}," on the same host.",{"type":16,"tag":24,"props":71,"children":72},{},[73,75,86],{"type":22,"value":74},"You should see the CredVault API title, a server selector, and tagged public data endpoints. The machine-readable OpenAPI document is also available at ",{"type":16,"tag":49,"props":76,"children":79},{"href":77,"rel":78},"https:\u002F\u002Fcredvault.net\u002Fswagger.json",[53],[80],{"type":16,"tag":62,"props":81,"children":83},{"className":82},[],[84],{"type":22,"value":85},"\u002Fswagger.json",{"type":22,"value":87},".",{"type":16,"tag":89,"props":90,"children":91},"blockquote",{},[92],{"type":16,"tag":24,"props":93,"children":94},{},[95,97,102],{"type":22,"value":96},"If you still see a CredVault “Page not found” screen, the edge proxy has not been updated yet. After Caddy routes ",{"type":16,"tag":62,"props":98,"children":100},{"className":99},[],[101],{"type":22,"value":67},{"type":22,"value":103}," to the backend, this link works.",{"type":16,"tag":30,"props":105,"children":107},{"id":106},"before-you-test",[108],{"type":22,"value":109},"Before you test",{"type":16,"tag":111,"props":112,"children":113},"ol",{},[114,134,147],{"type":16,"tag":115,"props":116,"children":117},"li",{},[118,120,125,127,132],{"type":22,"value":119},"Create an API key in the dashboard (",{"type":16,"tag":45,"props":121,"children":122},{},[123],{"type":22,"value":124},"API Keys",{"type":22,"value":126}," → ",{"type":16,"tag":45,"props":128,"children":129},{},[130],{"type":22,"value":131},"Create New Key",{"type":22,"value":133},").",{"type":16,"tag":115,"props":135,"children":136},{},[137,139,145],{"type":22,"value":138},"Copy the key once (",{"type":16,"tag":62,"props":140,"children":142},{"className":141},[],[143],{"type":22,"value":144},"cvk_…",{"type":22,"value":146},"). It is only shown at creation time.",{"type":16,"tag":115,"props":148,"children":149},{},[150,152,158,160,166,167,173],{"type":22,"value":151},"Grant at least the scopes you plan to try (",{"type":16,"tag":62,"props":153,"children":155},{"className":154},[],[156],{"type":22,"value":157},"data:read",{"type":22,"value":159},", ",{"type":16,"tag":62,"props":161,"children":163},{"className":162},[],[164],{"type":22,"value":165},"data:write",{"type":22,"value":159},{"type":16,"tag":62,"props":168,"children":170},{"className":169},[],[171],{"type":22,"value":172},"webhooks:manage",{"type":22,"value":174},", etc.).",{"type":16,"tag":30,"props":176,"children":178},{"id":177},"authorize-swagger",[179],{"type":22,"value":180},"Authorize Swagger",{"type":16,"tag":111,"props":182,"children":183},{},[184,196,216,235],{"type":16,"tag":115,"props":185,"children":186},{},[187,189,194],{"type":22,"value":188},"Click ",{"type":16,"tag":45,"props":190,"children":191},{},[192],{"type":22,"value":193},"Authorize",{"type":22,"value":195}," (padlock) at the top of Swagger UI.",{"type":16,"tag":115,"props":197,"children":198},{},[199,201,206,208,214],{"type":22,"value":200},"Prefer ",{"type":16,"tag":45,"props":202,"children":203},{},[204],{"type":22,"value":205},"ApiKeyAuth",{"type":22,"value":207}," — paste your full key into the ",{"type":16,"tag":62,"props":209,"children":211},{"className":210},[],[212],{"type":22,"value":213},"X-API-Key",{"type":22,"value":215}," value field.",{"type":16,"tag":115,"props":217,"children":218},{},[219,221,226,228,233],{"type":22,"value":220},"You can also use ",{"type":16,"tag":45,"props":222,"children":223},{},[224],{"type":22,"value":225},"BearerAuth",{"type":22,"value":227}," with ",{"type":16,"tag":62,"props":229,"children":231},{"className":230},[],[232],{"type":22,"value":144},{"type":22,"value":234}," as the bearer token (same key).",{"type":16,"tag":115,"props":236,"children":237},{},[238,239,243,245,250],{"type":22,"value":188},{"type":16,"tag":45,"props":240,"children":241},{},[242],{"type":22,"value":193},{"type":22,"value":244},", then ",{"type":16,"tag":45,"props":246,"children":247},{},[248],{"type":22,"value":249},"Close",{"type":22,"value":87},{"type":16,"tag":24,"props":252,"children":253},{},[254,256,261],{"type":22,"value":255},"Every ",{"type":16,"tag":45,"props":257,"children":258},{},[259],{"type":22,"value":260},"Try it out",{"type":22,"value":262}," request will include that credential until you log out of the padlock dialog.",{"type":16,"tag":30,"props":264,"children":266},{"id":265},"try-an-endpoint",[267],{"type":22,"value":268},"Try an endpoint",{"type":16,"tag":111,"props":270,"children":271},{},[272,284,293,298,308],{"type":16,"tag":115,"props":273,"children":274},{},[275,277,283],{"type":22,"value":276},"Expand a path (for example ",{"type":16,"tag":62,"props":278,"children":280},{"className":279},[],[281],{"type":22,"value":282},"GET \u002Fapi\u002Fv1\u002Fdata\u002F{collection}",{"type":22,"value":133},{"type":16,"tag":115,"props":285,"children":286},{},[287,288,292],{"type":22,"value":188},{"type":16,"tag":45,"props":289,"children":290},{},[291],{"type":22,"value":260},{"type":22,"value":87},{"type":16,"tag":115,"props":294,"children":295},{},[296],{"type":22,"value":297},"Fill path\u002Fquery fields (collection name, optional filters).",{"type":16,"tag":115,"props":299,"children":300},{},[301,302,307],{"type":22,"value":188},{"type":16,"tag":45,"props":303,"children":304},{},[305],{"type":22,"value":306},"Execute",{"type":22,"value":87},{"type":16,"tag":115,"props":309,"children":310},{},[311],{"type":22,"value":312},"Read the status code and JSON body below.",{"type":16,"tag":314,"props":315,"children":317},"h3",{"id":316},"quick-smoke-test",[318],{"type":22,"value":319},"Quick smoke test",{"type":16,"tag":321,"props":322,"children":323},"table",{},[324,343],{"type":16,"tag":325,"props":326,"children":327},"thead",{},[328],{"type":16,"tag":329,"props":330,"children":331},"tr",{},[332,338],{"type":16,"tag":333,"props":334,"children":335},"th",{},[336],{"type":22,"value":337},"Step",{"type":16,"tag":333,"props":339,"children":340},{},[341],{"type":22,"value":342},"Action",{"type":16,"tag":344,"props":345,"children":346},"tbody",{},[347,366,385,403],{"type":16,"tag":329,"props":348,"children":349},{},[350,356],{"type":16,"tag":351,"props":352,"children":353},"td",{},[354],{"type":22,"value":355},"1",{"type":16,"tag":351,"props":357,"children":358},{},[359,361],{"type":22,"value":360},"Authorize with ",{"type":16,"tag":62,"props":362,"children":364},{"className":363},[],[365],{"type":22,"value":144},{"type":16,"tag":329,"props":367,"children":368},{},[369,374],{"type":16,"tag":351,"props":370,"children":371},{},[372],{"type":22,"value":373},"2",{"type":16,"tag":351,"props":375,"children":376},{},[377,383],{"type":16,"tag":62,"props":378,"children":380},{"className":379},[],[381],{"type":22,"value":382},"POST \u002Fapi\u002Fv1\u002Fdata\u002F{collection}",{"type":22,"value":384}," with a small JSON body",{"type":16,"tag":329,"props":386,"children":387},{},[388,393],{"type":16,"tag":351,"props":389,"children":390},{},[391],{"type":22,"value":392},"3",{"type":16,"tag":351,"props":394,"children":395},{},[396,401],{"type":16,"tag":62,"props":397,"children":399},{"className":398},[],[400],{"type":22,"value":282},{"type":22,"value":402}," and confirm the document appears",{"type":16,"tag":329,"props":404,"children":405},{},[406,411],{"type":16,"tag":351,"props":407,"children":408},{},[409],{"type":22,"value":410},"4",{"type":16,"tag":351,"props":412,"children":413},{},[414,420,422],{"type":16,"tag":62,"props":415,"children":417},{"className":416},[],[418],{"type":22,"value":419},"GET \u002Fapi\u002Fv1\u002Fdata\u002F{collection}\u002F{id}",{"type":22,"value":421}," with the returned ",{"type":16,"tag":62,"props":423,"children":425},{"className":424},[],[426],{"type":22,"value":427},"_id",{"type":16,"tag":30,"props":429,"children":431},{"id":430},"what-is-documented-here",[432],{"type":22,"value":433},"What is documented here",{"type":16,"tag":24,"props":435,"children":436},{},[437,439,444,446,452],{"type":22,"value":438},"The explorer focuses on the ",{"type":16,"tag":45,"props":440,"children":441},{},[442],{"type":22,"value":443},"public data API",{"type":22,"value":445}," mounted at ",{"type":16,"tag":62,"props":447,"children":449},{"className":448},[],[450],{"type":22,"value":451},"\u002Fapi\u002Fv1\u002Fdata",{"type":22,"value":453},":",{"type":16,"tag":455,"props":456,"children":457},"ul",{},[458,463,468,481,486],{"type":16,"tag":115,"props":459,"children":460},{},[461],{"type":22,"value":462},"Query \u002F read documents",{"type":16,"tag":115,"props":464,"children":465},{},[466],{"type":22,"value":467},"Create, update, delete documents",{"type":16,"tag":115,"props":469,"children":470},{},[471,473,479],{"type":22,"value":472},"SQL-style LakeVault queries (",{"type":16,"tag":62,"props":474,"children":476},{"className":475},[],[477],{"type":22,"value":478},"POST \u002Fsql",{"type":22,"value":480},")",{"type":16,"tag":115,"props":482,"children":483},{},[484],{"type":22,"value":485},"Batch operations",{"type":16,"tag":115,"props":487,"children":488},{},[489],{"type":22,"value":490},"Webhook registration",{"type":16,"tag":24,"props":492,"children":493},{},[494,496,501,503,509],{"type":22,"value":495},"Dashboard session routes (billing UI, admin, etc.) are not the primary surface in this explorer — use your ",{"type":16,"tag":62,"props":497,"children":499},{"className":498},[],[500],{"type":22,"value":144},{"type":22,"value":502}," key against ",{"type":16,"tag":62,"props":504,"children":506},{"className":505},[],[507],{"type":22,"value":508},"\u002Fapi\u002Fv1\u002Fdata\u002F...",{"type":22,"value":87},{"type":16,"tag":30,"props":511,"children":513},{"id":512},"curl-equivalent",[514],{"type":22,"value":515},"Curl equivalent",{"type":16,"tag":24,"props":517,"children":518},{},[519],{"type":22,"value":520},"Swagger’s “Try it out” is the same request as:",{"type":16,"tag":522,"props":523,"children":527},"pre",{"className":524,"code":525,"language":526,"meta":8,"style":8},"language-bash shiki shiki-themes github-dark","curl -sS https:\u002F\u002Fcredvault.net\u002Fapi\u002Fv1\u002Fdata\u002Fusers \\\n  -H \"X-API-Key: cvk_YOUR_KEY_HERE\" \\\n  -H \"Content-Type: application\u002Fjson\"\n","bash",[528],{"type":16,"tag":62,"props":529,"children":530},{"__ignoreMap":8},[531,559,577],{"type":16,"tag":532,"props":533,"children":535},"span",{"class":534,"line":11},"line",[536,542,548,554],{"type":16,"tag":532,"props":537,"children":539},{"style":538},"--shiki-default:#B392F0",[540],{"type":22,"value":541},"curl",{"type":16,"tag":532,"props":543,"children":545},{"style":544},"--shiki-default:#79B8FF",[546],{"type":22,"value":547}," -sS",{"type":16,"tag":532,"props":549,"children":551},{"style":550},"--shiki-default:#9ECBFF",[552],{"type":22,"value":553}," https:\u002F\u002Fcredvault.net\u002Fapi\u002Fv1\u002Fdata\u002Fusers",{"type":16,"tag":532,"props":555,"children":556},{"style":544},[557],{"type":22,"value":558}," \\\n",{"type":16,"tag":532,"props":560,"children":562},{"class":534,"line":561},2,[563,568,573],{"type":16,"tag":532,"props":564,"children":565},{"style":544},[566],{"type":22,"value":567},"  -H",{"type":16,"tag":532,"props":569,"children":570},{"style":550},[571],{"type":22,"value":572}," \"X-API-Key: cvk_YOUR_KEY_HERE\"",{"type":16,"tag":532,"props":574,"children":575},{"style":544},[576],{"type":22,"value":558},{"type":16,"tag":532,"props":578,"children":580},{"class":534,"line":579},3,[581,585],{"type":16,"tag":532,"props":582,"children":583},{"style":544},[584],{"type":22,"value":567},{"type":16,"tag":532,"props":586,"children":587},{"style":550},[588],{"type":22,"value":589}," \"Content-Type: application\u002Fjson\"\n",{"type":16,"tag":24,"props":591,"children":592},{},[593],{"type":22,"value":594},"Or with bearer style:",{"type":16,"tag":522,"props":596,"children":598},{"className":524,"code":597,"language":526,"meta":8,"style":8},"curl -sS https:\u002F\u002Fcredvault.net\u002Fapi\u002Fv1\u002Fdata\u002Fusers \\\n  -H \"Authorization: Bearer cvk_YOUR_KEY_HERE\"\n",[599],{"type":16,"tag":62,"props":600,"children":601},{"__ignoreMap":8},[602,621],{"type":16,"tag":532,"props":603,"children":604},{"class":534,"line":11},[605,609,613,617],{"type":16,"tag":532,"props":606,"children":607},{"style":538},[608],{"type":22,"value":541},{"type":16,"tag":532,"props":610,"children":611},{"style":544},[612],{"type":22,"value":547},{"type":16,"tag":532,"props":614,"children":615},{"style":550},[616],{"type":22,"value":553},{"type":16,"tag":532,"props":618,"children":619},{"style":544},[620],{"type":22,"value":558},{"type":16,"tag":532,"props":622,"children":623},{"class":534,"line":561},[624,628],{"type":16,"tag":532,"props":625,"children":626},{"style":544},[627],{"type":22,"value":567},{"type":16,"tag":532,"props":629,"children":630},{"style":550},[631],{"type":22,"value":632}," \"Authorization: Bearer cvk_YOUR_KEY_HERE\"\n",{"type":16,"tag":30,"props":634,"children":636},{"id":635},"common-responses",[637],{"type":22,"value":638},"Common responses",{"type":16,"tag":321,"props":640,"children":641},{},[642,663],{"type":16,"tag":325,"props":643,"children":644},{},[645],{"type":16,"tag":329,"props":646,"children":647},{},[648,653,658],{"type":16,"tag":333,"props":649,"children":650},{},[651],{"type":22,"value":652},"Status",{"type":16,"tag":333,"props":654,"children":655},{},[656],{"type":22,"value":657},"Meaning",{"type":16,"tag":333,"props":659,"children":660},{},[661],{"type":22,"value":662},"What to do",{"type":16,"tag":344,"props":664,"children":665},{},[666,684,708,744,762],{"type":16,"tag":329,"props":667,"children":668},{},[669,674,679],{"type":16,"tag":351,"props":670,"children":671},{},[672],{"type":22,"value":673},"200 \u002F 201",{"type":16,"tag":351,"props":675,"children":676},{},[677],{"type":22,"value":678},"Success",{"type":16,"tag":351,"props":680,"children":681},{},[682],{"type":22,"value":683},"Use the JSON body",{"type":16,"tag":329,"props":685,"children":686},{},[687,692,697],{"type":16,"tag":351,"props":688,"children":689},{},[690],{"type":22,"value":691},"401",{"type":16,"tag":351,"props":693,"children":694},{},[695],{"type":22,"value":696},"Missing or invalid key",{"type":16,"tag":351,"props":698,"children":699},{},[700,702],{"type":22,"value":701},"Re-authorize; confirm the key starts with ",{"type":16,"tag":62,"props":703,"children":705},{"className":704},[],[706],{"type":22,"value":707},"cvk_",{"type":16,"tag":329,"props":709,"children":710},{},[711,716,721],{"type":16,"tag":351,"props":712,"children":713},{},[714],{"type":22,"value":715},"403",{"type":16,"tag":351,"props":717,"children":718},{},[719],{"type":22,"value":720},"Key valid but scope too narrow",{"type":16,"tag":351,"props":722,"children":723},{},[724,726,731,733,738,739],{"type":22,"value":725},"Add ",{"type":16,"tag":62,"props":727,"children":729},{"className":728},[],[730],{"type":22,"value":157},{"type":22,"value":732}," \u002F ",{"type":16,"tag":62,"props":734,"children":736},{"className":735},[],[737],{"type":22,"value":165},{"type":22,"value":732},{"type":16,"tag":62,"props":740,"children":742},{"className":741},[],[743],{"type":22,"value":172},{"type":16,"tag":329,"props":745,"children":746},{},[747,752,757],{"type":16,"tag":351,"props":748,"children":749},{},[750],{"type":22,"value":751},"404",{"type":16,"tag":351,"props":753,"children":754},{},[755],{"type":22,"value":756},"No active cluster or missing document",{"type":16,"tag":351,"props":758,"children":759},{},[760],{"type":22,"value":761},"Create a cluster first, or check the id",{"type":16,"tag":329,"props":763,"children":764},{},[765,770,775],{"type":16,"tag":351,"props":766,"children":767},{},[768],{"type":22,"value":769},"429",{"type":16,"tag":351,"props":771,"children":772},{},[773],{"type":22,"value":774},"Rate limited",{"type":16,"tag":351,"props":776,"children":777},{},[778],{"type":22,"value":779},"Wait, then retry",{"type":16,"tag":30,"props":781,"children":783},{"id":782},"next-steps",[784],{"type":22,"value":785},"Next steps",{"type":16,"tag":455,"props":787,"children":788},{},[789,799,810],{"type":16,"tag":115,"props":790,"children":791},{},[792,794],{"type":22,"value":793},"Create and rotate keys: ",{"type":16,"tag":49,"props":795,"children":797},{"href":796},"\u002Fdocs\u002Ffeatures\u002Fapi-keys",[798],{"type":22,"value":124},{"type":16,"tag":115,"props":800,"children":801},{},[802,804],{"type":22,"value":803},"Install the CLI for the same backend: ",{"type":16,"tag":49,"props":805,"children":807},{"href":806},"\u002Fdocs\u002Ffeatures\u002Fcie-cli",[808],{"type":22,"value":809},"CIE CLI",{"type":16,"tag":115,"props":811,"children":812},{},[813,815,820],{"type":22,"value":814},"Keep ",{"type":16,"tag":62,"props":816,"children":818},{"className":817},[],[819],{"type":22,"value":67},{"type":22,"value":821}," open while you paste generated requests into your app",{"type":16,"tag":823,"props":824,"children":825},"style",{},[826],{"type":22,"value":827},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":8,"searchDepth":561,"depth":561,"links":829},[830,831,832,833,836,837,838,839],{"id":32,"depth":561,"text":35},{"id":106,"depth":561,"text":109},{"id":177,"depth":561,"text":180},{"id":265,"depth":561,"text":268,"children":834},[835],{"id":316,"depth":579,"text":319},{"id":430,"depth":561,"text":433},{"id":512,"depth":561,"text":515},{"id":635,"depth":561,"text":638},{"id":782,"depth":561,"text":785},"markdown","content:docs:guides:testing-api-swagger.md","content","docs\u002Fguides\u002Ftesting-api-swagger.md","docs\u002Fguides\u002Ftesting-api-swagger","md",1791370285569]