PageSourceSearch

https://docs.voiden.md/assets/js/dfe7efd6.66d62af3.js

js voiden.md collected 2026-10-04 00:20:30 UTC 5,579 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkvoiden_docs=globalThis.webpackChunkvoiden_docs||[]).push([[374],{2396:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"core-features-section/voiden-blocks/rest-blocks/path-params-block","title":"Path Params Block","description":"Some APIs embed parameters directly into the URL path itself \u2014 like /users/ or /products/{category}/{item}.","source":"@site/docs/core-features-section/voiden-blocks/rest-blocks/path-params-block.md","sourceDirName":"core-features-section/voiden-blocks/rest-blocks","slug":"/core-features-section/voiden-blocks/rest-blocks/path-params-block","permalink":"/docs/core-features-section/voiden-blocks/rest-blocks/path-params-block","draft":false,"unlisted":false,"editUrl":"https://github.com/VoidenHQ/docs/tree/main/docs/core-features-section/voiden-blocks/rest-blocks/path-params-block.md","tags":[],"version":"current","lastUpdatedAt":1781265498000,"sidebarPosition":10,"frontMatter":{"id":"path-params-block","title":"Path Params Block","sidebar_label":"Path Params Block","sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"Query Params Block","permalink":"/docs/core-features-section/voiden-blocks/rest-blocks/query-params-block"},"next":{"title":"Multipart Table Block","permalink":"/docs/core-features-section/voiden-blocks/rest-blocks/multipart-table-block"}}');var r=s(4848),a=s(8453);const o={id:"path-params-block",title:"Path Params Block",sidebar_label:"Path Params Block",sidebar_position:10},i="Path Params Block",l={},c=[{value:"Try it Out",id:"try-it-out",level:3}];function d(e){const t={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h3:"h3",header:"header",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"path-params-block",children:"Path Params Block"})}),"\n",(0,r.jsxs)(t.p,{children:["Some APIs embed parameters directly into the ",(0,r.jsx)(t.strong,{children:"URL"})," path itself \u2014 like ",(0,r.jsx)(t.code,{children:"/users/{id}"})," or ",(0,r.jsx)(t.code,{children:"/products/{category}/{item}"}),".",(0,r.jsx)(t.br,{}),"\n","The ",(0,r.jsx)(t.strong,{children:"Path Params Block"})," lets you define these dynamic segments as a clean key-value table in ",(0,r.jsx)(t.strong,{children:"Voiden"}),", so you can swap values without manually editing your endpoint URL."]}),"\n",(0,r.jsx)(t.p,{children:"Define your placeholders once in the endpoint, then fill in the values in the table.\nVoiden automatically substitutes them into the URL at runtime, keeping your endpoint template reusable and your parameter values visible."}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h3,{id:"try-it-out",children:"Try it Out"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Type ",(0,r.jsx)(t.code,{children:"/path-params"})," and press Enter to create a Path Params Block."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"path-params",src:s(4953).A+"",width:"1293",he
1ight:"854"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Add the key-value pairs to the table."}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Run the request using ",(0,r.jsx)(t.strong,{children:"Cmd + Enter"})," (Mac) or ",(0,r.jsx)(t.strong,{children:"Ctrl + Enter"})," (Windows/Linux),",(0,r.jsx)(t.br,{}),"\n",(0,r.jsx)(t.strong,{children:"or"})," click the ",(0,r.jsx)(t.strong,{children:"green Play button"})," in the toolbar."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Check the ",(0,r.jsx)(t.strong,{children:"Response Panel"}),". In the ",(0,r.jsx)(t.strong,{children:"Request Summary / Security"})," section you\u2019ll see your path params applied to the endpoint URL, confirming they\u2019re being sent as expected."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"path-params",src:s(5110).A+"",width:"1294",height:"854"})}),"\n",(0,r.jsxs)(t.blockquote,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Pro Tip:"})," Want to temporarily disable a path param without deleting it?",(0,r.jsx)(t.br,{}),"\n","Use ",(0,r.jsx)(t.strong,{children:"Cmd + /"})," (Mac) or ",(0,r.jsx)(t.strong,{children:"Ctrl + /"})," (Windows/Linux) to comment it out.",(0,r.jsx)(t.br,{}),"\n","It\u2019ll stay visible but won\u2019t be sent with the request."]}),"\n"]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsxs)(t.p,{children:["The Path Params Block makes dynamic URLs manageable.",(0,r.jsx)(t.br,{}),"\n","No string concatenation. No template confusion. Just variables and values, cleanly separated in a simple table."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},4953:(e,t,s)=>{s.d(t,{A:()=>n});const n=s.p+"assets/images/path-param-de6a67f1bdb4954ce3ada9415993211f.png"},5110:(e,t,s)=>{s.d(t,{A:()=>n});const n=s.p+"assets/images/path-params-done-99ac42f86750d7de0308c43094f692ea.gif"},8453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>i});var n=s(6540);const r={},a=n.createContext(r);function o(e){const t=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.