diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 00000000..f796ee30 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,16 @@ +In order to pull data from your locally running backend (see [docker-compose](../docker-compose.yml)) to your local harddrive, you can run the following command + +``` +npx directus-sync pull \ + --directus-url http://localhost:8055 \ + --directus-email admin@it4c.dev \ + --directus-password admin123 +``` + +To push local changes or to seed directus use the following command +``` +npx directus-sync push \ + --directus-url http://localhost:8055 \ + --directus-email admin@it4c.dev \ + --directus-password admin123 +``` \ No newline at end of file diff --git a/backend/directus-config/collections/dashboards.json b/backend/directus-config/collections/dashboards.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/dashboards.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/flows.json b/backend/directus-config/collections/flows.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/flows.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/folders.json b/backend/directus-config/collections/folders.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/folders.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/operations.json b/backend/directus-config/collections/operations.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/operations.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/panels.json b/backend/directus-config/collections/panels.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/panels.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/permissions.json b/backend/directus-config/collections/permissions.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/permissions.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/policies.json b/backend/directus-config/collections/policies.json new file mode 100644 index 00000000..e9ddc251 --- /dev/null +++ b/backend/directus-config/collections/policies.json @@ -0,0 +1,34 @@ +[ + { + "name": "Administrator", + "icon": "verified", + "description": "$t:admin_description", + "ip_access": null, + "enforce_tfa": false, + "admin_access": true, + "app_access": true, + "roles": [ + { + "role": "_sync_default_admin_role", + "sort": null + } + ], + "_syncId": "_sync_default_admin_policy" + }, + { + "name": "$t:public_label", + "icon": "public", + "description": "$t:public_description", + "ip_access": null, + "enforce_tfa": false, + "admin_access": false, + "app_access": false, + "roles": [ + { + "role": null, + "sort": 1 + } + ], + "_syncId": "_sync_default_public_policy" + } +] diff --git a/backend/directus-config/collections/presets.json b/backend/directus-config/collections/presets.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/presets.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/roles.json b/backend/directus-config/collections/roles.json new file mode 100644 index 00000000..4973cd84 --- /dev/null +++ b/backend/directus-config/collections/roles.json @@ -0,0 +1,9 @@ +[ + { + "name": "Administrator", + "icon": "verified", + "description": "$t:admin_description", + "parent": null, + "_syncId": "_sync_default_admin_role" + } +] diff --git a/backend/directus-config/collections/settings.json b/backend/directus-config/collections/settings.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/settings.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/collections/translations.json b/backend/directus-config/collections/translations.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/backend/directus-config/collections/translations.json @@ -0,0 +1 @@ +[] diff --git a/backend/directus-config/snapshot/collections/directus_sync_id_map.json b/backend/directus-config/snapshot/collections/directus_sync_id_map.json new file mode 100644 index 00000000..a2c04373 --- /dev/null +++ b/backend/directus-config/snapshot/collections/directus_sync_id_map.json @@ -0,0 +1,7 @@ +{ + "collection": "directus_sync_id_map", + "meta": null, + "schema": { + "name": "directus_sync_id_map" + } +} diff --git a/backend/directus-config/snapshot/fields/directus_sync_id_map/created_at.json b/backend/directus-config/snapshot/fields/directus_sync_id_map/created_at.json new file mode 100644 index 00000000..edee32af --- /dev/null +++ b/backend/directus-config/snapshot/fields/directus_sync_id_map/created_at.json @@ -0,0 +1,24 @@ +{ + "collection": "directus_sync_id_map", + "field": "created_at", + "type": "dateTime", + "meta": null, + "schema": { + "name": "created_at", + "table": "directus_sync_id_map", + "data_type": "datetime", + "default_value": "CURRENT_TIMESTAMP", + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_nullable": true, + "is_unique": false, + "is_indexed": true, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/snapshot/fields/directus_sync_id_map/id.json b/backend/directus-config/snapshot/fields/directus_sync_id_map/id.json new file mode 100644 index 00000000..0707090b --- /dev/null +++ b/backend/directus-config/snapshot/fields/directus_sync_id_map/id.json @@ -0,0 +1,24 @@ +{ + "collection": "directus_sync_id_map", + "field": "id", + "type": "integer", + "meta": null, + "schema": { + "name": "id", + "table": "directus_sync_id_map", + "data_type": "integer", + "default_value": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": true, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": true, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/snapshot/fields/directus_sync_id_map/local_id.json b/backend/directus-config/snapshot/fields/directus_sync_id_map/local_id.json new file mode 100644 index 00000000..6246f366 --- /dev/null +++ b/backend/directus-config/snapshot/fields/directus_sync_id_map/local_id.json @@ -0,0 +1,24 @@ +{ + "collection": "directus_sync_id_map", + "field": "local_id", + "type": "string", + "meta": null, + "schema": { + "name": "local_id", + "table": "directus_sync_id_map", + "data_type": "varchar", + "default_value": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/snapshot/fields/directus_sync_id_map/sync_id.json b/backend/directus-config/snapshot/fields/directus_sync_id_map/sync_id.json new file mode 100644 index 00000000..7e27cb11 --- /dev/null +++ b/backend/directus-config/snapshot/fields/directus_sync_id_map/sync_id.json @@ -0,0 +1,24 @@ +{ + "collection": "directus_sync_id_map", + "field": "sync_id", + "type": "string", + "meta": null, + "schema": { + "name": "sync_id", + "table": "directus_sync_id_map", + "data_type": "varchar", + "default_value": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/snapshot/fields/directus_sync_id_map/table.json b/backend/directus-config/snapshot/fields/directus_sync_id_map/table.json new file mode 100644 index 00000000..a59f5f50 --- /dev/null +++ b/backend/directus-config/snapshot/fields/directus_sync_id_map/table.json @@ -0,0 +1,24 @@ +{ + "collection": "directus_sync_id_map", + "field": "table", + "type": "string", + "meta": null, + "schema": { + "name": "table", + "table": "directus_sync_id_map", + "data_type": "varchar", + "default_value": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/snapshot/info.json b/backend/directus-config/snapshot/info.json new file mode 100644 index 00000000..e4d0409a --- /dev/null +++ b/backend/directus-config/snapshot/info.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "directus": "11.4.1", + "vendor": "sqlite" +} diff --git a/backend/directus-config/specs/item.graphql b/backend/directus-config/specs/item.graphql new file mode 100644 index 00000000..81990647 --- /dev/null +++ b/backend/directus-config/specs/item.graphql @@ -0,0 +1,973 @@ +type Query { + """There's no data to query.""" + _empty: Void +} + +type Mutation + +type Subscription { + directus_folders_mutated(event: EventEnum): directus_folders_mutated + directus_files_mutated(event: EventEnum): directus_files_mutated + directus_operations_mutated(event: EventEnum): directus_operations_mutated + directus_notifications_mutated(event: EventEnum): directus_notifications_mutated + directus_translations_mutated(event: EventEnum): directus_translations_mutated + directus_shares_mutated(event: EventEnum): directus_shares_mutated + directus_versions_mutated(event: EventEnum): directus_versions_mutated + directus_revisions_mutated(event: EventEnum): directus_revisions_mutated + directus_users_mutated(event: EventEnum): directus_users_mutated + directus_webhooks_mutated(event: EventEnum): directus_webhooks_mutated + directus_settings_mutated(event: EventEnum): directus_settings_mutated + directus_policies_mutated(event: EventEnum): directus_policies_mutated + directus_permissions_mutated(event: EventEnum): directus_permissions_mutated + directus_access_mutated(event: EventEnum): directus_access_mutated + directus_dashboards_mutated(event: EventEnum): directus_dashboards_mutated + directus_flows_mutated(event: EventEnum): directus_flows_mutated + directus_panels_mutated(event: EventEnum): directus_panels_mutated + directus_presets_mutated(event: EventEnum): directus_presets_mutated + directus_roles_mutated(event: EventEnum): directus_roles_mutated + directus_comments_mutated(event: EventEnum): directus_comments_mutated + directus_activity_mutated(event: EventEnum): directus_activity_mutated +} + +"""The `Boolean` scalar type represents `true` or `false`.""" +scalar Boolean + +"""ISO8601 Date values""" +scalar Date + +"""BigInt value""" +scalar GraphQLBigInt + +"""A Float or a String""" +scalar GraphQLStringOrFloat + +"""Hashed string values""" +scalar Hash + +""" +The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. +""" +scalar ID + +""" +The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +""" +scalar Int + +""" +The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" +scalar JSON + +""" +The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. +""" +scalar String + +"""Represents NULL values""" +scalar Void + +enum EventEnum { + create + update + delete +} + +type count_functions { + count: Int +} + +type datetime_functions { + year: Int + month: Int + week: Int + day: Int + weekday: Int + hour: Int + minute: Int + second: Int +} + +type directus_access { + id: ID! + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + policy(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_policies + sort: Int +} + +type directus_access_mutated { + key: ID! + event: EventEnum + data: directus_access +} + +type directus_activity { + id: ID! + action: String! + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + timestamp: Date + timestamp_func: datetime_functions + ip: String + user_agent: String + collection: String! + item: String! + origin: String + revisions(filter: directus_revisions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_revisions] + revisions_func: count_functions +} + +type directus_activity_mutated { + key: ID! + event: EventEnum + data: directus_activity +} + +type directus_comments { + id: ID! + collection: String! + item: String! + comment: String! + date_created: Date + date_created_func: datetime_functions + date_updated: Date + date_updated_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + user_updated(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_comments_mutated { + key: ID! + event: EventEnum + data: directus_comments +} + +type directus_dashboards { + id: ID! + name: String! + icon: String + note: String + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + color: String + panels(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_panels] + panels_func: count_functions +} + +type directus_dashboards_mutated { + key: ID! + event: EventEnum + data: directus_dashboards +} + +type directus_files { + id: ID! + storage: String! + filename_disk: String + filename_download: String! + title: String + type: String + folder(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders + uploaded_by(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + created_on: Date + created_on_func: datetime_functions + modified_by(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + modified_on: Date + modified_on_func: datetime_functions + charset: String + filesize: GraphQLBigInt + width: Int + height: Int + duration: Int + embed: String + description: String + location: String + tags: JSON + tags_func: count_functions + metadata: JSON + metadata_func: count_functions + focal_point_x: Int + focal_point_y: Int + tus_id: String + tus_data: JSON + tus_data_func: count_functions + uploaded_on: Date + uploaded_on_func: datetime_functions +} + +type directus_files_mutated { + key: ID! + event: EventEnum + data: directus_files +} + +type directus_flows { + id: ID! + name: String! + icon: String + color: String + description: String + status: String + trigger: String + accountability: String + options: JSON + options_func: count_functions + operation(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + operations(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_operations] + operations_func: count_functions +} + +type directus_flows_mutated { + key: ID! + event: EventEnum + data: directus_flows +} + +type directus_folders { + id: ID! + name: String! + parent(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders +} + +type directus_folders_mutated { + key: ID! + event: EventEnum + data: directus_folders +} + +type directus_notifications { + id: ID! + timestamp: Date + timestamp_func: datetime_functions + status: String + recipient(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + sender(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + subject: String! + message: String + collection: String + item: String +} + +type directus_notifications_mutated { + key: ID! + event: EventEnum + data: directus_notifications +} + +type directus_operations { + id: ID! + name: String + key: String! + type: String! + position_x: Int! + position_y: Int! + options: JSON + options_func: count_functions + resolve(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + reject(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + flow(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_flows + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_operations_mutated { + key: ID! + event: EventEnum + data: directus_operations +} + +type directus_panels { + id: ID! + dashboard(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_dashboards + name: String + icon: String + color: String + show_header: Boolean! + note: String + type: String! + position_x: Int! + position_y: Int! + width: Int! + height: Int! + options: JSON + options_func: count_functions + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_panels_mutated { + key: ID! + event: EventEnum + data: directus_panels +} + +type directus_permissions { + id: ID + collection: String! + action: String! + permissions: JSON + permissions_func: count_functions + validation: JSON + validation_func: count_functions + presets: JSON + presets_func: count_functions + fields: [String] + policy(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_policies +} + +type directus_permissions_mutated { + key: ID! + event: EventEnum + data: directus_permissions +} + +type directus_policies { + id: ID! + name: String! + icon: String + description: String + ip_access: [String] + + """$t:field_options.directus_policies.enforce_tfa""" + enforce_tfa: Boolean! + admin_access: Boolean! + app_access: Boolean! + permissions(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_permissions] + permissions_func: count_functions + users(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + users_func: count_functions + roles(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + roles_func: count_functions +} + +type directus_policies_mutated { + key: ID! + event: EventEnum + data: directus_policies +} + +type directus_presets { + id: ID! + bookmark: String + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + collection: String + search: String + layout: String + layout_query: JSON + layout_query_func: count_functions + layout_options: JSON + layout_options_func: count_functions + refresh_interval: Int + filter: JSON + filter_func: count_functions + icon: String + color: String +} + +type directus_presets_mutated { + key: ID! + event: EventEnum + data: directus_presets +} + +type directus_revisions { + id: ID! + activity(filter: directus_activity_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_activity + collection: String! + item: String! + data: JSON + data_func: count_functions + delta: JSON + delta_func: count_functions + parent(filter: directus_revisions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_revisions + version(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_versions +} + +type directus_revisions_mutated { + key: ID! + event: EventEnum + data: directus_revisions +} + +type directus_roles { + id: ID! + name: String! + icon: String + description: String + parent(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + children(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_roles] + children_func: count_functions + policies(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + policies_func: count_functions + users(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_users] + users_func: count_functions +} + +type directus_roles_mutated { + key: ID! + event: EventEnum + data: directus_roles +} + +type directus_settings { + id: ID! + project_name: String + project_url: String + + """$t:field_options.directus_settings.project_color_note""" + project_color: String + project_logo(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_foreground(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_background(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_note: String + auth_login_attempts: Int + auth_password_policy: String + storage_asset_transform: String + storage_asset_presets: JSON + storage_asset_presets_func: count_functions + custom_css: String + storage_default_folder(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders + basemaps: JSON + basemaps_func: count_functions + mapbox_key: String + module_bar: JSON + module_bar_func: count_functions + project_descriptor: String + default_language: String + custom_aspect_ratios: JSON + custom_aspect_ratios_func: count_functions + public_favicon(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + default_appearance: String + default_theme_light: String + theme_light_overrides: JSON + theme_light_overrides_func: count_functions + default_theme_dark: String + theme_dark_overrides: JSON + theme_dark_overrides_func: count_functions + report_error_url: String + report_bug_url: String + report_feature_url: String + + """$t:fields.directus_settings.public_registration_note""" + public_registration: Boolean! + + """$t:fields.directus_settings.public_registration_verify_email_note""" + public_registration_verify_email: Boolean + public_registration_role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + + """$t:fields.directus_settings.public_registration_email_filter_note""" + public_registration_email_filter: JSON + public_registration_email_filter_func: count_functions +} + +type directus_settings_mutated { + key: ID! + event: EventEnum + data: directus_settings +} + +type directus_shares { + id: ID! + name: String + collection: String! + item: String! + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + + """$t:shared_leave_blank_for_passwordless_access""" + password: Hash + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + date_created: Date + date_created_func: datetime_functions + + """$t:shared_leave_blank_for_unlimited""" + date_start: Date + date_start_func: datetime_functions + + """$t:shared_leave_blank_for_unlimited""" + date_end: Date + date_end_func: datetime_functions + times_used: Int + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Int +} + +type directus_shares_mutated { + key: ID! + event: EventEnum + data: directus_shares +} + +type directus_translations { + id: ID! + language: String! + key: String! + value: String! +} + +type directus_translations_mutated { + key: ID! + event: EventEnum + data: directus_translations +} + +type directus_users { + id: ID! + first_name: String + last_name: String + email: String + password: Hash + location: String + title: String + description: String + tags: JSON + tags_func: count_functions + avatar(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + language: String + tfa_secret: Hash + status: String + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + token: Hash + last_access: Date + last_access_func: datetime_functions + last_page: String + provider: String + external_identifier: String + auth_data: JSON + auth_data_func: count_functions + email_notifications: Boolean + appearance: String + theme_dark: String + theme_light: String + theme_light_overrides: JSON + theme_light_overrides_func: count_functions + theme_dark_overrides: JSON + theme_dark_overrides_func: count_functions + policies(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + policies_func: count_functions +} + +type directus_users_mutated { + key: ID! + event: EventEnum + data: directus_users +} + +type directus_versions { + id: ID! + key: String! + name: String + collection: String! + item: String! + hash: String + date_created: Date + date_created_func: datetime_functions + date_updated: Date + date_updated_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + user_updated(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + delta: JSON + delta_func: count_functions +} + +type directus_versions_mutated { + key: ID! + event: EventEnum + data: directus_versions +} + +type directus_webhooks { + id: ID! + name: String! + method: String + url: String! + status: String + data: Boolean + actions: [String]! + collections: [String]! + headers: JSON + headers_func: count_functions + was_active_before_deprecation: Boolean! + migrated_flow(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_flows +} + +type directus_webhooks_mutated { + key: ID! + event: EventEnum + data: directus_webhooks +} + +input big_int_filter_operators { + _eq: GraphQLBigInt + _neq: GraphQLBigInt + _in: [GraphQLBigInt] + _nin: [GraphQLBigInt] + _gt: GraphQLBigInt + _gte: GraphQLBigInt + _lt: GraphQLBigInt + _lte: GraphQLBigInt + _null: Boolean + _nnull: Boolean + _between: [GraphQLBigInt] + _nbetween: [GraphQLBigInt] +} + +input boolean_filter_operators { + _eq: Boolean + _neq: Boolean + _null: Boolean + _nnull: Boolean +} + +input count_function_filter_operators { + count: number_filter_operators +} + +input date_filter_operators { + _eq: String + _neq: String + _gt: String + _gte: String + _lt: String + _lte: String + _null: Boolean + _nnull: Boolean + _in: [String] + _nin: [String] + _between: [GraphQLStringOrFloat] + _nbetween: [GraphQLStringOrFloat] +} + +input datetime_function_filter_operators { + year: number_filter_operators + month: number_filter_operators + week: number_filter_operators + day: number_filter_operators + weekday: number_filter_operators + hour: number_filter_operators + minute: number_filter_operators + second: number_filter_operators +} + +input directus_access_filter { + id: string_filter_operators + role: directus_roles_filter + user: directus_users_filter + policy: directus_policies_filter + sort: number_filter_operators + _and: [directus_access_filter] + _or: [directus_access_filter] +} + +input directus_activity_filter { + id: number_filter_operators + action: string_filter_operators + user: directus_users_filter + timestamp: date_filter_operators + timestamp_func: datetime_function_filter_operators + ip: string_filter_operators + user_agent: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + origin: string_filter_operators + revisions: directus_revisions_filter + revisions_func: count_function_filter_operators + _and: [directus_activity_filter] + _or: [directus_activity_filter] +} + +input directus_dashboards_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + note: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + color: string_filter_operators + panels: directus_panels_filter + panels_func: count_function_filter_operators + _and: [directus_dashboards_filter] + _or: [directus_dashboards_filter] +} + +input directus_files_filter { + id: string_filter_operators + storage: string_filter_operators + filename_disk: string_filter_operators + filename_download: string_filter_operators + title: string_filter_operators + type: string_filter_operators + folder: directus_folders_filter + uploaded_by: directus_users_filter + created_on: date_filter_operators + created_on_func: datetime_function_filter_operators + modified_by: directus_users_filter + modified_on: date_filter_operators + modified_on_func: datetime_function_filter_operators + charset: string_filter_operators + filesize: big_int_filter_operators + width: number_filter_operators + height: number_filter_operators + duration: number_filter_operators + embed: string_filter_operators + description: string_filter_operators + location: string_filter_operators + tags: string_filter_operators + tags_func: count_function_filter_operators + metadata: string_filter_operators + metadata_func: count_function_filter_operators + focal_point_x: number_filter_operators + focal_point_y: number_filter_operators + tus_id: string_filter_operators + tus_data: string_filter_operators + tus_data_func: count_function_filter_operators + uploaded_on: date_filter_operators + uploaded_on_func: datetime_function_filter_operators + _and: [directus_files_filter] + _or: [directus_files_filter] +} + +input directus_flows_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + color: string_filter_operators + description: string_filter_operators + status: string_filter_operators + trigger: string_filter_operators + accountability: string_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + operation: directus_operations_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + operations: directus_operations_filter + operations_func: count_function_filter_operators + _and: [directus_flows_filter] + _or: [directus_flows_filter] +} + +input directus_folders_filter { + id: string_filter_operators + name: string_filter_operators + parent: directus_folders_filter + _and: [directus_folders_filter] + _or: [directus_folders_filter] +} + +input directus_operations_filter { + id: string_filter_operators + name: string_filter_operators + key: string_filter_operators + type: string_filter_operators + position_x: number_filter_operators + position_y: number_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + resolve: directus_operations_filter + reject: directus_operations_filter + flow: directus_flows_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + _and: [directus_operations_filter] + _or: [directus_operations_filter] +} + +input directus_panels_filter { + id: string_filter_operators + dashboard: directus_dashboards_filter + name: string_filter_operators + icon: string_filter_operators + color: string_filter_operators + show_header: boolean_filter_operators + note: string_filter_operators + type: string_filter_operators + position_x: number_filter_operators + position_y: number_filter_operators + width: number_filter_operators + height: number_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + _and: [directus_panels_filter] + _or: [directus_panels_filter] +} + +input directus_permissions_filter { + id: number_filter_operators + collection: string_filter_operators + action: string_filter_operators + permissions: string_filter_operators + permissions_func: count_function_filter_operators + validation: string_filter_operators + validation_func: count_function_filter_operators + presets: string_filter_operators + presets_func: count_function_filter_operators + fields: string_filter_operators + policy: directus_policies_filter + _and: [directus_permissions_filter] + _or: [directus_permissions_filter] +} + +input directus_policies_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + description: string_filter_operators + ip_access: string_filter_operators + enforce_tfa: boolean_filter_operators + admin_access: boolean_filter_operators + app_access: boolean_filter_operators + permissions: directus_permissions_filter + permissions_func: count_function_filter_operators + users: directus_access_filter + users_func: count_function_filter_operators + roles: directus_access_filter + roles_func: count_function_filter_operators + _and: [directus_policies_filter] + _or: [directus_policies_filter] +} + +input directus_revisions_filter { + id: number_filter_operators + activity: directus_activity_filter + collection: string_filter_operators + item: string_filter_operators + data: string_filter_operators + data_func: count_function_filter_operators + delta: string_filter_operators + delta_func: count_function_filter_operators + parent: directus_revisions_filter + version: directus_versions_filter + _and: [directus_revisions_filter] + _or: [directus_revisions_filter] +} + +input directus_roles_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + description: string_filter_operators + parent: directus_roles_filter + children: directus_roles_filter + children_func: count_function_filter_operators + policies: directus_access_filter + policies_func: count_function_filter_operators + users: directus_users_filter + users_func: count_function_filter_operators + _and: [directus_roles_filter] + _or: [directus_roles_filter] +} + +input directus_users_filter { + id: string_filter_operators + first_name: string_filter_operators + last_name: string_filter_operators + email: string_filter_operators + password: hash_filter_operators + location: string_filter_operators + title: string_filter_operators + description: string_filter_operators + tags: string_filter_operators + tags_func: count_function_filter_operators + avatar: directus_files_filter + language: string_filter_operators + tfa_secret: hash_filter_operators + status: string_filter_operators + role: directus_roles_filter + token: hash_filter_operators + last_access: date_filter_operators + last_access_func: datetime_function_filter_operators + last_page: string_filter_operators + provider: string_filter_operators + external_identifier: string_filter_operators + auth_data: string_filter_operators + auth_data_func: count_function_filter_operators + email_notifications: boolean_filter_operators + appearance: string_filter_operators + theme_dark: string_filter_operators + theme_light: string_filter_operators + theme_light_overrides: string_filter_operators + theme_light_overrides_func: count_function_filter_operators + theme_dark_overrides: string_filter_operators + theme_dark_overrides_func: count_function_filter_operators + policies: directus_access_filter + policies_func: count_function_filter_operators + _and: [directus_users_filter] + _or: [directus_users_filter] +} + +input directus_versions_filter { + id: string_filter_operators + key: string_filter_operators + name: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + hash: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + date_updated: date_filter_operators + date_updated_func: datetime_function_filter_operators + user_created: directus_users_filter + user_updated: directus_users_filter + delta: string_filter_operators + delta_func: count_function_filter_operators + _and: [directus_versions_filter] + _or: [directus_versions_filter] +} + +input hash_filter_operators { + _null: Boolean + _nnull: Boolean + _empty: Boolean + _nempty: Boolean +} + +input number_filter_operators { + _eq: GraphQLStringOrFloat + _neq: GraphQLStringOrFloat + _in: [GraphQLStringOrFloat] + _nin: [GraphQLStringOrFloat] + _gt: GraphQLStringOrFloat + _gte: GraphQLStringOrFloat + _lt: GraphQLStringOrFloat + _lte: GraphQLStringOrFloat + _null: Boolean + _nnull: Boolean + _between: [GraphQLStringOrFloat] + _nbetween: [GraphQLStringOrFloat] +} + +input string_filter_operators { + _eq: String + _neq: String + _contains: String + _icontains: String + _ncontains: String + _starts_with: String + _nstarts_with: String + _istarts_with: String + _nistarts_with: String + _ends_with: String + _nends_with: String + _iends_with: String + _niends_with: String + _in: [String] + _nin: [String] + _null: Boolean + _nnull: Boolean + _empty: Boolean + _nempty: Boolean +} \ No newline at end of file diff --git a/backend/directus-config/specs/openapi.json b/backend/directus-config/specs/openapi.json new file mode 100644 index 00000000..a0f55792 --- /dev/null +++ b/backend/directus-config/specs/openapi.json @@ -0,0 +1,9731 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Dynamic API Specification", + "description": "This is a dynamically generated API specification for all endpoints existing on the current project.", + "version": "11.4.1" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Your current Directus instance." + } + ], + "paths": { + "/assets/{id}": { + "get": { + "tags": [ + "Assets" + ], + "operationId": "getAsset", + "summary": "Get an Asset", + "description": "Image typed files can be dynamically resized and transformed to fit any need.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the file.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "The key of the asset size configured in settings.", + "schema": { + "type": "string" + } + }, + { + "name": "transforms", + "in": "query", + "description": "A JSON array of image transformations", + "schema": { + "type": "string" + } + }, + { + "name": "download", + "in": "query", + "description": "Download the asset to your computer", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + } + }, + "/auth/login": { + "post": { + "summary": "Retrieve a Temporary Access Token", + "description": "Retrieve a Temporary Access Token", + "tags": [ + "Authentication" + ], + "operationId": "login", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "example": "admin@example.com", + "description": "Email address of the user you're retrieving the access token for." + }, + "password": { + "type": "string", + "description": "Password of the user.", + "format": "password", + "example": "password" + }, + "mode": { + "type": "string", + "enum": [ + "json", + "cookie", + "session" + ], + "default": "json", + "description": "Whether to retrieve the refresh token in the JSON response, or in a httpOnly cookie." + }, + "otp": { + "type": "string", + "description": "The user's one-time-password (if MFA is enabled)." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful authentification", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "example": "eyJhbGciOiJI..." + }, + "expires": { + "type": "integer", + "example": 900 + }, + "refresh_token": { + "type": "string", + "example": "yuOJkjdPXMd..." + } + } + } + } + } + } + } + } + } + } + }, + "/auth/refresh": { + "post": { + "summary": "Refresh Token", + "description": "Refresh a Temporary Access Token.", + "tags": [ + "Authentication" + ], + "operationId": "refresh", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJ0eXAiOiJKV...", + "description": "JWT access token you want to refresh. This token can't be expired." + }, + "mode": { + "type": "string", + "enum": [ + "json", + "cookie", + "session" + ], + "default": "json", + "description": "Whether to submit and retrieve the refresh token in the JSON response, or in a httpOnly cookie." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "access_token": { + "type": "string", + "example": "eyJhbGciOiJI..." + }, + "expires": { + "type": "integer", + "example": 900 + }, + "refresh_token": { + "type": "string", + "example": "Gy-caJMpmGTA..." + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/auth/logout": { + "post": { + "summary": "Log Out", + "description": "Log Out", + "tags": [ + "Authentication" + ], + "operationId": "logout", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "refresh_token": { + "type": "string", + "example": "eyJ0eXAiOiJKV...", + "description": "The refresh token to invalidate. If you have the refresh token in a cookie through /auth/login, you don't have to submit it here." + }, + "mode": { + "type": "string", + "enum": [ + "json", + "cookie", + "session" + ], + "description": "Whether the refresh token is submitted in the JSON response, or in a httpOnly cookie." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Request successful" + } + } + } + }, + "/auth/password/request": { + "post": { + "tags": [ + "Authentication" + ], + "operationId": "passwordRequest", + "summary": "Request a Password Reset", + "description": "Request a reset password email to be send.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string", + "example": "admin@example.com", + "description": "Email address of the user you're requesting a reset for." + } + } + } + } + } + }, + "responses": { + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/auth/password/reset": { + "post": { + "tags": [ + "Authentication" + ], + "operationId": "passwordReset", + "summary": "Reset a Password", + "description": "The request a password reset endpoint sends an email with a link to the admin app which in turn uses this endpoint to allow the user to reset their password.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token", + "password" + ], + "properties": { + "token": { + "type": "string", + "example": "eyJ0eXAiOiJKV1Qi...", + "description": "One-time use JWT token that is used to verify the user." + }, + "password": { + "type": "string", + "example": "password", + "format": "password", + "description": "New password for the user." + } + } + } + } + } + }, + "responses": { + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/auth/oauth": { + "get": { + "tags": [ + "Authentication" + ], + "operationId": "oauth", + "summary": "List OAuth Providers", + "description": "List configured OAuth providers.", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "public": { + "type": "boolean" + }, + "data": { + "type": "array", + "example": [ + "github", + "facebook" + ], + "items": { + "type": "string" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/auth/oauth/{provider}": { + "get": { + "summary": "Authenticated using an OAuth provider", + "description": "Start OAuth flow using the specified provider", + "tags": [ + "Authentication" + ], + "operationId": "oauthProvider", + "parameters": [ + { + "name": "provider", + "in": "path", + "description": "Key of the activated OAuth provider.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "redirect", + "in": "query", + "required": false, + "description": "Where to redirect on successful login.
If set the authentication details are set inside cookies otherwise a JSON is returned.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "public": { + "type": "boolean" + }, + "data": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/schema/snapshot": { + "get": { + "summary": "Retrieve Schema Snapshot", + "description": "Retrieve the current schema. This endpoint is only available to admin users.", + "operationId": "schemaSnapshot", + "parameters": [ + { + "$ref": "#/components/parameters/Export" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Schema" + } + } + } + }, + "text/yaml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "403": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Schema" + ] + } + }, + "/schema/apply": { + "post": { + "summary": "Apply Schema Difference", + "description": "Update the instance's schema by passing the diff previously retrieved via `/schema/diff` endpoint in the JSON request body or a JSON/YAML file. This endpoint is only available to admin users.", + "operationId": "schemaApply", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Diff" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Successful request" + }, + "403": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Schema" + ] + } + }, + "/schema/diff": { + "post": { + "summary": "Retrieve Schema Difference", + "description": "Compare the current instance's schema against the schema snapshot in JSON request body or a JSON/YAML file and retrieve the difference. This endpoint is only available to admin users.", + "operationId": "schemaDiff", + "parameters": [ + { + "name": "force", + "description": "Bypass version and database vendor restrictions.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Schema" + } + } + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Diff" + } + } + } + } + } + }, + "204": { + "description": "No schema difference." + }, + "403": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Schema" + ] + } + }, + "/server/info": { + "get": { + "summary": "System Info", + "description": "Perform a system status check and return the options.", + "operationId": "serverInfo", + "parameters": [ + { + "description": "The first time you create a project, the provided token will be saved and required for subsequent project installs. It can also be found and configured in `/config/__api.json` on your server.", + "in": "query", + "name": "super_admin_token", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Server" + ] + } + }, + "/server/ping": { + "get": { + "summary": "Ping", + "description": "Ping, pong. Ping.. pong.", + "operationId": "ping", + "responses": { + "200": { + "content": { + "application/text": { + "schema": { + "type": "string", + "pattern": "pong", + "example": "pong" + } + } + }, + "description": "Successful request" + } + }, + "tags": [ + "Server" + ] + } + }, + "/utils/hash/generate": { + "post": { + "summary": "Hash a string", + "description": "Generate a hash for a given string.", + "operationId": "hash-generate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "string": { + "description": "String to hash.", + "type": "string" + } + }, + "required": [ + "string" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "string", + "example": "$argon2i$v=19$m=4096,t=3,p=1$pOyIa/zmRAjCVLb2f7kOyg$DasoO6LzMM+6iKfzCDq6JbsYsZWLSm33p7i9NxL9mDc" + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/hash/verify": { + "post": { + "summary": "Hash a string", + "description": "Generate a hash for a given string.", + "operationId": "hash-verify", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "string": { + "description": "String to hash.", + "type": "string" + }, + "hash": { + "description": "Hash you want to verify against.", + "type": "string" + } + }, + "required": [ + "string", + "hash" + ] + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "boolean", + "example": true + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/sort/{collection}": { + "post": { + "summary": "Sort Items", + "description": "Re-sort items in collection based on start and to value of item", + "operationId": "sort", + "parameters": [ + { + "description": "Collection identifier", + "in": "path", + "name": "collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "item": { + "description": "Primary key of item to move", + "type": "number" + }, + "to": { + "description": "Primary key of item where to move the current item to", + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/import/{collection}": { + "post": { + "summary": "Import Items", + "description": "Import multiple records from a JSON or CSV file into a collection.", + "operationId": "import", + "parameters": [ + { + "description": "Collection identifier", + "in": "path", + "name": "collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/export/{collection}": { + "post": { + "summary": "Export Items", + "description": "Export a larger data set to a file in the File Library", + "operationId": "export", + "parameters": [ + { + "description": "Collection identifier", + "in": "path", + "name": "collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "format": { + "description": "What file format to save the export to. One of csv, xml, json", + "type": "string", + "enum": [ + "csv", + "xml", + "json" + ] + }, + "query": { + "$ref": "#/components/schemas/Query" + }, + "file": { + "$ref": "#/components/schemas/Files" + } + }, + "required": [ + "format", + "query", + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/cache/clear": { + "post": { + "summary": "Clear Cache", + "description": "Resets both the data and schema cache of Directus.", + "operationId": "clear-cache", + "responses": { + "200": { + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/utils/random/string": { + "get": { + "summary": "Get a Random String", + "description": "Returns a random string of given length.", + "operationId": "random", + "parameters": [ + { + "description": "Length of the random string.", + "in": "query", + "name": "length", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "string", + "example": "1>M3+4oh.S" + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + } + }, + "tags": [ + "Utilities" + ] + } + }, + "/folders": { + "get": { + "summary": "List Folders", + "description": "List the folders.", + "operationId": "getFolders", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folders" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Folders" + ] + }, + "post": { + "summary": "Create a Folder", + "description": "Create a new folder.", + "operationId": "createFolder", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Amsterdam", + "description": "Name of the folder." + }, + "parent": { + "description": "Unique identifier of the parent folder. This allows for nested folders.", + "type": "integer" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Folders" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Folders" + ] + }, + "patch": { + "summary": "Update Multiple Folders", + "description": "Update multiple folders at the same time.", + "tags": [ + "Folders" + ], + "operationId": "updateFolders", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Amsterdam", + "description": "Name of the folder." + }, + "parent": { + "description": "Unique identifier of the parent folder. This allows for nested folders.", + "type": "integer" + } + }, + "required": [ + "name" + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Folders" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Folders", + "description": "Delete multiple existing folders.", + "tags": [ + "Folders" + ], + "operationId": "deleteFolders", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/folders/{id}": { + "get": { + "summary": "Retrieve a Folder", + "description": "Retrieve a single folder by unique identifier.", + "operationId": "getFolder", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Folders" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Folders" + ] + }, + "patch": { + "summary": "Update a Folder", + "description": "Update an existing folder", + "operationId": "updateFolder", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the folder. Can't be null or empty." + }, + "parent": { + "type": "integer", + "example": 3, + "description": "Unique identifier of the parent folder. This allows for nested folders." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Folders" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Folders" + ] + }, + "delete": { + "summary": "Delete a Folder", + "description": "Delete an existing folder", + "operationId": "deleteFolder", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Folders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/relations": { + "get": { + "summary": "List Relations", + "description": "List the relations.", + "operationId": "getRelations", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Relations" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Relations" + ] + }, + "post": { + "summary": "Create a Relation", + "description": "Create a new relation.", + "operationId": "createRelation", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "collection_many": { + "description": "Collection that has the field that holds the foreign key.", + "type": "string", + "example": "articles" + }, + "collection_one": { + "description": "Collection on the _one_ side of the relationship.", + "type": "string", + "example": "authors" + }, + "field_many": { + "description": "Foreign key. Field that holds the primary key of the related collection.", + "type": "string", + "example": "author" + }, + "field_one": { + "description": "Alias column that serves as the _one_ side of the relationship.", + "type": "string", + "example": "books" + }, + "junction_field": { + "description": "Field on the junction table that holds the primary key of the related collection.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Relations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Relations" + ] + } + }, + "/relations/{id}": { + "get": { + "summary": "Retrieve a Relation", + "description": "Retrieve a single relation by unique identifier.", + "operationId": "getRelation", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Relations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Relations" + ] + }, + "patch": { + "summary": "Update a Relation", + "description": "Update an existing relation", + "operationId": "updateRelation", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "collection_many": { + "description": "Collection that has the field that holds the foreign key.", + "type": "string" + }, + "collection_one": { + "description": "Collection on the _one_ side of the relationship.", + "type": "string" + }, + "field_many": { + "description": "Foreign key. Field that holds the primary key of the related collection.", + "type": "string" + }, + "field_one": { + "description": "Alias column that serves as the _one_ side of the relationship.", + "type": "string", + "example": "books" + }, + "junction_field": { + "description": "Field on the junction table that holds the primary key of the related collection.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Relations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Relations" + ] + }, + "delete": { + "summary": "Delete a Relation", + "description": "Delete an existing relation.", + "operationId": "deleteRelation", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Relations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ] + } + }, + "/files": { + "get": { + "summary": "List Files", + "description": "List the files.", + "tags": [ + "Files" + ], + "operationId": "getFiles", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Files" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "post": { + "summary": "Create a File", + "description": "Create a new file", + "tags": [ + "Files" + ], + "operationId": "createFile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Files" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "summary": "Update Multiple Files", + "description": "Update multiple files at the same time.", + "tags": [ + "Files" + ], + "operationId": "updateFiles", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "data": { + "type": "string" + } + } + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Files" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Files", + "description": "Delete multiple existing files.", + "tags": [ + "Files" + ], + "operationId": "deleteFiles", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/files/{id}": { + "get": { + "summary": "Retrieve a Files", + "description": "Retrieve a single file by unique identifier.", + "tags": [ + "Files" + ], + "operationId": "getFile", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Files" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "summary": "Update a File", + "description": "Update an existing file, and/or replace it's file contents.", + "tags": [ + "Files" + ], + "operationId": "updateFile", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "multipart/data": { + "schema": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "title": { + "description": "Title for the file. Is extracted from the filename on upload, but can be edited by the user.", + "example": "User Avatar", + "type": "string" + }, + "filename_download": { + "description": "Preferred filename when file is downloaded.", + "type": "string" + }, + "description": { + "description": "Description for the file.", + "type": "string", + "nullable": true + }, + "folder": { + "description": "Virtual folder where this file resides in.", + "example": null, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Folders" + } + ], + "nullable": true + }, + "tags": { + "description": "Tags for the file. Is automatically populated based on Exif data for images.", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "file": { + "description": "File contents.", + "format": "binary" + } + } + } + }, + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "description": "Title for the file. Is extracted from the filename on upload, but can be edited by the user.", + "example": "User Avatar", + "type": "string" + }, + "filename_download": { + "description": "Preferred filename when file is downloaded.", + "type": "string" + }, + "description": { + "description": "Description for the file.", + "type": "string", + "nullable": true + }, + "folder": { + "description": "Virtual folder where this file resides in.", + "example": null, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Folders" + } + ], + "nullable": true + }, + "tags": { + "description": "Tags for the file. Is automatically populated based on Exif data for images.", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Files" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete a File", + "description": "Delete an existing file.", + "tags": [ + "Files" + ], + "operationId": "deleteFile", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/fields": { + "get": { + "summary": "List All Fields", + "description": "Returns a list of the fields available in the project.", + "operationId": "getFields", + "parameters": [ + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Sort" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fields" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ] + } + }, + "/fields/{collection}": { + "get": { + "summary": "List Fields in Collection", + "description": "Returns a list of the fields available in the given collection.", + "operationId": "getCollectionFields", + "parameters": [ + { + "description": "Unique identifier of the collection the item resides in.", + "in": "path", + "name": "collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Sort" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fields" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ] + }, + "post": { + "summary": "Create Field in Collection", + "description": "Create a new field in a given collection.", + "operationId": "createField", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "field", + "datatype", + "type", + "length" + ], + "type": "object", + "properties": { + "field": { + "description": "Unique name of the field. Field name is unique within the collection.", + "example": "id", + "type": "string" + }, + "type": { + "description": "Directus specific data type. Used to cast values in the API.", + "example": "integer", + "type": "string" + }, + "schema": { + "description": "The schema info.", + "type": "object", + "properties": { + "name": { + "description": "The name of the field.", + "example": "title", + "type": "string" + }, + "table": { + "description": "The collection of the field.", + "example": "posts", + "type": "string" + }, + "type": { + "description": "The type of the field.", + "example": "string", + "type": "string" + }, + "default_value": { + "description": "The default value of the field.", + "example": null, + "type": "string", + "nullable": true + }, + "max_length": { + "description": "The max length of the field.", + "example": null, + "type": "integer", + "nullable": true + }, + "is_nullable": { + "description": "If the field is nullable.", + "example": false, + "type": "boolean" + }, + "is_primary_key": { + "description": "If the field is primary key.", + "example": false, + "type": "boolean" + }, + "has_auto_increment": { + "description": "If the field has auto increment.", + "example": false, + "type": "boolean" + }, + "foreign_key_column": { + "description": "Related column from the foreign key constraint.", + "example": null, + "type": "string", + "nullable": true + }, + "foreign_key_table": { + "description": "Related table from the foreign key constraint.", + "example": null, + "type": "string", + "nullable": true + }, + "comment": { + "description": "Comment as saved in the database.", + "example": null, + "type": "string", + "nullable": true + }, + "schema": { + "description": "Database schema (pg only).", + "example": "public", + "type": "string" + }, + "foreign_key_schema": { + "description": "Related schema from the foreign key constraint (pg only).", + "example": null, + "type": "string", + "nullable": true + } + } + }, + "meta": { + "description": "The meta info.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "description": "Unique identifier for the field in the `directus_fields` collection.", + "example": 3, + "type": "integer" + }, + "collection": { + "description": "Unique name of the collection this field is in.", + "example": "posts", + "type": "string" + }, + "field": { + "description": "Unique name of the field. Field name is unique within the collection.", + "example": "title", + "type": "string" + }, + "special": { + "description": "Transformation flag for field", + "example": null, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "system-interface": { + "description": "What interface is used in the admin app to edit the value for this field.", + "example": "primary-key", + "type": "string", + "nullable": true + }, + "options": { + "description": "Options for the interface that's used. This format is based on the individual interface.", + "example": null, + "type": "object", + "nullable": true + }, + "display": { + "description": "What display is used in the admin app to display the value for this field.", + "example": null, + "type": "string", + "nullable": true + }, + "display_options": { + "description": "Options for the display that's used. This format is based on the individual display.", + "example": null, + "type": "object", + "nullable": true + }, + "locked": { + "description": "If the field can be altered by the end user. Directus system fields have this value set to `true`.", + "example": true, + "type": "boolean" + }, + "readonly": { + "description": "Prevents the user from editing the value in the field.", + "example": false, + "type": "boolean" + }, + "hidden": { + "description": "If this field should be hidden.", + "example": true, + "type": "boolean" + }, + "sort": { + "description": "Sort order of this field on the edit page of the admin app.", + "example": 1, + "type": "integer", + "nullable": true + }, + "width": { + "description": "Width of the field on the edit form.", + "example": null, + "type": "string", + "nullable": true, + "enum": [ + "half", + "half-left", + "half-right", + "full", + "fill", + null + ] + }, + "group": { + "description": "What field group this field is part of.", + "example": null, + "type": "integer", + "nullable": true + }, + "translation": { + "description": "Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app.", + "example": null, + "type": "object", + "nullable": true + }, + "note": { + "description": "A user provided note for the field. Will be rendered alongside the interface on the edit page.", + "example": "", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Fields" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ], + "parameters": [ + { + "description": "Unique identifier of the collection the item resides in.", + "in": "path", + "name": "collection", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, + "/fields/{collection}/{id}": { + "get": { + "summary": "Retrieve a Field", + "description": "Retrieves the details of a single field in a given collection.", + "operationId": "getCollectionField", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Fields" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ], + "parameters": [ + { + "name": "collection", + "in": "path", + "description": "Unique identifier of the collection the item resides in.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the field.", + "schema": { + "type": "string" + }, + "required": true + } + ] + }, + "patch": { + "summary": "Update a Field", + "description": "Update an existing field.", + "operationId": "updateField", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "field": { + "description": "Unique name of the field. Field name is unique within the collection.", + "example": "id", + "type": "string" + }, + "type": { + "description": "Directus specific data type. Used to cast values in the API.", + "example": "integer", + "type": "string" + }, + "schema": { + "description": "The schema info.", + "type": "object", + "properties": { + "name": { + "description": "The name of the field.", + "example": "title", + "type": "string" + }, + "table": { + "description": "The collection of the field.", + "example": "posts", + "type": "string" + }, + "type": { + "description": "The type of the field.", + "example": "string", + "type": "string" + }, + "default_value": { + "description": "The default value of the field.", + "example": null, + "type": "string", + "nullable": true + }, + "max_length": { + "description": "The max length of the field.", + "example": null, + "type": "integer", + "nullable": true + }, + "is_nullable": { + "description": "If the field is nullable.", + "example": false, + "type": "boolean" + }, + "is_primary_key": { + "description": "If the field is primary key.", + "example": false, + "type": "boolean" + }, + "has_auto_increment": { + "description": "If the field has auto increment.", + "example": false, + "type": "boolean" + }, + "foreign_key_column": { + "description": "Related column from the foreign key constraint.", + "example": null, + "type": "string", + "nullable": true + }, + "foreign_key_table": { + "description": "Related table from the foreign key constraint.", + "example": null, + "type": "string", + "nullable": true + }, + "comment": { + "description": "Comment as saved in the database.", + "example": null, + "type": "string", + "nullable": true + }, + "schema": { + "description": "Database schema (pg only).", + "example": "public", + "type": "string" + }, + "foreign_key_schema": { + "description": "Related schema from the foreign key constraint (pg only).", + "example": null, + "type": "string", + "nullable": true + } + } + }, + "meta": { + "description": "The meta info.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "description": "Unique identifier for the field in the `directus_fields` collection.", + "example": 3, + "type": "integer" + }, + "collection": { + "description": "Unique name of the collection this field is in.", + "example": "posts", + "type": "string" + }, + "field": { + "description": "Unique name of the field. Field name is unique within the collection.", + "example": "title", + "type": "string" + }, + "special": { + "description": "Transformation flag for field", + "example": null, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "system-interface": { + "description": "What interface is used in the admin app to edit the value for this field.", + "example": "primary-key", + "type": "string", + "nullable": true + }, + "options": { + "description": "Options for the interface that's used. This format is based on the individual interface.", + "example": null, + "type": "object", + "nullable": true + }, + "display": { + "description": "What display is used in the admin app to display the value for this field.", + "example": null, + "type": "string", + "nullable": true + }, + "display_options": { + "description": "Options for the display that's used. This format is based on the individual display.", + "example": null, + "type": "object", + "nullable": true + }, + "locked": { + "description": "If the field can be altered by the end user. Directus system fields have this value set to `true`.", + "example": true, + "type": "boolean" + }, + "readonly": { + "description": "Prevents the user from editing the value in the field.", + "example": false, + "type": "boolean" + }, + "hidden": { + "description": "If this field should be hidden.", + "example": true, + "type": "boolean" + }, + "sort": { + "description": "Sort order of this field on the edit page of the admin app.", + "example": 1, + "type": "integer", + "nullable": true + }, + "width": { + "description": "Width of the field on the edit form.", + "example": null, + "type": "string", + "nullable": true, + "enum": [ + "half", + "half-left", + "half-right", + "full", + "fill", + null + ] + }, + "group": { + "description": "What field group this field is part of.", + "example": null, + "type": "integer", + "nullable": true + }, + "translation": { + "description": "Key value pair of `: ` that allows the user to change the displayed name of the field in the admin app.", + "example": null, + "type": "object", + "nullable": true + }, + "note": { + "description": "A user provided note for the field. Will be rendered alongside the interface on the edit page.", + "example": "", + "type": "string", + "nullable": true + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Fields" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ], + "parameters": [ + { + "name": "collection", + "in": "path", + "description": "Unique identifier of the collection the item resides in.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the field.", + "schema": { + "type": "string" + }, + "required": true + } + ] + }, + "delete": { + "summary": "Delete a Field", + "description": "Delete an existing field.", + "operationId": "deleteField", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Fields" + ], + "parameters": [ + { + "name": "collection", + "in": "path", + "description": "Unique identifier of the collection the item resides in.", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the field.", + "schema": { + "type": "string" + }, + "required": true + } + ] + } + }, + "/operations": { + "get": { + "summary": "List Operations", + "description": "Get all operations.", + "operationId": "getOperations", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operations" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Operations" + ] + }, + "post": { + "summary": "Create an Operation", + "description": "Create a new operation.", + "operationId": "createOperation", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Operations" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Operations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Operations" + ] + }, + "patch": { + "summary": "Update Multiple Operations", + "description": "Update multiple operations at the same time.", + "tags": [ + "Operations" + ], + "operationId": "updateOperations", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Operations" + } + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operations" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Operations", + "description": "Delete multiple existing operations.", + "tags": [ + "Operations" + ], + "operationId": "deleteOperations", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/operations/{id}": { + "get": { + "summary": "Retrieve an Operation", + "description": "Retrieve a single operation by unique identifier.", + "operationId": "getOperation", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Operations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + }, + "patch": { + "summary": "Update an Operation", + "description": "Update an existing operation", + "operationId": "updateOperation", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Operations" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Operations" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Operations" + ] + }, + "delete": { + "summary": "Delete an Operation", + "description": "Delete an existing operation", + "operationId": "deleteOperation", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/versions": { + "get": { + "summary": "List Content Versions", + "description": "Get all Content Versions.", + "operationId": "getContentVersions", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Versions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + }, + "post": { + "summary": "Create Multiple Content Versions", + "description": "Create multiple new Content Versions.", + "operationId": "createContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Versions" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Versions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + }, + "patch": { + "summary": "Update Multiple Content Versions", + "description": "Update multiple Content Versions at the same time.", + "operationId": "updateContentVersions", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Versions" + } + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Versions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Versions" + ] + }, + "delete": { + "summary": "Delete Multiple Content Versions", + "description": "Delete multiple existing Content Versions.", + "operationId": "deleteContentVersions", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Versions" + ] + } + }, + "/versions/{id}": { + "get": { + "summary": "Retrieve a Content Version", + "description": "Retrieve a single Content Version by unique identifier.", + "operationId": "getContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Versions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + }, + "patch": { + "summary": "Update a Content Version", + "description": "Update an existing Content Version.", + "operationId": "updateContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Versions" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Versions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + }, + "delete": { + "summary": "Delete a Content Version", + "description": "Delete an existing Content Version.", + "operationId": "deleteContentVersion", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/versions/{id}/save": { + "post": { + "summary": "Save to a Content Version", + "description": "Save item changes to an existing Content Version.", + "operationId": "saveContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + } + }, + "/versions/{id}/compare": { + "get": { + "summary": "Compare a Content Version", + "description": "Compare an existing Content Version with the main version of the item.", + "operationId": "compareContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + } + }, + "/versions/{id}/promote": { + "post": { + "summary": "Promote a Content Version", + "description": "Pass the current hash of the main version of the item (obtained from the `compare` endpoint) along with an optional array of field names of which the values are to be promoted (by default, all fields are selected).", + "operationId": "promoteContentVersion", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mainHash": { + "description": "Hash of the main version of the item to be promoted.", + "type": "string" + }, + "fields": { + "description": "Optional array of field names of which the values are to be promoted.", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Versions" + ] + } + }, + "/revisions": { + "get": { + "summary": "List Revisions", + "description": "List the revisions.", + "operationId": "getRevisions", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Revisions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Revisions" + ] + } + }, + "/revisions/{id}": { + "get": { + "summary": "Retrieve a Revision", + "description": "Retrieve a single revision by unique identifier.", + "operationId": "getRevision", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Revisions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Revisions" + ] + } + }, + "/users": { + "get": { + "summary": "List Users", + "description": "List the users.", + "operationId": "getUsers", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Users" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + }, + "post": { + "summary": "Create a User", + "description": "Create a new user.", + "operationId": "createUser", + "parameters": [ + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Users" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + }, + "patch": { + "summary": "Update Multiple Users", + "description": "Update multiple users at the same time.", + "tags": [ + "Users" + ], + "operationId": "updateUsers", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Users" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Users", + "description": "Delete multiple existing users.", + "tags": [ + "Users" + ], + "operationId": "deleteUsers", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/users/{id}": { + "get": { + "summary": "Retrieve a User", + "description": "Retrieve a single user by unique identifier.", + "operationId": "getUser", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + }, + "patch": { + "summary": "Update a User", + "description": "Update an existing user", + "operationId": "updateUser", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Users" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + }, + "delete": { + "summary": "Delete a User", + "description": "Delete an existing user", + "operationId": "deleteUser", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/users/invite": { + "post": { + "summary": "Invite User(s)", + "description": "Invites one or more users to this project. It creates a user with an invited status, and then sends an email to the user with instructions on how to activate their account.", + "operationId": "invite", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Email address or array of email addresses of the to-be-invited user(s).", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/users/invite/accept": { + "post": { + "summary": "Accept User Invite", + "description": "Accepts and enables an invited user using a JWT invitation token.", + "operationId": "acceptInvite", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "example": "eyJh...KmUk", + "description": "Accept invite token." + }, + "password": { + "type": "string", + "description": "Password of the user.", + "format": "password", + "example": "d1r3ctu5" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/users/me": { + "get": { + "summary": "Retrieve Current User", + "description": "Retrieve the currently authenticated user.", + "operationId": "getMe", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + }, + "patch": { + "summary": "Update Current User", + "description": "Update the currently authenticated user.", + "operationId": "updateMe", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Users" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/users/me/track/page": { + "patch": { + "summary": "Update Last Page", + "description": "Updates the last used page field of the currently authenticated user. This is used internally to be able to open the Directus admin app from the last page you used.", + "operationId": "updateLastUsedPageMe", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "last_page": { + "description": "Path of the page you used last.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/users/me/tfa/enable": { + "post": { + "summary": "Enable 2FA", + "description": "Enables two-factor authentication for the currently authenticated user.", + "operationId": "meTfaEnable", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/users/me/tfa/disable": { + "post": { + "summary": "Disable 2FA", + "description": "Disables two-factor authentication for the currently authenticated user.", + "operationId": "meTfaDisable", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Users" + ] + } + }, + "/extensions": { + "get": { + "summary": "List Extensions", + "description": "List the installed extensions and their configuration in the project.", + "operationId": "listExtensions", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extensions" + } + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "tags": [ + "Extensions" + ] + } + }, + "/extensions/{name}": { + "patch": { + "summary": "Update an Extension", + "description": "Update an existing extension.", + "operationId": "updateExtensions", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "description": "Directus metadata for the extension. Where the configuration for the extension in the current project is stored.", + "properties": { + "enabled": { + "description": "Whether or not the extension is enabled.", + "example": true, + "type": "boolean" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Extensions" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Extensions" + ] + } + }, + "/extensions/{bundle}/{name}": { + "patch": { + "summary": "Update an Extension", + "description": "Update an existing extension.", + "operationId": "updateExtensionBundle", + "parameters": [ + { + "in": "path", + "name": "bundle", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "description": "Directus metadata for the extension. Where the configuration for the extension in the current project is stored.", + "properties": { + "enabled": { + "description": "Whether or not the extension is enabled.", + "example": true, + "type": "boolean" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Extensions" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Extensions" + ] + } + }, + "/webhooks": { + "get": { + "summary": "List Webhooks", + "description": "Get all webhooks.", + "operationId": "getWebhooks", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Webhooks" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Webhooks" + ] + }, + "post": { + "summary": "Create a Webhook", + "description": "Create a new webhook.", + "operationId": "createWebhook", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Roles" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Webhooks" + ] + }, + "patch": { + "summary": "Update Multiple Webhooks", + "description": "Update multiple webhooks at the same time.", + "tags": [ + "Webhooks" + ], + "operationId": "updateWebhooks", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Webhooks" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Webhooks", + "description": "Delete multiple existing webhooks.", + "tags": [ + "Webhooks" + ], + "operationId": "deleteWebhooks", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/webhooks/{id}": { + "get": { + "summary": "Retrieve a Webhook", + "description": "Retrieve a single webhook by unique identifier.", + "operationId": "getWebhook", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Webhooks" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + }, + "patch": { + "summary": "Update a Webhook", + "description": "Update an existing webhook", + "operationId": "updateWebhook", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Roles" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Webhooks" + ] + }, + "delete": { + "summary": "Delete a Webhook", + "description": "Delete an existing webhook", + "operationId": "deleteWebhook", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Webhooks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/settings": { + "get": { + "summary": "Retrieve Settings", + "description": "List the settings.", + "operationId": "getSettings", + "parameters": [ + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Settings" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Settings" + ] + }, + "patch": { + "summary": "Update Settings", + "description": "Update the settings", + "operationId": "updateSetting", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Settings" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Settings" + ] + } + }, + "/permissions": { + "get": { + "summary": "List Permissions", + "description": "List all permissions.", + "operationId": "getPermissions", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permissions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ] + }, + "post": { + "summary": "Create a Permission", + "description": "Create a new permission.", + "operationId": "createPermission", + "parameters": [ + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "collection": { + "description": "What collection this permission applies to.", + "type": "string", + "example": "customers" + }, + "comment": { + "description": "If the user can post comments.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "full" + ] + }, + "create": { + "description": "If the user can create items.", + "type": "string", + "enum": [ + "none", + "full" + ] + }, + "delete": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "always" + ] + }, + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "integer", + "example": 3 + }, + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "featured_image" + ] + }, + "status": { + "description": "What status this permission applies to.", + "type": "string" + }, + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "array", + "items": { + "type": "string" + } + }, + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ] + }, + "patch": { + "summary": "Update Multiple Permissions", + "description": "Update multiple permissions at the same time.", + "tags": [ + "Permissions" + ], + "operationId": "updatePermissions", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { + "properties": { + "collection": { + "description": "What collection this permission applies to.", + "type": "string", + "example": "customers" + }, + "comment": { + "description": "If the user can post comments.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "full" + ] + }, + "create": { + "description": "If the user can create items.", + "type": "string", + "enum": [ + "none", + "full" + ] + }, + "delete": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "always" + ] + }, + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "integer", + "example": 3 + }, + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "featured_image" + ] + }, + "status": { + "description": "What status this permission applies to.", + "type": "string" + }, + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "array", + "items": { + "type": "string" + } + }, + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permissions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Permissions", + "description": "Delete multiple existing permissions.", + "tags": [ + "Permissions" + ], + "operationId": "deletePermissions", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/permissions/me": { + "get": { + "summary": "List My Permissions", + "description": "List the permissions that apply to the current user.", + "operationId": "getMyPermissions", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ] + } + }, + "/permissions/{id}": { + "get": { + "summary": "Retrieve a Permission", + "description": "Retrieve a single permissions object by unique identifier.", + "operationId": "getPermission", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ] + }, + "patch": { + "summary": "Update a Permission", + "description": "Update an existing permission", + "operationId": "updatePermission", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "collection": { + "description": "What collection this permission applies to.", + "type": "object" + }, + "comment": { + "description": "If the user can post comments. `full`.", + "type": "string", + "enum": [ + "none", + "create", + "update" + ] + }, + "create": { + "description": "If the user can create items.", + "type": "string", + "enum": [ + "none", + "full" + ] + }, + "delete": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "always" + ] + }, + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "object" + }, + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "object" + }, + "status": { + "description": "What status this permission applies to.", + "type": "object" + }, + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "object" + }, + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ] + }, + "delete": { + "summary": "Delete a Permission", + "description": "Delete an existing permission", + "operationId": "deletePermission", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Permissions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ] + } + }, + "/collections": { + "get": { + "summary": "List Collections", + "description": "Returns a list of the collections available in the project.", + "operationId": "getCollections", + "parameters": [ + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collections" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ] + }, + "post": { + "summary": "Create a Collection", + "description": "Create a new collection in Directus.", + "operationId": "createCollection", + "parameters": [ + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection", + "fields" + ], + "properties": { + "collection": { + "type": "string", + "description": "Unique name of the collection.", + "example": "my_collection" + }, + "fields": { + "type": "array", + "description": "The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided.", + "items": { + "type": "object" + } + }, + "icon": { + "description": "Name of a Google Material Design Icon that's assigned to this collection.", + "type": "string", + "example": "people", + "nullable": true + }, + "note": { + "description": "A note describing the collection.", + "type": "string", + "example": null, + "nullable": true + }, + "display_template": { + "description": "Text representation of how items from this collection are shown across the system.", + "type": "string", + "example": null, + "nullable": true + }, + "hidden": { + "description": "Whether or not the collection is hidden from the navigation in the admin app.", + "type": "boolean", + "example": false + }, + "singleton": { + "description": "Whether or not the collection is treated as a single object.", + "type": "boolean", + "example": false + }, + "translation": { + "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", + "type": "string", + "example": null, + "nullable": true + }, + "versioning": { + "description": "Whether or not Content Versioning is enabled for this collection.", + "type": "boolean", + "example": false + }, + "archive_field": { + "description": "What field holds the archive value.", + "type": "string", + "example": null, + "nullable": true + }, + "archive_app_filter": { + "description": "What value to use for \"archived\" items.", + "type": "string", + "example": null, + "nullable": true + }, + "archive_value": { + "description": "What value to use to \"unarchive\" items.", + "type": "string", + "example": null, + "nullable": true + }, + "unarchive_value": { + "description": "Whether or not to show the \"archived\" filter.", + "type": "string", + "example": null, + "nullable": true + }, + "sort_field": { + "description": "The sort field in the collection.", + "type": "string", + "example": null, + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Collections" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ] + } + }, + "/collections/{id}": { + "get": { + "summary": "Retrieve a Collection", + "description": "Retrieves the details of a single collection.", + "operationId": "getCollection", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Collections" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ] + }, + "patch": { + "summary": "Update a Collection", + "description": "Update an existing collection.", + "operationId": "updateCollection", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "description": "Metadata of the collection.", + "type": "object", + "properties": { + "icon": { + "description": "Name of a Google Material Design Icon that's assigned to this collection.", + "type": "string", + "example": "people", + "nullable": true + }, + "color": { + "description": "Choose the color for the icon assigned to this collection.", + "type": "string", + "example": "#6644ff", + "nullable": true + }, + "note": { + "description": "A note describing the collection.", + "type": "string", + "example": null, + "nullable": true + }, + "display_template": { + "description": "Text representation of how items from this collection are shown across the system.", + "type": "string", + "example": null, + "nullable": true + }, + "hidden": { + "description": "Whether or not the collection is hidden from the navigation in the admin app.", + "type": "boolean", + "example": false + }, + "singleton": { + "description": "Whether or not the collection is treated as a single object.", + "type": "boolean", + "example": false + }, + "translation": { + "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", + "type": "string", + "example": null, + "nullable": true + }, + "versioning": { + "description": "Whether or not Content Versioning is enabled for this collection.", + "type": "boolean", + "example": false + }, + "archive_field": { + "description": "What field holds the archive value.", + "type": "string", + "example": null, + "nullable": true + }, + "archive_app_filter": { + "description": "What value to use for \"archived\" items.", + "type": "string", + "example": null, + "nullable": true + }, + "archive_value": { + "description": "What value to use to \"unarchive\" items.", + "type": "string", + "example": null, + "nullable": true + }, + "unarchive_value": { + "description": "Whether or not to show the \"archived\" filter.", + "type": "string", + "example": null, + "nullable": true + }, + "sort_field": { + "description": "The sort field in the collection.", + "type": "string", + "example": null, + "nullable": true + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Collections" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ] + }, + "delete": { + "summary": "Delete a Collection", + "description": "Delete an existing collection. Warning: This will delete the whole collection, including the items within. Proceed with caution.", + "operationId": "deleteCollection", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } + } + ] + } + }, + "/flows": { + "get": { + "summary": "List Flows", + "description": "Get all flows.", + "operationId": "getFlows", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flows" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ] + }, + "post": { + "summary": "Create a Flow", + "description": "Create a new flow.", + "operationId": "createFlow", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Flows" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ] + }, + "patch": { + "summary": "Update Multiple Flows", + "description": "Update multiple flows at the same time.", + "tags": [ + "Flows" + ], + "operationId": "updateFlows", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" + } + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flows" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Flows", + "description": "Delete multiple existing flows.", + "tags": [ + "Flows" + ], + "operationId": "deleteFlows", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/flows/{id}": { + "get": { + "summary": "Retrieve a Flow", + "description": "Retrieve a single flow by unique identifier.", + "operationId": "getFlow", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Flows" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + }, + "patch": { + "summary": "Update a Flow", + "description": "Update an existing flow", + "operationId": "updateFlow", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Flows" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ] + }, + "delete": { + "summary": "Delete a Flow", + "description": "Delete an existing flow", + "operationId": "deleteFlow", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/presets": { + "get": { + "tags": [ + "Presets" + ], + "operationId": "getPresets", + "summary": "List Presets", + "description": "List the presets.", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Presets" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "post": { + "tags": [ + "Presets" + ], + "operationId": "createPreset", + "summary": "Create a Preset", + "description": "Create a new preset.", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "What collection this collection preset is used for.", + "example": "articles" + }, + "title": { + "type": "string", + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" + }, + "role": { + "type": "string", + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", + "example": null + }, + "search": { + "type": "string", + "description": "What the user searched for in search/filter in the header bar." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "aHKLAakdVghzD" + }, + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } + } + } + }, + "layout": { + "type": "string", + "description": "Name of the view type that is used." + }, + "layout_query": { + "type": "string", + "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + }, + "layout_options": { + "type": "string", + "description": "Options of the views. The properties in here are controlled by the layout." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Presets" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "summary": "Update Multiple Presets", + "description": "Update multiple presets at the same time.", + "tags": [ + "Presets" + ], + "operationId": "updatePresets", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "What collection this collection preset is used for.", + "example": "articles" + }, + "title": { + "type": "string", + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" + }, + "role": { + "type": "string", + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", + "example": null + }, + "search": { + "type": "string", + "description": "What the user searched for in search/filter in the header bar." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "aHKLAakdVghzD" + }, + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } + } + } + }, + "layout": { + "type": "string", + "description": "Name of the view type that is used." + }, + "layout_query": { + "type": "string", + "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + }, + "layout_options": { + "type": "string", + "description": "Options of the views. The properties in here are controlled by the layout." + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Presets" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Presets", + "description": "Delete multiple existing presets.", + "tags": [ + "Presets" + ], + "operationId": "deletePresets", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/presets/{id}": { + "get": { + "tags": [ + "Presets" + ], + "operationId": "getPreset", + "summary": "Retrieve a Preset", + "description": "Retrieve a single preset by unique identifier.", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Presets" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "tags": [ + "Presets" + ], + "operationId": "updatePreset", + "summary": "Update a Preset", + "description": "Update an existing preset.", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "What collection this collection preset is used for.", + "example": "articles" + }, + "title": { + "type": "string", + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" + }, + "role": { + "type": "integer", + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role." + }, + "search_query": { + "type": "string", + "description": "What the user searched for in search/filter in the header bar." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } + } + } + }, + "view_type": { + "type": "string", + "description": "Name of the view type that is used. Defaults to tabular." + }, + "view_query": { + "type": "string", + "description": "View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + }, + "view_options": { + "type": "string", + "description": "Options of the views. The properties in here are controlled by the layout." + }, + "translation": { + "type": "object", + "description": "Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Presets" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "tags": [ + "Presets" + ], + "operationId": "deletePreset", + "summary": "Delete a Preset", + "description": "Delete an existing preset.", + "security": [ + { + "Auth": [] + } + ], + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ] + } + }, + "/roles": { + "get": { + "summary": "List Roles", + "description": "List the roles.", + "operationId": "getRoles", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Roles" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Roles" + ] + }, + "post": { + "summary": "Create a Role", + "description": "Create a new role.", + "operationId": "createRole", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string", + "example": "Interns" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Roles" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Roles" + ] + }, + "patch": { + "summary": "Update Multiple Roles", + "description": "Update multiple roles at the same time.", + "tags": [ + "Roles" + ], + "operationId": "updateRoles", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string", + "example": "Interns" + } + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Roles" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Roles", + "description": "Delete multiple existing roles.", + "tags": [ + "Roles" + ], + "operationId": "deleteRoles", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/roles/{id}": { + "get": { + "summary": "Retrieve a Role", + "description": "Retrieve a single role by unique identifier.", + "operationId": "getRole", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Roles" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Roles" + ] + }, + "patch": { + "summary": "Update a Role", + "description": "Update an existing role", + "operationId": "updateRole", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Roles" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Roles" + ] + }, + "delete": { + "summary": "Delete a Role", + "description": "Delete an existing role", + "operationId": "deleteRole", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Roles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + } + }, + "/comments": { + "get": { + "tags": [ + "Comments" + ], + "operationId": "getComments", + "summary": "List Comments", + "description": "List the comments.", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comments" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "post": { + "tags": [ + "Comments" + ], + "operationId": "createComment", + "summary": "Create a Comment", + "description": "Create a new comment.", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection", + "item", + "comment" + ], + "properties": { + "collection": { + "type": "string", + "description": "Which collection this collection comment is for.", + "example": "projects" + }, + "item": { + "type": "string", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" + }, + "comment": { + "type": "string", + "example": "A new comment" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Comments" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "summary": "Update Multiple Comments", + "description": "Update multiple comments at the same time.", + "tags": [ + "Comments" + ], + "operationId": "updateComments", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "Which collection this collection comment is for.", + "example": "projects" + }, + "item": { + "type": "string", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" + }, + "comment": { + "type": "string", + "example": "A new comment" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comments" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Comments", + "description": "Delete multiple existing comments.", + "tags": [ + "Comments" + ], + "operationId": "deleteComments", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/comments/{id}": { + "get": { + "tags": [ + "Comments" + ], + "operationId": "getComment", + "summary": "Retrieve a Comment", + "description": "Retrieve a single comment by unique identifier.", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Comments" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "tags": [ + "Comments" + ], + "operationId": "updateComment", + "summary": "Update a Comment", + "description": "Update an existing comment.", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "Which collection this comment is for.", + "example": "projects" + }, + "item": { + "type": "string", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" + }, + "comment": { + "type": "string", + "example": "An updated comment" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Comments" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "delete": { + "tags": [ + "Comments" + ], + "operationId": "deleteComment", + "summary": "Delete a Comment", + "description": "Delete an existing comment.", + "security": [ + { + "Auth": [] + } + ], + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/activity": { + "get": { + "operationId": "getActivities", + "summary": "List Activity Actions", + "description": "Returns a list of activity actions.", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Activity" + ] + } + }, + "/activity/{id}": { + "get": { + "summary": "Retrieve an Activity Action", + "description": "Retrieves the details of an existing activity action. Provide the primary key of the activity action and Directus will return the corresponding information.", + "operationId": "getActivity", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Activity" + ] + } + } + }, + "tags": [ + { + "name": "Assets", + "description": "Image typed files can be dynamically resized and transformed to fit any need." + }, + { + "name": "Authentication", + "description": "All data within the platform is private by default. The public role can be configured to expose data without authentication, or you can pass an access token to the API to access private data." + }, + { + "name": "Schema", + "description": "Retrieve and update the schema of an instance.", + "x-authentication": "admin", + "x-schemas": [ + "Schema", + "Diff" + ] + }, + { + "name": "Server", + "description": "Access to where Directus runs. Allows you to make sure your server has everything needed to run the platform, and check what kind of latency we're dealing with." + }, + { + "name": "Utilities", + "description": "Directus comes with various utility endpoints you can use to simplify your development flow.", + "x-authentication": "user", + "x-schemas": [ + "Files", + "Folders", + "Users", + "Roles" + ] + }, + { + "name": "Folders", + "description": "Group files by virtual folders.", + "x-collection": "directus_folders" + }, + { + "name": "Relations", + "description": "What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of.", + "x-collection": "directus_relations" + }, + { + "name": "Files", + "description": "Files can be saved in any given location. Directus has a powerful assets endpoint that can be used to generate thumbnails for images on the fly.", + "x-collection": "directus_files" + }, + { + "name": "Fields", + "description": "Fields are individual pieces of content within an item. They are mapped to columns in the database.", + "x-collection": "directus_fields" + }, + { + "name": "Operations", + "description": "Operations are the building blocks within Data Flows.", + "x-collection": "directus_operations" + }, + { + "name": "Versions", + "description": "Enables users to create unpublished copies of an item, modify them independently from the main version, and promote them to become the new main version when ready.", + "x-collection": "directus_versions" + }, + { + "name": "Revisions", + "description": "Revisions are individual changes to items made. Directus keeps track of changes made, so you're able to revert to a previous state at will.", + "x-collection": "directus_revisions" + }, + { + "name": "Users", + "description": "Users are what gives you access to the data.", + "x-collection": "directus_users" + }, + { + "name": "Extensions", + "description": "Directus can easily be extended through the addition of several types of extensions, including layouts, interfaces, and modules.", + "x-collection": "directus_extensions" + }, + { + "name": "Webhooks", + "description": "Webhooks.", + "x-collection": "directus_webhooks" + }, + { + "name": "Settings", + "description": "Settings control the way the platform works and acts.", + "x-collection": "directus_settings" + }, + { + "name": "Permissions", + "description": "Permissions control who has access to what and when.", + "x-collection": "directus_permissions" + }, + { + "name": "Collections", + "description": "Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database.", + "x-collection": "directus_collections" + }, + { + "name": "Flows", + "description": "Flows enable custom, event-driven data processing and task automation.", + "x-collection": "directus_flows" + }, + { + "name": "Presets", + "description": "Presets hold the preferences of individual users of the platform. This allows Directus to show and maintain custom item listings for users of the app.", + "x-collection": "directus_presets" + }, + { + "name": "Roles", + "description": "Roles are groups of users that share permissions.", + "x-collection": "directus_roles" + }, + { + "name": "Comments", + "description": "Comments can be added to items.", + "x-collection": "directus_comments" + }, + { + "name": "Activity", + "description": "All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.", + "x-collection": "directus_activity" + } + ], + "components": { + "schemas": { + "Diff": { + "type": "object", + "properties": { + "hash": { + "type": "string" + }, + "diff": { + "type": "object", + "properties": { + "collections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection": { + "type": "string" + }, + "diff": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection": { + "type": "string" + }, + "field": { + "type": "string" + }, + "diff": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "relations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection": { + "type": "string" + }, + "field": { + "type": "string" + }, + "related_collection": { + "type": "string" + }, + "diff": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "Files": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the file.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02", + "type": "string" + }, + "storage": { + "description": "Where the file is stored. Either `local` for the local filesystem or the name of the storage adapter (for example `s3`).", + "example": "local", + "type": "string" + }, + "filename_disk": { + "description": "Name of the file on disk. By default, Directus uses a random hash for the filename.", + "example": "a88c3b72-ac58-5436-a4ec-b2858531333a.jpg", + "type": "string" + }, + "filename_download": { + "description": "How you want to the file to be named when it's being downloaded.", + "example": "avatar.jpg", + "type": "string" + }, + "title": { + "description": "Title for the file. Is extracted from the filename on upload, but can be edited by the user.", + "example": "User Avatar", + "type": "string" + }, + "type": { + "description": "MIME type of the file.", + "example": "image/jpeg", + "type": "string" + }, + "folder": { + "description": "Virtual folder where this file resides in.", + "example": null, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Folders" + } + ], + "nullable": true + }, + "uploaded_by": { + "description": "Who uploaded the file.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "created_on": { + "description": "When the file was created.", + "example": "2019-12-03T00:10:15+00:00", + "type": "string", + "format": "date-time" + }, + "modified_by": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "modified_on": { + "nullable": false, + "type": "string", + "format": "date-time" + }, + "charset": { + "description": "Character set of the file.", + "example": "binary", + "type": "string", + "nullable": true + }, + "filesize": { + "description": "Size of the file in bytes.", + "example": 137862, + "type": "integer" + }, + "width": { + "description": "Width of the file in pixels. Only applies to images.", + "example": 800, + "type": "integer", + "nullable": true + }, + "height": { + "description": "Height of the file in pixels. Only applies to images.", + "example": 838, + "type": "integer", + "nullable": true + }, + "duration": { + "description": "Duration of the file in seconds. Only applies to audio and video.", + "example": 0, + "type": "integer", + "nullable": true + }, + "embed": { + "description": "Where the file was embedded from.", + "example": null, + "type": "string", + "nullable": true + }, + "description": { + "description": "Description for the file.", + "type": "string", + "nullable": true + }, + "location": { + "description": "Where the file was created. Is automatically populated based on Exif data for images.", + "type": "string", + "nullable": true + }, + "tags": { + "description": "Tags for the file. Is automatically populated based on Exif data for images.", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "metadata": { + "description": "IPTC, Exif, and ICC metadata extracted from file", + "type": "object", + "nullable": true + }, + "focal_point_x": { + "nullable": true, + "type": "integer" + }, + "focal_point_y": { + "nullable": true, + "type": "integer" + }, + "tus_id": { + "nullable": true, + "type": "string" + }, + "tus_data": { + "nullable": true + }, + "uploaded_on": { + "description": "When the file was last uploaded/replaced.", + "example": "2019-12-03T00:10:15+00:00", + "type": "string", + "format": "date-time" + } + }, + "x-collection": "directus_files" + }, + "Folders": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the folder.", + "example": "0cf0e03d-4364-45df-b77b-ca61f61869d2", + "type": "string" + }, + "name": { + "description": "Name of the folder.", + "example": "New York", + "type": "string" + }, + "parent": { + "description": "Unique identifier of the parent folder. This allows for nested folders.", + "example": null, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Folders" + } + ], + "nullable": true + } + }, + "x-collection": "directus_folders" + }, + "Roles": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the role.", + "example": "2f24211d-d928-469a-aea3-3c8f53d4e426", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "example": "Administrator", + "type": "string" + }, + "icon": { + "description": "The role's icon.", + "example": "verified_user", + "type": "string" + }, + "description": { + "description": "Description of the role.", + "example": "Admins have access to all managed data within the system by default", + "type": "string", + "nullable": true + }, + "parent": { + "nullable": true, + "description": "$t:field_options.directus_roles.parent_note", + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Roles" + } + ] + }, + "children": { + "nullable": true, + "description": "$t:field_options.directus_roles.children_note", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Roles" + } + ] + } + }, + "policies": { + "nullable": true + }, + "users": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + } + } + }, + "x-collection": "directus_roles" + }, + "Schema": { + "type": "object", + "properties": { + "version": { + "type": "integer", + "example": 1 + }, + "directus": { + "type": "string" + }, + "vendor": { + "type": "string" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collections" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fields" + } + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Relations" + } + } + } + }, + "Users": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the user.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "type": "string" + }, + "first_name": { + "description": "First name of the user.", + "example": "Admin", + "type": "string" + }, + "last_name": { + "description": "Last name of the user.", + "example": "User", + "type": "string" + }, + "email": { + "description": "Unique email address for the user.", + "example": "admin@example.com", + "type": "string", + "format": "email" + }, + "password": { + "description": "Password of the user.", + "type": "string" + }, + "location": { + "description": "The user's location.", + "example": null, + "type": "string", + "nullable": true + }, + "title": { + "description": "The user's title.", + "example": null, + "type": "string", + "nullable": true + }, + "description": { + "description": "The user's description.", + "example": null, + "type": "string", + "nullable": true + }, + "tags": { + "description": "The user's tags.", + "example": null, + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "avatar": { + "description": "The user's avatar.", + "example": null, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Files" + } + ], + "nullable": true + }, + "language": { + "description": "The user's language used in Directus.", + "example": "en-US", + "type": "string" + }, + "tfa_secret": { + "description": "The 2FA secret string that's used to generate one time passwords.", + "example": null, + "type": "string", + "nullable": true + }, + "status": { + "description": "Status of the user.", + "example": "active", + "type": "string", + "enum": [ + "active", + "invited", + "draft", + "suspended", + "deleted" + ] + }, + "role": { + "description": "Unique identifier of the role of this user.", + "example": "2f24211d-d928-469a-aea3-3c8f53d4e426", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Roles" + } + ] + }, + "token": { + "description": "Static token for the user.", + "type": "string", + "nullable": true + }, + "last_access": { + "description": "When this user used the API last.", + "example": "2020-05-31T14:32:37Z", + "type": "string", + "nullable": true, + "format": "date-time" + }, + "last_page": { + "description": "Last page that the user was on.", + "example": "/my-project/settings/collections/a", + "type": "string", + "nullable": true + }, + "provider": { + "nullable": false, + "type": "string" + }, + "external_identifier": { + "nullable": true, + "type": "string" + }, + "auth_data": { + "nullable": true + }, + "email_notifications": { + "nullable": true, + "type": "boolean" + }, + "appearance": { + "nullable": true, + "type": "string" + }, + "theme_dark": { + "nullable": true, + "type": "string" + }, + "theme_light": { + "nullable": true, + "type": "string" + }, + "theme_light_overrides": { + "nullable": true + }, + "theme_dark_overrides": { + "nullable": true + }, + "policies": { + "nullable": true + } + }, + "x-collection": "directus_users" + }, + "Query": { + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Control what fields are being returned in the object.", + "example": [ + "*", + "*.*" + ] + }, + "filter": { + "type": "object", + "example": { + "": { + "": "" + } + } + }, + "search": { + "description": "Filter by items that contain the given search query in one of their fields.", + "type": "string" + }, + "sort": { + "type": "array", + "items": { + "type": "string" + }, + "description": "How to sort the returned items.", + "example": [ + "-date_created" + ] + }, + "limit": { + "type": "number", + "description": "Set the maximum number of items that will be returned" + }, + "offset": { + "type": "number", + "description": "How many items to skip when fetching data." + }, + "page": { + "type": "number", + "description": "Cursor for use in pagination. Often used in combination with limit." + }, + "deep": { + "type": "object", + "description": "Deep allows you to set any of the other query parameters on a nested relational dataset.", + "example": { + "related_articles": { + "_limit": 3 + } + } + } + } + }, + "x-metadata": { + "type": "object", + "properties": { + "total_count": { + "description": "Returns the total item count of the collection you're querying.", + "type": "integer" + }, + "filter_count": { + "description": "Returns the item count of the collection you're querying, taking the current filter/search parameters into account.", + "type": "integer" + } + } + }, + "Relations": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the relation.", + "example": 1, + "type": "integer" + }, + "many_collection": { + "description": "Collection that has the field that holds the foreign key.", + "example": "directus_activity", + "type": "string" + }, + "many_field": { + "description": "Foreign key. Field that holds the primary key of the related collection.", + "example": "user", + "type": "string" + }, + "one_collection": { + "description": "Collection on the _one_ side of the relationship.", + "example": "directus_users", + "type": "string" + }, + "one_field": { + "description": "Alias column that serves as the _one_ side of the relationship.", + "example": null, + "type": "string", + "nullable": true + }, + "one_collection_field": { + "nullable": true, + "type": "string" + }, + "one_allowed_collections": { + "nullable": true, + "type": "array", + "items": { + "type": "string" + } + }, + "junction_field": { + "description": "Field on the junction table that holds the many field of the related relation.", + "example": null, + "type": "string", + "nullable": true + }, + "sort_field": { + "nullable": true, + "type": "string" + }, + "one_deselect_action": { + "nullable": false, + "type": "string" + } + }, + "x-collection": "directus_relations" + }, + "Fields": { + "type": "object", + "properties": { + "id": { + "nullable": false, + "type": "integer" + }, + "collection": { + "description": "Unique name of the collection this field is in.", + "example": "about_us", + "type": "string" + }, + "field": { + "description": "Unique name of the field. Field name is unique within the collection.", + "example": "id", + "type": "string" + }, + "special": { + "nullable": true, + "type": "array", + "items": { + "type": "string" + } + }, + "interface": { + "nullable": true, + "type": "string" + }, + "options": { + "nullable": true + }, + "display": { + "nullable": true, + "type": "string" + }, + "display_options": { + "nullable": true + }, + "readonly": { + "nullable": false, + "type": "boolean" + }, + "hidden": { + "nullable": false, + "type": "boolean" + }, + "sort": { + "nullable": true, + "type": "integer" + }, + "width": { + "nullable": true, + "type": "string" + }, + "translations": { + "nullable": true + }, + "note": { + "nullable": true, + "type": "string" + }, + "conditions": { + "nullable": true + }, + "required": { + "nullable": true, + "type": "boolean" + }, + "group": { + "nullable": true, + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/Fields" + } + ] + }, + "validation": { + "nullable": true + }, + "validation_message": { + "nullable": true, + "type": "string" + } + }, + "x-collection": "directus_fields" + }, + "Operations": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the operation.", + "type": "string", + "example": "2f24211d-d928-469a-aea3-3c8f53d4e426" + }, + "name": { + "description": "The name of the operation.", + "type": "string", + "example": "Log to Console" + }, + "key": { + "description": "Key for the operation. Must be unique within a given flow.", + "type": "string", + "example": "log_console" + }, + "type": { + "description": "Type of operation. One of `log`, `mail`, `notification`, `create`, `read`, `request`, `sleep`, `transform`, `trigger`, `condition`, or any type of custom operation extensions.", + "type": "string", + "example": "log" + }, + "position_x": { + "description": "Position of the operation on the X axis within the flow workspace.", + "type": "integer", + "example": 12 + }, + "position_y": { + "description": "Position of the operation on the Y axis within the flow workspace.", + "type": "integer", + "example": 12 + }, + "options": { + "description": "Options depending on the type of the operation.", + "type": "object", + "example": null, + "nullable": true + }, + "resolve": { + "description": "The operation triggered when the current operation succeeds (or `then` logic of a condition operation).", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Operations" + } + ] + }, + "reject": { + "description": "The operation triggered when the current operation fails (or `otherwise` logic of a condition operation).", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Operations" + } + ] + }, + "flow": { + "nullable": false, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Flows" + } + ] + }, + "date_created": { + "description": "Timestamp in ISO8601 when the operation was created.", + "type": "string", + "example": "2022-05-11T13:14:52Z", + "format": "date-time", + "nullable": true + }, + "user_created": { + "description": "The user who created the operation.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + } + }, + "x-collection": "directus_operations" + }, + "Versions": { + "type": "object", + "properties": { + "id": { + "description": "Primary key of the Content Version.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "type": "string" + }, + "key": { + "description": "Key of the Content Version, used as the value for the \"version\" query parameter.", + "example": "draft", + "type": "string" + }, + "name": { + "description": "Descriptive name of the Content Version.", + "example": "My Draft", + "type": "string" + }, + "collection": { + "description": "Name of the collection the Content Version is created on.", + "example": "articles", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "item": { + "description": "The item the Content Version is created on.", + "example": "168", + "type": "string" + }, + "hash": { + "nullable": true, + "type": "string" + }, + "date_created": { + "description": "When the Content Version was created.", + "type": "string", + "example": "2022-05-11T13:14:52Z", + "format": "date-time", + "nullable": true + }, + "date_updated": { + "description": "When the Content Version was last updated.", + "type": "string", + "example": "2022-05-11T13:14:53Z", + "format": "date-time", + "nullable": true + }, + "user_created": { + "description": "User that created the Content Version.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "user_updated": { + "description": "User that last updated the Content Version.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "delta": { + "description": "The current changes compared to the main version of the item.", + "example": { + "my_field": "Updated Value" + }, + "type": "object" + } + }, + "x-collection": "directus_versions" + }, + "Revisions": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the revision.", + "example": 1, + "type": "integer" + }, + "activity": { + "description": "Unique identifier for the activity record.", + "example": 2, + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/Activity" + } + ] + }, + "collection": { + "description": "Collection of the updated item.", + "example": "articles", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "item": { + "description": "Primary key of updated item.", + "example": "168", + "type": "string" + }, + "data": { + "description": "Copy of item state at time of update.", + "example": { + "author": 1, + "body": "This is my first post", + "featured_image": 15, + "id": "168", + "title": "Hello, World!" + }, + "type": "object", + "nullable": true + }, + "delta": { + "description": "Changes between the previous and the current revision.", + "example": { + "title": "Hello, World!" + }, + "type": "object" + }, + "parent": { + "description": "If the current item was updated relationally, this is the id of the parent revision record", + "example": null, + "type": "integer", + "nullable": true + }, + "version": { + "description": "Associated version of this revision.", + "example": "draft", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Versions" + } + ] + } + }, + "x-collection": "directus_revisions" + }, + "Extensions": { + "type": "object", + "properties": { + "enabled": { + "nullable": false, + "type": "boolean" + }, + "id": { + "nullable": false, + "type": "string", + "format": "uuid" + }, + "folder": { + "nullable": false, + "type": "string" + }, + "source": { + "nullable": false, + "type": "string" + }, + "bundle": { + "description": "Name of the bundle the extension is in.", + "example": "directus-extension-my-bundle", + "type": "string", + "nullable": true + } + }, + "x-collection": "directus_extensions" + }, + "Webhooks": { + "type": "object", + "properties": { + "id": { + "description": "The index of the webhook.", + "type": "integer", + "example": 1 + }, + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null, + "nullable": true + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "inactive" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "type": "array", + "items": { + "type": "string" + }, + "example": null, + "nullable": true + }, + "collections": { + "nullable": false, + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "nullable": true + }, + "was_active_before_deprecation": { + "nullable": false, + "type": "boolean" + }, + "migrated_flow": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Flows" + } + ] + } + }, + "x-collection": "directus_webhooks" + }, + "Settings": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the setting.", + "type": "integer", + "example": 1 + }, + "project_name": { + "description": "The name of the project.", + "type": "string", + "example": "Directus" + }, + "project_url": { + "description": "The url of the project.", + "type": "string", + "example": null, + "nullable": true + }, + "project_color": { + "description": "The brand color of the project.", + "type": "string", + "example": null, + "nullable": true + }, + "project_logo": { + "description": "The logo of the project.", + "type": "string", + "example": null, + "nullable": true + }, + "public_foreground": { + "description": "The foreground of the project.", + "type": "string", + "example": null, + "nullable": true + }, + "public_background": { + "description": "The background of the project.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "example": null, + "nullable": true + }, + "public_note": { + "description": "Note rendered on the public pages of the app.", + "type": "string", + "example": null, + "nullable": true + }, + "auth_login_attempts": { + "description": "Allowed authentication login attempts before the user's status is set to blocked.", + "type": "integer", + "example": 25 + }, + "auth_password_policy": { + "description": "Authentication password policy.", + "type": "string", + "nullable": true + }, + "storage_asset_transform": { + "description": "What transformations are allowed in the assets endpoint.", + "type": "string", + "enum": [ + "all", + "none", + "presets" + ], + "example": "all", + "nullable": true + }, + "storage_asset_presets": { + "description": "Array of allowed", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "description": "Key for the asset. Used in the assets endpoint.", + "type": "string" + }, + "fit": { + "description": "Whether to crop the thumbnail to match the size, or maintain the aspect ratio.", + "type": "string", + "enum": [ + "cover", + "contain", + "inside", + "outside" + ] + }, + "width": { + "description": "Width of the thumbnail.", + "type": "integer" + }, + "height": { + "description": "Height of the thumbnail.", + "type": "integer" + }, + "withoutEnlargement": { + "description": "No image upscale", + "type": "boolean" + }, + "quality": { + "description": "Quality of the compression used.", + "type": "integer" + }, + "format": { + "description": "Reformat output image", + "type": "string", + "enum": [ + "", + "jpeg", + "png", + "webp", + "tiff", + "avif" + ] + }, + "transforms": { + "description": "Additional transformations to apply", + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "method": { + "description": "The Sharp method name", + "type": "string" + }, + "arguments": { + "description": "A list of arguments to pass to the Sharp method", + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "argument": { + "description": "A JSON representation of the argument value", + "type": "string" + } + } + } + } + } + } + } + } + }, + "example": null, + "nullable": true + }, + "custom_css": { + "nullable": true, + "type": "string" + }, + "storage_default_folder": { + "description": "Default folder to place files", + "type": "string", + "format": "uuid" + }, + "basemaps": { + "nullable": true + }, + "mapbox_key": { + "nullable": true, + "type": "string" + }, + "module_bar": { + "nullable": true + }, + "project_descriptor": { + "nullable": true, + "type": "string" + }, + "default_language": { + "nullable": false, + "type": "string" + }, + "custom_aspect_ratios": { + "nullable": true + }, + "public_favicon": { + "nullable": true, + "description": "$t:field_options.directus_settings.project_favicon_note", + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Files" + } + ] + }, + "default_appearance": { + "nullable": false, + "type": "string" + }, + "default_theme_light": { + "nullable": true, + "type": "string" + }, + "theme_light_overrides": { + "nullable": true + }, + "default_theme_dark": { + "nullable": true, + "type": "string" + }, + "theme_dark_overrides": { + "nullable": true + }, + "report_error_url": { + "nullable": true, + "type": "string" + }, + "report_bug_url": { + "nullable": true, + "type": "string" + }, + "report_feature_url": { + "nullable": true, + "type": "string" + }, + "public_registration": { + "nullable": false, + "description": "$t:fields.directus_settings.public_registration_note", + "type": "boolean" + }, + "public_registration_verify_email": { + "nullable": false, + "description": "$t:fields.directus_settings.public_registration_verify_email_note", + "type": "boolean" + }, + "public_registration_role": { + "nullable": true, + "description": "$t:fields.directus_settings.public_registration_role_note", + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Roles" + } + ] + }, + "public_registration_email_filter": { + "nullable": true, + "description": "$t:fields.directus_settings.public_registration_email_filter_note" + } + }, + "x-collection": "directus_settings" + }, + "Permissions": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the permission.", + "example": 1, + "type": "integer" + }, + "collection": { + "description": "What collection this permission applies to.", + "example": "customers", + "type": "string" + }, + "action": { + "description": "What action this permission applies to.", + "example": "create", + "type": "string", + "enum": [ + "create", + "read", + "update", + "delete" + ] + }, + "permissions": { + "description": "JSON structure containing the permissions checks for this permission.", + "type": "object", + "nullable": true + }, + "validation": { + "description": "JSON structure containing the validation checks for this permission.", + "type": "object", + "nullable": true + }, + "presets": { + "description": "JSON structure containing the preset value for created/updated items.", + "type": "object", + "nullable": true + }, + "fields": { + "description": "CSV of fields that the user is allowed to interact with.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "policy": { + "nullable": false + } + }, + "x-collection": "directus_permissions" + }, + "Collections": { + "type": "object", + "properties": { + "collection": { + "description": "The collection key.", + "example": "customers", + "type": "string" + }, + "icon": { + "nullable": true, + "type": "string" + }, + "note": { + "nullable": true, + "type": "string" + }, + "display_template": { + "nullable": true, + "type": "string" + }, + "hidden": { + "nullable": false, + "type": "boolean" + }, + "singleton": { + "nullable": false, + "type": "boolean" + }, + "translations": { + "nullable": true + }, + "archive_field": { + "nullable": true, + "type": "string" + }, + "archive_app_filter": { + "nullable": false, + "type": "boolean" + }, + "archive_value": { + "nullable": true, + "type": "string" + }, + "unarchive_value": { + "nullable": true, + "type": "string" + }, + "sort_field": { + "nullable": true, + "type": "string" + }, + "accountability": { + "nullable": true, + "type": "string" + }, + "color": { + "nullable": true, + "type": "string" + }, + "item_duplication_fields": { + "nullable": true + }, + "sort": { + "nullable": true, + "type": "integer" + }, + "group": { + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "collapse": { + "nullable": false, + "type": "string" + }, + "preview_url": { + "nullable": true, + "type": "string" + }, + "versioning": { + "nullable": false, + "type": "boolean" + } + }, + "x-collection": "directus_collections" + }, + "Flows": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the flow.", + "type": "string", + "example": "2f24211d-d928-469a-aea3-3c8f53d4e426" + }, + "name": { + "description": "The name of the flow.", + "type": "string", + "example": "Update Articles Flow" + }, + "icon": { + "description": "Icon displayed in the Admin App for the flow.", + "type": "string", + "example": "bolt" + }, + "color": { + "description": "Color of the icon displayed in the Admin App for the flow.", + "type": "string", + "example": "#112233", + "nullable": true + }, + "description": { + "nullable": true, + "type": "string" + }, + "status": { + "description": "Current status of the flow.", + "type": "string", + "example": "active", + "default": "active", + "enum": [ + "active", + "inactive" + ] + }, + "trigger": { + "description": "Type of trigger for the flow. One of `hook`, `webhook`, `operation`, `schedule`, `manual`.", + "type": "string", + "example": "manual" + }, + "accountability": { + "description": "The permission used during the flow. One of `$public`, `$trigger`, `$full`, or UUID of a role.", + "type": "string", + "example": "$trigger" + }, + "options": { + "description": "Options of the selected trigger for the flow.", + "type": "object", + "example": null, + "nullable": true + }, + "operation": { + "description": "UUID of the operation connected to the trigger in the flow.", + "example": "92e82998-e421-412f-a513-13701e83e4ce", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Operations" + } + ] + }, + "date_created": { + "description": "Timestamp in ISO8601 when the flow was created.", + "type": "string", + "example": "2022-05-11T13:14:52Z", + "format": "date-time", + "nullable": true + }, + "user_created": { + "description": "The user who created the flow.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "operations": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Operations" + } + ] + } + } + }, + "x-collection": "directus_flows" + }, + "Presets": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for this single collection preset.", + "example": 155, + "type": "integer" + }, + "bookmark": { + "description": "Name for the bookmark. If this is set, the preset will be considered a bookmark.", + "nullable": true, + "type": "string" + }, + "user": { + "description": "The unique identifier of the user to whom this collection preset applies.", + "example": "63716273-0f29-4648-8a2a-2af2948f6f78", + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "role": { + "description": "The unique identifier of a role in the platform. If `user` is null, this will be used to apply the collection preset or bookmark for all users in the role.", + "example": "50419801-0f30-8644-2b3c-9bc2d980d0a0", + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Roles" + } + ] + }, + "collection": { + "description": "What collection this collection preset is used for.", + "example": "articles", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "search": { + "description": "Search query.", + "type": "string", + "nullable": true + }, + "layout": { + "description": "Key of the layout that is used.", + "type": "string", + "example": null + }, + "layout_query": { + "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters.", + "example": { + "cards": { + "sort": "-published_on" + } + }, + "nullable": true + }, + "layout_options": { + "description": "Options of the views. The properties in here are controlled by the layout.", + "example": { + "cards": { + "icon": "account_circle", + "title": "{{ first_name }} {{ last_name }}", + "subtitle": "{{ title }}", + "size": 3 + } + }, + "nullable": true + }, + "refresh_interval": { + "nullable": true, + "type": "integer" + }, + "filter": { + "nullable": true + }, + "icon": { + "nullable": true, + "type": "string" + }, + "color": { + "nullable": true, + "type": "string" + } + }, + "x-collection": "directus_presets" + }, + "Comments": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for this single collection preset.", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28", + "type": "string" + }, + "collection": { + "description": "The collection of the item the Comment is created for.", + "example": "articles", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "item": { + "description": "The item the Comment is created for.", + "example": "123", + "type": "string" + }, + "comment": { + "description": "User comment. This will store the comments that show up in the right sidebar of the item edit page in the admin app.", + "example": "This is a comment", + "type": "string" + }, + "date_created": { + "description": "When the Comment was created.", + "type": "string", + "example": "2024-01-23T12:34:56Z", + "format": "date-time", + "nullable": true + }, + "date_updated": { + "description": "When the Comment was updated.", + "type": "string", + "example": "2024-01-23T12:34:56Z", + "format": "date-time", + "nullable": true + }, + "user_created": { + "description": "User that created the Comment.", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + }, + "user_updated": { + "description": "User that updated the Comment.", + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ] + } + }, + "x-collection": "directus_comments" + }, + "Activity": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "example": 2, + "type": "integer" + }, + "action": { + "description": "Action that was performed.", + "example": "update", + "type": "string", + "enum": [ + "create", + "update", + "delete", + "login" + ] + }, + "user": { + "description": "The user who performed this action.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Users" + } + ], + "nullable": true + }, + "timestamp": { + "description": "When the action happened.", + "example": "2019-12-05T22:52:09Z", + "type": "string", + "format": "date-time" + }, + "ip": { + "description": "The IP address of the user at the time the action took place.", + "example": "127.0.0.1", + "oneOf": [ + { + "type": "string", + "format": "ipv4" + } + ] + }, + "user_agent": { + "description": "User agent string of the browser the user used when the action took place.", + "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", + "type": "string" + }, + "collection": { + "description": "Collection identifier in which the item resides.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/Collections" + } + ] + }, + "item": { + "description": "Unique identifier for the item the action applied to. This is always a string, even for integer primary keys.", + "example": "328", + "type": "string" + }, + "origin": { + "description": "Origin of the request when the action took place.", + "example": "https://directus.io", + "type": "string" + }, + "revisions": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/Revisions" + } + ] + } + } + }, + "x-collection": "directus_activity" + } + }, + "parameters": { + "Id": { + "description": "Index", + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + "UUId": { + "description": "Unique identifier for the object.", + "name": "id", + "in": "path", + "required": true, + "schema": { + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02", + "type": "string" + } + }, + "Collection": { + "description": "Collection of which you want to retrieve the items from.", + "name": "collection", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "Search": { + "description": "Filter by items that contain the given search query in one of their fields.", + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + "Page": { + "description": "Cursor for use in pagination. Often used in combination with limit.", + "in": "query", + "name": "page", + "required": false, + "schema": { + "type": "integer" + } + }, + "Offset": { + "description": "How many items to skip when fetching data.", + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + } + }, + "Sort": { + "description": "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.\n", + "in": "query", + "name": "sort", + "required": false, + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Meta": { + "description": "What metadata to return in the response.", + "in": "query", + "name": "meta", + "required": false, + "schema": { + "type": "string" + } + }, + "Limit": { + "description": "A limit on the number of objects that are returned.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } + }, + "Filter": { + "description": "Select items in collection by given conditions.", + "in": "query", + "name": "filter", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "": { + "": "" + } + } + } + } + } + }, + "Fields": { + "description": "Control what fields are being returned in the object.", + "in": "query", + "name": "fields", + "required": false, + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Export": { + "name": "export", + "description": "Saves the API response to a file. Accepts one of \"csv\", \"json\", \"xml\", \"yaml\".", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "csv", + "json", + "xml", + "yaml" + ] + } + }, + "Version": { + "name": "version", + "description": "Retrieve an item's state from a specific Content Version. The value corresponds to the \"key\" of the Content Version.\n", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + }, + "responses": { + "NotFoundError": { + "description": "Error: Not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int64" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + }, + "UnauthorizedError": { + "description": "Error: Unauthorized request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int64" + }, + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "securitySchemes": { + "KeyAuth": { + "type": "apiKey", + "in": "query", + "name": "access_token" + }, + "Auth": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + } + } +} diff --git a/backend/directus-config/specs/system.graphql b/backend/directus-config/specs/system.graphql new file mode 100644 index 00000000..a9620a48 --- /dev/null +++ b/backend/directus-config/specs/system.graphql @@ -0,0 +1,2813 @@ +type Query { + server_specs_oas: JSON + server_specs_graphql(scope: graphql_sdl_scope): String + server_ping: String + server_info: server_info + server_health: JSON + collections: [directus_collections!]! + collections_by_name(name: String!): directus_collections + fields: [directus_fields!]! + fields_in_collection(collection: String!): [directus_fields!]! + fields_by_name(collection: String!, field: String!): directus_fields + relations: [directus_relations!]! + relations_in_collection(collection: String!): [directus_relations!]! + relations_by_name(collection: String!, field: String!): directus_relations + extensions: [directus_extensions!]! + users_me: directus_users + permissions_me: permissions_me_type + roles_me: [directus_roles] + policies_me_globals: policy_me_globals_type + folders(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_folders!]! + folders_by_id(id: ID!, version: String): directus_folders + folders_aggregated(groupBy: [String], filter: directus_folders_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_folders_aggregated!]! + files(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_files!]! + files_by_id(id: ID!, version: String): directus_files + files_aggregated(groupBy: [String], filter: directus_files_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_files_aggregated!]! + operations(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_operations!]! + operations_by_id(id: ID!, version: String): directus_operations + operations_aggregated(groupBy: [String], filter: directus_operations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_operations_aggregated!]! + notifications(filter: directus_notifications_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_notifications!]! + notifications_by_id(id: ID!, version: String): directus_notifications + notifications_aggregated(groupBy: [String], filter: directus_notifications_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_notifications_aggregated!]! + translations(filter: directus_translations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_translations!]! + translations_by_id(id: ID!, version: String): directus_translations + translations_aggregated(groupBy: [String], filter: directus_translations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_translations_aggregated!]! + shares(filter: directus_shares_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_shares!]! + shares_by_id(id: ID!, version: String): directus_shares + shares_aggregated(groupBy: [String], filter: directus_shares_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_shares_aggregated!]! + versions(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_versions!]! + versions_by_id(id: ID!, version: String): directus_versions + versions_aggregated(groupBy: [String], filter: directus_versions_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_versions_aggregated!]! + revisions(filter: directus_revisions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_revisions!]! + revisions_by_id(id: ID!, version: String): directus_revisions + revisions_aggregated(groupBy: [String], filter: directus_revisions_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_revisions_aggregated!]! + users(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_users!]! + users_by_id(id: ID!, version: String): directus_users + users_aggregated(groupBy: [String], filter: directus_users_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_users_aggregated!]! + webhooks(filter: directus_webhooks_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_webhooks!]! + webhooks_by_id(id: ID!, version: String): directus_webhooks + webhooks_aggregated(groupBy: [String], filter: directus_webhooks_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_webhooks_aggregated!]! + settings(version: String): directus_settings + policies(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_policies!]! + policies_by_id(id: ID!, version: String): directus_policies + policies_aggregated(groupBy: [String], filter: directus_policies_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_policies_aggregated!]! + permissions(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_permissions!]! + permissions_by_id(id: ID!, version: String): directus_permissions + permissions_aggregated(groupBy: [String], filter: directus_permissions_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_permissions_aggregated!]! + access(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access!]! + access_by_id(id: ID!, version: String): directus_access + access_aggregated(groupBy: [String], filter: directus_access_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_access_aggregated!]! + dashboards(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_dashboards!]! + dashboards_by_id(id: ID!, version: String): directus_dashboards + dashboards_aggregated(groupBy: [String], filter: directus_dashboards_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_dashboards_aggregated!]! + flows(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_flows!]! + flows_by_id(id: ID!, version: String): directus_flows + flows_aggregated(groupBy: [String], filter: directus_flows_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_flows_aggregated!]! + panels(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_panels!]! + panels_by_id(id: ID!, version: String): directus_panels + panels_aggregated(groupBy: [String], filter: directus_panels_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_panels_aggregated!]! + presets(filter: directus_presets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_presets!]! + presets_by_id(id: ID!, version: String): directus_presets + presets_aggregated(groupBy: [String], filter: directus_presets_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_presets_aggregated!]! + roles(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_roles!]! + roles_by_id(id: ID!, version: String): directus_roles + roles_aggregated(groupBy: [String], filter: directus_roles_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_roles_aggregated!]! + comments(filter: directus_comments_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_comments!]! + comments_by_id(id: ID!, version: String): directus_comments + comments_aggregated(groupBy: [String], filter: directus_comments_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_comments_aggregated!]! + activity(filter: directus_activity_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_activity!]! + activity_by_id(id: ID!, version: String): directus_activity + activity_aggregated(groupBy: [String], filter: directus_activity_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [directus_activity_aggregated!]! +} + +type Mutation { + auth_login(email: String!, password: String!, mode: auth_mode, otp: String): auth_tokens + auth_refresh(refresh_token: String, mode: auth_mode): auth_tokens + auth_logout(refresh_token: String, mode: auth_mode): Boolean + auth_password_request(email: String!, reset_url: String): Boolean + auth_password_reset(token: String!, password: String!): Boolean + users_me_tfa_generate(password: String!): users_me_tfa_generate_data + users_me_tfa_enable(otp: String!, secret: String!): Boolean + users_me_tfa_disable(otp: String!): Boolean + utils_random_string(length: Int): String + utils_hash_generate(string: String!): String + utils_hash_verify(string: String!, hash: String!): Boolean + utils_sort(collection: String!, item: ID!, to: ID!): Boolean + utils_revert(revision: ID!): Boolean + utils_cache_clear: Void + users_invite_accept(token: String!, password: String!): Boolean + users_register(email: String!, password: String!, verification_url: String, first_name: String, last_name: String): Boolean + users_register_verify(token: String!): Boolean + create_collections_item(data: create_directus_collections_input!): directus_collections + update_collections_item(collection: String!, data: update_directus_collections_input!): directus_collections + delete_collections_item(collection: String!): delete_collection + create_fields_item(collection: String!, data: create_directus_fields_input!): directus_fields + update_fields_item(collection: String!, field: String!, data: update_directus_fields_input!): directus_fields + delete_fields_item(collection: String!, field: String!): delete_field + create_relations_item(data: create_directus_relations_input!): directus_relations + update_relations_item(collection: String!, field: String!, data: update_directus_relations_input!): directus_relations + delete_relations_item(collection: String!, field: String!): delete_relation + update_extensions_item(id: ID, data: update_directus_extensions_inputInput): directus_extensions + update_users_me(data: update_directus_users_input): directus_users + import_file(url: String!, data: create_directus_files_input): directus_files + users_invite(email: String!, role: String!, invite_url: String): Boolean + create_folders_items(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_folders_input!]): [directus_folders!]! + create_folders_item(data: create_directus_folders_input!): directus_folders + create_files_items(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_files_input!]): [directus_files!]! + create_files_item(data: create_directus_files_input!): directus_files + create_operations_items(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_operations_input!]): [directus_operations!]! + create_operations_item(data: create_directus_operations_input!): directus_operations + create_notifications_items(filter: directus_notifications_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_notifications_input!]): [directus_notifications!]! + create_notifications_item(data: create_directus_notifications_input!): directus_notifications + create_translations_items(filter: directus_translations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_translations_input!]): [directus_translations!]! + create_translations_item(data: create_directus_translations_input!): directus_translations + create_shares_items(filter: directus_shares_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_shares_input!]): [directus_shares!]! + create_shares_item(data: create_directus_shares_input!): directus_shares + create_versions_items(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_versions_input!]): [directus_versions!]! + create_versions_item(data: create_directus_versions_input!): directus_versions + create_users_items(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_users_input!]): [directus_users!]! + create_users_item(data: create_directus_users_input!): directus_users + create_webhooks_items(filter: directus_webhooks_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_webhooks_input!]): [directus_webhooks!]! + create_webhooks_item(data: create_directus_webhooks_input!): directus_webhooks + create_policies_items(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_policies_input!]): [directus_policies!]! + create_policies_item(data: create_directus_policies_input!): directus_policies + create_permissions_items(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_permissions_input!]): [directus_permissions!]! + create_permissions_item(data: create_directus_permissions_input!): directus_permissions + create_access_items(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_access_input!]): [directus_access!]! + create_access_item(data: create_directus_access_input!): directus_access + create_dashboards_items(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_dashboards_input!]): [directus_dashboards!]! + create_dashboards_item(data: create_directus_dashboards_input!): directus_dashboards + create_flows_items(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_flows_input!]): [directus_flows!]! + create_flows_item(data: create_directus_flows_input!): directus_flows + create_panels_items(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_panels_input!]): [directus_panels!]! + create_panels_item(data: create_directus_panels_input!): directus_panels + create_presets_items(filter: directus_presets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_presets_input!]): [directus_presets!]! + create_presets_item(data: create_directus_presets_input!): directus_presets + create_roles_items(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_roles_input!]): [directus_roles!]! + create_roles_item(data: create_directus_roles_input!): directus_roles + create_comments_items(filter: directus_comments_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_directus_comments_input!]): [directus_comments!]! + create_comments_item(data: create_directus_comments_input!): directus_comments + update_folders_items(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_folders_input!): [directus_folders!]! + update_folders_batch(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_folders_input!]): [directus_folders!]! + update_folders_item(id: ID!, data: update_directus_folders_input!): directus_folders + update_files_items(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_files_input!): [directus_files!]! + update_files_batch(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_files_input!]): [directus_files!]! + update_files_item(id: ID!, data: update_directus_files_input!): directus_files + update_operations_items(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_operations_input!): [directus_operations!]! + update_operations_batch(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_operations_input!]): [directus_operations!]! + update_operations_item(id: ID!, data: update_directus_operations_input!): directus_operations + update_notifications_items(filter: directus_notifications_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_notifications_input!): [directus_notifications!]! + update_notifications_batch(filter: directus_notifications_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_notifications_input!]): [directus_notifications!]! + update_notifications_item(id: ID!, data: update_directus_notifications_input!): directus_notifications + update_translations_items(filter: directus_translations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_translations_input!): [directus_translations!]! + update_translations_batch(filter: directus_translations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_translations_input!]): [directus_translations!]! + update_translations_item(id: ID!, data: update_directus_translations_input!): directus_translations + update_shares_items(filter: directus_shares_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_shares_input!): [directus_shares!]! + update_shares_batch(filter: directus_shares_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_shares_input!]): [directus_shares!]! + update_shares_item(id: ID!, data: update_directus_shares_input!): directus_shares + update_versions_items(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_versions_input!): [directus_versions!]! + update_versions_batch(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_versions_input!]): [directus_versions!]! + update_versions_item(id: ID!, data: update_directus_versions_input!): directus_versions + update_users_items(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_users_input!): [directus_users!]! + update_users_batch(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_users_input!]): [directus_users!]! + update_users_item(id: ID!, data: update_directus_users_input!): directus_users + update_webhooks_items(filter: directus_webhooks_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_webhooks_input!): [directus_webhooks!]! + update_webhooks_batch(filter: directus_webhooks_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_webhooks_input!]): [directus_webhooks!]! + update_webhooks_item(id: ID!, data: update_directus_webhooks_input!): directus_webhooks + update_settings(data: update_directus_settings_input!): directus_settings + update_policies_items(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_policies_input!): [directus_policies!]! + update_policies_batch(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_policies_input!]): [directus_policies!]! + update_policies_item(id: ID!, data: update_directus_policies_input!): directus_policies + update_permissions_items(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_permissions_input!): [directus_permissions!]! + update_permissions_batch(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_permissions_input!]): [directus_permissions!]! + update_permissions_item(id: ID!, data: update_directus_permissions_input!): directus_permissions + update_access_items(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_access_input!): [directus_access!]! + update_access_batch(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_access_input!]): [directus_access!]! + update_access_item(id: ID!, data: update_directus_access_input!): directus_access + update_dashboards_items(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_dashboards_input!): [directus_dashboards!]! + update_dashboards_batch(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_dashboards_input!]): [directus_dashboards!]! + update_dashboards_item(id: ID!, data: update_directus_dashboards_input!): directus_dashboards + update_flows_items(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_flows_input!): [directus_flows!]! + update_flows_batch(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_flows_input!]): [directus_flows!]! + update_flows_item(id: ID!, data: update_directus_flows_input!): directus_flows + update_panels_items(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_panels_input!): [directus_panels!]! + update_panels_batch(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_panels_input!]): [directus_panels!]! + update_panels_item(id: ID!, data: update_directus_panels_input!): directus_panels + update_presets_items(filter: directus_presets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_presets_input!): [directus_presets!]! + update_presets_batch(filter: directus_presets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_presets_input!]): [directus_presets!]! + update_presets_item(id: ID!, data: update_directus_presets_input!): directus_presets + update_roles_items(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_roles_input!): [directus_roles!]! + update_roles_batch(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_roles_input!]): [directus_roles!]! + update_roles_item(id: ID!, data: update_directus_roles_input!): directus_roles + update_comments_items(filter: directus_comments_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_directus_comments_input!): [directus_comments!]! + update_comments_batch(filter: directus_comments_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_directus_comments_input!]): [directus_comments!]! + update_comments_item(id: ID!, data: update_directus_comments_input!): directus_comments + delete_folders_items(ids: [ID]!): delete_many + delete_folders_item(id: ID!): delete_one + delete_files_items(ids: [ID]!): delete_many + delete_files_item(id: ID!): delete_one + delete_operations_items(ids: [ID]!): delete_many + delete_operations_item(id: ID!): delete_one + delete_notifications_items(ids: [ID]!): delete_many + delete_notifications_item(id: ID!): delete_one + delete_translations_items(ids: [ID]!): delete_many + delete_translations_item(id: ID!): delete_one + delete_shares_items(ids: [ID]!): delete_many + delete_shares_item(id: ID!): delete_one + delete_versions_items(ids: [ID]!): delete_many + delete_versions_item(id: ID!): delete_one + delete_users_items(ids: [ID]!): delete_many + delete_users_item(id: ID!): delete_one + delete_webhooks_items(ids: [ID]!): delete_many + delete_webhooks_item(id: ID!): delete_one + delete_policies_items(ids: [ID]!): delete_many + delete_policies_item(id: ID!): delete_one + delete_permissions_items(ids: [ID]!): delete_many + delete_permissions_item(id: ID!): delete_one + delete_access_items(ids: [ID]!): delete_many + delete_access_item(id: ID!): delete_one + delete_dashboards_items(ids: [ID]!): delete_many + delete_dashboards_item(id: ID!): delete_one + delete_flows_items(ids: [ID]!): delete_many + delete_flows_item(id: ID!): delete_one + delete_panels_items(ids: [ID]!): delete_many + delete_panels_item(id: ID!): delete_one + delete_presets_items(ids: [ID]!): delete_many + delete_presets_item(id: ID!): delete_one + delete_roles_items(ids: [ID]!): delete_many + delete_roles_item(id: ID!): delete_one + delete_comments_items(ids: [ID]!): delete_many + delete_comments_item(id: ID!): delete_one +} + +type Subscription { + directus_folders_mutated(event: EventEnum): directus_folders_mutated + directus_files_mutated(event: EventEnum): directus_files_mutated + directus_operations_mutated(event: EventEnum): directus_operations_mutated + directus_notifications_mutated(event: EventEnum): directus_notifications_mutated + directus_translations_mutated(event: EventEnum): directus_translations_mutated + directus_shares_mutated(event: EventEnum): directus_shares_mutated + directus_versions_mutated(event: EventEnum): directus_versions_mutated + directus_revisions_mutated(event: EventEnum): directus_revisions_mutated + directus_users_mutated(event: EventEnum): directus_users_mutated + directus_webhooks_mutated(event: EventEnum): directus_webhooks_mutated + directus_settings_mutated(event: EventEnum): directus_settings_mutated + directus_policies_mutated(event: EventEnum): directus_policies_mutated + directus_permissions_mutated(event: EventEnum): directus_permissions_mutated + directus_access_mutated(event: EventEnum): directus_access_mutated + directus_dashboards_mutated(event: EventEnum): directus_dashboards_mutated + directus_flows_mutated(event: EventEnum): directus_flows_mutated + directus_panels_mutated(event: EventEnum): directus_panels_mutated + directus_presets_mutated(event: EventEnum): directus_presets_mutated + directus_roles_mutated(event: EventEnum): directus_roles_mutated + directus_comments_mutated(event: EventEnum): directus_comments_mutated + directus_activity_mutated(event: EventEnum): directus_activity_mutated +} + +"""The `Boolean` scalar type represents `true` or `false`.""" +scalar Boolean + +"""ISO8601 Date values""" +scalar Date + +""" +The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). +""" +scalar Float + +"""BigInt value""" +scalar GraphQLBigInt + +"""A Float or a String""" +scalar GraphQLStringOrFloat + +"""Hashed string values""" +scalar Hash + +""" +The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. +""" +scalar ID + +""" +The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. +""" +scalar Int + +""" +The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" +scalar JSON + +scalar permissions_me_type + +""" +The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. +""" +scalar String + +"""Represents NULL values""" +scalar Void + +enum auth_mode { + json + cookie + session +} + +enum EventEnum { + create + update + delete +} + +enum graphql_sdl_scope { + items + system +} + +type auth_tokens { + access_token: String + expires: GraphQLBigInt + refresh_token: String +} + +type count_functions { + count: Int +} + +type datetime_functions { + year: Int + month: Int + week: Int + day: Int + weekday: Int + hour: Int + minute: Int + second: Int +} + +type delete_collection { + collection: String +} + +type delete_field { + collection: String + field: String +} + +type delete_many { + ids: [ID]! +} + +type delete_one { + id: ID! +} + +type delete_relation { + collection: String + field: String +} + +type directus_access { + id: ID! + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + policy(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_policies + sort: Int +} + +type directus_access_aggregated { + group: JSON + countAll: Int + count: directus_access_aggregated_count + countDistinct: directus_access_aggregated_count + avg: directus_access_aggregated_fields + sum: directus_access_aggregated_fields + avgDistinct: directus_access_aggregated_fields + sumDistinct: directus_access_aggregated_fields + min: directus_access_aggregated_fields + max: directus_access_aggregated_fields +} + +type directus_access_aggregated_count { + id: Int + role: Int + user: Int + policy: Int + sort: Int +} + +type directus_access_aggregated_fields { + sort: Float +} + +type directus_access_mutated { + key: ID! + event: EventEnum + data: directus_access +} + +type directus_activity { + id: ID! + action: String! + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + timestamp: Date + timestamp_func: datetime_functions + ip: String + user_agent: String + collection: String! + item: String! + origin: String + revisions(filter: directus_revisions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_revisions] + revisions_func: count_functions +} + +type directus_activity_aggregated { + group: JSON + countAll: Int + count: directus_activity_aggregated_count + countDistinct: directus_activity_aggregated_count + avg: directus_activity_aggregated_fields + sum: directus_activity_aggregated_fields + avgDistinct: directus_activity_aggregated_fields + sumDistinct: directus_activity_aggregated_fields + min: directus_activity_aggregated_fields + max: directus_activity_aggregated_fields +} + +type directus_activity_aggregated_count { + id: Int + action: Int + user: Int + timestamp: Int + ip: Int + user_agent: Int + collection: Int + item: Int + origin: Int + revisions: Int +} + +type directus_activity_aggregated_fields { + id: Float +} + +type directus_activity_mutated { + key: ID! + event: EventEnum + data: directus_activity +} + +type directus_collections { + collection: String + meta: directus_collections_meta + schema: directus_collections_schema +} + +type directus_collections_meta { + collection: String! + icon: String + note: String + display_template: String + hidden: Boolean! + singleton: Boolean! + translations: JSON + archive_field: String + archive_app_filter: Boolean! + archive_value: String + unarchive_value: String + sort_field: String + accountability: String + color: String + item_duplication_fields: JSON + sort: Int + group: String + collapse: String! + preview_url: String + versioning: Boolean! +} + +type directus_collections_schema { + name: String + comment: String +} + +type directus_comments { + id: ID! + collection: String! + item: String! + comment: String! + date_created: Date + date_created_func: datetime_functions + date_updated: Date + date_updated_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + user_updated(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_comments_aggregated { + group: JSON + countAll: Int + count: directus_comments_aggregated_count + countDistinct: directus_comments_aggregated_count +} + +type directus_comments_aggregated_count { + id: Int + collection: Int + item: Int + comment: Int + date_created: Int + date_updated: Int + user_created: Int + user_updated: Int +} + +type directus_comments_mutated { + key: ID! + event: EventEnum + data: directus_comments +} + +type directus_dashboards { + id: ID! + name: String! + icon: String + note: String + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + color: String + panels(filter: directus_panels_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_panels] + panels_func: count_functions +} + +type directus_dashboards_aggregated { + group: JSON + countAll: Int + count: directus_dashboards_aggregated_count + countDistinct: directus_dashboards_aggregated_count +} + +type directus_dashboards_aggregated_count { + id: Int + name: Int + icon: Int + note: Int + date_created: Int + user_created: Int + color: Int + panels: Int +} + +type directus_dashboards_mutated { + key: ID! + event: EventEnum + data: directus_dashboards +} + +type directus_extensions { + bundle: String + name: String! + schema: directus_extensions_schema + meta: directus_extensions_meta +} + +type directus_extensions_meta { + enabled: Boolean +} + +type directus_extensions_schema { + type: String + local: Boolean +} + +type directus_fields { + collection: String + field: String + type: String + meta: directus_fields_meta + schema: directus_fields_schema +} + +type directus_fields_meta { + id: Int! + collection: String! + field: String! + special: [String] + interface: String + options: JSON + display: String + display_options: JSON + readonly: Boolean! + hidden: Boolean! + sort: Int + width: String + translations: JSON + note: String + conditions: JSON + required: Boolean + group: String + validation: JSON + validation_message: String +} + +type directus_fields_schema { + name: String + table: String + data_type: String + default_value: String + max_length: Int + numeric_precision: Int + numeric_scale: Int + is_generated: Boolean + generation_expression: String + is_indexed: Boolean + is_nullable: Boolean + is_unique: Boolean + is_primary_key: Boolean + has_auto_increment: Boolean + foreign_key_column: String + foreign_key_table: String + comment: String +} + +type directus_files { + id: ID! + storage: String! + filename_disk: String + filename_download: String! + title: String + type: String + folder(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders + uploaded_by(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + created_on: Date + created_on_func: datetime_functions + modified_by(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + modified_on: Date + modified_on_func: datetime_functions + charset: String + filesize: GraphQLBigInt + width: Int + height: Int + duration: Int + embed: String + description: String + location: String + tags: JSON + tags_func: count_functions + metadata: JSON + metadata_func: count_functions + focal_point_x: Int + focal_point_y: Int + tus_id: String + tus_data: JSON + tus_data_func: count_functions + uploaded_on: Date + uploaded_on_func: datetime_functions +} + +type directus_files_aggregated { + group: JSON + countAll: Int + count: directus_files_aggregated_count + countDistinct: directus_files_aggregated_count + avg: directus_files_aggregated_fields + sum: directus_files_aggregated_fields + avgDistinct: directus_files_aggregated_fields + sumDistinct: directus_files_aggregated_fields + min: directus_files_aggregated_fields + max: directus_files_aggregated_fields +} + +type directus_files_aggregated_count { + id: Int + storage: Int + filename_disk: Int + filename_download: Int + title: Int + type: Int + folder: Int + uploaded_by: Int + created_on: Int + modified_by: Int + modified_on: Int + charset: Int + filesize: Int + width: Int + height: Int + duration: Int + embed: Int + description: Int + location: Int + tags: Int + metadata: Int + focal_point_x: Int + focal_point_y: Int + tus_id: Int + tus_data: Int + uploaded_on: Int +} + +type directus_files_aggregated_fields { + filesize: Float + width: Float + height: Float + duration: Float + focal_point_x: Float + focal_point_y: Float +} + +type directus_files_mutated { + key: ID! + event: EventEnum + data: directus_files +} + +type directus_flows { + id: ID! + name: String! + icon: String + color: String + description: String + status: String + trigger: String + accountability: String + options: JSON + options_func: count_functions + operation(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + operations(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_operations] + operations_func: count_functions +} + +type directus_flows_aggregated { + group: JSON + countAll: Int + count: directus_flows_aggregated_count + countDistinct: directus_flows_aggregated_count +} + +type directus_flows_aggregated_count { + id: Int + name: Int + icon: Int + color: Int + description: Int + status: Int + trigger: Int + accountability: Int + options: Int + operation: Int + date_created: Int + user_created: Int + operations: Int +} + +type directus_flows_mutated { + key: ID! + event: EventEnum + data: directus_flows +} + +type directus_folders { + id: ID! + name: String! + parent(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders +} + +type directus_folders_aggregated { + group: JSON + countAll: Int + count: directus_folders_aggregated_count + countDistinct: directus_folders_aggregated_count +} + +type directus_folders_aggregated_count { + id: Int + name: Int + parent: Int +} + +type directus_folders_mutated { + key: ID! + event: EventEnum + data: directus_folders +} + +type directus_notifications { + id: ID! + timestamp: Date + timestamp_func: datetime_functions + status: String + recipient(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + sender(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + subject: String! + message: String + collection: String + item: String +} + +type directus_notifications_aggregated { + group: JSON + countAll: Int + count: directus_notifications_aggregated_count + countDistinct: directus_notifications_aggregated_count + avg: directus_notifications_aggregated_fields + sum: directus_notifications_aggregated_fields + avgDistinct: directus_notifications_aggregated_fields + sumDistinct: directus_notifications_aggregated_fields + min: directus_notifications_aggregated_fields + max: directus_notifications_aggregated_fields +} + +type directus_notifications_aggregated_count { + id: Int + timestamp: Int + status: Int + recipient: Int + sender: Int + subject: Int + message: Int + collection: Int + item: Int +} + +type directus_notifications_aggregated_fields { + id: Float +} + +type directus_notifications_mutated { + key: ID! + event: EventEnum + data: directus_notifications +} + +type directus_operations { + id: ID! + name: String + key: String! + type: String! + position_x: Int! + position_y: Int! + options: JSON + options_func: count_functions + resolve(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + reject(filter: directus_operations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_operations + flow(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_flows + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_operations_aggregated { + group: JSON + countAll: Int + count: directus_operations_aggregated_count + countDistinct: directus_operations_aggregated_count + avg: directus_operations_aggregated_fields + sum: directus_operations_aggregated_fields + avgDistinct: directus_operations_aggregated_fields + sumDistinct: directus_operations_aggregated_fields + min: directus_operations_aggregated_fields + max: directus_operations_aggregated_fields +} + +type directus_operations_aggregated_count { + id: Int + name: Int + key: Int + type: Int + position_x: Int + position_y: Int + options: Int + resolve: Int + reject: Int + flow: Int + date_created: Int + user_created: Int +} + +type directus_operations_aggregated_fields { + position_x: Float + position_y: Float +} + +type directus_operations_mutated { + key: ID! + event: EventEnum + data: directus_operations +} + +type directus_panels { + id: ID! + dashboard(filter: directus_dashboards_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_dashboards + name: String + icon: String + color: String + show_header: Boolean! + note: String + type: String! + position_x: Int! + position_y: Int! + width: Int! + height: Int! + options: JSON + options_func: count_functions + date_created: Date + date_created_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users +} + +type directus_panels_aggregated { + group: JSON + countAll: Int + count: directus_panels_aggregated_count + countDistinct: directus_panels_aggregated_count + avg: directus_panels_aggregated_fields + sum: directus_panels_aggregated_fields + avgDistinct: directus_panels_aggregated_fields + sumDistinct: directus_panels_aggregated_fields + min: directus_panels_aggregated_fields + max: directus_panels_aggregated_fields +} + +type directus_panels_aggregated_count { + id: Int + dashboard: Int + name: Int + icon: Int + color: Int + show_header: Int + note: Int + type: Int + position_x: Int + position_y: Int + width: Int + height: Int + options: Int + date_created: Int + user_created: Int +} + +type directus_panels_aggregated_fields { + position_x: Float + position_y: Float + width: Float + height: Float +} + +type directus_panels_mutated { + key: ID! + event: EventEnum + data: directus_panels +} + +type directus_permissions { + id: ID + collection: String! + action: String! + permissions: JSON + permissions_func: count_functions + validation: JSON + validation_func: count_functions + presets: JSON + presets_func: count_functions + fields: [String] + policy(filter: directus_policies_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_policies +} + +type directus_permissions_aggregated { + group: JSON + countAll: Int + count: directus_permissions_aggregated_count + countDistinct: directus_permissions_aggregated_count + avg: directus_permissions_aggregated_fields + sum: directus_permissions_aggregated_fields + avgDistinct: directus_permissions_aggregated_fields + sumDistinct: directus_permissions_aggregated_fields + min: directus_permissions_aggregated_fields + max: directus_permissions_aggregated_fields +} + +type directus_permissions_aggregated_count { + id: Int + collection: Int + action: Int + permissions: Int + validation: Int + presets: Int + fields: Int + policy: Int +} + +type directus_permissions_aggregated_fields { + id: Float +} + +type directus_permissions_mutated { + key: ID! + event: EventEnum + data: directus_permissions +} + +type directus_policies { + id: ID! + name: String! + icon: String + description: String + ip_access: [String] + + """$t:field_options.directus_policies.enforce_tfa""" + enforce_tfa: Boolean! + admin_access: Boolean! + app_access: Boolean! + permissions(filter: directus_permissions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_permissions] + permissions_func: count_functions + users(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + users_func: count_functions + roles(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + roles_func: count_functions +} + +type directus_policies_aggregated { + group: JSON + countAll: Int + count: directus_policies_aggregated_count + countDistinct: directus_policies_aggregated_count +} + +type directus_policies_aggregated_count { + id: Int + name: Int + icon: Int + description: Int + ip_access: Int + + """$t:field_options.directus_policies.enforce_tfa""" + enforce_tfa: Int + admin_access: Int + app_access: Int + permissions: Int + users: Int + roles: Int +} + +type directus_policies_mutated { + key: ID! + event: EventEnum + data: directus_policies +} + +type directus_presets { + id: ID! + bookmark: String + user(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + collection: String + search: String + layout: String + layout_query: JSON + layout_query_func: count_functions + layout_options: JSON + layout_options_func: count_functions + refresh_interval: Int + filter: JSON + filter_func: count_functions + icon: String + color: String +} + +type directus_presets_aggregated { + group: JSON + countAll: Int + count: directus_presets_aggregated_count + countDistinct: directus_presets_aggregated_count + avg: directus_presets_aggregated_fields + sum: directus_presets_aggregated_fields + avgDistinct: directus_presets_aggregated_fields + sumDistinct: directus_presets_aggregated_fields + min: directus_presets_aggregated_fields + max: directus_presets_aggregated_fields +} + +type directus_presets_aggregated_count { + id: Int + bookmark: Int + user: Int + role: Int + collection: Int + search: Int + layout: Int + layout_query: Int + layout_options: Int + refresh_interval: Int + filter: Int + icon: Int + color: Int +} + +type directus_presets_aggregated_fields { + id: Float + refresh_interval: Float +} + +type directus_presets_mutated { + key: ID! + event: EventEnum + data: directus_presets +} + +type directus_relations { + collection: String + field: String + related_collection: String + schema: directus_relations_schema + meta: directus_relations_meta +} + +type directus_relations_meta { + id: Int + many_collection: String + many_field: String + one_collection: String + one_field: String + one_collection_field: String + one_allowed_collections: [String] + junction_field: String + sort_field: String + one_deselect_action: String +} + +type directus_relations_schema { + table: String! + column: String! + foreign_key_table: String! + foreign_key_column: String! + constraint_name: String + on_update: String! + on_delete: String! +} + +type directus_revisions { + id: ID! + activity(filter: directus_activity_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_activity + collection: String! + item: String! + data: JSON + data_func: count_functions + delta: JSON + delta_func: count_functions + parent(filter: directus_revisions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_revisions + version(filter: directus_versions_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_versions +} + +type directus_revisions_aggregated { + group: JSON + countAll: Int + count: directus_revisions_aggregated_count + countDistinct: directus_revisions_aggregated_count + avg: directus_revisions_aggregated_fields + sum: directus_revisions_aggregated_fields + avgDistinct: directus_revisions_aggregated_fields + sumDistinct: directus_revisions_aggregated_fields + min: directus_revisions_aggregated_fields + max: directus_revisions_aggregated_fields +} + +type directus_revisions_aggregated_count { + id: Int + activity: Int + collection: Int + item: Int + data: Int + delta: Int + parent: Int + version: Int +} + +type directus_revisions_aggregated_fields { + id: Float + activity: Float + parent: Float +} + +type directus_revisions_mutated { + key: ID! + event: EventEnum + data: directus_revisions +} + +type directus_roles { + id: ID! + name: String! + icon: String + description: String + parent(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + children(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_roles] + children_func: count_functions + policies(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + policies_func: count_functions + users(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_users] + users_func: count_functions +} + +type directus_roles_aggregated { + group: JSON + countAll: Int + count: directus_roles_aggregated_count + countDistinct: directus_roles_aggregated_count +} + +type directus_roles_aggregated_count { + id: Int + name: Int + icon: Int + description: Int + + """$t:field_options.directus_roles.parent_note""" + parent: Int + + """$t:field_options.directus_roles.children_note""" + children: Int + policies: Int + users: Int +} + +type directus_roles_mutated { + key: ID! + event: EventEnum + data: directus_roles +} + +type directus_settings { + id: ID! + project_name: String + project_url: String + + """$t:field_options.directus_settings.project_color_note""" + project_color: String + project_logo(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_foreground(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_background(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + public_note: String + auth_login_attempts: Int + auth_password_policy: String + storage_asset_transform: String + storage_asset_presets: JSON + storage_asset_presets_func: count_functions + custom_css: String + storage_default_folder(filter: directus_folders_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_folders + basemaps: JSON + basemaps_func: count_functions + mapbox_key: String + module_bar: JSON + module_bar_func: count_functions + project_descriptor: String + default_language: String + custom_aspect_ratios: JSON + custom_aspect_ratios_func: count_functions + public_favicon(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + default_appearance: String + default_theme_light: String + theme_light_overrides: JSON + theme_light_overrides_func: count_functions + default_theme_dark: String + theme_dark_overrides: JSON + theme_dark_overrides_func: count_functions + report_error_url: String + report_bug_url: String + report_feature_url: String + + """$t:fields.directus_settings.public_registration_note""" + public_registration: Boolean! + + """$t:fields.directus_settings.public_registration_verify_email_note""" + public_registration_verify_email: Boolean + public_registration_role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + + """$t:fields.directus_settings.public_registration_email_filter_note""" + public_registration_email_filter: JSON + public_registration_email_filter_func: count_functions +} + +type directus_settings_mutated { + key: ID! + event: EventEnum + data: directus_settings +} + +type directus_shares { + id: ID! + name: String + collection: String! + item: String! + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + + """$t:shared_leave_blank_for_passwordless_access""" + password: Hash + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + date_created: Date + date_created_func: datetime_functions + + """$t:shared_leave_blank_for_unlimited""" + date_start: Date + date_start_func: datetime_functions + + """$t:shared_leave_blank_for_unlimited""" + date_end: Date + date_end_func: datetime_functions + times_used: Int + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Int +} + +type directus_shares_aggregated { + group: JSON + countAll: Int + count: directus_shares_aggregated_count + countDistinct: directus_shares_aggregated_count + avg: directus_shares_aggregated_fields + sum: directus_shares_aggregated_fields + avgDistinct: directus_shares_aggregated_fields + sumDistinct: directus_shares_aggregated_fields + min: directus_shares_aggregated_fields + max: directus_shares_aggregated_fields +} + +type directus_shares_aggregated_count { + id: Int + name: Int + collection: Int + item: Int + role: Int + + """$t:shared_leave_blank_for_passwordless_access""" + password: Int + user_created: Int + date_created: Int + + """$t:shared_leave_blank_for_unlimited""" + date_start: Int + + """$t:shared_leave_blank_for_unlimited""" + date_end: Int + times_used: Int + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Int +} + +type directus_shares_aggregated_fields { + times_used: Float + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Float +} + +type directus_shares_mutated { + key: ID! + event: EventEnum + data: directus_shares +} + +type directus_translations { + id: ID! + language: String! + key: String! + value: String! +} + +type directus_translations_aggregated { + group: JSON + countAll: Int + count: directus_translations_aggregated_count + countDistinct: directus_translations_aggregated_count +} + +type directus_translations_aggregated_count { + id: Int + language: Int + key: Int + value: Int +} + +type directus_translations_mutated { + key: ID! + event: EventEnum + data: directus_translations +} + +type directus_users { + id: ID! + first_name: String + last_name: String + email: String + password: Hash + location: String + title: String + description: String + tags: JSON + tags_func: count_functions + avatar(filter: directus_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_files + language: String + tfa_secret: Hash + status: String + role(filter: directus_roles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_roles + token: Hash + last_access: Date + last_access_func: datetime_functions + last_page: String + provider: String + external_identifier: String + auth_data: JSON + auth_data_func: count_functions + email_notifications: Boolean + appearance: String + theme_dark: String + theme_light: String + theme_light_overrides: JSON + theme_light_overrides_func: count_functions + theme_dark_overrides: JSON + theme_dark_overrides_func: count_functions + policies(filter: directus_access_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [directus_access] + policies_func: count_functions +} + +type directus_users_aggregated { + group: JSON + countAll: Int + count: directus_users_aggregated_count + countDistinct: directus_users_aggregated_count +} + +type directus_users_aggregated_count { + id: Int + first_name: Int + last_name: Int + email: Int + password: Int + location: Int + title: Int + description: Int + tags: Int + avatar: Int + language: Int + tfa_secret: Int + status: Int + role: Int + token: Int + last_access: Int + last_page: Int + provider: Int + external_identifier: Int + auth_data: Int + email_notifications: Int + appearance: Int + theme_dark: Int + theme_light: Int + theme_light_overrides: Int + theme_dark_overrides: Int + policies: Int +} + +type directus_users_mutated { + key: ID! + event: EventEnum + data: directus_users +} + +type directus_versions { + id: ID! + key: String! + name: String + collection: String! + item: String! + hash: String + date_created: Date + date_created_func: datetime_functions + date_updated: Date + date_updated_func: datetime_functions + user_created(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + user_updated(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users + delta: JSON + delta_func: count_functions +} + +type directus_versions_aggregated { + group: JSON + countAll: Int + count: directus_versions_aggregated_count + countDistinct: directus_versions_aggregated_count +} + +type directus_versions_aggregated_count { + id: Int + key: Int + name: Int + collection: Int + item: Int + hash: Int + date_created: Int + date_updated: Int + user_created: Int + user_updated: Int + delta: Int +} + +type directus_versions_mutated { + key: ID! + event: EventEnum + data: directus_versions +} + +type directus_webhooks { + id: ID! + name: String! + method: String + url: String! + status: String + data: Boolean + actions: [String]! + collections: [String]! + headers: JSON + headers_func: count_functions + was_active_before_deprecation: Boolean! + migrated_flow(filter: directus_flows_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_flows +} + +type directus_webhooks_aggregated { + group: JSON + countAll: Int + count: directus_webhooks_aggregated_count + countDistinct: directus_webhooks_aggregated_count + avg: directus_webhooks_aggregated_fields + sum: directus_webhooks_aggregated_fields + avgDistinct: directus_webhooks_aggregated_fields + sumDistinct: directus_webhooks_aggregated_fields + min: directus_webhooks_aggregated_fields + max: directus_webhooks_aggregated_fields +} + +type directus_webhooks_aggregated_count { + id: Int + name: Int + method: Int + url: Int + status: Int + data: Int + actions: Int + collections: Int + headers: Int + was_active_before_deprecation: Int + migrated_flow: Int +} + +type directus_webhooks_aggregated_fields { + id: Float +} + +type directus_webhooks_mutated { + key: ID! + event: EventEnum + data: directus_webhooks +} + +type policy_me_globals_type { + enforce_tfa: Boolean + app_access: Boolean + admin_access: Boolean +} + +type server_info { + project: server_info_project + rateLimit: Boolean + rateLimitGlobal: Boolean + websocket: Boolean + queryLimit: server_info_query_limit +} + +type server_info_project { + project_name: String + project_descriptor: String + project_logo: String + project_color: String + default_language: String + public_foreground: String + public_background: String + public_note: String + custom_css: String + public_registration: Boolean + public_registration_verify_email: Boolean +} + +type server_info_query_limit { + default: Int + max: Int +} + +type users_me_tfa_generate_data { + secret: String + otpauth_url: String +} + +input big_int_filter_operators { + _eq: GraphQLBigInt + _neq: GraphQLBigInt + _in: [GraphQLBigInt] + _nin: [GraphQLBigInt] + _gt: GraphQLBigInt + _gte: GraphQLBigInt + _lt: GraphQLBigInt + _lte: GraphQLBigInt + _null: Boolean + _nnull: Boolean + _between: [GraphQLBigInt] + _nbetween: [GraphQLBigInt] +} + +input boolean_filter_operators { + _eq: Boolean + _neq: Boolean + _null: Boolean + _nnull: Boolean +} + +input count_function_filter_operators { + count: number_filter_operators +} + +input create_directus_access_input { + id: ID + role: create_directus_roles_input + user: create_directus_users_input + policy: create_directus_policies_input + sort: Int +} + +input create_directus_collections_fields_input { + collection: String + field: String + type: String + meta: directus_fields_meta_input + schema: directus_fields_schema_input +} + +input create_directus_collections_input { + collection: String + meta: directus_collections_meta_input + schema: directus_collections_schema_input + fields: [create_directus_collections_fields_input!] +} + +input create_directus_comments_input { + id: ID + collection: String! + item: String! + comment: String! + date_created: Date + date_updated: Date + user_created: create_directus_users_input + user_updated: create_directus_users_input +} + +input create_directus_dashboards_input { + id: ID + name: String! + icon: String + note: String + date_created: Date + user_created: create_directus_users_input + color: String + panels: [create_directus_panels_input] +} + +input create_directus_fields_input { + collection: String + field: String + type: String + meta: directus_fields_meta_input + schema: directus_fields_schema_input +} + +input create_directus_files_input { + id: ID + storage: String! + filename_disk: String + filename_download: String! + title: String + type: String + folder: create_directus_folders_input + uploaded_by: create_directus_users_input + created_on: Date + modified_by: create_directus_users_input + modified_on: Date + charset: String + filesize: GraphQLBigInt + width: Int + height: Int + duration: Int + embed: String + description: String + location: String + tags: JSON + metadata: JSON + focal_point_x: Int + focal_point_y: Int + tus_id: String + tus_data: JSON + uploaded_on: Date +} + +input create_directus_flows_input { + id: ID + name: String! + icon: String + color: String + description: String + status: String + trigger: String + accountability: String + options: JSON + operation: create_directus_operations_input + date_created: Date + user_created: create_directus_users_input + operations: [create_directus_operations_input] +} + +input create_directus_folders_input { + id: ID + name: String! + parent: create_directus_folders_input +} + +input create_directus_notifications_input { + id: ID + timestamp: Date + status: String + recipient: create_directus_users_input + sender: create_directus_users_input + subject: String! + message: String + collection: String + item: String +} + +input create_directus_operations_input { + id: ID + name: String + key: String! + type: String! + position_x: Int! + position_y: Int! + options: JSON + resolve: create_directus_operations_input + reject: create_directus_operations_input + flow: create_directus_flows_input + date_created: Date + user_created: create_directus_users_input +} + +input create_directus_panels_input { + id: ID + dashboard: create_directus_dashboards_input + name: String + icon: String + color: String + show_header: Boolean! + note: String + type: String! + position_x: Int! + position_y: Int! + width: Int! + height: Int! + options: JSON + date_created: Date + user_created: create_directus_users_input +} + +input create_directus_permissions_input { + id: ID + collection: String! + action: String! + permissions: JSON + validation: JSON + presets: JSON + fields: [String] + policy: create_directus_policies_input +} + +input create_directus_policies_input { + id: ID + name: String! + icon: String + description: String + ip_access: [String] + + """$t:field_options.directus_policies.enforce_tfa""" + enforce_tfa: Boolean! + admin_access: Boolean! + app_access: Boolean! + permissions: [create_directus_permissions_input] + users: [create_directus_access_input] + roles: [create_directus_access_input] +} + +input create_directus_presets_input { + id: ID + bookmark: String + user: create_directus_users_input + role: create_directus_roles_input + collection: String + search: String + layout: String + layout_query: JSON + layout_options: JSON + refresh_interval: Int + filter: JSON + icon: String + color: String +} + +input create_directus_relations_input { + collection: String + field: String + related_collection: String + schema: directus_relations_schema_input + meta: directus_relations_meta_input +} + +input create_directus_roles_input { + id: ID + name: String! + icon: String + description: String + parent: create_directus_roles_input + children: [create_directus_roles_input] + policies: [create_directus_access_input] + users: [create_directus_users_input] +} + +input create_directus_shares_input { + id: ID + name: String + collection: String! + item: String! + role: create_directus_roles_input + + """$t:shared_leave_blank_for_passwordless_access""" + password: Hash + user_created: create_directus_users_input + date_created: Date + + """$t:shared_leave_blank_for_unlimited""" + date_start: Date + + """$t:shared_leave_blank_for_unlimited""" + date_end: Date + times_used: Int + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Int +} + +input create_directus_translations_input { + id: ID + language: String! + key: String! + value: String! +} + +input create_directus_users_input { + id: ID + first_name: String + last_name: String + email: String + password: Hash + location: String + title: String + description: String + tags: JSON + avatar: create_directus_files_input + language: String + tfa_secret: Hash + status: String + role: create_directus_roles_input + token: Hash + last_access: Date + last_page: String + provider: String + external_identifier: String + auth_data: JSON + email_notifications: Boolean + appearance: String + theme_dark: String + theme_light: String + theme_light_overrides: JSON + theme_dark_overrides: JSON + policies: [create_directus_access_input] +} + +input create_directus_versions_input { + id: ID + key: String! + name: String + collection: String! + item: String! + hash: String + date_created: Date + date_updated: Date + user_created: create_directus_users_input + user_updated: create_directus_users_input + delta: JSON +} + +input create_directus_webhooks_input { + id: ID + name: String! + method: String + url: String! + status: String + data: Boolean + actions: [String]! + collections: [String]! + headers: JSON + was_active_before_deprecation: Boolean! + migrated_flow: create_directus_flows_input +} + +input date_filter_operators { + _eq: String + _neq: String + _gt: String + _gte: String + _lt: String + _lte: String + _null: Boolean + _nnull: Boolean + _in: [String] + _nin: [String] + _between: [GraphQLStringOrFloat] + _nbetween: [GraphQLStringOrFloat] +} + +input datetime_function_filter_operators { + year: number_filter_operators + month: number_filter_operators + week: number_filter_operators + day: number_filter_operators + weekday: number_filter_operators + hour: number_filter_operators + minute: number_filter_operators + second: number_filter_operators +} + +input directus_access_filter { + id: string_filter_operators + role: directus_roles_filter + user: directus_users_filter + policy: directus_policies_filter + sort: number_filter_operators + _and: [directus_access_filter] + _or: [directus_access_filter] +} + +input directus_activity_filter { + id: number_filter_operators + action: string_filter_operators + user: directus_users_filter + timestamp: date_filter_operators + timestamp_func: datetime_function_filter_operators + ip: string_filter_operators + user_agent: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + origin: string_filter_operators + revisions: directus_revisions_filter + revisions_func: count_function_filter_operators + _and: [directus_activity_filter] + _or: [directus_activity_filter] +} + +input directus_collections_meta_input { + collection: String! + icon: String + note: String + display_template: String + hidden: Boolean! + singleton: Boolean! + translations: JSON + archive_field: String + archive_app_filter: Boolean! + archive_value: String + unarchive_value: String + sort_field: String + accountability: String + color: String + item_duplication_fields: JSON + sort: Int + group: String + collapse: String! + preview_url: String + versioning: Boolean! +} + +input directus_collections_schema_input { + name: String + comment: String +} + +input directus_comments_filter { + id: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + comment: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + date_updated: date_filter_operators + date_updated_func: datetime_function_filter_operators + user_created: directus_users_filter + user_updated: directus_users_filter + _and: [directus_comments_filter] + _or: [directus_comments_filter] +} + +input directus_dashboards_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + note: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + color: string_filter_operators + panels: directus_panels_filter + panels_func: count_function_filter_operators + _and: [directus_dashboards_filter] + _or: [directus_dashboards_filter] +} + +input directus_fields_meta_input { + id: Int! + collection: String! + field: String! + special: [String] + interface: String + options: JSON + display: String + display_options: JSON + readonly: Boolean! + hidden: Boolean! + sort: Int + width: String + translations: JSON + note: String + conditions: JSON + required: Boolean + group: String + validation: JSON + validation_message: String +} + +input directus_fields_schema_input { + name: String + table: String + data_type: String + default_value: String + max_length: Int + numeric_precision: Int + numeric_scale: Int + is_generated: Boolean + generation_expression: String + is_indexed: Boolean + is_nullable: Boolean + is_unique: Boolean + is_primary_key: Boolean + has_auto_increment: Boolean + foreign_key_column: String + foreign_key_table: String + comment: String +} + +input directus_files_filter { + id: string_filter_operators + storage: string_filter_operators + filename_disk: string_filter_operators + filename_download: string_filter_operators + title: string_filter_operators + type: string_filter_operators + folder: directus_folders_filter + uploaded_by: directus_users_filter + created_on: date_filter_operators + created_on_func: datetime_function_filter_operators + modified_by: directus_users_filter + modified_on: date_filter_operators + modified_on_func: datetime_function_filter_operators + charset: string_filter_operators + filesize: big_int_filter_operators + width: number_filter_operators + height: number_filter_operators + duration: number_filter_operators + embed: string_filter_operators + description: string_filter_operators + location: string_filter_operators + tags: string_filter_operators + tags_func: count_function_filter_operators + metadata: string_filter_operators + metadata_func: count_function_filter_operators + focal_point_x: number_filter_operators + focal_point_y: number_filter_operators + tus_id: string_filter_operators + tus_data: string_filter_operators + tus_data_func: count_function_filter_operators + uploaded_on: date_filter_operators + uploaded_on_func: datetime_function_filter_operators + _and: [directus_files_filter] + _or: [directus_files_filter] +} + +input directus_flows_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + color: string_filter_operators + description: string_filter_operators + status: string_filter_operators + trigger: string_filter_operators + accountability: string_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + operation: directus_operations_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + operations: directus_operations_filter + operations_func: count_function_filter_operators + _and: [directus_flows_filter] + _or: [directus_flows_filter] +} + +input directus_folders_filter { + id: string_filter_operators + name: string_filter_operators + parent: directus_folders_filter + _and: [directus_folders_filter] + _or: [directus_folders_filter] +} + +input directus_notifications_filter { + id: number_filter_operators + timestamp: date_filter_operators + timestamp_func: datetime_function_filter_operators + status: string_filter_operators + recipient: directus_users_filter + sender: directus_users_filter + subject: string_filter_operators + message: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + _and: [directus_notifications_filter] + _or: [directus_notifications_filter] +} + +input directus_operations_filter { + id: string_filter_operators + name: string_filter_operators + key: string_filter_operators + type: string_filter_operators + position_x: number_filter_operators + position_y: number_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + resolve: directus_operations_filter + reject: directus_operations_filter + flow: directus_flows_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + _and: [directus_operations_filter] + _or: [directus_operations_filter] +} + +input directus_panels_filter { + id: string_filter_operators + dashboard: directus_dashboards_filter + name: string_filter_operators + icon: string_filter_operators + color: string_filter_operators + show_header: boolean_filter_operators + note: string_filter_operators + type: string_filter_operators + position_x: number_filter_operators + position_y: number_filter_operators + width: number_filter_operators + height: number_filter_operators + options: string_filter_operators + options_func: count_function_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + user_created: directus_users_filter + _and: [directus_panels_filter] + _or: [directus_panels_filter] +} + +input directus_permissions_filter { + id: number_filter_operators + collection: string_filter_operators + action: string_filter_operators + permissions: string_filter_operators + permissions_func: count_function_filter_operators + validation: string_filter_operators + validation_func: count_function_filter_operators + presets: string_filter_operators + presets_func: count_function_filter_operators + fields: string_filter_operators + policy: directus_policies_filter + _and: [directus_permissions_filter] + _or: [directus_permissions_filter] +} + +input directus_policies_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + description: string_filter_operators + ip_access: string_filter_operators + enforce_tfa: boolean_filter_operators + admin_access: boolean_filter_operators + app_access: boolean_filter_operators + permissions: directus_permissions_filter + permissions_func: count_function_filter_operators + users: directus_access_filter + users_func: count_function_filter_operators + roles: directus_access_filter + roles_func: count_function_filter_operators + _and: [directus_policies_filter] + _or: [directus_policies_filter] +} + +input directus_presets_filter { + id: number_filter_operators + bookmark: string_filter_operators + user: directus_users_filter + role: directus_roles_filter + collection: string_filter_operators + search: string_filter_operators + layout: string_filter_operators + layout_query: string_filter_operators + layout_query_func: count_function_filter_operators + layout_options: string_filter_operators + layout_options_func: count_function_filter_operators + refresh_interval: number_filter_operators + filter: string_filter_operators + filter_func: count_function_filter_operators + icon: string_filter_operators + color: string_filter_operators + _and: [directus_presets_filter] + _or: [directus_presets_filter] +} + +input directus_relations_meta_input { + id: Int + many_collection: String + many_field: String + one_collection: String + one_field: String + one_collection_field: String + one_allowed_collections: [String] + junction_field: String + sort_field: String + one_deselect_action: String +} + +input directus_relations_schema_input { + table: String! + column: String! + foreign_key_table: String! + foreign_key_column: String! + constraint_name: String + on_update: String! + on_delete: String! +} + +input directus_revisions_filter { + id: number_filter_operators + activity: directus_activity_filter + collection: string_filter_operators + item: string_filter_operators + data: string_filter_operators + data_func: count_function_filter_operators + delta: string_filter_operators + delta_func: count_function_filter_operators + parent: directus_revisions_filter + version: directus_versions_filter + _and: [directus_revisions_filter] + _or: [directus_revisions_filter] +} + +input directus_roles_filter { + id: string_filter_operators + name: string_filter_operators + icon: string_filter_operators + description: string_filter_operators + parent: directus_roles_filter + children: directus_roles_filter + children_func: count_function_filter_operators + policies: directus_access_filter + policies_func: count_function_filter_operators + users: directus_users_filter + users_func: count_function_filter_operators + _and: [directus_roles_filter] + _or: [directus_roles_filter] +} + +input directus_shares_filter { + id: string_filter_operators + name: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + role: directus_roles_filter + password: hash_filter_operators + user_created: directus_users_filter + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + date_start: date_filter_operators + date_start_func: datetime_function_filter_operators + date_end: date_filter_operators + date_end_func: datetime_function_filter_operators + times_used: number_filter_operators + max_uses: number_filter_operators + _and: [directus_shares_filter] + _or: [directus_shares_filter] +} + +input directus_translations_filter { + id: string_filter_operators + language: string_filter_operators + key: string_filter_operators + value: string_filter_operators + _and: [directus_translations_filter] + _or: [directus_translations_filter] +} + +input directus_users_filter { + id: string_filter_operators + first_name: string_filter_operators + last_name: string_filter_operators + email: string_filter_operators + password: hash_filter_operators + location: string_filter_operators + title: string_filter_operators + description: string_filter_operators + tags: string_filter_operators + tags_func: count_function_filter_operators + avatar: directus_files_filter + language: string_filter_operators + tfa_secret: hash_filter_operators + status: string_filter_operators + role: directus_roles_filter + token: hash_filter_operators + last_access: date_filter_operators + last_access_func: datetime_function_filter_operators + last_page: string_filter_operators + provider: string_filter_operators + external_identifier: string_filter_operators + auth_data: string_filter_operators + auth_data_func: count_function_filter_operators + email_notifications: boolean_filter_operators + appearance: string_filter_operators + theme_dark: string_filter_operators + theme_light: string_filter_operators + theme_light_overrides: string_filter_operators + theme_light_overrides_func: count_function_filter_operators + theme_dark_overrides: string_filter_operators + theme_dark_overrides_func: count_function_filter_operators + policies: directus_access_filter + policies_func: count_function_filter_operators + _and: [directus_users_filter] + _or: [directus_users_filter] +} + +input directus_versions_filter { + id: string_filter_operators + key: string_filter_operators + name: string_filter_operators + collection: string_filter_operators + item: string_filter_operators + hash: string_filter_operators + date_created: date_filter_operators + date_created_func: datetime_function_filter_operators + date_updated: date_filter_operators + date_updated_func: datetime_function_filter_operators + user_created: directus_users_filter + user_updated: directus_users_filter + delta: string_filter_operators + delta_func: count_function_filter_operators + _and: [directus_versions_filter] + _or: [directus_versions_filter] +} + +input directus_webhooks_filter { + id: number_filter_operators + name: string_filter_operators + method: string_filter_operators + url: string_filter_operators + status: string_filter_operators + data: boolean_filter_operators + actions: string_filter_operators + collections: string_filter_operators + headers: string_filter_operators + headers_func: count_function_filter_operators + was_active_before_deprecation: boolean_filter_operators + migrated_flow: directus_flows_filter + _and: [directus_webhooks_filter] + _or: [directus_webhooks_filter] +} + +input hash_filter_operators { + _null: Boolean + _nnull: Boolean + _empty: Boolean + _nempty: Boolean +} + +input number_filter_operators { + _eq: GraphQLStringOrFloat + _neq: GraphQLStringOrFloat + _in: [GraphQLStringOrFloat] + _nin: [GraphQLStringOrFloat] + _gt: GraphQLStringOrFloat + _gte: GraphQLStringOrFloat + _lt: GraphQLStringOrFloat + _lte: GraphQLStringOrFloat + _null: Boolean + _nnull: Boolean + _between: [GraphQLStringOrFloat] + _nbetween: [GraphQLStringOrFloat] +} + +input string_filter_operators { + _eq: String + _neq: String + _contains: String + _icontains: String + _ncontains: String + _starts_with: String + _nstarts_with: String + _istarts_with: String + _nistarts_with: String + _ends_with: String + _nends_with: String + _iends_with: String + _niends_with: String + _in: [String] + _nin: [String] + _null: Boolean + _nnull: Boolean + _empty: Boolean + _nempty: Boolean +} + +input update_directus_access_input { + id: ID + role: update_directus_roles_input + user: update_directus_users_input + policy: update_directus_policies_input + sort: Int +} + +input update_directus_collections_input { + meta: directus_collections_meta_input +} + +input update_directus_comments_input { + id: ID + collection: String + item: String + comment: String + date_created: Date + date_updated: Date + user_created: update_directus_users_input + user_updated: update_directus_users_input +} + +input update_directus_dashboards_input { + id: ID + name: String + icon: String + note: String + date_created: Date + user_created: update_directus_users_input + color: String + panels: [update_directus_panels_input] +} + +input update_directus_extensions_input_metaInput { + enabled: Boolean +} + +input update_directus_extensions_inputInput { + meta: update_directus_extensions_input_metaInput +} + +input update_directus_fields_input { + collection: String + field: String + type: String + meta: directus_fields_meta_input + schema: directus_fields_schema_input +} + +input update_directus_files_input { + id: ID + storage: String + filename_disk: String + filename_download: String + title: String + type: String + folder: update_directus_folders_input + uploaded_by: update_directus_users_input + created_on: Date + modified_by: update_directus_users_input + modified_on: Date + charset: String + filesize: GraphQLBigInt + width: Int + height: Int + duration: Int + embed: String + description: String + location: String + tags: JSON + metadata: JSON + focal_point_x: Int + focal_point_y: Int + tus_id: String + tus_data: JSON + uploaded_on: Date +} + +input update_directus_flows_input { + id: ID + name: String + icon: String + color: String + description: String + status: String + trigger: String + accountability: String + options: JSON + operation: update_directus_operations_input + date_created: Date + user_created: update_directus_users_input + operations: [update_directus_operations_input] +} + +input update_directus_folders_input { + id: ID + name: String + parent: update_directus_folders_input +} + +input update_directus_notifications_input { + id: ID + timestamp: Date + status: String + recipient: update_directus_users_input + sender: update_directus_users_input + subject: String + message: String + collection: String + item: String +} + +input update_directus_operations_input { + id: ID + name: String + key: String + type: String + position_x: Int + position_y: Int + options: JSON + resolve: update_directus_operations_input + reject: update_directus_operations_input + flow: update_directus_flows_input + date_created: Date + user_created: update_directus_users_input +} + +input update_directus_panels_input { + id: ID + dashboard: update_directus_dashboards_input + name: String + icon: String + color: String + show_header: Boolean + note: String + type: String + position_x: Int + position_y: Int + width: Int + height: Int + options: JSON + date_created: Date + user_created: update_directus_users_input +} + +input update_directus_permissions_input { + id: ID + collection: String + action: String + permissions: JSON + validation: JSON + presets: JSON + fields: [String] + policy: update_directus_policies_input +} + +input update_directus_policies_input { + id: ID + name: String + icon: String + description: String + ip_access: [String] + + """$t:field_options.directus_policies.enforce_tfa""" + enforce_tfa: Boolean + admin_access: Boolean + app_access: Boolean + permissions: [update_directus_permissions_input] + users: [update_directus_access_input] + roles: [update_directus_access_input] +} + +input update_directus_presets_input { + id: ID + bookmark: String + user: update_directus_users_input + role: update_directus_roles_input + collection: String + search: String + layout: String + layout_query: JSON + layout_options: JSON + refresh_interval: Int + filter: JSON + icon: String + color: String +} + +input update_directus_relations_input { + collection: String + field: String + related_collection: String + schema: directus_relations_schema_input + meta: directus_relations_meta_input +} + +input update_directus_roles_input { + id: ID + name: String + icon: String + description: String + parent: update_directus_roles_input + children: [update_directus_roles_input] + policies: [update_directus_access_input] + users: [update_directus_users_input] +} + +input update_directus_settings_input { + id: ID + project_name: String + project_url: String + + """$t:field_options.directus_settings.project_color_note""" + project_color: String + project_logo: update_directus_files_input + public_foreground: update_directus_files_input + public_background: update_directus_files_input + public_note: String + auth_login_attempts: Int + auth_password_policy: String + storage_asset_transform: String + storage_asset_presets: JSON + custom_css: String + storage_default_folder: update_directus_folders_input + basemaps: JSON + mapbox_key: String + module_bar: JSON + project_descriptor: String + default_language: String + custom_aspect_ratios: JSON + public_favicon: update_directus_files_input + default_appearance: String + default_theme_light: String + theme_light_overrides: JSON + default_theme_dark: String + theme_dark_overrides: JSON + report_error_url: String + report_bug_url: String + report_feature_url: String + + """$t:fields.directus_settings.public_registration_note""" + public_registration: Boolean + + """$t:fields.directus_settings.public_registration_verify_email_note""" + public_registration_verify_email: Boolean + public_registration_role: update_directus_roles_input + + """$t:fields.directus_settings.public_registration_email_filter_note""" + public_registration_email_filter: JSON +} + +input update_directus_shares_input { + id: ID + name: String + collection: String + item: String + role: update_directus_roles_input + + """$t:shared_leave_blank_for_passwordless_access""" + password: Hash + user_created: update_directus_users_input + date_created: Date + + """$t:shared_leave_blank_for_unlimited""" + date_start: Date + + """$t:shared_leave_blank_for_unlimited""" + date_end: Date + times_used: Int + + """$t:shared_leave_blank_for_unlimited""" + max_uses: Int +} + +input update_directus_translations_input { + id: ID + language: String + key: String + value: String +} + +input update_directus_users_input { + id: ID + first_name: String + last_name: String + email: String + password: Hash + location: String + title: String + description: String + tags: JSON + avatar: update_directus_files_input + language: String + tfa_secret: Hash + status: String + role: update_directus_roles_input + token: Hash + last_access: Date + last_page: String + provider: String + external_identifier: String + auth_data: JSON + email_notifications: Boolean + appearance: String + theme_dark: String + theme_light: String + theme_light_overrides: JSON + theme_dark_overrides: JSON + policies: [update_directus_access_input] +} + +input update_directus_versions_input { + id: ID + key: String + name: String + collection: String + item: String + hash: String + date_created: Date + date_updated: Date + user_created: update_directus_users_input + user_updated: update_directus_users_input + delta: JSON +} + +input update_directus_webhooks_input { + id: ID + name: String + method: String + url: String + status: String + data: Boolean + actions: [String] + collections: [String] + headers: JSON + was_active_before_deprecation: Boolean + migrated_flow: update_directus_flows_input +} \ No newline at end of file