Skip to content

Commit 442383f

Browse files
Merge pull request #30 from directus/oas-fixed
New OpenAPI Spec
2 parents 53b87d3 + 1ed52cb commit 442383f

File tree

321 files changed

+12525
-6574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+12525
-6574
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Id:
2+
description: Identifier for the object.
3+
name: id
4+
in: path
5+
required: true
6+
schema:
7+
type: integer
8+
UUId:
9+
description: Unique identifier for the object.
10+
name: id
11+
in: path
12+
required: true
13+
schema:
14+
example: 8cbb43fe-4cdf-4991-8352-c461779cec02
15+
type: string
16+
Collection:
17+
description: Collection of which you want to retrieve the items from.
18+
name: collection
19+
in: path
20+
required: true
21+
schema:
22+
type: string
23+
Search:
24+
description: Filter by items that contain the given search query in one of their fields.
25+
in: query
26+
name: search
27+
required: false
28+
schema:
29+
type: string
30+
Page:
31+
description: Cursor for use in pagination. Often used in combination with limit.
32+
in: query
33+
name: page
34+
required: false
35+
schema:
36+
type: integer
37+
Offset:
38+
description: How many items to skip when fetching data.
39+
in: query
40+
name: offset
41+
required: false
42+
schema:
43+
type: integer
44+
Sort:
45+
description: >-
46+
How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly.
47+
in: query
48+
name: sort
49+
required: false
50+
explode: false
51+
schema:
52+
type: array
53+
items:
54+
type: string
55+
Meta:
56+
description: What metadata to return in the response.
57+
in: query
58+
name: meta
59+
required: false
60+
schema:
61+
type: string
62+
Limit:
63+
description: A limit on the number of objects that are returned.
64+
in: query
65+
name: limit
66+
required: false
67+
schema:
68+
type: integer
69+
Filter:
70+
description: Select items in collection by given conditions.
71+
in: query
72+
name: filter
73+
required: false
74+
content:
75+
application/json:
76+
schema:
77+
type: object
78+
example:
79+
<field>:
80+
<operator>: <value>
81+
Fields:
82+
description: Control what fields are being returned in the object.
83+
in: query
84+
name: fields
85+
required: false
86+
explode: false
87+
schema:
88+
type: array
89+
items:
90+
type: string
91+
Export:
92+
name: export
93+
description: Saves the API response to a file. Accepts one of `csv`, `json`, `xml`, `yaml`.
94+
in: query
95+
required: false
96+
schema:
97+
type: string
98+
enum:
99+
- csv
100+
- json
101+
- xml
102+
- yaml
103+
Version:
104+
name: version
105+
description: >-
106+
Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version.
107+
in: query
108+
required: false
109+
schema:
110+
type: string

