Get collection schemas
Returns local and effective schema details for the collection, including inheritance.
Required API key permissions: read:collections. Write permissions also grant read access for the same resource.
Authentication
apiKeyhttp, bearer, Andesine API keyUse an Andesine API key as a Bearer token
oauthhttp, bearer, Andesine OAuth access tokenUse an OAuth access token with andesine:api scope. Send x-workspace-id for workspace operations. Current user permissions apply.
Query parameters
collectionIDstringcollectionPathstringDecoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.
collectionSlugPathstringDecoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.
Headers
x-workspace-idstringRequired for OAuth: ID of the workspace to access. API keys use their own workspace.
Responses
200OKapplication/json
Bodyobject2 fields
local*any ofOptions
Any of
LocalCollectionSchemaobject
id*stringID of the local collection schema
collectionID*stringID of the collection
enabled*booleanWhether the collection currently defines a local schema
draft*any ofCurrent local schema draft
Options
Any of
SchemaDraftDefinitionobject
formatVersion*constant1fields*array of SchemaFieldOptions
Any of
SchemaPropertyobject
id*stringkind*constant"property"label*stringtype*string"text", "number", "checkbox", "date", "url", "select", "multi-select"initialValue*SchemaPropertyValueOptions
Any of
Option 1boolean
Option 2string
Option 3array of string
options*array of stringoptionalbooleanSchemaFragmentobject
id*stringkind*constant"fragment"label*stringallowedBlocks*array of SchemaBlockTypeinitialContent*array of ContentNode5 fields
type*stringattrsobject1 field
{key}anycontentarray of ContentNodemarksarray of ContentMark2 fields
type*stringattrsobject1 field
{key}anytextstringoptionalbooleanOption 2null
draftDocument*any ofCurrent draft projected as an editor document
Options
Any of
ContentNodeobject
type*stringattrsobject1 field
{key}anycontentarray of ContentNodemarksarray of ContentMark2 fields
type*stringattrsobject1 field
{key}anytextstringOption 2null
draftHash*any ofHash of the current local schema draft
Options
Any of
Option 1string
Option 2null
hasUnappliedChanges*booleanWhether the draft differs from the active version
activeVersion*any ofOptions
Any of
SchemaVersionSummaryobject
id*stringID of the schema version
schemaID*stringID of the local collection schema
collectionID*stringID of the collection
version*numberSequential schema version number
hash*stringHash of the schema definition
name*any ofOptional schema version name
Options
Any of
Option 1string
Option 2null
reason*stringReason why the schema version was created
"auto", "manual", "revert", "schema-migration", "import"sourceVersionID*any ofSource version used for a revert
Options
Any of
Option 1string
Option 2null
active*booleanWhether this is the active local schema version
appliedBy*any ofMembership that applied the schema version
Options
Any of
Option 1string
Option 2null
contributorIDs*array of stringMemberships that contributed to the schema version
createdAt*stringTime when the schema version was created
updatedAt*stringTime when the schema version name was last updated
Option 2null
createdAt*stringTime when the local schema was first created
updatedAt*stringTime when the local schema draft was last updated
Option 2null
effective*any ofOptions
Any of
EffectiveCollectionSchemaobject
id*stringID of the effective schema revision
collectionID*stringID of the collection
definition*objectEffective inherited schema definition
3 fields
formatVersion*constant1fields*array of ResolvedSchemaField1 field
source*SchemaFieldSource4 fields
collectionID*stringinherited*booleanschemaID*stringversionID*stringAny of
SchemaPropertyobject
id*stringkind*constant"property"label*stringtype*string"text", "number", "checkbox", "date", "url", "select", "multi-select"initialValue*SchemaPropertyValueOptions
Any of
Option 1boolean
Option 2string
Option 3array of string
options*array of stringoptionalbooleanSchemaFragmentobject
id*stringkind*constant"fragment"label*stringallowedBlocks*array of SchemaBlockTypeinitialContent*array of ContentNode5 fields
type*stringattrsobject1 field
{key}anycontentarray of ContentNodemarksarray of ContentMark2 fields
type*stringattrsobject1 field
{key}anytextstringoptionalbooleansourceVersionIDs*array of stringdocument*objectEffective schema projected as an editor document
5 fields
type*stringattrsobject1 field
{key}anycontentarray of ContentNode5 fields
type*stringattrsobject1 field
{key}anycontentarray of ContentNodemarksarray of ContentMark2 fields
type*stringattrsobject1 field
{key}anytextstringmarksarray of ContentMark2 fields
type*stringattrsobject1 field
{key}anytextstringhash*stringHash of the effective schema definition
inherited*booleanWhether the effective schema is fully inherited
createdAt*stringTime when the effective revision was created
Option 2null
400Bad Requestapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"BAD_REQUEST"status*constant400message*string"Bad Request"dataValidationErrorData2 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
issuesarray of ValidationIssue3 fields
message*stringcodestringpatharray of any ofOptions
Any of
Option 1string
Option 2number
Option 3object
key*any ofOptions
Any of
Option 1string
Option 2number
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany401Unauthorizedapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"UNAUTHORIZED"status*constant401message*string"Unauthorized"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany403Forbiddenapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"FORBIDDEN"status*constant403message*string"Forbidden"dataForbiddenErrorData4 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
missingPermissionsarray of stringrequiredPlanconstant"pro"actionstringThe requested action that was denied
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany404Not Foundapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"NOT_FOUND"status*constant404message*string"Not Found"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany409Conflictapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"CONFLICT"status*constant409message*string"Conflict"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany429Too Many Requestsapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"TOO_MANY_REQUESTS"status*constant429message*string"Too Many Requests"dataRateLimitErrorData3 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
limitstringThe limit that was reached: a short-term rate limit, or a monthly API call, AI credit, or spending limit
"rate", "api-calls", "ai-credits", "spending"retryAfterSecondsnumberMinimum delay before another attempt, in seconds. Also sent in Retry-After.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany500Internal Server Errorapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"INTERNAL_SERVER_ERROR"status*constant500message*string"Internal Server Error"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany503Service Unavailableapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"SERVICE_UNAVAILABLE"status*constant503message*string"Service Unavailable"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany