Skip to content

Commit

Permalink
docs: Add some documentation on the new API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobefu committed Dec 22, 2024
1 parent 4b6e1d8 commit 7e1f5b8
Show file tree
Hide file tree
Showing 2 changed files with 51 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 @@ -58,3 +58,15 @@ description = "An overview of all the API endpoints"
### Response type

[++ContentTypeResponse++](response-types#contenttyperesponse)

## Get all global fields

`/api/v1/global-fields`

### Parameters

--

### Response type

[++GlobalFieldsResponse++](response-types#globalfieldsresponse)
39 changes: 39 additions & 0 deletions docs/content/api-server/response-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,42 @@ description = "A list of possible response types"
error?: string // Will be null unless there's an error
}
```

## GlobalFieldsResponse

```typescript
{
data: { // Will be null if there's an error
global_fields: {
_version: number,
created_at: string, // Timestamp string
description: string,
inbuilt_class: boolean,
last_activity: unknown,
maintain_revisions: boolean,
schema: {
data_type: string,
display_name: string,
error_messages: {
format: string,
},
field_metadata: {
default_value: string,
description: string,
version: number,
},
format: string,
mandatory: boolean,
multiple: boolean,
non_localizable: boolean,
uid: string,
unique: boolean,
}[],
title: string,
uid: string,
updated_at: string, // Timestamp string
}[],
}
error?: string // Will be null unless there's an error
}
```

0 comments on commit 7e1f5b8

Please sign in to comment.