api-spec/components/responses.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
NotFoundError:
2+
description: "Error: Not found."
3+
content:
4+
application/json:
5+
schema:
6+
type: object
7+
properties:
8+
error:
9+
type: object
10+
properties:
11+
code:
12+
type: integer
13+
format: int64
14+
message:
15+
type: string
16+
UnauthorizedError:
17+
description: "Error: Unauthorized request"
18+
content:
19+
application/json:
20+
schema:
21+
type: object
22+
properties:
23+
error:
24+
type: object
25+
properties:
26+
code:
27+
type: integer
28+
format: int64
29+
message:
30+
type: string
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
x-metadata:
2+
$ref: x-metadata.yaml
3+
Activity:
4+
$ref: Activity.yaml
5+
Collections:
6+
$ref: Collections.yaml
7+
Comments:
8+
$ref: Comments.yaml
9+
Dashboards:
10+
$ref: Dashboards.yaml
11+
Diff:
12+
$ref: Diff.yaml
13+
Extensions:
14+
$ref: Extensions.yaml
15+
Fields:
16+
$ref: Fields.yaml
17+
Files:
18+
$ref: Files.yaml
19+
Flows:
20+
$ref: Flows.yaml
21+
Folders:
22+
$ref: Folders.yaml
23+
Items:
24+
$ref: Items.yaml
25+
Notifications:
26+
$ref: Notifications.yaml
27+
Operations:
28+
$ref: Operations.yaml
29+
Panels:
30+
$ref: Panels.yaml
31+
Permissions:
32+
$ref: Permissions.yaml
33+
Policies:
34+
$ref: Policies.yaml
35+
Presets:
36+
$ref: Presets.yaml
37+
Query:
38+
$ref: Query.yaml
39+
Relations:
40+
$ref: Relations.yaml
41+
Revisions:
42+
$ref: Revisions.yaml
43+
Roles:
44+
$ref: Roles.yaml
45+
Schema:
46+
$ref: Schema.yaml
47+
Settings:
48+
$ref: Settings.yaml
49+
Shares:
50+
$ref: Shares.yaml
51+
Translations:
52+
$ref: Translations.yaml
53+
Users:
54+
$ref: Users.yaml
55+
Versions:
56+
$ref: Versions.yaml
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
type: object
2+
properties:
3+
id:
4+
description: Unique identifier for the object.
5+
example: 2
6+
type: integer
7+
action:
8+
description: Action that was performed.
9+
example: update
10+
type: string
11+
enum:
12+
- create
13+
- update
14+
- delete
15+
- login
16+
user:
17+
description: The user who performed this action. Many-to-one to users.
18+
type: string
19+
oneOf:
20+
- $ref: Users.yaml
21+
nullable: true
22+
timestamp:
23+
description: When the action happened.
24+
example: '2019-12-05T22:52:09Z'
25+
type: string
26+
format: date-time
27+
ip:
28+
description: The IP address of the user at the time the action took place.
29+
example: 127.0.0.1
30+
oneOf:
31+
- type: string
32+
- format: ipv4
33+
user_agent:
34+
description: User agent string of the browser the user used when the action took place.
35+
example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/78.0.3904.108 Safari/537.36
36+
type: string
37+
collection:
38+
description: Collection identifier in which the item resides.
39+
oneOf:
40+
- type: string
41+
- $ref: Collections.yaml
42+
item:
43+
description: Unique identifier for the item the action applied to. This is always a string, even for integer primary keys.
44+
example: '328'
45+
type: string
46+
comment:
47+
description: User comment. This will store the comments that show up in the right sidebar of the item edit page in the admin app.
48+
example: null
49+
type: string
50+
nullable: true
51+
origin:
52+
description: Origin of the request when the action took place.
53+
example: https://directus.io
54+
type: string
55+
revisions:
56+
description: Any changes that were made in this activity. One-to-many to revisions.
57+
nullable: true
58+
type: array
59+
items:
60+
oneOf:
61+
- $ref: Revisions.yaml
62+
x-collection: directus_activity
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
type: object
2+
properties:
3+
collection:
4+
description: Name of the collection. This matches the table name in the database.
5+
example: customers
6+
type: string
7+
icon:
8+
nullable: true
9+
description: Icon displayed in the Data Studio when working with this collection.
10+
type: string
11+
note:
12+
nullable: true
13+
description: Short description displayed in the Data Studio.
14+
type: string
15+
display_template:
16+
nullable: true
17+
description: How items in this collection should be displayed when viewed relationally in the Data Studio.
18+
type: string
19+
hidden:
20+
nullable: false
21+
description: Whether or not this collection is hidden in the Data Studio.
22+
type: boolean
23+
singleton:
24+
nullable: false
25+
description: Whether or not this collection is treated as a singleton.
26+
type: boolean
27+
translations:
28+
description: How this collection's name is displayed in the different languages in the Data Studio.
29+
type: array
30+
nullable: true
31+
archive_field:
32+
description: What field in the collection holds the archived state.
33+
nullable: true
34+
type: string
35+
archive_app_filter:
36+
nullable: false
37+
type: boolean
38+
archive_value:
39+
nullable: true
40+
description: What value the archive field should be set to when archiving an item.
41+
type: string
42+
unarchive_value:
43+
nullable: true
44+
description: What value the archive field should be set to when unarchiving an item.
45+
type: string
46+
sort_field:
47+
nullable: true
48+
description: What field holds the sort value on the collection. The Data Studio uses this to allow drag-and-drop manual sorting.
49+
type: string
50+
accountability:
51+
nullable: true
52+
description: What data is tracked. One of `all`, `activity`.
53+
type: string
54+
item_duplication_fields:
55+
nullable: true
56+
description: What fields are duplicated during "Save as copy" action of an item in this collection.
57+
type: array
58+
sort:
59+
nullable: true
60+
description: What sort order of the collection relative to other collections of the same level.
61+
type: integer
62+
group:
63+
nullable: true
64+
description: The name of the parent collection.
65+
type: string
66+
oneOf:
67+
- $ref: Collections.yaml
68+
collapse:
69+
nullable: false
70+
description: What is the default behavior of this collection or "folder" collection when it has nested collections. One of `open`, `closed`, `locked`.
71+
type: string
72+
versioning:
73+
nullable: false
74+
description: Whether or not Content Versioning is enabled for this collection.
75+
type: boolean
76+
x-collection: directus_collections
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
type: object
2+
properties:
3+
collection:
4+
description: Collection identifier in which the item resides.
5+
example: articles
6+
type: string
7+
id:
8+
description: Unique identifier for the object.
9+
example: 2fab3b9d-0543-4b87-8a30-3c5ee66fedf1
10+
type: string
11+
format: uuid
12+
item:
13+
description: The item the comment is created for.
14+
example: 15
15+
type: string
16+
comment:
17+
description: User comment. This will store the comments that show up in the right sidebar of the item edit page in the Data Studio.
18+
example: This is a comment on an article
19+
type: string
20+
date_created:
21+
description: Timestamp in ISO8601 when the comment was created.
22+
example: 2023-01-15T09:14:52Z
23+
type: string
24+
format: date-time
25+
date_updated:
26+
description: Timestamp in ISO8601 when the comment was last updated.
27+
example: 2023-01-15T09:00:00Z
28+
type: string
29+
format: date-time
30+
user_created:
31+
description: The user who created the comment. Many-to-one to users.
32+
example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af
33+
type: string
34+
oneOf:
35+
- $ref: Users.yaml
36+
user_updated:
37+
description: The user who last updated the comment. Many-to-one to users.
38+
example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af
39+
type: string
40+
oneOf:
41+
- $ref: Users.yaml
42+
x-collection: directus_comments

0 commit comments

Comments
 (0)