Skip to content

Commit

Permalink
docs: Add documentation on the new content types API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed Dec 15, 2024
1 parent b04fbc2 commit 2b80406
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/content/api-server/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,15 @@ description = "An overview of all the API endpoints"
### Response type

[++RoutableEntryResponse++](response-types#routableentryresponse)

## Get entry by UID

`/api/v1/content-types`

### Parameters

--

### Response type

[++ContentTypeResponse++](response-types#contenttyperesponse)
52 changes: 52 additions & 0 deletions docs/content/api-server/response-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,60 @@ description = "A list of possible response types"
updated_at: string, // Timestamp string
updated_by: string, // The user UID
url: string,
// additional options for any other fields
},
},
error?: string // Will be null unless there's an error
}
```

## ContentTypeResponse

```typescript
{
DEFAULT_ACL: unknown,
SYS_ACL: unknown,
_version: number,
abilities: {
create_object: boolean,
delete_all_objects: boolean,
delete_object: boolean,
get_all_objects: boolean,
get_one_object: boolean,
update_object: boolean,
},
created_at: string, // Timestamp string
description: string,
inbuilt_class: boolean,
last_activity: unknown,
maintain_revisions: boolean,
options: {
is_page: boolean,
publishable: boolean,
singleton: boolean, // Whether or not the content type supports multiple entries
sub_title: string[],
title: string,
url_pattern: string,
url_prefix: string,
// additional options for any other fields
},
schema: [
{
data_type: string,
display_name: string,
field_metadata: {
_default: boolean,
version: number,
},
mandatory: boolean,
multiple: boolean,
non_localizable: boolean,
uid: string,
unique: boolean,
}[]
],
title: string,
uid: string,
updated_at: string, // Timestamp string
}[]
```

0 comments on commit 2b80406

Please sign in to comment.