[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"/api/concepts/structures":3,"/api/concepts/structures-surround":467},{"id":4,"title":5,"body":6,"description":458,"extension":459,"links":460,"meta":461,"navigation":462,"path":463,"seo":464,"stem":465,"__hash__":466},"docs/api/2.concepts/structures.md","Structures",{"type":7,"value":8,"toc":451},"minimark",[9,23,38,43,49,141,144,160,164,167,260,264,270,443],[10,11,12,13,17,18,22],"p",{},"Object types in Capacities are represented as ",[14,15,16],"strong",{},"structures"," in the API. Every object has a ",[19,20,21],"code",{},"structureId"," that identifies which type it belongs to.",[10,24,25,26,33,34,37],{},"Retrieve structures for the token's space via ",[27,28,30],"a",{"href":29},"/api/reference",[19,31,32],{},"GET /space/structures"," (or ",[19,35,36],{},"capacities.space.structures()"," in the TypeScript SDK).",[39,40,42],"h2",{"id":41},"structure-metadata","Structure metadata",[10,44,45,46,48],{},"Each entry in the ",[19,47,16],{}," array includes:",[50,51,52,65],"table",{},[53,54,55],"thead",{},[56,57,58,62],"tr",{},[59,60,61],"th",{},"Field",[59,63,64],{},"Description",[66,67,68,82,92,102,121,131],"tbody",{},[56,69,70,76],{},[71,72,73],"td",{},[19,74,75],{},"id",[71,77,78,79,81],{},"Structure id — use as ",[19,80,21],{}," when creating objects",[56,83,84,89],{},[71,85,86],{},[19,87,88],{},"title",[71,90,91],{},"Singular display name (e.g. \"Book\")",[56,93,94,99],{},[71,95,96],{},[19,97,98],{},"pluralName",[71,100,101],{},"Plural display name (e.g. \"Books\")",[56,103,104,109],{},[71,105,106],{},[19,107,108],{},"propertyDefinitions",[71,110,111,112,115,116,120],{},"Fields on objects of this type; label fields include ",[19,113,114],{},"labelSet"," (see ",[27,117,119],{"href":118},"/api/concepts/properties","Properties",")",[56,122,123,128],{},[71,124,125],{},[19,126,127],{},"labelColor",[71,129,130],{},"Color for this type in the UI",[56,132,133,138],{},[71,134,135],{},[19,136,137],{},"collections",[71,139,140],{},"Collections of this structure",[10,142,143],{},"Not every basic structure supports every API operation. At the moment, the following structures are supported via the standard CRUD endpoints:",[145,146,147,151,154,157],"ul",{},[148,149,150],"li",{},"Page",[148,152,153],{},"Tags",[148,155,156],{},"Tasks",[148,158,159],{},"Custom object types",[39,161,163],{"id":162},"content-ids","Content IDs",[10,165,166],{},"All content in Capacities is identified by UUIDs.",[145,168,169,187,212,230,250],{},[148,170,171,174,175,178,179,182,183,186],{},[14,172,173],{},"Space id"," — shown in ",[14,176,177],{},"Settings → Space settings",", or via ",[19,180,181],{},"GET /user/spaces"," / ",[19,184,185],{},"GET /space",".",[148,188,189,192,193,196,197,201,202],{},[14,190,191],{},"Object id"," — use ",[19,194,195],{},"GET /object?id=…"," or copy an object reference from the app (⋯ menu → ",[198,199,200],"em",{},"Copy object reference","). The last segment of a reference URL is the object id:\n",[203,204,209],"pre",{"className":205,"code":207,"language":208},[206],"language-text","capacities://SPACE_ID/OBJECT_ID\n","text",[19,210,207],{"__ignoreMap":211},"",[148,213,214,217,218,220,221,223,224,226,227,229],{},[14,215,216],{},"Collection id"," — same as object ids: copy a collection reference from the app (⋯ menu → ",[198,219,200],{},"), or look it up under each structure's ",[19,222,137],{}," on ",[19,225,32],{},", or on objects in the ",[19,228,137],{}," array.",[148,231,232,235,236,239,240,243,244,246,247,249],{},[14,233,234],{},"Property definition id"," — keys in ",[19,237,238],{},"properties"," and ",[19,241,242],{},"blocks"," on objects; listed on each structure's ",[19,245,108],{}," from ",[19,248,32],{},", or in the app under that property's definition settings.",[148,251,252,255,256,259],{},[14,253,254],{},"Block id"," — present on blocks returned by ",[19,257,258],{},"GET /object","; required for patch/delete/position operations.",[39,261,263],{"id":262},"built-in-structures","Built-in structures",[10,265,266,267,269],{},"Built-in Capacities types use fixed ",[19,268,21],{}," strings:",[50,271,272,283],{},[53,273,274],{},[56,275,276,279],{},[59,277,278],{},"Object type",[59,280,281],{},[19,282,21],{},[66,284,285,295,304,314,324,333,343,353,363,373,383,393,403,413,423,433],{},[56,286,287,290],{},[71,288,289],{},"Space",[71,291,292],{},[19,293,294],{},"RootSpace",[56,296,297,299],{},[71,298,278],{},[71,300,301],{},[19,302,303],{},"RootStructure",[56,305,306,309],{},[71,307,308],{},"Collection",[71,310,311],{},[19,312,313],{},"RootDatabase",[56,315,316,319],{},[71,317,318],{},"Query",[71,320,321],{},[19,322,323],{},"RootQuery",[56,325,326,328],{},[71,327,150],{},[71,329,330],{},[19,331,332],{},"RootPage",[56,334,335,338],{},[71,336,337],{},"Image",[71,339,340],{},[19,341,342],{},"MediaImage",[56,344,345,348],{},[71,346,347],{},"PDF",[71,349,350],{},[19,351,352],{},"MediaPDF",[56,354,355,358],{},[71,356,357],{},"Audio",[71,359,360],{},[19,361,362],{},"MediaAudio",[56,364,365,368],{},[71,366,367],{},"Weblink",[71,369,370],{},[19,371,372],{},"MediaWebResource",[56,374,375,378],{},[71,376,377],{},"File",[71,379,380],{},[19,381,382],{},"MediaFile",[56,384,385,388],{},[71,386,387],{},"Tweet",[71,389,390],{},[19,391,392],{},"MediaTweet",[56,394,395,398],{},[71,396,397],{},"AI Chat",[71,399,400],{},[19,401,402],{},"RootAIChat",[56,404,405,408],{},[71,406,407],{},"Table",[71,409,410],{},[19,411,412],{},"RootSimpleTable",[56,414,415,418],{},[71,416,417],{},"Daily note",[71,419,420],{},[19,421,422],{},"RootDailyNote",[56,424,425,428],{},[71,426,427],{},"Tag",[71,429,430],{},[19,431,432],{},"RootTag",[56,434,435,438],{},[71,436,437],{},"Task",[71,439,440],{},[19,441,442],{},"RootTask",[10,444,445,446,448,449,186],{},"Custom object types you create in Capacities have their own ",[19,447,21],{}," (a UUID). Look them up via ",[19,450,32],{},{"title":211,"searchDepth":452,"depth":453,"links":454},1,2,[455,456,457],{"id":41,"depth":453,"text":42},{"id":162,"depth":453,"text":163},{"id":262,"depth":453,"text":263},"How Capacities object types are represented as structures in the API.","md",null,{},true,"/api/concepts/structures",{"title":5,"description":458},"api/2.concepts/structures","ej-b-Mm8y2dbtsrSEKmAp1yKsGVWZ6c-XEY3jIKAjHs",[468,470],{"title":119,"path":118,"stem":469,"children":-1},"api/2.concepts/properties",{"title":471,"path":472,"stem":473,"children":-1},"Text tokens","/api/concepts/text-tokens","api/2.concepts/text-tokens",1781012283921]