From a09d3fb9b37bcb4f2025432bd78b04e91ec0ad0e Mon Sep 17 00:00:00 2001 From: Connor Winston Date: Fri, 20 Sep 2024 10:01:09 -0500 Subject: [PATCH 001/119] Add OAS --- api-spec/components/parameters.yaml | 110 + api-spec/components/responses.yaml | 30 + api-spec/components/schemas/Activity.yaml | 62 + api-spec/components/schemas/Collections.yaml | 64 + api-spec/components/schemas/Diff.yaml | 46 + api-spec/components/schemas/Extensions.yaml | 21 + api-spec/components/schemas/Fields.yaml | 61 + api-spec/components/schemas/Files.yaml | 118 + api-spec/components/schemas/Flows.yaml | 70 + api-spec/components/schemas/Folders.yaml | 18 + api-spec/components/schemas/Operations.yaml | 62 + api-spec/components/schemas/Permissions.yaml | 40 + api-spec/components/schemas/Presets.yaml | 65 + api-spec/components/schemas/Query.yaml | 40 + api-spec/components/schemas/Relations.yaml | 43 + api-spec/components/schemas/Revisions.yaml | 49 + api-spec/components/schemas/Roles.yaml | 46 + api-spec/components/schemas/Schema.yaml | 21 + api-spec/components/schemas/Settings.yaml | 193 + api-spec/components/schemas/Users.yaml | 118 + api-spec/components/schemas/Versions.yaml | 52 + api-spec/components/schemas/Webhooks.yaml | 51 + api-spec/components/schemas/_index.yaml | 43 + api-spec/components/schemas/x-metadata.yaml | 8 + api-spec/components/security.yaml | 8 + api-spec/index.yaml | 6646 +---------------- .../paths/permissions/_id/getPermission.yaml | 39 + api-spec/paths/permissions/_id/index.yaml | 2 + .../paths/permissions/createPermission.yaml | 121 + .../paths/permissions/getPermissions.yaml | 48 + api-spec/paths/permissions/index.yaml | 4 + 31 files changed, 1716 insertions(+), 6583 deletions(-) create mode 100644 api-spec/components/parameters.yaml create mode 100644 api-spec/components/responses.yaml create mode 100644 api-spec/components/schemas/Activity.yaml create mode 100644 api-spec/components/schemas/Collections.yaml create mode 100644 api-spec/components/schemas/Diff.yaml create mode 100644 api-spec/components/schemas/Extensions.yaml create mode 100644 api-spec/components/schemas/Fields.yaml create mode 100644 api-spec/components/schemas/Files.yaml create mode 100644 api-spec/components/schemas/Flows.yaml create mode 100644 api-spec/components/schemas/Folders.yaml create mode 100644 api-spec/components/schemas/Operations.yaml create mode 100644 api-spec/components/schemas/Permissions.yaml create mode 100644 api-spec/components/schemas/Presets.yaml create mode 100644 api-spec/components/schemas/Query.yaml create mode 100644 api-spec/components/schemas/Relations.yaml create mode 100644 api-spec/components/schemas/Revisions.yaml create mode 100644 api-spec/components/schemas/Roles.yaml create mode 100644 api-spec/components/schemas/Schema.yaml create mode 100644 api-spec/components/schemas/Settings.yaml create mode 100644 api-spec/components/schemas/Users.yaml create mode 100644 api-spec/components/schemas/Versions.yaml create mode 100644 api-spec/components/schemas/Webhooks.yaml create mode 100644 api-spec/components/schemas/_index.yaml create mode 100644 api-spec/components/schemas/x-metadata.yaml create mode 100644 api-spec/components/security.yaml create mode 100644 api-spec/paths/permissions/_id/getPermission.yaml create mode 100644 api-spec/paths/permissions/_id/index.yaml create mode 100644 api-spec/paths/permissions/createPermission.yaml create mode 100644 api-spec/paths/permissions/getPermissions.yaml create mode 100644 api-spec/paths/permissions/index.yaml diff --git a/api-spec/components/parameters.yaml b/api-spec/components/parameters.yaml new file mode 100644 index 00000000..5f00deaa --- /dev/null +++ b/api-spec/components/parameters.yaml @@ -0,0 +1,110 @@ +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. + 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. + in: query + required: false + schema: + type: string \ No newline at end of file diff --git a/api-spec/components/responses.yaml b/api-spec/components/responses.yaml new file mode 100644 index 00000000..1d6d39eb --- /dev/null +++ b/api-spec/components/responses.yaml @@ -0,0 +1,30 @@ +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 \ No newline at end of file diff --git a/api-spec/components/schemas/Activity.yaml b/api-spec/components/schemas/Activity.yaml new file mode 100644 index 00000000..5fd6597b --- /dev/null +++ b/api-spec/components/schemas/Activity.yaml @@ -0,0 +1,62 @@ +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: users.yaml + 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: collections.yaml + 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 + 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: null + type: string + nullable: true + 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: revisions.yaml +x-collection: directus_activity \ No newline at end of file diff --git a/api-spec/components/schemas/Collections.yaml b/api-spec/components/schemas/Collections.yaml new file mode 100644 index 00000000..f3f50a99 --- /dev/null +++ b/api-spec/components/schemas/Collections.yaml @@ -0,0 +1,64 @@ +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: collections.yaml + collapse: + nullable: false + type: string + preview_url: + nullable: true + type: string + versioning: + nullable: false + type: boolean +x-collection: directus_collections \ No newline at end of file diff --git a/api-spec/components/schemas/Diff.yaml b/api-spec/components/schemas/Diff.yaml new file mode 100644 index 00000000..be0bbf3b --- /dev/null +++ b/api-spec/components/schemas/Diff.yaml @@ -0,0 +1,46 @@ +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 \ No newline at end of file diff --git a/api-spec/components/schemas/Extensions.yaml b/api-spec/components/schemas/Extensions.yaml new file mode 100644 index 00000000..35715c12 --- /dev/null +++ b/api-spec/components/schemas/Extensions.yaml @@ -0,0 +1,21 @@ +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: my-bundle + type: string + nullable: true +x-collection: directus_extensions \ No newline at end of file diff --git a/api-spec/components/schemas/Fields.yaml b/api-spec/components/schemas/Fields.yaml new file mode 100644 index 00000000..f1535450 --- /dev/null +++ b/api-spec/components/schemas/Fields.yaml @@ -0,0 +1,61 @@ +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: fields.yaml + validation: + nullable: true + validation_message: + nullable: true + type: string +x-collection: directus_fields \ No newline at end of file diff --git a/api-spec/components/schemas/Files.yaml b/api-spec/components/schemas/Files.yaml new file mode 100644 index 00000000..54d280dd --- /dev/null +++ b/api-spec/components/schemas/Files.yaml @@ -0,0 +1,118 @@ +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: folders.yaml + nullable: true + uploaded_by: + description: Who uploaded the file. + example: 63716273-0f29-4648-8a2a-2af2948f6f78 + oneOf: + - type: string + - $ref: users.yaml + 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: users.yaml + 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 \ No newline at end of file diff --git a/api-spec/components/schemas/Flows.yaml b/api-spec/components/schemas/Flows.yaml new file mode 100644 index 00000000..b31fa6c5 --- /dev/null +++ b/api-spec/components/schemas/Flows.yaml @@ -0,0 +1,70 @@ +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: operations.yaml + 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: users.yaml + operations: + nullable: true + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: operations.yaml +x-collection: directus_flows \ No newline at end of file diff --git a/api-spec/components/schemas/Folders.yaml b/api-spec/components/schemas/Folders.yaml new file mode 100644 index 00000000..9507bd86 --- /dev/null +++ b/api-spec/components/schemas/Folders.yaml @@ -0,0 +1,18 @@ +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: folders.yaml + nullable: true +x-collection: directus_folders \ No newline at end of file diff --git a/api-spec/components/schemas/Operations.yaml b/api-spec/components/schemas/Operations.yaml new file mode 100644 index 00000000..7a44fbc6 --- /dev/null +++ b/api-spec/components/schemas/Operations.yaml @@ -0,0 +1,62 @@ +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: operations.yaml + 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: operations.yaml + flow: + nullable: false + oneOf: + - type: string + format: uuid + - $ref: flows.yaml + 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: users.yaml +x-collection: directus_operations \ No newline at end of file diff --git a/api-spec/components/schemas/Permissions.yaml b/api-spec/components/schemas/Permissions.yaml new file mode 100644 index 00000000..da8819f2 --- /dev/null +++ b/api-spec/components/schemas/Permissions.yaml @@ -0,0 +1,40 @@ +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 \ No newline at end of file diff --git a/api-spec/components/schemas/Presets.yaml b/api-spec/components/schemas/Presets.yaml new file mode 100644 index 00000000..d4b8cd45 --- /dev/null +++ b/api-spec/components/schemas/Presets.yaml @@ -0,0 +1,65 @@ +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: users.yaml + 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: roles.yaml + collection: + description: What collection this collection preset is used for. + example: articles + oneOf: + - type: string + - $ref: collections.yaml + 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 \ No newline at end of file diff --git a/api-spec/components/schemas/Query.yaml b/api-spec/components/schemas/Query.yaml new file mode 100644 index 00000000..ac304e0b --- /dev/null +++ b/api-spec/components/schemas/Query.yaml @@ -0,0 +1,40 @@ +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 \ No newline at end of file diff --git a/api-spec/components/schemas/Relations.yaml b/api-spec/components/schemas/Relations.yaml new file mode 100644 index 00000000..57a08b74 --- /dev/null +++ b/api-spec/components/schemas/Relations.yaml @@ -0,0 +1,43 @@ +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 \ No newline at end of file diff --git a/api-spec/components/schemas/Revisions.yaml b/api-spec/components/schemas/Revisions.yaml new file mode 100644 index 00000000..159f070d --- /dev/null +++ b/api-spec/components/schemas/Revisions.yaml @@ -0,0 +1,49 @@ +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: activity.yaml + collection: + description: Collection of the updated item. + example: articles + oneOf: + - type: string + - $ref: collections.yaml + 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: versions.yaml +x-collection: directus_revisions \ No newline at end of file diff --git a/api-spec/components/schemas/Roles.yaml b/api-spec/components/schemas/Roles.yaml new file mode 100644 index 00000000..a6a55484 --- /dev/null +++ b/api-spec/components/schemas/Roles.yaml @@ -0,0 +1,46 @@ +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: Optional parent role that this role inherits permissions from. + oneOf: + - type: string + format: uuid + - $ref: roles.yaml + children: + nullable: true + description: Nested child roles that inherit this roles permissions + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: roles.yaml + policies: + nullable: true + users: + nullable: true + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: users.yaml +x-collection: directus_roles \ No newline at end of file diff --git a/api-spec/components/schemas/Schema.yaml b/api-spec/components/schemas/Schema.yaml new file mode 100644 index 00000000..c91eb2bf --- /dev/null +++ b/api-spec/components/schemas/Schema.yaml @@ -0,0 +1,21 @@ +type: object +properties: + version: + type: integer + example: 1 + directus: + type: string + vendor: + type: string + collections: + type: array + items: + $ref: collections.yaml + fields: + type: array + items: + $ref: fields.yaml + relations: + type: array + items: + $ref: relations.yaml \ No newline at end of file diff --git a/api-spec/components/schemas/Settings.yaml b/api-spec/components/schemas/Settings.yaml new file mode 100644 index 00000000..ae454305 --- /dev/null +++ b/api-spec/components/schemas/Settings.yaml @@ -0,0 +1,193 @@ +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: files.yaml + 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: roles.yaml + public_registration_email_filter: + nullable: true + description: $t:fields.directus_settings.public_registration_email_filter_note +x-collection: directus_settings \ No newline at end of file diff --git a/api-spec/components/schemas/Users.yaml b/api-spec/components/schemas/Users.yaml new file mode 100644 index 00000000..9e09a2c0 --- /dev/null +++ b/api-spec/components/schemas/Users.yaml @@ -0,0 +1,118 @@ +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: files.yaml + 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: roles.yaml + 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 \ No newline at end of file diff --git a/api-spec/components/schemas/Versions.yaml b/api-spec/components/schemas/Versions.yaml new file mode 100644 index 00000000..15764b15 --- /dev/null +++ b/api-spec/components/schemas/Versions.yaml @@ -0,0 +1,52 @@ +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: collections.yaml + 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 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: users.yaml + user_updated: + description: User that updated the Content Version. + example: 63716273-0f29-4648-8a2a-2af2948f6f78 + oneOf: + - type: string + - $ref: users.yaml +x-collection: directus_versions \ No newline at end of file diff --git a/api-spec/components/schemas/Webhooks.yaml b/api-spec/components/schemas/Webhooks.yaml new file mode 100644 index 00000000..4ba55f26 --- /dev/null +++ b/api-spec/components/schemas/Webhooks.yaml @@ -0,0 +1,51 @@ +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: flows.yaml +x-collection: directus_webhooks \ No newline at end of file diff --git a/api-spec/components/schemas/_index.yaml b/api-spec/components/schemas/_index.yaml new file mode 100644 index 00000000..84722ed6 --- /dev/null +++ b/api-spec/components/schemas/_index.yaml @@ -0,0 +1,43 @@ +Diff: + $ref: diff.yaml +Query: + $ref: query.yaml +Schema: + $ref: schema.yaml +x-metadata: + $ref: x-metadata.yaml + +Activity: + $ref: activity.yaml +Collections: + $ref: collections.yaml +Extensions: + $ref: extensions.yaml +Fields: + $ref: fields.yaml +Files: + $ref: files.yaml +Flows: + $ref: flows.yaml +Folders: + $ref: folders.yaml +Operations: + $ref: operations.yaml +Permissions: + $ref: permissions.yaml +Presets: + $ref: presets.yaml +Relations: + $ref: relations.yaml +Revisions: + $ref: revisions.yaml +Roles: + $ref: roles.yaml +Settings: + $ref: settings.yaml +Users: + $ref: users.yaml +Versions: + $ref: versions.yaml +Webhooks: + $ref: webhooks.yaml \ No newline at end of file diff --git a/api-spec/components/schemas/x-metadata.yaml b/api-spec/components/schemas/x-metadata.yaml new file mode 100644 index 00000000..f98608d3 --- /dev/null +++ b/api-spec/components/schemas/x-metadata.yaml @@ -0,0 +1,8 @@ +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 \ No newline at end of file diff --git a/api-spec/components/security.yaml b/api-spec/components/security.yaml new file mode 100644 index 00000000..a9562bb8 --- /dev/null +++ b/api-spec/components/security.yaml @@ -0,0 +1,8 @@ +KeyAuth: + type: apiKey + in: query + name: access_token +Auth: + type: apiKey + in: header + name: Authorization \ No newline at end of file diff --git a/api-spec/index.yaml b/api-spec/index.yaml index e9ca0dbe..3b87fae3 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -1,5035 +1,35 @@ ---- -openapi: 3.0.1 +openapi: '3.0.1' info: - title: Directus API Specification - description: - This is a dynamically generated API specification for all endpoints - existing on the current project. - version: 10.9.2 + title: Directus API Reference + description: This is a dynamically generated API specification for all endpoints existing on the current project! + version: '11.1.0' + license: + name: Business Source License 1.1 (BUSL-1.1) + url: https://github.com/directus/directus/blob/main/license servers: - - url: https://testing-connor-custom-domains.directus.community/ - description: Your current Directus instance. -paths: - "/merge-test": - $ref: "./merge-test.yaml" - "/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. - x-codeSamples: - - label: Directus SDK - lang: Typescript - source: |- - import { createDirectus, rest, readAssetRaw } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); + - url: https://example.directus.app + description: Your current Directus project. - const result = await client.request(readAssetRaw('', { key: '' })); - 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 - default: json - description: - Choose between retrieving the token as a string, or - setting it as a cookie. - otp: - type: string - description: If 2FA is enabled, you need to pass the one time password. - 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 - required: - - token - properties: - refresh_token: - type: string - example: eyJ0eXAiOiJKV... - description: - JWT access token you want to refresh. This token can't - be expired. - 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 - required: - - token - properties: - refresh_token: - type: string - example: eyJ0eXAiOiJKV... - description: JWT access token you want to logout. - 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" - "/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" - "/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/comment": - post: - summary: Create a Comment - description: Creates a new comment. - operationId: createComment - parameters: - - "$ref": "#/components/parameters/Meta" - requestBody: - content: - application/json: - schema: - type: object - required: - - collection - - item - - comment - properties: - collection: - type: string - example: projects - item: - type: integer - example: 1 - comment: - type: string - example: A new comment - responses: - "200": - content: - application/json: - schema: - type: object - properties: - data: - "$ref": "#/components/schemas/Activity" - 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 - "/activity/comment/{id}": - patch: - summary: Update a Comment - description: Update the content of an existing comment. - operationId: updateComment - parameters: - - "$ref": "#/components/parameters/Id" - - "$ref": "#/components/parameters/Meta" - requestBody: - content: - application/json: - schema: - type: object - properties: - comment: - type: string - example: My updated comment - responses: - "200": - content: - application/json: - schema: - type: object - properties: - data: - "$ref": "#/components/schemas/Activity" - description: Successful request - "401": - "$ref": "#/components/responses/UnauthorizedError" - "404": - "$ref": "#/components/responses/NotFoundError" - tags: - - Activity - delete: - summary: Delete a Comment - description: Delete an existing comment. Deleted comments can not be retrieved. - operationId: deleteComment - parameters: - - "$ref": "#/components/parameters/Id" - responses: - "203": - description: Deleted successfully - "401": - "$ref": "#/components/responses/UnauthorizedError" - "404": - "$ref": "#/components/responses/NotFoundError" - tags: - - Activity - "/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: - nullable: true - display_template: - description: - Text representation of how items from this collection - are shown across the system. - type: string - example: - 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: - 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: - nullable: true - archive_app_filter: - description: What value to use for "archived" items. - type: string - example: - nullable: true - archive_value: - description: What value to use to "unarchive" items. - type: string - example: - nullable: true - unarchive_value: - description: Whether or not to show the "archived" filter. - type: string - example: - nullable: true - sort_field: - description: The sort field in the collection. - type: string - example: - 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: - nullable: true - display_template: - description: - Text representation of how items from this collection - are shown across the system. - type: string - example: - 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: - 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: - nullable: true - archive_app_filter: - description: What value to use for "archived" items. - type: string - example: - nullable: true - archive_value: - description: What value to use to "unarchive" items. - type: string - example: - nullable: true - unarchive_value: - description: Whether or not to show the "archived" filter. - type: string - example: - nullable: true - sort_field: - description: The sort field in the collection. - type: string - example: - 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 - "/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: - type: string - nullable: true - max_length: - description: The max length of the field. - example: - 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: - type: string - nullable: true - foreign_key_table: - description: Related table from the foreign key constraint. - example: - type: string - nullable: true - comment: - description: Comment as saved in the database. - example: - 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: - 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: - 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: - type: object - nullable: true - display: - description: - What display is used in the admin app to display - the value for this field. - example: - type: string - nullable: true - display_options: - description: - Options for the display that's used. This format - is based on the individual display. - example: - 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: - type: string - nullable: true - enum: - - half - - half-left - - half-right - - full - - fill - - - group: - description: What field group this field is part of. - example: - 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: - 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: - type: string - nullable: true - max_length: - description: The max length of the field. - example: - 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: - type: string - nullable: true - foreign_key_table: - description: Related table from the foreign key constraint. - example: - type: string - nullable: true - comment: - description: Comment as saved in the database. - example: - 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: - 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: - 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: - type: object - nullable: true - display: - description: - What display is used in the admin app to display - the value for this field. - example: - type: string - nullable: true - display_options: - description: - Options for the display that's used. This format - is based on the individual display. - example: - 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: - type: string - nullable: true - enum: - - half - - half-left - - half-right - - full - - fill - - - group: - description: What field group this field is part of. - example: - 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: - 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 - "/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: - 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: - 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" - "/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 +paths: "/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 + $ref: paths/permissions/index.yaml "/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" - "/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" - "/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: - 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: - system-collections: - description: The collections that triggers this webhook. - example: - 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: - 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: - system-collections: - description: The collections that triggers this webhook. - example: - 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: - 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: - system-collections: - description: The collections that triggers this webhook. - example: - 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" - "/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 - "/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: - 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: - 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" - "/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" - "/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 - "/items/example_collection": - post: - summary: Create an Item - description: Create a new example_collection item. - tags: - - Items - - ItemsExampleCollection - operationId: createItemsExampleCollection - parameters: - - "$ref": "#/components/parameters/Meta" - requestBody: - content: - application/json: - schema: - oneOf: - - type: array - items: - "$ref": "#/components/schemas/ItemsExampleCollection" - - "$ref": "#/components/schemas/ItemsExampleCollection" - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - items: - "$ref": "#/components/schemas/ItemsExampleCollection" - "401": - "$ref": "#/components/responses/UnauthorizedError" - get: - summary: List Items - description: List the example_collection items. - tags: - - Items - - ItemsExampleCollection - operationId: readItemsExampleCollection - security: - - Auth: [] - 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": - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - type: object - "$ref": "#/components/schemas/ItemsExampleCollection" - meta: - "$ref": "#/components/schemas/x-metadata" - "401": - "$ref": "#/components/responses/UnauthorizedError" - patch: - summary: Update Multiple Items - description: Update multiple example_collection items at the same time. - tags: - - Items - - ItemsExampleCollection - operationId: updateItemsExampleCollection - 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: - oneOf: - - type: array - items: - "$ref": "#/components/schemas/ItemsExampleCollection" - - "$ref": "#/components/schemas/ItemsExampleCollection" - responses: - "200": - description: Successful request - content: - application/json: - schema: - properties: - data: - items: - "$ref": "#/components/schemas/ItemsExampleCollection" - delete: - summary: Delete Multiple Items - description: Delete multiple existing example_collection items. - tags: - - Items - - ItemsExampleCollection - operationId: deleteItemsExampleCollection - responses: - "200": - description: Successful request - "401": - "$ref": "#/components/responses/UnauthorizedError" - parameters: [] - "/items/example_collection/{id}": - get: - summary: Retrieve an Item - description: Retrieve a single example_collection item by unique identifier. - tags: - - Items - - ItemsExampleCollection - operationId: readSingleItemsExampleCollection - parameters: - - "$ref": "#/components/parameters/Fields" - - "$ref": "#/components/parameters/Meta" - - "$ref": "#/components/parameters/Version" - - name: id - description: Index of the item. - in: path - required: true - schema: - oneOf: - - type: integer - description: Incremental index of the item. - example: 1 - - type: string - description: Unique identifier of the item. - example: 8cbb43fe-4cdf-4991-8352-c461779cec02 - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - type: object - "$ref": "#/components/schemas/ItemsExampleCollection" - "401": - "$ref": "#/components/responses/UnauthorizedError" - "404": - "$ref": "#/components/responses/NotFoundError" - patch: - summary: Update an Item - description: Update an existing example_collection item. - tags: - - Items - - ItemsExampleCollection - operationId: updateSingleItemsExampleCollection - parameters: - - "$ref": "#/components/parameters/Fields" - - "$ref": "#/components/parameters/Meta" - - name: id - description: Index of the item. - in: path - required: true - schema: - oneOf: - - type: integer - description: Incremental index of the item. - example: 1 - - type: string - description: Unique identifier of the item. - example: 8cbb43fe-4cdf-4991-8352-c461779cec02 - requestBody: - content: - application/json: - schema: - type: object - "$ref": "#/components/schemas/ItemsExampleCollection" - responses: - "200": - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - type: object - "$ref": "#/components/schemas/ItemsExampleCollection" - "401": - "$ref": "#/components/responses/UnauthorizedError" - "404": - "$ref": "#/components/responses/NotFoundError" - delete: - summary: Delete an Item - description: Delete an existing example_collection item. - tags: - - Items - - ItemsExampleCollection - operationId: deleteSingleItemsExampleCollection - responses: - "200": - description: Successful request - "401": - "$ref": "#/components/responses/UnauthorizedError" - "404": - "$ref": "#/components/responses/NotFoundError" - parameters: - - name: id - description: Index of the item. - in: path - required: true - schema: - oneOf: - - type: integer - description: Incremental index of the item. - example: 1 - - type: string - description: Unique identifier of the item. - example: 8cbb43fe-4cdf-4991-8352-c461779cec02 - "/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 - "/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: updateExtensions - 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 + $ref: paths/permissions/_id/index.yaml + +components: + parameters: + $ref: components/parameters.yaml + responses: + $ref: components/responses.yaml + securitySchemes: + $ref: components/security.yaml + schemas: + $ref: components/schemas/_index.yaml tags: - name: Assets - description: - Image typed files can be dynamically resized and transformed to fit - any need. + 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. + 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 @@ -5037,14 +37,9 @@ tags: - 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. + 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. + description: Directus comes with various utility endpoints you can use to simplify your development flow. x-authentication: user x-schemas: - Files @@ -5054,1567 +49,52 @@ tags: - name: Folders description: Group files by virtual folders. x-collection: directus_folders - - name: Roles - description: Roles are groups of users that share permissions. - x-collection: directus_roles - - 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 - - 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: Fields - description: - Fields are individual pieces of content within an item. They are mapped - to columns in the database. - x-collection: directus_fields + - 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. + 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: Permissions - description: Permissions control who has access to what and when. - x-collection: directus_permissions - - 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: 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: 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 - name: Webhooks description: Webhooks. x-collection: directus_webhooks - - 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: 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: Flows - description: Flows enable custom, event-driven data processing and task automation. - x-collection: directus_flows - - 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: ItemsExampleCollection - x-collection: example_collection - name: Settings description: Settings control the way the platform works and acts. x-collection: directus_settings - - 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 -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: - 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" - uploaded_on: - description: When the file was uploaded. - 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: timestamp - 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: - 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 - 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: - 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 - ip_access: - description: - Array of IP addresses that are allowed to connect to the API - as a user of this role. - example: [] - type: array - items: - type: string - enforce_tfa: - description: Whether or not this role enforces the use of 2FA. - example: false - type: boolean - admin_access: - description: Admin role. If true, skips all permission checks. - example: false - type: boolean - app_access: - description: The users in the role are allowed to use the app. - example: true - type: boolean - 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: - type: string - nullable: true - title: - description: The user's title. - example: - type: string - nullable: true - description: - description: The user's description. - example: - type: string - nullable: true - tags: - description: The user's tags. - example: - type: array - nullable: true - items: - type: string - avatar: - description: The user's avatar. - example: - 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: - 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 - 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 - 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 - 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: - type: string - nullable: true - 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 - 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 - 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 - Permissions: - type: object - properties: - id: - description: Unique identifier for the permission. - example: 1 - type: integer - role: - description: Unique identifier of the role this permission applies to. - example: 2f24211d-d928-469a-aea3-3c8f53d4e426 - type: string - nullable: true - 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 - x-collection: directus_permissions - 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: - 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: - type: string - nullable: true - sort_field: - nullable: true - type: string - one_deselect_action: - nullable: false - type: string - x-collection: directus_relations - 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: - 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: - nullable: true - collections: - nullable: false - type: array - items: - type: string - headers: - nullable: true - x-collection: directus_webhooks - 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: - type: integer - nullable: true - version: - description: Associated version of this revision. - example: draft - oneOf: - - type: string - - "$ref": "#/components/schemas/Versions" - x-collection: directus_revisions - 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: - 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 - 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: - 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 - 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: - 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 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 updated the Content Version. - example: 63716273-0f29-4648-8a2a-2af2948f6f78 - oneOf: - - type: string - - "$ref": "#/components/schemas/Users" - x-collection: directus_versions - ItemsExampleCollection: - type: object - properties: - id: - nullable: false - type: string - format: uuid - status: - nullable: false - type: string - sort: - nullable: true - type: integer - user_created: - nullable: true - oneOf: - - type: string - format: uuid - - "$ref": "#/components/schemas/Users" - date_created: - nullable: true - type: string - format: timestamp - user_updated: - nullable: true - oneOf: - - type: string - format: uuid - - "$ref": "#/components/schemas/Users" - date_updated: - nullable: true - type: string - format: timestamp - text: - nullable: true - type: string - x-collection: example_collection - 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: - nullable: true - project_color: - description: The brand color of the project. - type: string - example: - nullable: true - project_logo: - description: The logo of the project. - type: string - example: - nullable: true - public_foreground: - description: The foreground of the project. - type: string - example: - nullable: true - public_background: - description: The background of the project. - type: object - properties: - id: - type: string - type: - type: string - example: - nullable: true - public_note: - description: Note rendered on the public pages of the app. - type: string - example: - 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: - 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 - x-collection: directus_settings - Extensions: - type: object - properties: - name: - description: Unique name of the extension. - example: my-bundle-operation - type: string - enabled: - nullable: false - type: boolean - x-collection: directus_extensions - 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. - - " - 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 - schema: - type: array - items: - type: string - pattern: "^(\\[[^\\[\\]]*?\\]){1}(\\[(_eq|_neq|_lt|_lte|_gt|_gte|_in|_nin|_null|_nnull|_contains|_ncontains|_between|_nbetween|_empty|_nempty)\\])?=.*?$" - 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 - Mode: - description: - Controls if the API sets a cookie or returns a JWT on successful - login. - in: query - name: mode - required: true - schema: - type: string - enum: - - jwt - - cookie - 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. + - 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 - ' - 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/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml new file mode 100644 index 00000000..2504f9e9 --- /dev/null +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -0,0 +1,39 @@ +summary: Retrieve a Permission +description: Retrieve a single permissions object by unique identifier. +operationId: getPermission +parameters: + - "$ref": "../../../components/parameters.yaml#/Id" + - "$ref": "../../../components/parameters.yaml#/Fields" + - "$ref": "../../../components/parameters.yaml#/Meta" +responses: + "200": + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + "$ref": "../../../components/schemas/permissions.yaml" + "401": + "$ref": "../../../components/responses.yaml#/UnauthorizedError" + "404": + "$ref": "../../../components/responses.yaml#/NotFoundError" +tags: + - Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPermission } from '@directus/sdk'; + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPermission(permission_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + GET /graphql/system + + type Query { + permissions_by_id(id: ID!): directus_permissions + } \ No newline at end of file diff --git a/api-spec/paths/permissions/_id/index.yaml b/api-spec/paths/permissions/_id/index.yaml new file mode 100644 index 00000000..a57be843 --- /dev/null +++ b/api-spec/paths/permissions/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getPermission.yaml \ No newline at end of file diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml new file mode 100644 index 00000000..dd8f30bb --- /dev/null +++ b/api-spec/paths/permissions/createPermission.yaml @@ -0,0 +1,121 @@ +summary: Create a Permission +description: Create a new permission. +operationId: createPermission +parameters: + - "$ref": "../../components/parameters.yaml#/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.yaml" + "401": + "$ref": "../../components/responses.yaml#/UnauthorizedError" + "404": + "$ref": "../../components/responses.yaml#/NotFoundError" +tags: + - Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPermission } from '@directus/sdk'; + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPermission(permission_object)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_permissions_item(data: create_directus_permissions_input!): directus_permissions + } \ No newline at end of file diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml new file mode 100644 index 00000000..a1e2ed09 --- /dev/null +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -0,0 +1,48 @@ +summary: List Permissions +description: List all permissions. +operationId: getPermissions +parameters: + - "$ref": "../../components/parameters.yaml#/Fields" + - "$ref": "../../components/parameters.yaml#/Limit" + - "$ref": "../../components/parameters.yaml#/Offset" + - "$ref": "../../components/parameters.yaml#/Meta" + - "$ref": "../../components/parameters.yaml#/Sort" + - "$ref": "../../components/parameters.yaml#/Filter" + - "$ref": "../../components/parameters.yaml#/Search" + - "$ref": "../../components/parameters.yaml#/Page" +responses: + "200": + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + "$ref": "../../components/schemas/permissions.yaml" + meta: + "$ref": "../../components/schemas/x-metadata.yaml" + "401": + "$ref": "../../components/responses.yaml#/UnauthorizedError" + "404": + "$ref": "../../components/responses.yaml#/NotFoundError" +tags: + - Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPermissions } from '@directus/sdk'; + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPermissions(query_object)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + permissions: directus_permissions + } \ No newline at end of file diff --git a/api-spec/paths/permissions/index.yaml b/api-spec/paths/permissions/index.yaml new file mode 100644 index 00000000..c6b5e5f9 --- /dev/null +++ b/api-spec/paths/permissions/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getPermissions.yaml +post: + $ref: createPermission.yaml \ No newline at end of file From 23853554bc67195388c49fb6da9d943decda3382 Mon Sep 17 00:00:00 2001 From: Connor Winston Date: Fri, 20 Sep 2024 10:09:23 -0500 Subject: [PATCH 002/119] Change Bundle --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 97c2bf01..d73fc2ca 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "oas:dev": "nodemon --watch './api-spec/**/*.yaml' --exec 'pnpm oas:build && pnpm scalar serve ./public/oas.yaml -p 5001' --ext yaml", - "oas:build": "redocly bundle api-spec/index.yaml -o public/oas.yaml --ext yaml", + "oas:build": "redocly bundle ./api-spec/index.yaml -o ./public/oas.yaml --ext yaml", "oas:lint": "redocly lint ./api-spec/index.yaml", "nuxt:build": "nuxt generate", "nuxt:dev": "nuxt dev", From e8d12873d937b4f76dc725c179e767403c70a60f Mon Sep 17 00:00:00 2001 From: Connor Winston Date: Fri, 20 Sep 2024 10:14:54 -0500 Subject: [PATCH 003/119] Fix Capitalization --- .../paths/permissions/_id/getPermission.yaml | 14 +++++------ .../paths/permissions/createPermission.yaml | 8 +++---- .../paths/permissions/getPermissions.yaml | 24 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index 2504f9e9..b0eac569 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -2,9 +2,9 @@ summary: Retrieve a Permission description: Retrieve a single permissions object by unique identifier. operationId: getPermission parameters: - - "$ref": "../../../components/parameters.yaml#/Id" - - "$ref": "../../../components/parameters.yaml#/Fields" - - "$ref": "../../../components/parameters.yaml#/Meta" + - "$ref": "../../../components/Parameters.yaml#/Id" + - "$ref": "../../../components/Parameters.yaml#/Fields" + - "$ref": "../../../components/Parameters.yaml#/Meta" responses: "200": description: Successful request @@ -14,11 +14,11 @@ responses: type: object properties: data: - "$ref": "../../../components/schemas/permissions.yaml" + "$ref": "../../../components/schemas/Permissions.yaml" "401": - "$ref": "../../../components/responses.yaml#/UnauthorizedError" + "$ref": "../../../components/Responses.yaml#/UnauthorizedError" "404": - "$ref": "../../../components/responses.yaml#/NotFoundError" + "$ref": "../../../components/Responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: @@ -36,4 +36,4 @@ x-codeSamples: type Query { permissions_by_id(id: ID!): directus_permissions - } \ No newline at end of file + } diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml index dd8f30bb..ca87a062 100644 --- a/api-spec/paths/permissions/createPermission.yaml +++ b/api-spec/paths/permissions/createPermission.yaml @@ -2,7 +2,7 @@ summary: Create a Permission description: Create a new permission. operationId: createPermission parameters: - - "$ref": "../../components/parameters.yaml#/Meta" + - "$ref": "../../components/Parameters.yaml#/Meta" requestBody: content: application/json: @@ -98,9 +98,9 @@ responses: data: "$ref": "../../components/schemas/Permissions.yaml" "401": - "$ref": "../../components/responses.yaml#/UnauthorizedError" + "$ref": "../../components/Responses.yaml#/UnauthorizedError" "404": - "$ref": "../../components/responses.yaml#/NotFoundError" + "$ref": "../../components/Responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: @@ -118,4 +118,4 @@ x-codeSamples: type Mutation { create_permissions_item(data: create_directus_permissions_input!): directus_permissions - } \ No newline at end of file + } diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index a1e2ed09..ed3951fb 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -2,14 +2,14 @@ summary: List Permissions description: List all permissions. operationId: getPermissions parameters: - - "$ref": "../../components/parameters.yaml#/Fields" - - "$ref": "../../components/parameters.yaml#/Limit" - - "$ref": "../../components/parameters.yaml#/Offset" - - "$ref": "../../components/parameters.yaml#/Meta" - - "$ref": "../../components/parameters.yaml#/Sort" - - "$ref": "../../components/parameters.yaml#/Filter" - - "$ref": "../../components/parameters.yaml#/Search" - - "$ref": "../../components/parameters.yaml#/Page" + - "$ref": "../../components/Parameters.yaml#/Fields" + - "$ref": "../../components/Parameters.yaml#/Limit" + - "$ref": "../../components/Parameters.yaml#/Offset" + - "$ref": "../../components/Parameters.yaml#/Meta" + - "$ref": "../../components/Parameters.yaml#/Sort" + - "$ref": "../../components/Parameters.yaml#/Filter" + - "$ref": "../../components/Parameters.yaml#/Search" + - "$ref": "../../components/Parameters.yaml#/Page" responses: "200": description: Successful request @@ -21,13 +21,13 @@ responses: data: type: array items: - "$ref": "../../components/schemas/permissions.yaml" + "$ref": "../../components/schemas/Permissions.yaml" meta: "$ref": "../../components/schemas/x-metadata.yaml" "401": - "$ref": "../../components/responses.yaml#/UnauthorizedError" + "$ref": "../../components/Responses.yaml#/UnauthorizedError" "404": - "$ref": "../../components/responses.yaml#/NotFoundError" + "$ref": "../../components/Responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: @@ -45,4 +45,4 @@ x-codeSamples: type Query { permissions: directus_permissions - } \ No newline at end of file + } From c3579fb34cb4b96130ae602ff27343b169d0f327 Mon Sep 17 00:00:00 2001 From: Connor Winston Date: Fri, 20 Sep 2024 10:25:06 -0500 Subject: [PATCH 004/119] Try Fixing Action/Build Again --- api-spec/components/schemas/_index.yaml | 2 +- .../paths/permissions/_id/getPermission.yaml | 12 ++++---- .../paths/permissions/createPermission.yaml | 8 ++--- .../paths/permissions/getPermissions.yaml | 22 +++++++------- package.json | 2 +- pnpm-lock.yaml | 30 +++++++++---------- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api-spec/components/schemas/_index.yaml b/api-spec/components/schemas/_index.yaml index 84722ed6..1c1d61b2 100644 --- a/api-spec/components/schemas/_index.yaml +++ b/api-spec/components/schemas/_index.yaml @@ -40,4 +40,4 @@ Users: Versions: $ref: versions.yaml Webhooks: - $ref: webhooks.yaml \ No newline at end of file + $ref: webhooks.yaml diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index b0eac569..9cca894b 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -2,9 +2,9 @@ summary: Retrieve a Permission description: Retrieve a single permissions object by unique identifier. operationId: getPermission parameters: - - "$ref": "../../../components/Parameters.yaml#/Id" - - "$ref": "../../../components/Parameters.yaml#/Fields" - - "$ref": "../../../components/Parameters.yaml#/Meta" + - "$ref": "../../../components/parameters.yaml#/Id" + - "$ref": "../../../components/parameters.yaml#/Fields" + - "$ref": "../../../components/parameters.yaml#/Meta" responses: "200": description: Successful request @@ -14,11 +14,11 @@ responses: type: object properties: data: - "$ref": "../../../components/schemas/Permissions.yaml" + "$ref": "../../../components/schemas/permissions.yaml" "401": - "$ref": "../../../components/Responses.yaml#/UnauthorizedError" + "$ref": "../../../components/responses.yaml#/UnauthorizedError" "404": - "$ref": "../../../components/Responses.yaml#/NotFoundError" + "$ref": "../../../components/responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml index ca87a062..4eef6977 100644 --- a/api-spec/paths/permissions/createPermission.yaml +++ b/api-spec/paths/permissions/createPermission.yaml @@ -2,7 +2,7 @@ summary: Create a Permission description: Create a new permission. operationId: createPermission parameters: - - "$ref": "../../components/Parameters.yaml#/Meta" + - "$ref": "../../components/parameters.yaml#/Meta" requestBody: content: application/json: @@ -96,11 +96,11 @@ responses: type: object properties: data: - "$ref": "../../components/schemas/Permissions.yaml" + "$ref": "../../components/schemas/permissions.yaml" "401": - "$ref": "../../components/Responses.yaml#/UnauthorizedError" + "$ref": "../../components/responses.yaml#/UnauthorizedError" "404": - "$ref": "../../components/Responses.yaml#/NotFoundError" + "$ref": "../../components/responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index ed3951fb..37234a0e 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -2,14 +2,14 @@ summary: List Permissions description: List all permissions. operationId: getPermissions parameters: - - "$ref": "../../components/Parameters.yaml#/Fields" - - "$ref": "../../components/Parameters.yaml#/Limit" - - "$ref": "../../components/Parameters.yaml#/Offset" - - "$ref": "../../components/Parameters.yaml#/Meta" - - "$ref": "../../components/Parameters.yaml#/Sort" - - "$ref": "../../components/Parameters.yaml#/Filter" - - "$ref": "../../components/Parameters.yaml#/Search" - - "$ref": "../../components/Parameters.yaml#/Page" + - "$ref": "../../components/parameters.yaml#/Fields" + - "$ref": "../../components/parameters.yaml#/Limit" + - "$ref": "../../components/parameters.yaml#/Offset" + - "$ref": "../../components/parameters.yaml#/Meta" + - "$ref": "../../components/parameters.yaml#/Sort" + - "$ref": "../../components/parameters.yaml#/Filter" + - "$ref": "../../components/parameters.yaml#/Search" + - "$ref": "../../components/parameters.yaml#/Page" responses: "200": description: Successful request @@ -21,13 +21,13 @@ responses: data: type: array items: - "$ref": "../../components/schemas/Permissions.yaml" + "$ref": "../../components/schemas/permissions.yaml" meta: "$ref": "../../components/schemas/x-metadata.yaml" "401": - "$ref": "../../components/Responses.yaml#/UnauthorizedError" + "$ref": "../../components/responses.yaml#/UnauthorizedError" "404": - "$ref": "../../components/Responses.yaml#/NotFoundError" + "$ref": "../../components/responses.yaml#/NotFoundError" tags: - Permissions x-codeSamples: diff --git a/package.json b/package.json index d73fc2ca..aaff74d6 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "vue": "latest" }, "devDependencies": { - "@redocly/cli": "^1.25.2", + "@redocly/cli": "^1.25.3", "@scalar/cli": "^0.2.194", "nodemon": "^3.1.4", "sass": "^1.77.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bc97eb7..fae79e48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,8 +70,8 @@ importers: version: 3.4.38(typescript@5.5.4) devDependencies: '@redocly/cli': - specifier: ^1.25.2 - version: 1.25.2(enzyme@3.11.0) + specifier: ^1.25.3 + version: 1.25.3(enzyme@3.11.0) '@scalar/cli': specifier: ^0.2.194 version: 0.2.194(postcss@8.4.41)(tailwindcss@3.4.10)(typescript@5.5.4)(vue@3.4.38(typescript@5.5.4)) @@ -1414,16 +1414,16 @@ packages: '@redocly/ajv@8.11.2': resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} - '@redocly/cli@1.25.2': - resolution: {integrity: sha512-E4Y5MBoFG86KSVjScGMa9sc/awn1+7zKfFQNvP1XbELeJnYuYw6tbkBDugNlGinE0RRiZVOtnJutjVjsvs8P/Q==} + '@redocly/cli@1.25.3': + resolution: {integrity: sha512-58odmEj+gr7xp9fvAqzf+t6M4O3olvPOFe7SMu9mAdCaEGLr6o/AMdRvDwF+z1svinK/yAt4375/eL+H2LgPtQ==} engines: {node: '>=14.19.0', npm: '>=7.0.0'} hasBin: true - '@redocly/config@0.10.1': - resolution: {integrity: sha512-H3LnKVGzOaxskwJu8pmJYwBOWjP61qOK7TuTrbafqArDVckE06fhA6l0nO4KvBbjLPjy1Al7UnlxOu23V4Nl0w==} + '@redocly/config@0.11.0': + resolution: {integrity: sha512-vAc77vCuWsVgLx2LN02P6jqLBhHuot6O1LsSJEAAkWEvXARSGSQVon50QW7jlbCMg9OFTYYYRPN4W6K/YmnM3w==} - '@redocly/openapi-core@1.25.2': - resolution: {integrity: sha512-6lJ3cRwi9xFkz/DDSmZNiv16hrzUeDoiZJQppSckKmw7MHkARu9gqRNARxUjtOAywqvpGMneASVIF9ogmalrQg==} + '@redocly/openapi-core@1.25.3': + resolution: {integrity: sha512-dqJkyydgagW3FXX5cjtSUAnabsld4K6yq7RFgQ+ngI1m43PkEoSQt8pp+SfQDszSEoMbc7QKj8afbe7mZw17TA==} engines: {node: '>=14.19.0', npm: '>=7.0.0'} '@replit/codemirror-css-color-picker@6.2.0': @@ -9598,9 +9598,9 @@ snapshots: require-from-string: 2.0.2 uri-js-replace: 1.0.1 - '@redocly/cli@1.25.2(enzyme@3.11.0)': + '@redocly/cli@1.25.3(enzyme@3.11.0)': dependencies: - '@redocly/openapi-core': 1.25.2 + '@redocly/openapi-core': 1.25.3 abort-controller: 3.0.0 chokidar: 3.6.0 colorette: 1.4.0 @@ -9627,12 +9627,12 @@ snapshots: - supports-color - utf-8-validate - '@redocly/config@0.10.1': {} + '@redocly/config@0.11.0': {} - '@redocly/openapi-core@1.25.2': + '@redocly/openapi-core@1.25.3': dependencies: '@redocly/ajv': 8.11.2 - '@redocly/config': 0.10.1 + '@redocly/config': 0.11.0 colorette: 1.4.0 https-proxy-agent: 7.0.5 js-levenshtein: 1.1.6 @@ -16365,7 +16365,7 @@ snapshots: redoc@2.1.5(core-js@3.38.1)(enzyme@3.11.0)(mobx@6.13.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): dependencies: '@cfaester/enzyme-adapter-react-18': 0.8.0(enzyme@3.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@redocly/openapi-core': 1.25.2 + '@redocly/openapi-core': 1.25.3 classnames: 2.5.1 core-js: 3.38.1 decko: 1.2.0 @@ -17824,7 +17824,7 @@ snapshots: vite@5.4.2(@types/node@22.5.0)(sass@1.77.8)(terser@5.31.6): dependencies: esbuild: 0.21.5 - postcss: 8.4.41 + postcss: 8.4.45 rollup: 4.21.0 optionalDependencies: '@types/node': 22.5.0 From b7b82873124ecc7b41e24e10a180db82da81f495 Mon Sep 17 00:00:00 2001 From: Connor Winston Date: Fri, 20 Sep 2024 10:28:43 -0500 Subject: [PATCH 005/119] Change Caps --- api-spec/components/schemas/{Activity.yaml => activity.yaml} | 0 .../components/schemas/{Collections.yaml => collections.yaml} | 0 api-spec/components/schemas/{Diff.yaml => diff.yaml} | 0 api-spec/components/schemas/{Extensions.yaml => extensions.yaml} | 0 api-spec/components/schemas/{Fields.yaml => fields.yaml} | 0 api-spec/components/schemas/{Files.yaml => files.yaml} | 0 api-spec/components/schemas/{Flows.yaml => flows.yaml} | 0 api-spec/components/schemas/{Folders.yaml => folders.yaml} | 0 api-spec/components/schemas/{Operations.yaml => operations.yaml} | 0 .../components/schemas/{Permissions.yaml => permissions.yaml} | 0 api-spec/components/schemas/{Presets.yaml => presets.yaml} | 0 api-spec/components/schemas/{Query.yaml => query.yaml} | 0 api-spec/components/schemas/{Relations.yaml => relations.yaml} | 0 api-spec/components/schemas/{Revisions.yaml => revisions.yaml} | 0 api-spec/components/schemas/{Roles.yaml => roles.yaml} | 0 api-spec/components/schemas/{Schema.yaml => schema.yaml} | 0 api-spec/components/schemas/{Settings.yaml => settings.yaml} | 0 api-spec/components/schemas/{Users.yaml => users.yaml} | 0 api-spec/components/schemas/{Versions.yaml => versions.yaml} | 0 api-spec/components/schemas/{Webhooks.yaml => webhooks.yaml} | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename api-spec/components/schemas/{Activity.yaml => activity.yaml} (100%) rename api-spec/components/schemas/{Collections.yaml => collections.yaml} (100%) rename api-spec/components/schemas/{Diff.yaml => diff.yaml} (100%) rename api-spec/components/schemas/{Extensions.yaml => extensions.yaml} (100%) rename api-spec/components/schemas/{Fields.yaml => fields.yaml} (100%) rename api-spec/components/schemas/{Files.yaml => files.yaml} (100%) rename api-spec/components/schemas/{Flows.yaml => flows.yaml} (100%) rename api-spec/components/schemas/{Folders.yaml => folders.yaml} (100%) rename api-spec/components/schemas/{Operations.yaml => operations.yaml} (100%) rename api-spec/components/schemas/{Permissions.yaml => permissions.yaml} (100%) rename api-spec/components/schemas/{Presets.yaml => presets.yaml} (100%) rename api-spec/components/schemas/{Query.yaml => query.yaml} (100%) rename api-spec/components/schemas/{Relations.yaml => relations.yaml} (100%) rename api-spec/components/schemas/{Revisions.yaml => revisions.yaml} (100%) rename api-spec/components/schemas/{Roles.yaml => roles.yaml} (100%) rename api-spec/components/schemas/{Schema.yaml => schema.yaml} (100%) rename api-spec/components/schemas/{Settings.yaml => settings.yaml} (100%) rename api-spec/components/schemas/{Users.yaml => users.yaml} (100%) rename api-spec/components/schemas/{Versions.yaml => versions.yaml} (100%) rename api-spec/components/schemas/{Webhooks.yaml => webhooks.yaml} (100%) diff --git a/api-spec/components/schemas/Activity.yaml b/api-spec/components/schemas/activity.yaml similarity index 100% rename from api-spec/components/schemas/Activity.yaml rename to api-spec/components/schemas/activity.yaml diff --git a/api-spec/components/schemas/Collections.yaml b/api-spec/components/schemas/collections.yaml similarity index 100% rename from api-spec/components/schemas/Collections.yaml rename to api-spec/components/schemas/collections.yaml diff --git a/api-spec/components/schemas/Diff.yaml b/api-spec/components/schemas/diff.yaml similarity index 100% rename from api-spec/components/schemas/Diff.yaml rename to api-spec/components/schemas/diff.yaml diff --git a/api-spec/components/schemas/Extensions.yaml b/api-spec/components/schemas/extensions.yaml similarity index 100% rename from api-spec/components/schemas/Extensions.yaml rename to api-spec/components/schemas/extensions.yaml diff --git a/api-spec/components/schemas/Fields.yaml b/api-spec/components/schemas/fields.yaml similarity index 100% rename from api-spec/components/schemas/Fields.yaml rename to api-spec/components/schemas/fields.yaml diff --git a/api-spec/components/schemas/Files.yaml b/api-spec/components/schemas/files.yaml similarity index 100% rename from api-spec/components/schemas/Files.yaml rename to api-spec/components/schemas/files.yaml diff --git a/api-spec/components/schemas/Flows.yaml b/api-spec/components/schemas/flows.yaml similarity index 100% rename from api-spec/components/schemas/Flows.yaml rename to api-spec/components/schemas/flows.yaml diff --git a/api-spec/components/schemas/Folders.yaml b/api-spec/components/schemas/folders.yaml similarity index 100% rename from api-spec/components/schemas/Folders.yaml rename to api-spec/components/schemas/folders.yaml diff --git a/api-spec/components/schemas/Operations.yaml b/api-spec/components/schemas/operations.yaml similarity index 100% rename from api-spec/components/schemas/Operations.yaml rename to api-spec/components/schemas/operations.yaml diff --git a/api-spec/components/schemas/Permissions.yaml b/api-spec/components/schemas/permissions.yaml similarity index 100% rename from api-spec/components/schemas/Permissions.yaml rename to api-spec/components/schemas/permissions.yaml diff --git a/api-spec/components/schemas/Presets.yaml b/api-spec/components/schemas/presets.yaml similarity index 100% rename from api-spec/components/schemas/Presets.yaml rename to api-spec/components/schemas/presets.yaml diff --git a/api-spec/components/schemas/Query.yaml b/api-spec/components/schemas/query.yaml similarity index 100% rename from api-spec/components/schemas/Query.yaml rename to api-spec/components/schemas/query.yaml diff --git a/api-spec/components/schemas/Relations.yaml b/api-spec/components/schemas/relations.yaml similarity index 100% rename from api-spec/components/schemas/Relations.yaml rename to api-spec/components/schemas/relations.yaml diff --git a/api-spec/components/schemas/Revisions.yaml b/api-spec/components/schemas/revisions.yaml similarity index 100% rename from api-spec/components/schemas/Revisions.yaml rename to api-spec/components/schemas/revisions.yaml diff --git a/api-spec/components/schemas/Roles.yaml b/api-spec/components/schemas/roles.yaml similarity index 100% rename from api-spec/components/schemas/Roles.yaml rename to api-spec/components/schemas/roles.yaml diff --git a/api-spec/components/schemas/Schema.yaml b/api-spec/components/schemas/schema.yaml similarity index 100% rename from api-spec/components/schemas/Schema.yaml rename to api-spec/components/schemas/schema.yaml diff --git a/api-spec/components/schemas/Settings.yaml b/api-spec/components/schemas/settings.yaml similarity index 100% rename from api-spec/components/schemas/Settings.yaml rename to api-spec/components/schemas/settings.yaml diff --git a/api-spec/components/schemas/Users.yaml b/api-spec/components/schemas/users.yaml similarity index 100% rename from api-spec/components/schemas/Users.yaml rename to api-spec/components/schemas/users.yaml diff --git a/api-spec/components/schemas/Versions.yaml b/api-spec/components/schemas/versions.yaml similarity index 100% rename from api-spec/components/schemas/Versions.yaml rename to api-spec/components/schemas/versions.yaml diff --git a/api-spec/components/schemas/Webhooks.yaml b/api-spec/components/schemas/webhooks.yaml similarity index 100% rename from api-spec/components/schemas/Webhooks.yaml rename to api-spec/components/schemas/webhooks.yaml From 6741fcb8d19304e4568b9df95196cd1a6e4ce234 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Sun, 6 Oct 2024 23:07:17 +0100 Subject: [PATCH 006/119] Converting OAS Json to YAML, creating nested folder structure, adjusting references and appending GraphQL and SDK snippets --- api-spec/paths/activity/_id/getActivity.yaml | 41 ++++ api-spec/paths/activity/_id/index.yaml | 2 + .../activity/comment/_id/deleteComment.yaml | 31 +++ .../paths/activity/comment/_id/index.yaml | 4 + .../activity/comment/_id/updateComment.yaml | 48 ++++ .../paths/activity/comment/createComment.yaml | 63 +++++ api-spec/paths/activity/comment/index.yaml | 2 + api-spec/paths/activity/getActivities.yaml | 48 ++++ api-spec/paths/activity/index.yaml | 2 + api-spec/paths/assets/_id/getAsset.yaml | 44 ++++ api-spec/paths/assets/_id/index.yaml | 2 + api-spec/paths/auth/login/index.yaml | 2 + api-spec/paths/auth/login/login.yaml | 80 ++++++ api-spec/paths/auth/logout/index.yaml | 2 + api-spec/paths/auth/logout/logout.yaml | 48 ++++ .../paths/auth/oauth/_provider/index.yaml | 2 + .../auth/oauth/_provider/oauthProvider.yaml | 36 +++ api-spec/paths/auth/oauth/index.yaml | 2 + api-spec/paths/auth/oauth/oauth.yaml | 36 +++ .../paths/auth/password/request/index.yaml | 2 + .../password/request/passwordRequest.yaml | 37 +++ api-spec/paths/auth/password/reset/index.yaml | 2 + .../auth/password/reset/passwordReset.yaml | 44 ++++ api-spec/paths/auth/refresh/index.yaml | 2 + api-spec/paths/auth/refresh/refresh.yaml | 74 ++++++ .../collections/_id/deleteCollection.yaml | 37 +++ .../paths/collections/_id/getCollection.yaml | 44 ++++ api-spec/paths/collections/_id/index.yaml | 6 + .../collections/_id/updateCollection.yaml | 122 ++++++++++ .../paths/collections/createCollection.yaml | 121 +++++++++ .../paths/collections/getCollections.yaml | 41 ++++ api-spec/paths/collections/index.yaml | 4 + .../paths/extensions/_bundle/_name/index.yaml | 2 + .../_bundle/_name/updateExtensionBundle.yaml | 45 ++++ api-spec/paths/extensions/_name/index.yaml | 2 + .../extensions/_name/updateExtensions.yaml | 57 +++++ api-spec/paths/extensions/index.yaml | 2 + api-spec/paths/extensions/listExtensions.yaml | 36 +++ .../fields/_collection/_id/deleteField.yaml | 42 ++++ .../_collection/_id/getCollectionField.yaml | 49 ++++ .../paths/fields/_collection/_id/index.yaml | 6 + .../fields/_collection/_id/updateField.yaml | 223 +++++++++++++++++ .../paths/fields/_collection/createField.yaml | 230 ++++++++++++++++++ .../_collection/getCollectionFields.yaml | 46 ++++ api-spec/paths/fields/_collection/index.yaml | 4 + api-spec/paths/fields/getFields.yaml | 41 ++++ api-spec/paths/fields/index.yaml | 2 + api-spec/paths/files/_id/deleteFile.yaml | 29 +++ api-spec/paths/files/_id/getFile.yaml | 36 +++ api-spec/paths/files/_id/index.yaml | 6 + api-spec/paths/files/_id/updateFile.yaml | 105 ++++++++ api-spec/paths/files/createFile.yaml | 25 ++ api-spec/paths/files/deleteFiles.yaml | 31 +++ api-spec/paths/files/getFiles.yaml | 46 ++++ api-spec/paths/files/index.yaml | 8 + api-spec/paths/files/updateFiles.yaml | 61 +++++ api-spec/paths/flows/_id/deleteFlow.yaml | 31 +++ api-spec/paths/flows/_id/getFlow.yaml | 38 +++ api-spec/paths/flows/_id/index.yaml | 6 + api-spec/paths/flows/_id/updateFlow.yaml | 46 ++++ api-spec/paths/flows/createFlow.yaml | 45 ++++ api-spec/paths/flows/deleteFlows.yaml | 27 ++ api-spec/paths/flows/getFlows.yaml | 40 +++ api-spec/paths/flows/index.yaml | 8 + api-spec/paths/flows/updateFlows.yaml | 59 +++++ api-spec/paths/folders/_id/deleteFolder.yaml | 31 +++ api-spec/paths/folders/_id/getFolder.yaml | 40 +++ api-spec/paths/folders/_id/index.yaml | 6 + api-spec/paths/folders/_id/updateFolder.yaml | 54 ++++ api-spec/paths/folders/createFolder.yaml | 55 +++++ api-spec/paths/folders/deleteFolders.yaml | 27 ++ api-spec/paths/folders/getFolders.yaml | 48 ++++ api-spec/paths/folders/index.yaml | 8 + api-spec/paths/folders/updateFolders.yaml | 69 ++++++ .../paths/operations/_id/deleteOperation.yaml | 31 +++ .../paths/operations/_id/getOperation.yaml | 36 +++ api-spec/paths/operations/_id/index.yaml | 6 + .../paths/operations/_id/updateOperation.yaml | 46 ++++ .../paths/operations/createOperation.yaml | 45 ++++ .../paths/operations/deleteOperations.yaml | 27 ++ api-spec/paths/operations/getOperations.yaml | 40 +++ api-spec/paths/operations/index.yaml | 8 + .../paths/operations/updateOperations.yaml | 57 +++++ .../permissions/_id/deletePermission.yaml | 31 +++ .../paths/permissions/_id/getPermission.yaml | 47 ++-- api-spec/paths/permissions/_id/index.yaml | 6 +- .../permissions/_id/updatePermission.yaml | 109 +++++++++ .../paths/permissions/createPermission.yaml | 120 +++++---- .../paths/permissions/deletePermissions.yaml | 27 ++ .../paths/permissions/getPermissions.yaml | 59 ++--- api-spec/paths/permissions/index.yaml | 6 +- .../permissions/me/getMyPermissions.yaml | 28 +++ api-spec/paths/permissions/me/index.yaml | 2 + .../paths/permissions/updatePermissions.yaml | 135 ++++++++++ api-spec/paths/presets/_id/deletePreset.yaml | 31 +++ api-spec/paths/presets/_id/getPreset.yaml | 40 +++ api-spec/paths/presets/_id/index.yaml | 6 + api-spec/paths/presets/_id/updatePreset.yaml | 91 +++++++ api-spec/paths/presets/createPreset.yaml | 93 +++++++ api-spec/paths/presets/deletePresets.yaml | 27 ++ api-spec/paths/presets/getPresets.yaml | 49 ++++ api-spec/paths/presets/index.yaml | 8 + api-spec/paths/presets/updatePresets.yaml | 109 +++++++++ .../paths/relations/_id/deleteRelation.yaml | 31 +++ api-spec/paths/relations/_id/getRelation.yaml | 40 +++ api-spec/paths/relations/_id/index.yaml | 6 + .../paths/relations/_id/updateRelation.yaml | 64 +++++ api-spec/paths/relations/createRelation.yaml | 66 +++++ api-spec/paths/relations/getRelations.yaml | 47 ++++ api-spec/paths/relations/index.yaml | 4 + api-spec/paths/revisions/_id/getRevision.yaml | 40 +++ api-spec/paths/revisions/_id/index.yaml | 2 + api-spec/paths/revisions/getRevisions.yaml | 49 ++++ api-spec/paths/revisions/index.yaml | 2 + api-spec/paths/roles/_id/deleteRole.yaml | 31 +++ api-spec/paths/roles/_id/getRole.yaml | 38 +++ api-spec/paths/roles/_id/index.yaml | 6 + api-spec/paths/roles/_id/updateRole.yaml | 67 +++++ api-spec/paths/roles/createRole.yaml | 67 +++++ api-spec/paths/roles/deleteRoles.yaml | 27 ++ api-spec/paths/roles/getRoles.yaml | 49 ++++ api-spec/paths/roles/index.yaml | 8 + api-spec/paths/roles/updateRoles.yaml | 81 ++++++ api-spec/paths/schema/apply/index.yaml | 2 + api-spec/paths/schema/apply/schemaApply.yaml | 35 +++ api-spec/paths/schema/diff/index.yaml | 2 + api-spec/paths/schema/diff/schemaDiff.yaml | 116 +++++++++ api-spec/paths/schema/snapshot/index.yaml | 2 + .../paths/schema/snapshot/schemaSnapshot.yaml | 37 +++ api-spec/paths/server/info/index.yaml | 2 + api-spec/paths/server/info/serverInfo.yaml | 45 ++++ api-spec/paths/server/ping/index.yaml | 2 + api-spec/paths/server/ping/ping.yaml | 31 +++ api-spec/paths/settings/getSettings.yaml | 41 ++++ api-spec/paths/settings/index.yaml | 4 + api-spec/paths/settings/updateSetting.yaml | 41 ++++ api-spec/paths/users/_id/deleteUser.yaml | 31 +++ api-spec/paths/users/_id/getUser.yaml | 40 +++ api-spec/paths/users/_id/index.yaml | 6 + api-spec/paths/users/_id/updateUser.yaml | 45 ++++ api-spec/paths/users/createUser.yaml | 43 ++++ api-spec/paths/users/deleteUsers.yaml | 27 ++ api-spec/paths/users/getUsers.yaml | 48 ++++ api-spec/paths/users/index.yaml | 8 + .../users/invite/accept/acceptInvite.yaml | 50 ++++ api-spec/paths/users/invite/accept/index.yaml | 2 + api-spec/paths/users/invite/index.yaml | 2 + api-spec/paths/users/invite/invite.yaml | 38 +++ api-spec/paths/users/me/getMe.yaml | 39 +++ api-spec/paths/users/me/index.yaml | 4 + .../paths/users/me/tfa/disable/index.yaml | 2 + .../users/me/tfa/disable/meTfaDisable.yaml | 29 +++ api-spec/paths/users/me/tfa/enable/index.yaml | 2 + .../users/me/tfa/enable/meTfaEnable.yaml | 29 +++ api-spec/paths/users/me/track/page/index.yaml | 2 + .../me/track/page/updateLastUsedPageMe.yaml | 23 ++ api-spec/paths/users/me/updateMe.yaml | 36 +++ api-spec/paths/users/updateUsers.yaml | 58 +++++ .../paths/utils/cache/clear/clear-cache.yaml | 23 ++ api-spec/paths/utils/cache/clear/index.yaml | 2 + .../utils/export/_collection/export.yaml | 66 +++++ .../paths/utils/export/_collection/index.yaml | 2 + .../utils/hash/generate/hash-generate.yaml | 44 ++++ api-spec/paths/utils/hash/generate/index.yaml | 2 + .../paths/utils/hash/verify/hash-verify.yaml | 47 ++++ api-spec/paths/utils/hash/verify/index.yaml | 2 + .../utils/import/_collection/import.yaml | 40 +++ .../paths/utils/import/_collection/index.yaml | 2 + api-spec/paths/utils/random/string/index.yaml | 2 + .../paths/utils/random/string/random.yaml | 40 +++ .../paths/utils/sort/_collection/index.yaml | 2 + .../paths/utils/sort/_collection/sort.yaml | 43 ++++ .../_id/compare/compareContentVersion.yaml | 34 +++ .../paths/versions/_id/compare/index.yaml | 2 + .../versions/_id/deleteContentVersion.yaml | 31 +++ .../paths/versions/_id/getContentVersion.yaml | 40 +++ api-spec/paths/versions/_id/index.yaml | 6 + .../paths/versions/_id/promote/index.yaml | 2 + .../_id/promote/promoteContentVersion.yaml | 47 ++++ api-spec/paths/versions/_id/save/index.yaml | 2 + .../versions/_id/save/saveContentVersion.yaml | 37 +++ .../versions/_id/updateContentVersion.yaml | 46 ++++ .../paths/versions/createContentVersion.yaml | 45 ++++ .../paths/versions/deleteContentVersions.yaml | 27 ++ .../paths/versions/getContentVersions.yaml | 48 ++++ api-spec/paths/versions/index.yaml | 8 + .../paths/versions/updateContentVersions.yaml | 59 +++++ .../paths/webhooks/_id/deleteWebhook.yaml | 31 +++ api-spec/paths/webhooks/_id/getWebhook.yaml | 38 +++ api-spec/paths/webhooks/_id/index.yaml | 6 + .../paths/webhooks/_id/updateWebhook.yaml | 72 ++++++ api-spec/paths/webhooks/createWebhook.yaml | 71 ++++++ api-spec/paths/webhooks/deleteWebhooks.yaml | 27 ++ api-spec/paths/webhooks/getWebhooks.yaml | 36 +++ api-spec/paths/webhooks/index.yaml | 8 + api-spec/paths/webhooks/updateWebhooks.yaml | 85 +++++++ 196 files changed, 6782 insertions(+), 115 deletions(-) create mode 100644 api-spec/paths/activity/_id/getActivity.yaml create mode 100644 api-spec/paths/activity/_id/index.yaml create mode 100644 api-spec/paths/activity/comment/_id/deleteComment.yaml create mode 100644 api-spec/paths/activity/comment/_id/index.yaml create mode 100644 api-spec/paths/activity/comment/_id/updateComment.yaml create mode 100644 api-spec/paths/activity/comment/createComment.yaml create mode 100644 api-spec/paths/activity/comment/index.yaml create mode 100644 api-spec/paths/activity/getActivities.yaml create mode 100644 api-spec/paths/activity/index.yaml create mode 100644 api-spec/paths/assets/_id/getAsset.yaml create mode 100644 api-spec/paths/assets/_id/index.yaml create mode 100644 api-spec/paths/auth/login/index.yaml create mode 100644 api-spec/paths/auth/login/login.yaml create mode 100644 api-spec/paths/auth/logout/index.yaml create mode 100644 api-spec/paths/auth/logout/logout.yaml create mode 100644 api-spec/paths/auth/oauth/_provider/index.yaml create mode 100644 api-spec/paths/auth/oauth/_provider/oauthProvider.yaml create mode 100644 api-spec/paths/auth/oauth/index.yaml create mode 100644 api-spec/paths/auth/oauth/oauth.yaml create mode 100644 api-spec/paths/auth/password/request/index.yaml create mode 100644 api-spec/paths/auth/password/request/passwordRequest.yaml create mode 100644 api-spec/paths/auth/password/reset/index.yaml create mode 100644 api-spec/paths/auth/password/reset/passwordReset.yaml create mode 100644 api-spec/paths/auth/refresh/index.yaml create mode 100644 api-spec/paths/auth/refresh/refresh.yaml create mode 100644 api-spec/paths/collections/_id/deleteCollection.yaml create mode 100644 api-spec/paths/collections/_id/getCollection.yaml create mode 100644 api-spec/paths/collections/_id/index.yaml create mode 100644 api-spec/paths/collections/_id/updateCollection.yaml create mode 100644 api-spec/paths/collections/createCollection.yaml create mode 100644 api-spec/paths/collections/getCollections.yaml create mode 100644 api-spec/paths/collections/index.yaml create mode 100644 api-spec/paths/extensions/_bundle/_name/index.yaml create mode 100644 api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml create mode 100644 api-spec/paths/extensions/_name/index.yaml create mode 100644 api-spec/paths/extensions/_name/updateExtensions.yaml create mode 100644 api-spec/paths/extensions/index.yaml create mode 100644 api-spec/paths/extensions/listExtensions.yaml create mode 100644 api-spec/paths/fields/_collection/_id/deleteField.yaml create mode 100644 api-spec/paths/fields/_collection/_id/getCollectionField.yaml create mode 100644 api-spec/paths/fields/_collection/_id/index.yaml create mode 100644 api-spec/paths/fields/_collection/_id/updateField.yaml create mode 100644 api-spec/paths/fields/_collection/createField.yaml create mode 100644 api-spec/paths/fields/_collection/getCollectionFields.yaml create mode 100644 api-spec/paths/fields/_collection/index.yaml create mode 100644 api-spec/paths/fields/getFields.yaml create mode 100644 api-spec/paths/fields/index.yaml create mode 100644 api-spec/paths/files/_id/deleteFile.yaml create mode 100644 api-spec/paths/files/_id/getFile.yaml create mode 100644 api-spec/paths/files/_id/index.yaml create mode 100644 api-spec/paths/files/_id/updateFile.yaml create mode 100644 api-spec/paths/files/createFile.yaml create mode 100644 api-spec/paths/files/deleteFiles.yaml create mode 100644 api-spec/paths/files/getFiles.yaml create mode 100644 api-spec/paths/files/index.yaml create mode 100644 api-spec/paths/files/updateFiles.yaml create mode 100644 api-spec/paths/flows/_id/deleteFlow.yaml create mode 100644 api-spec/paths/flows/_id/getFlow.yaml create mode 100644 api-spec/paths/flows/_id/index.yaml create mode 100644 api-spec/paths/flows/_id/updateFlow.yaml create mode 100644 api-spec/paths/flows/createFlow.yaml create mode 100644 api-spec/paths/flows/deleteFlows.yaml create mode 100644 api-spec/paths/flows/getFlows.yaml create mode 100644 api-spec/paths/flows/index.yaml create mode 100644 api-spec/paths/flows/updateFlows.yaml create mode 100644 api-spec/paths/folders/_id/deleteFolder.yaml create mode 100644 api-spec/paths/folders/_id/getFolder.yaml create mode 100644 api-spec/paths/folders/_id/index.yaml create mode 100644 api-spec/paths/folders/_id/updateFolder.yaml create mode 100644 api-spec/paths/folders/createFolder.yaml create mode 100644 api-spec/paths/folders/deleteFolders.yaml create mode 100644 api-spec/paths/folders/getFolders.yaml create mode 100644 api-spec/paths/folders/index.yaml create mode 100644 api-spec/paths/folders/updateFolders.yaml create mode 100644 api-spec/paths/operations/_id/deleteOperation.yaml create mode 100644 api-spec/paths/operations/_id/getOperation.yaml create mode 100644 api-spec/paths/operations/_id/index.yaml create mode 100644 api-spec/paths/operations/_id/updateOperation.yaml create mode 100644 api-spec/paths/operations/createOperation.yaml create mode 100644 api-spec/paths/operations/deleteOperations.yaml create mode 100644 api-spec/paths/operations/getOperations.yaml create mode 100644 api-spec/paths/operations/index.yaml create mode 100644 api-spec/paths/operations/updateOperations.yaml create mode 100644 api-spec/paths/permissions/_id/deletePermission.yaml create mode 100644 api-spec/paths/permissions/_id/updatePermission.yaml create mode 100644 api-spec/paths/permissions/deletePermissions.yaml create mode 100644 api-spec/paths/permissions/me/getMyPermissions.yaml create mode 100644 api-spec/paths/permissions/me/index.yaml create mode 100644 api-spec/paths/permissions/updatePermissions.yaml create mode 100644 api-spec/paths/presets/_id/deletePreset.yaml create mode 100644 api-spec/paths/presets/_id/getPreset.yaml create mode 100644 api-spec/paths/presets/_id/index.yaml create mode 100644 api-spec/paths/presets/_id/updatePreset.yaml create mode 100644 api-spec/paths/presets/createPreset.yaml create mode 100644 api-spec/paths/presets/deletePresets.yaml create mode 100644 api-spec/paths/presets/getPresets.yaml create mode 100644 api-spec/paths/presets/index.yaml create mode 100644 api-spec/paths/presets/updatePresets.yaml create mode 100644 api-spec/paths/relations/_id/deleteRelation.yaml create mode 100644 api-spec/paths/relations/_id/getRelation.yaml create mode 100644 api-spec/paths/relations/_id/index.yaml create mode 100644 api-spec/paths/relations/_id/updateRelation.yaml create mode 100644 api-spec/paths/relations/createRelation.yaml create mode 100644 api-spec/paths/relations/getRelations.yaml create mode 100644 api-spec/paths/relations/index.yaml create mode 100644 api-spec/paths/revisions/_id/getRevision.yaml create mode 100644 api-spec/paths/revisions/_id/index.yaml create mode 100644 api-spec/paths/revisions/getRevisions.yaml create mode 100644 api-spec/paths/revisions/index.yaml create mode 100644 api-spec/paths/roles/_id/deleteRole.yaml create mode 100644 api-spec/paths/roles/_id/getRole.yaml create mode 100644 api-spec/paths/roles/_id/index.yaml create mode 100644 api-spec/paths/roles/_id/updateRole.yaml create mode 100644 api-spec/paths/roles/createRole.yaml create mode 100644 api-spec/paths/roles/deleteRoles.yaml create mode 100644 api-spec/paths/roles/getRoles.yaml create mode 100644 api-spec/paths/roles/index.yaml create mode 100644 api-spec/paths/roles/updateRoles.yaml create mode 100644 api-spec/paths/schema/apply/index.yaml create mode 100644 api-spec/paths/schema/apply/schemaApply.yaml create mode 100644 api-spec/paths/schema/diff/index.yaml create mode 100644 api-spec/paths/schema/diff/schemaDiff.yaml create mode 100644 api-spec/paths/schema/snapshot/index.yaml create mode 100644 api-spec/paths/schema/snapshot/schemaSnapshot.yaml create mode 100644 api-spec/paths/server/info/index.yaml create mode 100644 api-spec/paths/server/info/serverInfo.yaml create mode 100644 api-spec/paths/server/ping/index.yaml create mode 100644 api-spec/paths/server/ping/ping.yaml create mode 100644 api-spec/paths/settings/getSettings.yaml create mode 100644 api-spec/paths/settings/index.yaml create mode 100644 api-spec/paths/settings/updateSetting.yaml create mode 100644 api-spec/paths/users/_id/deleteUser.yaml create mode 100644 api-spec/paths/users/_id/getUser.yaml create mode 100644 api-spec/paths/users/_id/index.yaml create mode 100644 api-spec/paths/users/_id/updateUser.yaml create mode 100644 api-spec/paths/users/createUser.yaml create mode 100644 api-spec/paths/users/deleteUsers.yaml create mode 100644 api-spec/paths/users/getUsers.yaml create mode 100644 api-spec/paths/users/index.yaml create mode 100644 api-spec/paths/users/invite/accept/acceptInvite.yaml create mode 100644 api-spec/paths/users/invite/accept/index.yaml create mode 100644 api-spec/paths/users/invite/index.yaml create mode 100644 api-spec/paths/users/invite/invite.yaml create mode 100644 api-spec/paths/users/me/getMe.yaml create mode 100644 api-spec/paths/users/me/index.yaml create mode 100644 api-spec/paths/users/me/tfa/disable/index.yaml create mode 100644 api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml create mode 100644 api-spec/paths/users/me/tfa/enable/index.yaml create mode 100644 api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml create mode 100644 api-spec/paths/users/me/track/page/index.yaml create mode 100644 api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml create mode 100644 api-spec/paths/users/me/updateMe.yaml create mode 100644 api-spec/paths/users/updateUsers.yaml create mode 100644 api-spec/paths/utils/cache/clear/clear-cache.yaml create mode 100644 api-spec/paths/utils/cache/clear/index.yaml create mode 100644 api-spec/paths/utils/export/_collection/export.yaml create mode 100644 api-spec/paths/utils/export/_collection/index.yaml create mode 100644 api-spec/paths/utils/hash/generate/hash-generate.yaml create mode 100644 api-spec/paths/utils/hash/generate/index.yaml create mode 100644 api-spec/paths/utils/hash/verify/hash-verify.yaml create mode 100644 api-spec/paths/utils/hash/verify/index.yaml create mode 100644 api-spec/paths/utils/import/_collection/import.yaml create mode 100644 api-spec/paths/utils/import/_collection/index.yaml create mode 100644 api-spec/paths/utils/random/string/index.yaml create mode 100644 api-spec/paths/utils/random/string/random.yaml create mode 100644 api-spec/paths/utils/sort/_collection/index.yaml create mode 100644 api-spec/paths/utils/sort/_collection/sort.yaml create mode 100644 api-spec/paths/versions/_id/compare/compareContentVersion.yaml create mode 100644 api-spec/paths/versions/_id/compare/index.yaml create mode 100644 api-spec/paths/versions/_id/deleteContentVersion.yaml create mode 100644 api-spec/paths/versions/_id/getContentVersion.yaml create mode 100644 api-spec/paths/versions/_id/index.yaml create mode 100644 api-spec/paths/versions/_id/promote/index.yaml create mode 100644 api-spec/paths/versions/_id/promote/promoteContentVersion.yaml create mode 100644 api-spec/paths/versions/_id/save/index.yaml create mode 100644 api-spec/paths/versions/_id/save/saveContentVersion.yaml create mode 100644 api-spec/paths/versions/_id/updateContentVersion.yaml create mode 100644 api-spec/paths/versions/createContentVersion.yaml create mode 100644 api-spec/paths/versions/deleteContentVersions.yaml create mode 100644 api-spec/paths/versions/getContentVersions.yaml create mode 100644 api-spec/paths/versions/index.yaml create mode 100644 api-spec/paths/versions/updateContentVersions.yaml create mode 100644 api-spec/paths/webhooks/_id/deleteWebhook.yaml create mode 100644 api-spec/paths/webhooks/_id/getWebhook.yaml create mode 100644 api-spec/paths/webhooks/_id/index.yaml create mode 100644 api-spec/paths/webhooks/_id/updateWebhook.yaml create mode 100644 api-spec/paths/webhooks/createWebhook.yaml create mode 100644 api-spec/paths/webhooks/deleteWebhooks.yaml create mode 100644 api-spec/paths/webhooks/getWebhooks.yaml create mode 100644 api-spec/paths/webhooks/index.yaml create mode 100644 api-spec/paths/webhooks/updateWebhooks.yaml diff --git a/api-spec/paths/activity/_id/getActivity.yaml b/api-spec/paths/activity/_id/getActivity.yaml new file mode 100644 index 00000000..12d27865 --- /dev/null +++ b/api-spec/paths/activity/_id/getActivity.yaml @@ -0,0 +1,41 @@ +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.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/activity.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readActivity } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readActivity(activity_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + activity_by_id(id: ID!): directus_activity + } diff --git a/api-spec/paths/activity/_id/index.yaml b/api-spec/paths/activity/_id/index.yaml new file mode 100644 index 00000000..985bf563 --- /dev/null +++ b/api-spec/paths/activity/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getActivity.yaml diff --git a/api-spec/paths/activity/comment/_id/deleteComment.yaml b/api-spec/paths/activity/comment/_id/deleteComment.yaml new file mode 100644 index 00000000..f9240bd9 --- /dev/null +++ b/api-spec/paths/activity/comment/_id/deleteComment.yaml @@ -0,0 +1,31 @@ +summary: Delete a Comment +description: Delete an existing comment. Deleted comments can not be retrieved. +operationId: deleteComment +parameters: +- $ref: ../../components/parameters.yaml#/Id +responses: + '203': + description: Deleted successfully + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteComment } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteComment(comment_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_comment(id: ID): delete_one + } diff --git a/api-spec/paths/activity/comment/_id/index.yaml b/api-spec/paths/activity/comment/_id/index.yaml new file mode 100644 index 00000000..71bd6c99 --- /dev/null +++ b/api-spec/paths/activity/comment/_id/index.yaml @@ -0,0 +1,4 @@ +patch: + $ref: updateComment.yaml +delete: + $ref: deleteComment.yaml diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/activity/comment/_id/updateComment.yaml new file mode 100644 index 00000000..873a8662 --- /dev/null +++ b/api-spec/paths/activity/comment/_id/updateComment.yaml @@ -0,0 +1,48 @@ +summary: Update a Comment +description: Update the content of an existing comment. +operationId: updateComment +parameters: +- $ref: ../../components/parameters.yaml#/Id +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + comment: + type: string + example: My updated comment +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/activity.yaml + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateComment } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request( + updateComment(comment_id, { + comment: comment_content, + }) + ); + - label: GraphQL + lang: GraphQL + source: | + diff --git a/api-spec/paths/activity/comment/createComment.yaml b/api-spec/paths/activity/comment/createComment.yaml new file mode 100644 index 00000000..3918cb2a --- /dev/null +++ b/api-spec/paths/activity/comment/createComment.yaml @@ -0,0 +1,63 @@ +summary: Create a Comment +description: Creates a new comment. +operationId: createComment +parameters: +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + required: + - collection + - item + - comment + properties: + collection: + type: string + example: projects + item: + type: integer + example: 1 + comment: + type: string + example: A new comment +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/activity.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createComment } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request( + createComment({ + collection: collection_name, + item: item_id, + comment: comment_content, + }) + ); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_comment(collection: String!, item: ID!, comment: String!): directus_activity + } diff --git a/api-spec/paths/activity/comment/index.yaml b/api-spec/paths/activity/comment/index.yaml new file mode 100644 index 00000000..df54e4de --- /dev/null +++ b/api-spec/paths/activity/comment/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: createComment.yaml diff --git a/api-spec/paths/activity/getActivities.yaml b/api-spec/paths/activity/getActivities.yaml new file mode 100644 index 00000000..f26fa1c0 --- /dev/null +++ b/api-spec/paths/activity/getActivities.yaml @@ -0,0 +1,48 @@ +summary: List Activity Actions +operationId: getActivities +description: Returns a list of activity actions. +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/activity.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readActivities } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readActivities(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + activity: [directus_activity] + } diff --git a/api-spec/paths/activity/index.yaml b/api-spec/paths/activity/index.yaml new file mode 100644 index 00000000..b05679c7 --- /dev/null +++ b/api-spec/paths/activity/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getActivities.yaml diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml new file mode 100644 index 00000000..f430e199 --- /dev/null +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -0,0 +1,44 @@ +summary: Get an Asset +tags: +- Assets +operationId: getAsset +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.yaml#/NotFoundError +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: + - label: GraphQL + lang: GraphQL + source: | diff --git a/api-spec/paths/assets/_id/index.yaml b/api-spec/paths/assets/_id/index.yaml new file mode 100644 index 00000000..1138df10 --- /dev/null +++ b/api-spec/paths/assets/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getAsset.yaml diff --git a/api-spec/paths/auth/login/index.yaml b/api-spec/paths/auth/login/index.yaml new file mode 100644 index 00000000..32141b2b --- /dev/null +++ b/api-spec/paths/auth/login/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: login.yaml diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml new file mode 100644 index 00000000..2e3cd93c --- /dev/null +++ b/api-spec/paths/auth/login/login.yaml @@ -0,0 +1,80 @@ +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... +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, authentication, rest, login } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(authentication('json')).with(rest()); + + // login using the authentication composable + const result = await client.login(email, password); + + // login http request + const result = await client.request(login(email, password)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + mutation { + auth_login(email: "user_email", password: "user_password") { + access_token + refresh_token + } + } diff --git a/api-spec/paths/auth/logout/index.yaml b/api-spec/paths/auth/logout/index.yaml new file mode 100644 index 00000000..565859e9 --- /dev/null +++ b/api-spec/paths/auth/logout/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: logout.yaml diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml new file mode 100644 index 00000000..0d7e2f20 --- /dev/null +++ b/api-spec/paths/auth/logout/logout.yaml @@ -0,0 +1,48 @@ +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 +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, authentication, rest, logout } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(authentication()).with(rest()); + + // logout using the authentication composable + const result = await client.logout(); + + // logout http request + const result = await client.request(logout(refresh_token)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + mutation { + auth_logout(refresh_token: "refresh_token") + } diff --git a/api-spec/paths/auth/oauth/_provider/index.yaml b/api-spec/paths/auth/oauth/_provider/index.yaml new file mode 100644 index 00000000..20997031 --- /dev/null +++ b/api-spec/paths/auth/oauth/_provider/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: oauthProvider.yaml diff --git a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml new file mode 100644 index 00000000..52346c61 --- /dev/null +++ b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml @@ -0,0 +1,36 @@ +summary: Authenticated using an OAuth provider +description: Start OAuth flow using the specified provider +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.yaml#/UnauthorizedError +tags: +- Authentication diff --git a/api-spec/paths/auth/oauth/index.yaml b/api-spec/paths/auth/oauth/index.yaml new file mode 100644 index 00000000..2cfea1e0 --- /dev/null +++ b/api-spec/paths/auth/oauth/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: oauth.yaml diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml new file mode 100644 index 00000000..c9319260 --- /dev/null +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -0,0 +1,36 @@ +summary: List OAuth Providers +tags: +- Authentication +operationId: oauth +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.yaml#/UnauthorizedError +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readProviders } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readProviders()); + - label: GraphQL + lang: GraphQL + source: | diff --git a/api-spec/paths/auth/password/request/index.yaml b/api-spec/paths/auth/password/request/index.yaml new file mode 100644 index 00000000..03ce820b --- /dev/null +++ b/api-spec/paths/auth/password/request/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: passwordRequest.yaml diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml new file mode 100644 index 00000000..d953e16a --- /dev/null +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -0,0 +1,37 @@ +summary: Request a Password Reset +tags: +- Authentication +operationId: passwordRequest +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.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, passwordRequest } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(passwordRequest(user_email)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + mutation { + auth_password_request(email: "user_email") + } diff --git a/api-spec/paths/auth/password/reset/index.yaml b/api-spec/paths/auth/password/reset/index.yaml new file mode 100644 index 00000000..ae11c481 --- /dev/null +++ b/api-spec/paths/auth/password/reset/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: passwordReset.yaml diff --git a/api-spec/paths/auth/password/reset/passwordReset.yaml b/api-spec/paths/auth/password/reset/passwordReset.yaml new file mode 100644 index 00000000..cd83daab --- /dev/null +++ b/api-spec/paths/auth/password/reset/passwordReset.yaml @@ -0,0 +1,44 @@ +summary: Reset a Password +tags: +- Authentication +operationId: passwordReset +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.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, passwordReset } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(passwordReset(reset_token, new_password)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + mutation { + auth_password_reset(token: "password_reset_token", password: "password") + } diff --git a/api-spec/paths/auth/refresh/index.yaml b/api-spec/paths/auth/refresh/index.yaml new file mode 100644 index 00000000..abe63c27 --- /dev/null +++ b/api-spec/paths/auth/refresh/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: refresh.yaml diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml new file mode 100644 index 00000000..c11b4cf3 --- /dev/null +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -0,0 +1,74 @@ +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.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, authentication, rest, refresh } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(authentication()).with(rest()); + + // refresh using the authentication composable + const result = await client.refresh(); + + // refresh http request using a cookie + const result = await client.request(refresh('cookie')); + + // refresh http request using json + const result = await client.request(refresh('json', refresh_token)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + mutation { + auth_refresh(refresh_token: "refresh_token", mode: refresh_mode) { + access_token + refresh_token + } + } diff --git a/api-spec/paths/collections/_id/deleteCollection.yaml b/api-spec/paths/collections/_id/deleteCollection.yaml new file mode 100644 index 00000000..5d257e45 --- /dev/null +++ b/api-spec/paths/collections/_id/deleteCollection.yaml @@ -0,0 +1,37 @@ +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.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Collections +parameters: +- name: id + in: path + required: true + description: Unique identifier of the collection. + schema: + type: string +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteCollection(collection_name)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_collections_item(collection: String!): delete_collection + } diff --git a/api-spec/paths/collections/_id/getCollection.yaml b/api-spec/paths/collections/_id/getCollection.yaml new file mode 100644 index 00000000..1237f991 --- /dev/null +++ b/api-spec/paths/collections/_id/getCollection.yaml @@ -0,0 +1,44 @@ +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.yaml#/Meta +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/collections.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Collections +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readCollection(collection_name)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + collections_by_name(name: String!): directus_collections + } diff --git a/api-spec/paths/collections/_id/index.yaml b/api-spec/paths/collections/_id/index.yaml new file mode 100644 index 00000000..63fd9689 --- /dev/null +++ b/api-spec/paths/collections/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getCollection.yaml +patch: + $ref: updateCollection.yaml +delete: + $ref: deleteCollection.yaml diff --git a/api-spec/paths/collections/_id/updateCollection.yaml b/api-spec/paths/collections/_id/updateCollection.yaml new file mode 100644 index 00000000..44d19349 --- /dev/null +++ b/api-spec/paths/collections/_id/updateCollection.yaml @@ -0,0 +1,122 @@ +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.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + meta: + type: object + description: Metadata of the collection. + properties: + icon: + type: string + description: Name of a Google Material Design Icon that's assigned + to this collection. + example: people + nullable: true + color: + type: string + description: Choose the color for the icon assigned to this collection. + example: '#6644ff' + nullable: true + note: + type: string + description: A note describing the collection. + example: + nullable: true + display_template: + type: string + description: Text representation of how items from this collection + are shown across the system. + example: + nullable: true + hidden: + type: boolean + description: Whether or not the collection is hidden from the navigation + in the admin app. + example: false + singleton: + type: boolean + description: Whether or not the collection is treated as a single + object. + example: false + translation: + type: string + description: Key value pairs of how to show this collection's name + in different languages in the admin app. + example: + nullable: true + versioning: + type: boolean + description: Whether or not Content Versioning is enabled for this + collection. + example: false + archive_field: + type: string + description: What field holds the archive value. + example: + nullable: true + archive_app_filter: + type: string + description: What value to use for "archived" items. + example: + nullable: true + archive_value: + type: string + description: What value to use to "unarchive" items. + example: + nullable: true + unarchive_value: + type: string + description: Whether or not to show the "archived" filter. + example: + nullable: true + sort_field: + type: string + description: The sort field in the collection. + example: + nullable: true +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/collections.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Collections +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateCollection(collection_name, partial_collection_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_collections_item(collection: String!, data: update_directus_collections_input!): directus_collections + } diff --git a/api-spec/paths/collections/createCollection.yaml b/api-spec/paths/collections/createCollection.yaml new file mode 100644 index 00000000..8b2d2ea4 --- /dev/null +++ b/api-spec/paths/collections/createCollection.yaml @@ -0,0 +1,121 @@ +summary: Create a Collection +description: Create a new collection in Directus. +operationId: createCollection +parameters: +- $ref: ../../components/parameters.yaml#/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: + type: string + description: Name of a Google Material Design Icon that's assigned to + this collection. + example: people + nullable: true + note: + type: string + description: A note describing the collection. + example: + nullable: true + display_template: + type: string + description: Text representation of how items from this collection are + shown across the system. + example: + nullable: true + hidden: + type: boolean + description: Whether or not the collection is hidden from the navigation + in the admin app. + example: false + singleton: + type: boolean + description: Whether or not the collection is treated as a single object. + example: false + translation: + type: string + description: Key value pairs of how to show this collection's name in + different languages in the admin app. + example: + nullable: true + versioning: + type: boolean + description: Whether or not Content Versioning is enabled for this collection. + example: false + archive_field: + type: string + description: What field holds the archive value. + example: + nullable: true + archive_app_filter: + type: string + description: What value to use for "archived" items. + example: + nullable: true + archive_value: + type: string + description: What value to use to "unarchive" items. + example: + nullable: true + unarchive_value: + type: string + description: Whether or not to show the "archived" filter. + example: + nullable: true + sort_field: + type: string + description: The sort field in the collection. + example: + nullable: true +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/collections.yaml + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Collections +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request( + createCollection(collection_object) + ); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_collections_item(data: directus_collections): directus_collections + } diff --git a/api-spec/paths/collections/getCollections.yaml b/api-spec/paths/collections/getCollections.yaml new file mode 100644 index 00000000..82ae6999 --- /dev/null +++ b/api-spec/paths/collections/getCollections.yaml @@ -0,0 +1,41 @@ +summary: List Collections +description: Returns a list of the collections available in the project. +operationId: getCollections +parameters: +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/collections.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Collections +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readCollections } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readCollections()); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + collections: [directus_collections] + } diff --git a/api-spec/paths/collections/index.yaml b/api-spec/paths/collections/index.yaml new file mode 100644 index 00000000..3e1ce06f --- /dev/null +++ b/api-spec/paths/collections/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getCollections.yaml +post: + $ref: createCollection.yaml diff --git a/api-spec/paths/extensions/_bundle/_name/index.yaml b/api-spec/paths/extensions/_bundle/_name/index.yaml new file mode 100644 index 00000000..21c418d0 --- /dev/null +++ b/api-spec/paths/extensions/_bundle/_name/index.yaml @@ -0,0 +1,2 @@ +patch: + $ref: updateExtensionBundle.yaml diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml new file mode 100644 index 00000000..d0eca72c --- /dev/null +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -0,0 +1,45 @@ +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: + type: boolean + description: Whether or not the extension is enabled. + example: true +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/extensions.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Extensions diff --git a/api-spec/paths/extensions/_name/index.yaml b/api-spec/paths/extensions/_name/index.yaml new file mode 100644 index 00000000..1b969eb4 --- /dev/null +++ b/api-spec/paths/extensions/_name/index.yaml @@ -0,0 +1,2 @@ +patch: + $ref: updateExtensions.yaml diff --git a/api-spec/paths/extensions/_name/updateExtensions.yaml b/api-spec/paths/extensions/_name/updateExtensions.yaml new file mode 100644 index 00000000..fe5b6b09 --- /dev/null +++ b/api-spec/paths/extensions/_name/updateExtensions.yaml @@ -0,0 +1,57 @@ +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: + type: boolean + description: Whether or not the extension is enabled. + example: true +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/extensions.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Extensions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateExtension } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateExtension(bundle, name, partial_extension_object)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_extensions_item(bundle: String, name: String!, data: update_directus_extensions_input!): directus_extensions + } diff --git a/api-spec/paths/extensions/index.yaml b/api-spec/paths/extensions/index.yaml new file mode 100644 index 00000000..889d8e08 --- /dev/null +++ b/api-spec/paths/extensions/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: listExtensions.yaml diff --git a/api-spec/paths/extensions/listExtensions.yaml b/api-spec/paths/extensions/listExtensions.yaml new file mode 100644 index 00000000..c41ec8ff --- /dev/null +++ b/api-spec/paths/extensions/listExtensions.yaml @@ -0,0 +1,36 @@ +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.yaml + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Extensions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readExtensions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readExtensions()); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + extensions: [extension] + } \ No newline at end of file diff --git a/api-spec/paths/fields/_collection/_id/deleteField.yaml b/api-spec/paths/fields/_collection/_id/deleteField.yaml new file mode 100644 index 00000000..3122c7db --- /dev/null +++ b/api-spec/paths/fields/_collection/_id/deleteField.yaml @@ -0,0 +1,42 @@ +summary: Delete a Field +description: Delete an existing field. +operationId: deleteField +responses: + '200': + description: Successful request + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/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 +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteField } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteField(collection_name, field_name)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_fields_item(collection: String!, field: String!): delete_field + } diff --git a/api-spec/paths/fields/_collection/_id/getCollectionField.yaml b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml new file mode 100644 index 00000000..b7a6b7f9 --- /dev/null +++ b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml @@ -0,0 +1,49 @@ +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.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/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 +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readField } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readField(collection_name, field_name)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + fields_by_name(collection: String!, field: String!): directus_fields + } diff --git a/api-spec/paths/fields/_collection/_id/index.yaml b/api-spec/paths/fields/_collection/_id/index.yaml new file mode 100644 index 00000000..bc9b50f6 --- /dev/null +++ b/api-spec/paths/fields/_collection/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getCollectionField.yaml +patch: + $ref: updateField.yaml +delete: + $ref: deleteField.yaml diff --git a/api-spec/paths/fields/_collection/_id/updateField.yaml b/api-spec/paths/fields/_collection/_id/updateField.yaml new file mode 100644 index 00000000..8535b272 --- /dev/null +++ b/api-spec/paths/fields/_collection/_id/updateField.yaml @@ -0,0 +1,223 @@ +summary: Update a Field +description: Update an existing field. +operationId: updateField +requestBody: + content: + application/json: + schema: + type: object + properties: + type: + description: Directus specific data type. Used to cast values in the API. + example: integer + type: string + field: + type: string + description: Unique name of the field. Field name is unique within the + collection. + example: id + schema: + type: object + description: The schema info. + properties: + type: + description: The type of the field. + example: string + type: string + name: + type: string + description: The name of the field. + example: title + table: + type: string + description: The collection of the field. + example: posts + default_value: + type: string + description: The default value of the field. + example: + nullable: true + max_length: + type: integer + description: The max length of the field. + example: + nullable: true + is_nullable: + type: boolean + description: If the field is nullable. + example: false + is_primary_key: + type: boolean + description: If the field is primary key. + example: false + has_auto_increment: + type: boolean + description: If the field has auto increment. + example: false + foreign_key_column: + type: string + description: Related column from the foreign key constraint. + example: + nullable: true + foreign_key_table: + type: string + description: Related table from the foreign key constraint. + example: + nullable: true + comment: + type: string + description: Comment as saved in the database. + example: + nullable: true + schema: + type: string + description: Database schema (pg only). + example: public + foreign_key_schema: + type: string + description: Related schema from the foreign key constraint (pg only). + example: + nullable: true + meta: + type: object + description: The meta info. + nullable: true + properties: + id: + type: integer + description: Unique identifier for the field in the `directus_fields` + collection. + example: 3 + collection: + type: string + description: Unique name of the collection this field is in. + example: posts + field: + type: string + description: Unique name of the field. Field name is unique within + the collection. + example: title + special: + type: array + description: Transformation flag for field + example: + items: + type: string + nullable: true + system-interface: + type: string + description: What interface is used in the admin app to edit the value + for this field. + example: primary-key + nullable: true + options: + type: object + description: Options for the interface that's used. This format is + based on the individual interface. + example: + nullable: true + display: + type: string + description: What display is used in the admin app to display the + value for this field. + example: + nullable: true + display_options: + type: object + description: Options for the display that's used. This format is based + on the individual display. + example: + nullable: true + locked: + type: boolean + description: If the field can be altered by the end user. Directus + system fields have this value set to `true`. + example: true + readonly: + type: boolean + description: Prevents the user from editing the value in the field. + example: false + hidden: + type: boolean + description: If this field should be hidden. + example: true + sort: + type: integer + description: Sort order of this field on the edit page of the admin + app. + example: 1 + nullable: true + width: + type: string + description: Width of the field on the edit form. + example: + nullable: true + enum: + - half + - half-left + - half-right + - full + - fill + - + group: + type: integer + description: What field group this field is part of. + example: + nullable: true + translation: + type: object + description: 'Key value pair of `: ` that allows + the user to change the displayed name of the field in the admin + app.' + example: + nullable: true + note: + type: string + description: A user provided note for the field. Will be rendered + alongside the interface on the edit page. + example: '' + nullable: true +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/fields.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/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 +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateField } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateField(collection_name, field_name, partial_field_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_fields_item(collection: String!, field: String!, data: update_directus_fields_input!): directus_fields + } diff --git a/api-spec/paths/fields/_collection/createField.yaml b/api-spec/paths/fields/_collection/createField.yaml new file mode 100644 index 00000000..3ca97ace --- /dev/null +++ b/api-spec/paths/fields/_collection/createField.yaml @@ -0,0 +1,230 @@ +summary: Create Field in Collection +description: Create a new field in a given collection. +operationId: createField +requestBody: + content: + application/json: + schema: + type: object + required: + - field + - datatype + - type + - length + properties: + type: + description: Directus specific data type. Used to cast values in the API. + example: integer + type: string + field: + type: string + description: Unique name of the field. Field name is unique within the + collection. + example: id + schema: + type: object + description: The schema info. + properties: + type: + description: The type of the field. + example: string + type: string + name: + type: string + description: The name of the field. + example: title + table: + type: string + description: The collection of the field. + example: posts + default_value: + type: string + description: The default value of the field. + example: + nullable: true + max_length: + type: integer + description: The max length of the field. + example: + nullable: true + is_nullable: + type: boolean + description: If the field is nullable. + example: false + is_primary_key: + type: boolean + description: If the field is primary key. + example: false + has_auto_increment: + type: boolean + description: If the field has auto increment. + example: false + foreign_key_column: + type: string + description: Related column from the foreign key constraint. + example: + nullable: true + foreign_key_table: + type: string + description: Related table from the foreign key constraint. + example: + nullable: true + comment: + type: string + description: Comment as saved in the database. + example: + nullable: true + schema: + type: string + description: Database schema (pg only). + example: public + foreign_key_schema: + type: string + description: Related schema from the foreign key constraint (pg only). + example: + nullable: true + meta: + type: object + description: The meta info. + nullable: true + properties: + id: + type: integer + description: Unique identifier for the field in the `directus_fields` + collection. + example: 3 + collection: + type: string + description: Unique name of the collection this field is in. + example: posts + field: + type: string + description: Unique name of the field. Field name is unique within + the collection. + example: title + special: + type: array + description: Transformation flag for field + example: + items: + type: string + nullable: true + system-interface: + type: string + description: What interface is used in the admin app to edit the value + for this field. + example: primary-key + nullable: true + options: + type: object + description: Options for the interface that's used. This format is + based on the individual interface. + example: + nullable: true + display: + type: string + description: What display is used in the admin app to display the + value for this field. + example: + nullable: true + display_options: + type: object + description: Options for the display that's used. This format is based + on the individual display. + example: + nullable: true + locked: + type: boolean + description: If the field can be altered by the end user. Directus + system fields have this value set to `true`. + example: true + readonly: + type: boolean + description: Prevents the user from editing the value in the field. + example: false + hidden: + type: boolean + description: If this field should be hidden. + example: true + sort: + type: integer + description: Sort order of this field on the edit page of the admin + app. + example: 1 + nullable: true + width: + type: string + description: Width of the field on the edit form. + example: + nullable: true + enum: + - half + - half-left + - half-right + - full + - fill + - + group: + type: integer + description: What field group this field is part of. + example: + nullable: true + translation: + type: object + description: 'Key value pair of `: ` that allows + the user to change the displayed name of the field in the admin + app.' + example: + nullable: true + note: + type: string + description: A user provided note for the field. Will be rendered + alongside the interface on the edit page. + example: '' + nullable: true +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/fields.yaml + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Fields +parameters: +- description: Unique identifier of the collection the item resides in. + in: path + name: collection + required: true + schema: + type: string +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createField } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request( + createField(collection_name, { + field: field_name, + type: field_type, + field_field: value, + }) + ); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_fields_item(collection: String!, data: create_directus_fields_input!): directus_fields + } diff --git a/api-spec/paths/fields/_collection/getCollectionFields.yaml b/api-spec/paths/fields/_collection/getCollectionFields.yaml new file mode 100644 index 00000000..c93947a1 --- /dev/null +++ b/api-spec/paths/fields/_collection/getCollectionFields.yaml @@ -0,0 +1,46 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Fields +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFieldsByCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFieldsByCollection(collection_name)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + fields_in_collection(collection: String!): directus_fields + } diff --git a/api-spec/paths/fields/_collection/index.yaml b/api-spec/paths/fields/_collection/index.yaml new file mode 100644 index 00000000..2f3bc207 --- /dev/null +++ b/api-spec/paths/fields/_collection/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getCollectionFields.yaml +post: + $ref: createField.yaml diff --git a/api-spec/paths/fields/getFields.yaml b/api-spec/paths/fields/getFields.yaml new file mode 100644 index 00000000..ee2ddc06 --- /dev/null +++ b/api-spec/paths/fields/getFields.yaml @@ -0,0 +1,41 @@ +summary: List All Fields +description: Returns a list of the fields available in the project. +operationId: getFields +parameters: +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Sort +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/fields.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Fields +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFields } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFields()); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + fields: [directus_fields] + } diff --git a/api-spec/paths/fields/index.yaml b/api-spec/paths/fields/index.yaml new file mode 100644 index 00000000..bee5b769 --- /dev/null +++ b/api-spec/paths/fields/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getFields.yaml diff --git a/api-spec/paths/files/_id/deleteFile.yaml b/api-spec/paths/files/_id/deleteFile.yaml new file mode 100644 index 00000000..bc3eb92f --- /dev/null +++ b/api-spec/paths/files/_id/deleteFile.yaml @@ -0,0 +1,29 @@ +summary: Delete a File +description: Delete an existing file. +tags: +- Files +operationId: deleteFile +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFile } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFile(file_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_files_item(id: ID!): delete_one + } diff --git a/api-spec/paths/files/_id/getFile.yaml b/api-spec/paths/files/_id/getFile.yaml new file mode 100644 index 00000000..3bf639db --- /dev/null +++ b/api-spec/paths/files/_id/getFile.yaml @@ -0,0 +1,36 @@ +summary: Retrieve a Files +description: Retrieve a single file by unique identifier. +tags: +- Files +operationId: getFile +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/files.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFiles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFile(file_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + files_by_id(id: ID!): directus_files + } diff --git a/api-spec/paths/files/_id/index.yaml b/api-spec/paths/files/_id/index.yaml new file mode 100644 index 00000000..141ffa40 --- /dev/null +++ b/api-spec/paths/files/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getFile.yaml +patch: + $ref: updateFile.yaml +delete: + $ref: deleteFile.yaml diff --git a/api-spec/paths/files/_id/updateFile.yaml b/api-spec/paths/files/_id/updateFile.yaml new file mode 100644 index 00000000..094bbcb4 --- /dev/null +++ b/api-spec/paths/files/_id/updateFile.yaml @@ -0,0 +1,105 @@ +summary: Update a File +description: Update an existing file, and/or replace it's file contents. +tags: +- Files +operationId: updateFile +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + multipart/data: + schema: + type: object + required: + - file + properties: + title: + type: string + description: Title for the file. Is extracted from the filename on upload, + but can be edited by the user. + example: User Avatar + filename_download: + type: string + description: Preferred filename when file is downloaded. + description: + type: string + description: Description for the file. + nullable: true + folder: + description: Virtual folder where this file resides in. + example: + oneOf: + - type: string + - $ref: ../../components/schemas/folders.yaml + nullable: true + tags: + type: array + description: Tags for the file. Is automatically populated based on Exif + data for images. + nullable: true + items: + type: string + file: + description: File contents. + format: binary + application/json: + schema: + type: object + properties: + title: + type: string + description: Title for the file. Is extracted from the filename on upload, + but can be edited by the user. + example: User Avatar + filename_download: + type: string + description: Preferred filename when file is downloaded. + description: + type: string + description: Description for the file. + nullable: true + folder: + description: Virtual folder where this file resides in. + example: + oneOf: + - type: string + - $ref: ../../components/schemas/folders.yaml + nullable: true + tags: + type: array + description: Tags for the file. Is automatically populated based on Exif + data for images. + nullable: true + items: + type: string +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/files.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFile } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFile(file_id, partial_file_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_files_item(id: ID!, data: update_directus_files_input!): directus_files + } diff --git a/api-spec/paths/files/createFile.yaml b/api-spec/paths/files/createFile.yaml new file mode 100644 index 00000000..4dd9ab4c --- /dev/null +++ b/api-spec/paths/files/createFile.yaml @@ -0,0 +1,25 @@ +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.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/files/deleteFiles.yaml b/api-spec/paths/files/deleteFiles.yaml new file mode 100644 index 00000000..147feea5 --- /dev/null +++ b/api-spec/paths/files/deleteFiles.yaml @@ -0,0 +1,31 @@ +summary: Delete Multiple Files +description: Delete multiple existing files. +tags: +- Files +operationId: deleteFiles +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFiles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFiles(file_id_array)); + + //or + + const result = await client.request(deleteFiles(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_files_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/files/getFiles.yaml b/api-spec/paths/files/getFiles.yaml new file mode 100644 index 00000000..7cb9111e --- /dev/null +++ b/api-spec/paths/files/getFiles.yaml @@ -0,0 +1,46 @@ +summary: List Files +description: List the files. +tags: +- Files +operationId: getFiles +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/files.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFiles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFile(file_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + files_by_id(id: ID!): directus_files + } diff --git a/api-spec/paths/files/index.yaml b/api-spec/paths/files/index.yaml new file mode 100644 index 00000000..f664e543 --- /dev/null +++ b/api-spec/paths/files/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getFiles.yaml +post: + $ref: createFile.yaml +patch: + $ref: updateFiles.yaml +delete: + $ref: deleteFiles.yaml diff --git a/api-spec/paths/files/updateFiles.yaml b/api-spec/paths/files/updateFiles.yaml new file mode 100644 index 00000000..61e7068d --- /dev/null +++ b/api-spec/paths/files/updateFiles.yaml @@ -0,0 +1,61 @@ +summary: Update Multiple Files +description: Update multiple files at the same time. +tags: +- Files +operationId: updateFiles +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFiles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFiles(file_id_array, partial_file_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_files_items(ids: [ID!]!, data: update_directus_files!): [directus_files] + } diff --git a/api-spec/paths/flows/_id/deleteFlow.yaml b/api-spec/paths/flows/_id/deleteFlow.yaml new file mode 100644 index 00000000..222e6227 --- /dev/null +++ b/api-spec/paths/flows/_id/deleteFlow.yaml @@ -0,0 +1,31 @@ +summary: Delete a Flow +description: Delete an existing flow +operationId: deleteFlow +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Flows +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFlow(flow_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_flows_item(id: ID!): delete_one + } diff --git a/api-spec/paths/flows/_id/getFlow.yaml b/api-spec/paths/flows/_id/getFlow.yaml new file mode 100644 index 00000000..e9a48a32 --- /dev/null +++ b/api-spec/paths/flows/_id/getFlow.yaml @@ -0,0 +1,38 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Flows +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFlow(flow_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + flows_by_id(id: ID!): directus_flows + } diff --git a/api-spec/paths/flows/_id/index.yaml b/api-spec/paths/flows/_id/index.yaml new file mode 100644 index 00000000..1a52dac0 --- /dev/null +++ b/api-spec/paths/flows/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getFlow.yaml +patch: + $ref: updateFlow.yaml +delete: + $ref: deleteFlow.yaml diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml new file mode 100644 index 00000000..e37198cc --- /dev/null +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -0,0 +1,46 @@ +summary: Update a Flow +description: Update an existing flow +operationId: updateFlow +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/flows.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/flows.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFlow(flow_id, partial_flow_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_flows_item(id: ID!, data: update_directus_flows_input): directus_flows + } diff --git a/api-spec/paths/flows/createFlow.yaml b/api-spec/paths/flows/createFlow.yaml new file mode 100644 index 00000000..b563c63a --- /dev/null +++ b/api-spec/paths/flows/createFlow.yaml @@ -0,0 +1,45 @@ +summary: Create a Flow +description: Create a new flow. +operationId: createFlow +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/flows.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/flows.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createFlow(flow_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_flows_item(data: create_directus_flows_input!): directus_flows + } diff --git a/api-spec/paths/flows/deleteFlows.yaml b/api-spec/paths/flows/deleteFlows.yaml new file mode 100644 index 00000000..dfc190ba --- /dev/null +++ b/api-spec/paths/flows/deleteFlows.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Flows +description: Delete multiple existing flows. +tags: +- Flows +operationId: deleteFlows +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFlows } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFlows(flow_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_flows_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/flows/getFlows.yaml b/api-spec/paths/flows/getFlows.yaml new file mode 100644 index 00000000..89350279 --- /dev/null +++ b/api-spec/paths/flows/getFlows.yaml @@ -0,0 +1,40 @@ +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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFlows } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request(readFlows(query)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + flows: [directus_flows] + } diff --git a/api-spec/paths/flows/index.yaml b/api-spec/paths/flows/index.yaml new file mode 100644 index 00000000..125ad4f6 --- /dev/null +++ b/api-spec/paths/flows/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getFlows.yaml +post: + $ref: createFlow.yaml +patch: + $ref: updateFlows.yaml +delete: + $ref: deleteFlows.yaml diff --git a/api-spec/paths/flows/updateFlows.yaml b/api-spec/paths/flows/updateFlows.yaml new file mode 100644 index 00000000..0fbcae4c --- /dev/null +++ b/api-spec/paths/flows/updateFlows.yaml @@ -0,0 +1,59 @@ +summary: Update Multiple Flows +description: Update multiple flows at the same time. +tags: +- Flows +operationId: updateFlows +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + anyOf: + - $ref: ../../components/schemas/flows.yaml + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFlows } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFlows(flow_id_array, partial_flow_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_flows_items(ids: [ID!]!, data: update_directus_flows_input): [directus_flows] + } diff --git a/api-spec/paths/folders/_id/deleteFolder.yaml b/api-spec/paths/folders/_id/deleteFolder.yaml new file mode 100644 index 00000000..bfdf3216 --- /dev/null +++ b/api-spec/paths/folders/_id/deleteFolder.yaml @@ -0,0 +1,31 @@ +summary: Delete a Folder +description: Delete an existing folder +operationId: deleteFolder +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Folders +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFolder } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFolder(folder_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_folders_item(id: ID!): delete_one + } diff --git a/api-spec/paths/folders/_id/getFolder.yaml b/api-spec/paths/folders/_id/getFolder.yaml new file mode 100644 index 00000000..fba8acea --- /dev/null +++ b/api-spec/paths/folders/_id/getFolder.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a Folder +description: Retrieve a single folder by unique identifier. +operationId: getFolder +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/folders.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Folders +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFolder } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFolder(folder_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + folders_by_id(id: ID!): directus_folders + } diff --git a/api-spec/paths/folders/_id/index.yaml b/api-spec/paths/folders/_id/index.yaml new file mode 100644 index 00000000..6501c995 --- /dev/null +++ b/api-spec/paths/folders/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getFolder.yaml +patch: + $ref: updateFolder.yaml +delete: + $ref: deleteFolder.yaml diff --git a/api-spec/paths/folders/_id/updateFolder.yaml b/api-spec/paths/folders/_id/updateFolder.yaml new file mode 100644 index 00000000..9cfe4c64 --- /dev/null +++ b/api-spec/paths/folders/_id/updateFolder.yaml @@ -0,0 +1,54 @@ +summary: Update a Folder +description: Update an existing folder +operationId: updateFolder +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Folders +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFolder } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFolder(folder_id, partial_folder_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_folders_item(id: ID!, data: update_directus_folders_input): directus_folders + } diff --git a/api-spec/paths/folders/createFolder.yaml b/api-spec/paths/folders/createFolder.yaml new file mode 100644 index 00000000..f4c2e56a --- /dev/null +++ b/api-spec/paths/folders/createFolder.yaml @@ -0,0 +1,55 @@ +summary: Create a Folder +description: Create a new folder. +operationId: createFolder +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + name: + type: string + example: Amsterdam + description: Name of the folder. + parent: + type: integer + description: Unique identifier of the parent folder. This allows for nested + folders. + required: + - name +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/folders.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Folders +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createFolder } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createFolder(folder_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_folders_item(data: create_directus_folders_input): directus_folders + } diff --git a/api-spec/paths/folders/deleteFolders.yaml b/api-spec/paths/folders/deleteFolders.yaml new file mode 100644 index 00000000..174aef7e --- /dev/null +++ b/api-spec/paths/folders/deleteFolders.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Folders +description: Delete multiple existing folders. +tags: +- Folders +operationId: deleteFolders +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteFolders } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteFolders(folder_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_folders_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/folders/getFolders.yaml b/api-spec/paths/folders/getFolders.yaml new file mode 100644 index 00000000..49c4176f --- /dev/null +++ b/api-spec/paths/folders/getFolders.yaml @@ -0,0 +1,48 @@ +summary: List Folders +description: List the folders. +operationId: getFolders +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/folders.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Folders +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readFolders } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readFolders(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + folders: directus_folders + } diff --git a/api-spec/paths/folders/index.yaml b/api-spec/paths/folders/index.yaml new file mode 100644 index 00000000..24b4cb99 --- /dev/null +++ b/api-spec/paths/folders/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getFolders.yaml +post: + $ref: createFolder.yaml +patch: + $ref: updateFolders.yaml +delete: + $ref: deleteFolders.yaml diff --git a/api-spec/paths/folders/updateFolders.yaml b/api-spec/paths/folders/updateFolders.yaml new file mode 100644 index 00000000..00628577 --- /dev/null +++ b/api-spec/paths/folders/updateFolders.yaml @@ -0,0 +1,69 @@ +summary: Update Multiple Folders +description: Update multiple folders at the same time. +tags: +- Folders +operationId: updateFolders +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + name: + type: string + example: Amsterdam + description: Name of the folder. + parent: + type: integer + description: Unique identifier of the parent folder. This allows for + nested folders. + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateFolders } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateFolders(folder_id_array, partial_folder_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_folders_items(ids: [ID!]!, data: update_directus_folders_input): [directus_folders] + } diff --git a/api-spec/paths/operations/_id/deleteOperation.yaml b/api-spec/paths/operations/_id/deleteOperation.yaml new file mode 100644 index 00000000..fadf82e7 --- /dev/null +++ b/api-spec/paths/operations/_id/deleteOperation.yaml @@ -0,0 +1,31 @@ +summary: Delete an Operation +description: Delete an existing operation +operationId: deleteOperation +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Operations +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteOperation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteOperation(operation_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_operations_item(id: ID!): delete_one + } diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml new file mode 100644 index 00000000..5e5e0c4f --- /dev/null +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -0,0 +1,36 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Operations +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readOperation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readOperation(operation_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + operations_by_id(id: ID!): directus_operations + } diff --git a/api-spec/paths/operations/_id/index.yaml b/api-spec/paths/operations/_id/index.yaml new file mode 100644 index 00000000..b42cc849 --- /dev/null +++ b/api-spec/paths/operations/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getOperation.yaml +patch: + $ref: updateOperation.yaml +delete: + $ref: deleteOperation.yaml diff --git a/api-spec/paths/operations/_id/updateOperation.yaml b/api-spec/paths/operations/_id/updateOperation.yaml new file mode 100644 index 00000000..b091c256 --- /dev/null +++ b/api-spec/paths/operations/_id/updateOperation.yaml @@ -0,0 +1,46 @@ +summary: Update an Operation +description: Update an existing operation +operationId: updateOperation +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/operations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/operations.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Operations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateOperation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateOperation(operation_id, partial_operation_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_operations_item(id: ID!, data: update_directus_operations_input): directus_operations + } diff --git a/api-spec/paths/operations/createOperation.yaml b/api-spec/paths/operations/createOperation.yaml new file mode 100644 index 00000000..d1cf4774 --- /dev/null +++ b/api-spec/paths/operations/createOperation.yaml @@ -0,0 +1,45 @@ +summary: Create an Operation +description: Create a new operation. +operationId: createOperation +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/operations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/operations.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Operations +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createOperations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createOperations(operations_object_array)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_operations_items(data: [create_directus_operations_input!]!): [directus_operations] + } diff --git a/api-spec/paths/operations/deleteOperations.yaml b/api-spec/paths/operations/deleteOperations.yaml new file mode 100644 index 00000000..b5bd9ffd --- /dev/null +++ b/api-spec/paths/operations/deleteOperations.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Operations +description: Delete multiple existing operations. +tags: +- Operations +operationId: deleteOperations +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteOperations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteOperations(operations_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_operations_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml new file mode 100644 index 00000000..3e7aebd2 --- /dev/null +++ b/api-spec/paths/operations/getOperations.yaml @@ -0,0 +1,40 @@ +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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Operations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readOperations } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request(readOperations(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + operations: [directus_operations] + } diff --git a/api-spec/paths/operations/index.yaml b/api-spec/paths/operations/index.yaml new file mode 100644 index 00000000..8d3c9f9b --- /dev/null +++ b/api-spec/paths/operations/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getOperations.yaml +post: + $ref: createOperation.yaml +patch: + $ref: updateOperations.yaml +delete: + $ref: deleteOperations.yaml diff --git a/api-spec/paths/operations/updateOperations.yaml b/api-spec/paths/operations/updateOperations.yaml new file mode 100644 index 00000000..0ff4f637 --- /dev/null +++ b/api-spec/paths/operations/updateOperations.yaml @@ -0,0 +1,57 @@ +summary: Update Multiple Operations +description: Update multiple operations at the same time. +tags: +- Operations +operationId: updateOperations +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + anyOf: + - $ref: ../../components/schemas/operations.yaml + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateOperations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateOperations(operations_id_array, partial_operations_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_operations_items(ids: [ID!]!, data: update_directus_operations_input): [directus_operations] + } diff --git a/api-spec/paths/permissions/_id/deletePermission.yaml b/api-spec/paths/permissions/_id/deletePermission.yaml new file mode 100644 index 00000000..11037613 --- /dev/null +++ b/api-spec/paths/permissions/_id/deletePermission.yaml @@ -0,0 +1,31 @@ +summary: Delete a Permission +description: Delete an existing permission +operationId: deletePermission +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Permissions +parameters: +- $ref: ../../../components/parameters.yaml#/Id +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePermission } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePermission(permission_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_permissions_item(id: ID!): delete_one + } diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index 9cca894b..3e010fc4 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -2,11 +2,11 @@ summary: Retrieve a Permission description: Retrieve a single permissions object by unique identifier. operationId: getPermission parameters: - - "$ref": "../../../components/parameters.yaml#/Id" - - "$ref": "../../../components/parameters.yaml#/Fields" - - "$ref": "../../../components/parameters.yaml#/Meta" +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta responses: - "200": + '200': description: Successful request content: application/json: @@ -14,26 +14,27 @@ responses: type: object properties: data: - "$ref": "../../../components/schemas/permissions.yaml" - "401": - "$ref": "../../../components/responses.yaml#/UnauthorizedError" - "404": - "$ref": "../../../components/responses.yaml#/NotFoundError" + $ref: ../../../components/schemas/permissions.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError tags: - - Permissions +- Permissions x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, readPermission } from '@directus/sdk'; - const client = createDirectus('directus_project_url').with(rest()); +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPermission } from '@directus/sdk'; - const result = await client.request(readPermission(permission_id, query_object)); - - label: GraphQL - lang: GraphQL - source: | - GET /graphql/system + const client = createDirectus('directus_project_url').with(rest()); - type Query { - permissions_by_id(id: ID!): directus_permissions - } + const result = await client.request(readPermission(permission_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + permissions_by_id(id: ID!): directus_permissions + } diff --git a/api-spec/paths/permissions/_id/index.yaml b/api-spec/paths/permissions/_id/index.yaml index a57be843..9f4e4d71 100644 --- a/api-spec/paths/permissions/_id/index.yaml +++ b/api-spec/paths/permissions/_id/index.yaml @@ -1,2 +1,6 @@ get: - $ref: getPermission.yaml \ No newline at end of file + $ref: getPermission.yaml +patch: + $ref: updatePermission.yaml +delete: + $ref: deletePermission.yaml diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml new file mode 100644 index 00000000..57738c84 --- /dev/null +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -0,0 +1,109 @@ +summary: Update a Permission +description: Update an existing permission +operationId: updatePermission +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + collection: + type: object + description: What collection this permission applies to. + comment: + type: string + description: If the user can post comments. `full`. + enum: + - none + - create + - update + create: + type: string + description: If the user can create items. + enum: + - none + - full + delete: + type: string + description: If the user can update items. + enum: + - none + - mine + - role + - full + explain: + type: string + description: If the user is required to leave a comment explaining what + was changed. + enum: + - none + - create + - update + - always + read: + type: string + description: If the user can read items. + enum: + - none + - mine + - role + - full + read_field_blacklist: + type: object + description: Explicitly denies read access for specific fields. + role: + type: object + description: Unique identifier of the role this permission applies to. + status: + type: object + description: What status this permission applies to. + status_blacklist: + type: object + description: Explicitly denies specific statuses to be used. + update: + type: string + description: If the user can update items. + enum: + - none + - mine + - role + - full + write_field_blacklist: + type: object + description: Explicitly denies write access for specific fields. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/permissions.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Permissions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePermission } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePermission(permission_id, partial_permission_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_permissions_item(id: ID!, data: update_directus_permissions_input!): directus_permissions + } diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml index 4eef6977..33e8fe9c 100644 --- a/api-spec/paths/permissions/createPermission.yaml +++ b/api-spec/paths/permissions/createPermission.yaml @@ -2,93 +2,90 @@ summary: Create a Permission description: Create a new permission. operationId: createPermission parameters: - - "$ref": "../../components/parameters.yaml#/Meta" +- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: schema: + type: object properties: collection: - description: What collection this permission applies to. type: string + description: What collection this permission applies to. example: customers comment: - description: If the user can post comments. type: string + description: If the user can post comments. enum: - - none - - create - - update - - full + - none + - create + - update + - full create: - description: If the user can create items. type: string + description: If the user can create items. enum: - - none - - full + - none + - full delete: - description: If the user can update items. type: string + description: If the user can update items. enum: - - none - - mine - - role - - full + - none + - mine + - role + - full explain: - description: - If the user is required to leave a comment explaining - what was changed. type: string + description: If the user is required to leave a comment explaining what + was changed. enum: - - none - - create - - update - - always + - none + - create + - update + - always read: - description: If the user can read items. type: string + description: If the user can read items. enum: - - none - - mine - - role - - full + - none + - mine + - role + - full role: - description: - Unique identifier of the role this permission applies - to. type: integer + description: Unique identifier of the role this permission applies to. example: 3 read_field_blacklist: - description: Explicitly denies read access for specific fields. type: array + description: Explicitly denies read access for specific fields. items: type: string example: - - featured_image + - featured_image status: - description: What status this permission applies to. type: string + description: What status this permission applies to. status_blacklist: - description: Explicitly denies specific statuses to be used. type: array + description: Explicitly denies specific statuses to be used. items: type: string update: - description: If the user can update items. type: string + description: If the user can update items. enum: - - none - - mine - - role - - full + - none + - mine + - role + - full write_field_blacklist: - description: Explicitly denies write access for specific fields. type: array + description: Explicitly denies write access for specific fields. items: type: string - type: object responses: - "200": + '200': description: Successful request content: application/json: @@ -96,26 +93,27 @@ responses: type: object properties: data: - "$ref": "../../components/schemas/permissions.yaml" - "401": - "$ref": "../../components/responses.yaml#/UnauthorizedError" - "404": - "$ref": "../../components/responses.yaml#/NotFoundError" + $ref: ../../components/schemas/permissions.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError tags: - - Permissions +- Permissions x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createPermission } from '@directus/sdk'; - const client = createDirectus('directus_project_url').with(rest()); +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPermission } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); - const result = await client.request(createPermission(permission_object)); - - label: GraphQL - lang: GraphQL - source: | - POST /graphql/system + const result = await client.request(createPermission(permission_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system - type Mutation { - create_permissions_item(data: create_directus_permissions_input!): directus_permissions - } + type Mutation { + create_permissions_item(data: create_directus_permissions_input!): directus_permissions + } diff --git a/api-spec/paths/permissions/deletePermissions.yaml b/api-spec/paths/permissions/deletePermissions.yaml new file mode 100644 index 00000000..cd3253f6 --- /dev/null +++ b/api-spec/paths/permissions/deletePermissions.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Permissions +description: Delete multiple existing permissions. +tags: +- Permissions +operationId: deletePermissions +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePermissions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePermissions(permission_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_permissions_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index 37234a0e..3f0ab8a9 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -2,16 +2,16 @@ summary: List Permissions description: List all permissions. operationId: getPermissions parameters: - - "$ref": "../../components/parameters.yaml#/Fields" - - "$ref": "../../components/parameters.yaml#/Limit" - - "$ref": "../../components/parameters.yaml#/Offset" - - "$ref": "../../components/parameters.yaml#/Meta" - - "$ref": "../../components/parameters.yaml#/Sort" - - "$ref": "../../components/parameters.yaml#/Filter" - - "$ref": "../../components/parameters.yaml#/Search" - - "$ref": "../../components/parameters.yaml#/Page" +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page responses: - "200": + '200': description: Successful request content: application/json: @@ -21,28 +21,29 @@ responses: data: type: array items: - "$ref": "../../components/schemas/permissions.yaml" + $ref: ../../components/schemas/permissions.yaml meta: - "$ref": "../../components/schemas/x-metadata.yaml" - "401": - "$ref": "../../components/responses.yaml#/UnauthorizedError" - "404": - "$ref": "../../components/responses.yaml#/NotFoundError" + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError tags: - - Permissions +- Permissions x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, readPermissions } from '@directus/sdk'; - const client = createDirectus('directus_project_url').with(rest()); +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPermissions } from '@directus/sdk'; - const result = await client.request(readPermissions(query_object)); - - label: GraphQL - lang: GraphQL - source: | - POST /graphql/system + const client = createDirectus('directus_project_url').with(rest()); - type Query { - permissions: directus_permissions - } + const result = await client.request(readPermissions(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + permissions: directus_permissions + } diff --git a/api-spec/paths/permissions/index.yaml b/api-spec/paths/permissions/index.yaml index c6b5e5f9..a8d9cc7f 100644 --- a/api-spec/paths/permissions/index.yaml +++ b/api-spec/paths/permissions/index.yaml @@ -1,4 +1,8 @@ get: $ref: getPermissions.yaml post: - $ref: createPermission.yaml \ No newline at end of file + $ref: createPermission.yaml +patch: + $ref: updatePermissions.yaml +delete: + $ref: deletePermissions.yaml diff --git a/api-spec/paths/permissions/me/getMyPermissions.yaml b/api-spec/paths/permissions/me/getMyPermissions.yaml new file mode 100644 index 00000000..9ed2b9f1 --- /dev/null +++ b/api-spec/paths/permissions/me/getMyPermissions.yaml @@ -0,0 +1,28 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + - label: GraphQL + lang: GraphQL + source: | diff --git a/api-spec/paths/permissions/me/index.yaml b/api-spec/paths/permissions/me/index.yaml new file mode 100644 index 00000000..525fd0d4 --- /dev/null +++ b/api-spec/paths/permissions/me/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getMyPermissions.yaml diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml new file mode 100644 index 00000000..45cd3328 --- /dev/null +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -0,0 +1,135 @@ +summary: Update Multiple Permissions +description: Update multiple permissions at the same time. +tags: +- Permissions +operationId: updatePermissions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + keys: + type: array + items: + type: string + data: + type: object + properties: + collection: + type: string + description: What collection this permission applies to. + example: customers + comment: + type: string + description: If the user can post comments. + enum: + - none + - create + - update + - full + create: + type: string + description: If the user can create items. + enum: + - none + - full + delete: + type: string + description: If the user can update items. + enum: + - none + - mine + - role + - full + explain: + type: string + description: If the user is required to leave a comment explaining + what was changed. + enum: + - none + - create + - update + - always + read: + type: string + description: If the user can read items. + enum: + - none + - mine + - role + - full + role: + type: integer + description: Unique identifier of the role this permission applies + to. + example: 3 + read_field_blacklist: + type: array + description: Explicitly denies read access for specific fields. + items: + type: string + example: + - featured_image + status: + type: string + description: What status this permission applies to. + status_blacklist: + type: array + description: Explicitly denies specific statuses to be used. + items: + type: string + update: + type: string + description: If the user can update items. + enum: + - none + - mine + - role + - full + write_field_blacklist: + type: array + description: Explicitly denies write access for specific fields. + items: + type: string +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/permissions.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePermissions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePermissions(permission_id_array, permission_object_panel)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_permissions_items(id: [ID!]!, data: update_directus_permissions_input!): [directus_permissions] + } diff --git a/api-spec/paths/presets/_id/deletePreset.yaml b/api-spec/paths/presets/_id/deletePreset.yaml new file mode 100644 index 00000000..558405d7 --- /dev/null +++ b/api-spec/paths/presets/_id/deletePreset.yaml @@ -0,0 +1,31 @@ +summary: Delete a Preset +tags: +- Presets +operationId: deletePreset +description: Delete an existing preset. +security: +- Auth: [] +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError +parameters: +- $ref: ../../../components/parameters.yaml#/Id +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePreset } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePreset(preset_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_presets_item(id: ID!): delete_one + } diff --git a/api-spec/paths/presets/_id/getPreset.yaml b/api-spec/paths/presets/_id/getPreset.yaml new file mode 100644 index 00000000..062f3f85 --- /dev/null +++ b/api-spec/paths/presets/_id/getPreset.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a Preset +tags: +- Presets +operationId: getPreset +description: Retrieve a single preset by unique identifier. +security: +- Auth: [] +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/presets.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPreset } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPreset(preset_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + presets_by_id(id: ID!): directus_presets + } diff --git a/api-spec/paths/presets/_id/index.yaml b/api-spec/paths/presets/_id/index.yaml new file mode 100644 index 00000000..5c500613 --- /dev/null +++ b/api-spec/paths/presets/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getPreset.yaml +patch: + $ref: updatePreset.yaml +delete: + $ref: deletePreset.yaml diff --git a/api-spec/paths/presets/_id/updatePreset.yaml b/api-spec/paths/presets/_id/updatePreset.yaml new file mode 100644 index 00000000..7b7694b0 --- /dev/null +++ b/api-spec/paths/presets/_id/updatePreset.yaml @@ -0,0 +1,91 @@ +summary: Update a Preset +tags: +- Presets +operationId: updatePreset +description: Update an existing preset. +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePresets } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePreset(preset_id, partial_preset_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_presets_item(id: ID!, data: update_directus_presets_input): directus_presets + } diff --git a/api-spec/paths/presets/createPreset.yaml b/api-spec/paths/presets/createPreset.yaml new file mode 100644 index 00000000..c07fde2c --- /dev/null +++ b/api-spec/paths/presets/createPreset.yaml @@ -0,0 +1,93 @@ +summary: Create a Preset +tags: +- Presets +operationId: createPreset +description: Create a new preset. +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/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: + 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.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPreset } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPreset(presets_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_presets_item(data: create_directus_presets_input!): directus_presets + } diff --git a/api-spec/paths/presets/deletePresets.yaml b/api-spec/paths/presets/deletePresets.yaml new file mode 100644 index 00000000..a1b98d5b --- /dev/null +++ b/api-spec/paths/presets/deletePresets.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Presets +description: Delete multiple existing presets. +tags: +- Presets +operationId: deletePresets +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePresets } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePreset(preset_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_presets_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/presets/getPresets.yaml b/api-spec/paths/presets/getPresets.yaml new file mode 100644 index 00000000..a1717352 --- /dev/null +++ b/api-spec/paths/presets/getPresets.yaml @@ -0,0 +1,49 @@ +summary: List Presets +tags: +- Presets +operationId: getPresets +description: List the presets. +security: +- Auth: [] +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Page +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/presets.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPresets } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPresets(object_field)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + presets: [directus_presets] + } diff --git a/api-spec/paths/presets/index.yaml b/api-spec/paths/presets/index.yaml new file mode 100644 index 00000000..3d407b56 --- /dev/null +++ b/api-spec/paths/presets/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getPresets.yaml +post: + $ref: createPreset.yaml +patch: + $ref: updatePresets.yaml +delete: + $ref: deletePresets.yaml diff --git a/api-spec/paths/presets/updatePresets.yaml b/api-spec/paths/presets/updatePresets.yaml new file mode 100644 index 00000000..1339a98b --- /dev/null +++ b/api-spec/paths/presets/updatePresets.yaml @@ -0,0 +1,109 @@ +summary: Update Multiple Presets +description: Update multiple presets at the same time. +tags: +- Presets +operationId: updatePresets +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/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: + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePresets } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePresets(preset_id_array, partial_preset_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_presets_items(ids: [ID!]!, data: update_directus_presets_input): [directus_presets] + } diff --git a/api-spec/paths/relations/_id/deleteRelation.yaml b/api-spec/paths/relations/_id/deleteRelation.yaml new file mode 100644 index 00000000..c774fc41 --- /dev/null +++ b/api-spec/paths/relations/_id/deleteRelation.yaml @@ -0,0 +1,31 @@ +summary: Delete a Relation +description: Delete an existing relation. +operationId: deleteRelation +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Relations +parameters: +- $ref: ../../../components/parameters.yaml#/Id +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteRelation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteRelation(collection_name, field_name)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_relations_item(collection: String!, field: String!): delete_one + } diff --git a/api-spec/paths/relations/_id/getRelation.yaml b/api-spec/paths/relations/_id/getRelation.yaml new file mode 100644 index 00000000..e847a6a2 --- /dev/null +++ b/api-spec/paths/relations/_id/getRelation.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a Relation +description: Retrieve a single relation by unique identifier. +operationId: getRelation +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/relations.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Relations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRelation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRelation(collection_name, field_name, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + relations_by_name(collection: String!, field: String!): directus_relations + } diff --git a/api-spec/paths/relations/_id/index.yaml b/api-spec/paths/relations/_id/index.yaml new file mode 100644 index 00000000..e6fc7c4c --- /dev/null +++ b/api-spec/paths/relations/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getRelation.yaml +patch: + $ref: updateRelation.yaml +delete: + $ref: deleteRelation.yaml diff --git a/api-spec/paths/relations/_id/updateRelation.yaml b/api-spec/paths/relations/_id/updateRelation.yaml new file mode 100644 index 00000000..cb886892 --- /dev/null +++ b/api-spec/paths/relations/_id/updateRelation.yaml @@ -0,0 +1,64 @@ +summary: Update a Relation +description: Update an existing relation +operationId: updateRelation +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + collection_many: + type: string + description: Collection that has the field that holds the foreign key. + collection_one: + type: string + description: Collection on the _one_ side of the relationship. + field_many: + type: string + description: Foreign key. Field that holds the primary key of the related + collection. + field_one: + type: string + description: Alias column that serves as the _one_ side of the relationship. + example: books + junction_field: + type: string + description: Field on the junction table that holds the primary key of + the related collection. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/relations.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Relations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateRelation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateRelation(collection_name, field_name, partial_relation_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_relations_item(collection: String!, field: String!, data: update_directus_relations_input!): directus_relations + } diff --git a/api-spec/paths/relations/createRelation.yaml b/api-spec/paths/relations/createRelation.yaml new file mode 100644 index 00000000..bbaac7c8 --- /dev/null +++ b/api-spec/paths/relations/createRelation.yaml @@ -0,0 +1,66 @@ +summary: Create a Relation +description: Create a new relation. +operationId: createRelation +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + collection_many: + type: string + description: Collection that has the field that holds the foreign key. + example: articles + collection_one: + type: string + description: Collection on the _one_ side of the relationship. + example: authors + field_many: + type: string + description: Foreign key. Field that holds the primary key of the related + collection. + example: author + field_one: + type: string + description: Alias column that serves as the _one_ side of the relationship. + example: books + junction_field: + type: string + description: Field on the junction table that holds the primary key of + the related collection. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/relations.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Relations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createRelation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createRelation(relation_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_relations_item(data: create_directus_relations_input!): directus_relations + } diff --git a/api-spec/paths/relations/getRelations.yaml b/api-spec/paths/relations/getRelations.yaml new file mode 100644 index 00000000..7c7cacd9 --- /dev/null +++ b/api-spec/paths/relations/getRelations.yaml @@ -0,0 +1,47 @@ +summary: List Relations +description: List the relations. +operationId: getRelations +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/relations.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Relations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRelations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRelations(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + relations: [directus_relations] + } diff --git a/api-spec/paths/relations/index.yaml b/api-spec/paths/relations/index.yaml new file mode 100644 index 00000000..e1b72808 --- /dev/null +++ b/api-spec/paths/relations/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getRelations.yaml +post: + $ref: createRelation.yaml diff --git a/api-spec/paths/revisions/_id/getRevision.yaml b/api-spec/paths/revisions/_id/getRevision.yaml new file mode 100644 index 00000000..901eb8c9 --- /dev/null +++ b/api-spec/paths/revisions/_id/getRevision.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a Revision +description: Retrieve a single revision by unique identifier. +operationId: getRevision +parameters: +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/revisions.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Revisions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRevision } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRevision(revision_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + revisions_by_id(id: ID!): directus_revisions + } diff --git a/api-spec/paths/revisions/_id/index.yaml b/api-spec/paths/revisions/_id/index.yaml new file mode 100644 index 00000000..b87dc0d3 --- /dev/null +++ b/api-spec/paths/revisions/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getRevision.yaml diff --git a/api-spec/paths/revisions/getRevisions.yaml b/api-spec/paths/revisions/getRevisions.yaml new file mode 100644 index 00000000..8e04c6e5 --- /dev/null +++ b/api-spec/paths/revisions/getRevisions.yaml @@ -0,0 +1,49 @@ +summary: List Revisions +description: List the revisions. +operationId: getRevisions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/revisions.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Revisions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRevisions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRevisions(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + revisions: [directus_revisions] + } diff --git a/api-spec/paths/revisions/index.yaml b/api-spec/paths/revisions/index.yaml new file mode 100644 index 00000000..1c8be5e8 --- /dev/null +++ b/api-spec/paths/revisions/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getRevisions.yaml diff --git a/api-spec/paths/roles/_id/deleteRole.yaml b/api-spec/paths/roles/_id/deleteRole.yaml new file mode 100644 index 00000000..5ce34ffe --- /dev/null +++ b/api-spec/paths/roles/_id/deleteRole.yaml @@ -0,0 +1,31 @@ +summary: Delete a Role +description: Delete an existing role +operationId: deleteRole +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Roles +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteRole } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteRole(role_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_roles_item(id: ID!): delete_one + } diff --git a/api-spec/paths/roles/_id/getRole.yaml b/api-spec/paths/roles/_id/getRole.yaml new file mode 100644 index 00000000..163d8cc4 --- /dev/null +++ b/api-spec/paths/roles/_id/getRole.yaml @@ -0,0 +1,38 @@ +summary: Retrieve a Role +description: Retrieve a single role by unique identifier. +operationId: getRole +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/roles.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Roles +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRole } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRole(role_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + roles_by_id(id: ID!): directus_roles + } diff --git a/api-spec/paths/roles/_id/index.yaml b/api-spec/paths/roles/_id/index.yaml new file mode 100644 index 00000000..dd6b7539 --- /dev/null +++ b/api-spec/paths/roles/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getRole.yaml +patch: + $ref: updateRole.yaml +delete: + $ref: deleteRole.yaml diff --git a/api-spec/paths/roles/_id/updateRole.yaml b/api-spec/paths/roles/_id/updateRole.yaml new file mode 100644 index 00000000..fba40f63 --- /dev/null +++ b/api-spec/paths/roles/_id/updateRole.yaml @@ -0,0 +1,67 @@ +summary: Update a Role +description: Update an existing role +operationId: updateRole +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + description: + type: string + description: Description of the role. + enforce_tfa: + type: boolean + description: Whether or not this role enforces the use of 2FA. + external_id: + type: string + description: ID used with external services in SCIM. + ip_access: + type: array + description: Array of IP addresses that are allowed to connect to the + API as a user of this role. + items: + type: string + module_listing: + type: string + description: Custom override for the admin app module bar navigation. + name: + type: string + description: Name of the role. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/roles.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Roles +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateRole } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateRole(role_id, partial_role_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_roles_item(id: ID!, data: update_directus_roles_input): directus_roles + } diff --git a/api-spec/paths/roles/createRole.yaml b/api-spec/paths/roles/createRole.yaml new file mode 100644 index 00000000..9898698b --- /dev/null +++ b/api-spec/paths/roles/createRole.yaml @@ -0,0 +1,67 @@ +summary: Create a Role +description: Create a new role. +operationId: createRole +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + description: + type: string + description: Description of the role. + enforce_tfa: + type: boolean + description: Whether or not this role enforces the use of 2FA. + external_id: + type: string + description: ID used with external services in SCIM. + ip_access: + type: array + description: Array of IP addresses that are allowed to connect to the + API as a user of this role. + items: + type: string + module_listing: + type: string + description: Custom override for the admin app module bar navigation. + name: + type: string + description: Name of the role. + example: Interns +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/roles.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Roles +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createRole } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createRole(role_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_roles_item(data: create_directus_roles_input!): directus_roles + } diff --git a/api-spec/paths/roles/deleteRoles.yaml b/api-spec/paths/roles/deleteRoles.yaml new file mode 100644 index 00000000..18d0d534 --- /dev/null +++ b/api-spec/paths/roles/deleteRoles.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Roles +description: Delete multiple existing roles. +tags: +- Roles +operationId: deleteRoles +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteRoles } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request(deleteRoles(role_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_roles_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/roles/getRoles.yaml b/api-spec/paths/roles/getRoles.yaml new file mode 100644 index 00000000..d2f73a2e --- /dev/null +++ b/api-spec/paths/roles/getRoles.yaml @@ -0,0 +1,49 @@ +summary: List Roles +description: List the roles. +operationId: getRoles +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/roles.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Roles +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRoles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRoles(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + roles: [directus_roles] + } diff --git a/api-spec/paths/roles/index.yaml b/api-spec/paths/roles/index.yaml new file mode 100644 index 00000000..06cddf26 --- /dev/null +++ b/api-spec/paths/roles/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getRoles.yaml +post: + $ref: createRole.yaml +patch: + $ref: updateRoles.yaml +delete: + $ref: deleteRoles.yaml diff --git a/api-spec/paths/roles/updateRoles.yaml b/api-spec/paths/roles/updateRoles.yaml new file mode 100644 index 00000000..8a96c29c --- /dev/null +++ b/api-spec/paths/roles/updateRoles.yaml @@ -0,0 +1,81 @@ +summary: Update Multiple Roles +description: Update multiple roles at the same time. +tags: +- Roles +operationId: updateRoles +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + keys: + type: array + items: + type: string + data: + type: object + properties: + description: + type: string + description: Description of the role. + enforce_tfa: + type: boolean + description: Whether or not this role enforces the use of 2FA. + external_id: + type: string + description: ID used with external services in SCIM. + ip_access: + type: array + description: Array of IP addresses that are allowed to connect to + the API as a user of this role. + items: + type: string + module_listing: + type: string + description: Custom override for the admin app module bar navigation. + name: + type: string + description: Name of the role. + example: Interns +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/roles.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateRoles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateRoles(role_id_array, partial_role_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_roles_items(ids: [ID!]!, data: update_directus_roles_input): [directus_roles] + } diff --git a/api-spec/paths/schema/apply/index.yaml b/api-spec/paths/schema/apply/index.yaml new file mode 100644 index 00000000..988b3ea2 --- /dev/null +++ b/api-spec/paths/schema/apply/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: schemaApply.yaml diff --git a/api-spec/paths/schema/apply/schemaApply.yaml b/api-spec/paths/schema/apply/schemaApply.yaml new file mode 100644 index 00000000..7d963312 --- /dev/null +++ b/api-spec/paths/schema/apply/schemaApply.yaml @@ -0,0 +1,35 @@ +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.yaml + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary +responses: + '204': + description: Successful request + '403': + $ref: ../../../components/responses.yaml#/UnauthorizedError +tags: +- Schema +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + - label: GraphQL + lang: GraphQL + source: | diff --git a/api-spec/paths/schema/diff/index.yaml b/api-spec/paths/schema/diff/index.yaml new file mode 100644 index 00000000..c55a8aee --- /dev/null +++ b/api-spec/paths/schema/diff/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: schemaDiff.yaml diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml new file mode 100644 index 00000000..69fcd8a7 --- /dev/null +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -0,0 +1,116 @@ +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.yaml + 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.yaml + '204': + description: No schema difference. + '403': + $ref: ../../../components/responses.yaml#/UnauthorizedError +tags: +- Schema +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + ::: details **Toggle Open to See Request** + + import { createDirectus, rest, schemaDiff } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request( + schemaDiff({ + version: version_num, + directus: 'directus_version', + vendor: 'database_type', + collections: [ + { + collection: 'collection_name', + meta: { + // Meta fields + }, + schema: { + // Schema fields + }, + }, + ], + fields: [ + { + collection: 'collection_name', + field: 'field_1_id', + type: 'field_1_type', + meta: { + // Meta fields + }, + schema: { + // Meta fields + }, + }, + { + collection: 'collection_name', + field: 'field_2_id', + type: 'field_2_type', + meta: { + // Meta fields + }, + schema: { + // Meta fields + }, + }, + { + collection: 'collection_name', + field: 'field_3_id', + type: 'field_3_type', + meta: { + // Meta fields + }, + schema: { + // Meta fields + }, + }, + ], + relations: [], + }) + ); + + console.dir(result, { depth: null }); + + ::: +- label: GraphQL + lang: GraphQL + source: | + // Not supported in GraphQL diff --git a/api-spec/paths/schema/snapshot/index.yaml b/api-spec/paths/schema/snapshot/index.yaml new file mode 100644 index 00000000..ede78ad1 --- /dev/null +++ b/api-spec/paths/schema/snapshot/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: schemaSnapshot.yaml diff --git a/api-spec/paths/schema/snapshot/schemaSnapshot.yaml b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml new file mode 100644 index 00000000..6fc23786 --- /dev/null +++ b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml @@ -0,0 +1,37 @@ +summary: Retrieve Schema Snapshot +description: Retrieve the current schema. This endpoint is only available to admin + users. +operationId: schemaSnapshot +parameters: +- $ref: ../../../components/parameters.yaml#/Export +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/schema.yaml + text/yaml: + schema: + type: string + format: binary + '403': + $ref: ../../../components/responses.yaml#/UnauthorizedError +tags: +- Schema +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, schemaSnapshot } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(schemaSnapshot()); +- label: GraphQL + lang: GraphQL + source: | + // Not supported in GraphQL diff --git a/api-spec/paths/server/info/index.yaml b/api-spec/paths/server/info/index.yaml new file mode 100644 index 00000000..46016aa1 --- /dev/null +++ b/api-spec/paths/server/info/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: serverInfo.yaml diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml new file mode 100644 index 00000000..b0f50cb3 --- /dev/null +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -0,0 +1,45 @@ +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: + type: object + properties: + data: + type: object + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Server +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, serverInfo } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(serverInfo()); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + server_info: server_info + } diff --git a/api-spec/paths/server/ping/index.yaml b/api-spec/paths/server/ping/index.yaml new file mode 100644 index 00000000..fa33ebcc --- /dev/null +++ b/api-spec/paths/server/ping/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: ping.yaml diff --git a/api-spec/paths/server/ping/ping.yaml b/api-spec/paths/server/ping/ping.yaml new file mode 100644 index 00000000..e16057f4 --- /dev/null +++ b/api-spec/paths/server/ping/ping.yaml @@ -0,0 +1,31 @@ +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 +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, serverPing } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(serverPing()); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + server_ping: String + } \ No newline at end of file diff --git a/api-spec/paths/settings/getSettings.yaml b/api-spec/paths/settings/getSettings.yaml new file mode 100644 index 00000000..d8dffdb3 --- /dev/null +++ b/api-spec/paths/settings/getSettings.yaml @@ -0,0 +1,41 @@ +summary: Retrieve Settings +description: List the settings. +operationId: getSettings +parameters: +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/settings.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Settings +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readSettings } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readSettings()); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + settings: directus_settings + } diff --git a/api-spec/paths/settings/index.yaml b/api-spec/paths/settings/index.yaml new file mode 100644 index 00000000..fdd58afd --- /dev/null +++ b/api-spec/paths/settings/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getSettings.yaml +patch: + $ref: updateSetting.yaml diff --git a/api-spec/paths/settings/updateSetting.yaml b/api-spec/paths/settings/updateSetting.yaml new file mode 100644 index 00000000..fc42f9ed --- /dev/null +++ b/api-spec/paths/settings/updateSetting.yaml @@ -0,0 +1,41 @@ +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.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Settings +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateSettings } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateSettings(settings_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_settings(data: update_directus_settings_input!): directus_settings + } diff --git a/api-spec/paths/users/_id/deleteUser.yaml b/api-spec/paths/users/_id/deleteUser.yaml new file mode 100644 index 00000000..c91fa82e --- /dev/null +++ b/api-spec/paths/users/_id/deleteUser.yaml @@ -0,0 +1,31 @@ +summary: Delete a User +description: Delete an existing user +operationId: deleteUser +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteUser(user_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_users_item(id: ID!): delete_one + } diff --git a/api-spec/paths/users/_id/getUser.yaml b/api-spec/paths/users/_id/getUser.yaml new file mode 100644 index 00000000..8be97ee5 --- /dev/null +++ b/api-spec/paths/users/_id/getUser.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a User +description: Retrieve a single user by unique identifier. +operationId: getUser +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/users.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readUser(user_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + users_by_id(id: ID!): directus_users + } diff --git a/api-spec/paths/users/_id/index.yaml b/api-spec/paths/users/_id/index.yaml new file mode 100644 index 00000000..e665e929 --- /dev/null +++ b/api-spec/paths/users/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getUser.yaml +patch: + $ref: updateUser.yaml +delete: + $ref: deleteUser.yaml diff --git a/api-spec/paths/users/_id/updateUser.yaml b/api-spec/paths/users/_id/updateUser.yaml new file mode 100644 index 00000000..c97f64f1 --- /dev/null +++ b/api-spec/paths/users/_id/updateUser.yaml @@ -0,0 +1,45 @@ +summary: Update a User +description: Update an existing user +operationId: updateUser +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + $ref: ../../../components/schemas/users.yaml +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateUser(user_id, partial_user_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_users_item(id: ID!, data: update_directus_users_input!): directus_users + } diff --git a/api-spec/paths/users/createUser.yaml b/api-spec/paths/users/createUser.yaml new file mode 100644 index 00000000..0b414a2b --- /dev/null +++ b/api-spec/paths/users/createUser.yaml @@ -0,0 +1,43 @@ +summary: Create a User +description: Create a new user. +operationId: createUser +parameters: +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + $ref: ../../components/schemas/users.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/users.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createUser(user_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_users_item(data: create_directus_users_input!): directus_users + } diff --git a/api-spec/paths/users/deleteUsers.yaml b/api-spec/paths/users/deleteUsers.yaml new file mode 100644 index 00000000..01ae1ce9 --- /dev/null +++ b/api-spec/paths/users/deleteUsers.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Users +description: Delete multiple existing users. +tags: +- Users +operationId: deleteUsers +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteUsers } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteUsers(user_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_users_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/users/getUsers.yaml b/api-spec/paths/users/getUsers.yaml new file mode 100644 index 00000000..a699e391 --- /dev/null +++ b/api-spec/paths/users/getUsers.yaml @@ -0,0 +1,48 @@ +summary: List Users +description: List the users. +operationId: getUsers +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/users.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readUsers } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readUsers(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + users: [directus_users] + } diff --git a/api-spec/paths/users/index.yaml b/api-spec/paths/users/index.yaml new file mode 100644 index 00000000..2d2cf83b --- /dev/null +++ b/api-spec/paths/users/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getUsers.yaml +post: + $ref: createUser.yaml +patch: + $ref: updateUsers.yaml +delete: + $ref: deleteUsers.yaml diff --git a/api-spec/paths/users/invite/accept/acceptInvite.yaml b/api-spec/paths/users/invite/accept/acceptInvite.yaml new file mode 100644 index 00000000..122cd9ed --- /dev/null +++ b/api-spec/paths/users/invite/accept/acceptInvite.yaml @@ -0,0 +1,50 @@ +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.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, acceptUserInvite } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(acceptUserInvite(invite_token, user_password)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + users_invite_accept(token: String!, password: String!): Boolean + } diff --git a/api-spec/paths/users/invite/accept/index.yaml b/api-spec/paths/users/invite/accept/index.yaml new file mode 100644 index 00000000..678bce1c --- /dev/null +++ b/api-spec/paths/users/invite/accept/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: acceptInvite.yaml diff --git a/api-spec/paths/users/invite/index.yaml b/api-spec/paths/users/invite/index.yaml new file mode 100644 index 00000000..15bd4363 --- /dev/null +++ b/api-spec/paths/users/invite/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: invite.yaml diff --git a/api-spec/paths/users/invite/invite.yaml b/api-spec/paths/users/invite/invite.yaml new file mode 100644 index 00000000..95db7e69 --- /dev/null +++ b/api-spec/paths/users/invite/invite.yaml @@ -0,0 +1,38 @@ +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: + type: string + description: Email address or array of email addresses of the to-be-invited + user(s). +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/users.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + - label: GraphQL + lang: GraphQL + source: | diff --git a/api-spec/paths/users/me/getMe.yaml b/api-spec/paths/users/me/getMe.yaml new file mode 100644 index 00000000..b867575a --- /dev/null +++ b/api-spec/paths/users/me/getMe.yaml @@ -0,0 +1,39 @@ +summary: Retrieve Current User +description: Retrieve the currently authenticated user. +operationId: getMe +parameters: +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/users.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readMe } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readMe(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + users_me: directus_users + } diff --git a/api-spec/paths/users/me/index.yaml b/api-spec/paths/users/me/index.yaml new file mode 100644 index 00000000..9b9f4567 --- /dev/null +++ b/api-spec/paths/users/me/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getMe.yaml +patch: + $ref: updateMe.yaml diff --git a/api-spec/paths/users/me/tfa/disable/index.yaml b/api-spec/paths/users/me/tfa/disable/index.yaml new file mode 100644 index 00000000..2a0965a4 --- /dev/null +++ b/api-spec/paths/users/me/tfa/disable/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: meTfaDisable.yaml diff --git a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml new file mode 100644 index 00000000..56fd9cd3 --- /dev/null +++ b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml @@ -0,0 +1,29 @@ +summary: Disable 2FA +description: Disables two-factor authentication for the currently authenticated user. +operationId: meTfaDisable +responses: + '200': + description: Successful request + '401': + $ref: ../../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, disableTwoFactor } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(disableTwoFactor(otp)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + users_me_tfa_disable(otp: String!): Boolean + } diff --git a/api-spec/paths/users/me/tfa/enable/index.yaml b/api-spec/paths/users/me/tfa/enable/index.yaml new file mode 100644 index 00000000..007dfb71 --- /dev/null +++ b/api-spec/paths/users/me/tfa/enable/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: meTfaEnable.yaml diff --git a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml new file mode 100644 index 00000000..f1a51c4d --- /dev/null +++ b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml @@ -0,0 +1,29 @@ +summary: Enable 2FA +description: Enables two-factor authentication for the currently authenticated user. +operationId: meTfaEnable +responses: + '200': + description: Successful request + '401': + $ref: ../../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, enableTwoFactor } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(enableTwoFactor(secret, otp)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + users_me_tfa_enable(otp: String!, secret: String!): Boolean + } diff --git a/api-spec/paths/users/me/track/page/index.yaml b/api-spec/paths/users/me/track/page/index.yaml new file mode 100644 index 00000000..a20d8bc3 --- /dev/null +++ b/api-spec/paths/users/me/track/page/index.yaml @@ -0,0 +1,2 @@ +patch: + $ref: updateLastUsedPageMe.yaml diff --git a/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml new file mode 100644 index 00000000..d13b7ffe --- /dev/null +++ b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml @@ -0,0 +1,23 @@ +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: + type: object + properties: + last_page: + type: string + description: Path of the page you used last. +responses: + '200': + description: Successful request + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Users diff --git a/api-spec/paths/users/me/updateMe.yaml b/api-spec/paths/users/me/updateMe.yaml new file mode 100644 index 00000000..047e52f8 --- /dev/null +++ b/api-spec/paths/users/me/updateMe.yaml @@ -0,0 +1,36 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateMe } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateMe(partial_user_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_users_me(data: update_directus_users_input!): directus_users + } diff --git a/api-spec/paths/users/updateUsers.yaml b/api-spec/paths/users/updateUsers.yaml new file mode 100644 index 00000000..a7f64d13 --- /dev/null +++ b/api-spec/paths/users/updateUsers.yaml @@ -0,0 +1,58 @@ +summary: Update Multiple Users +description: Update multiple users at the same time. +tags: +- Users +operationId: updateUsers +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/users.yaml + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateUsers } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateUsers(user_id_array, partial_user_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_users_items(ids: [ID!]!, data: update_directus_users_input!): [directus_users] + } diff --git a/api-spec/paths/utils/cache/clear/clear-cache.yaml b/api-spec/paths/utils/cache/clear/clear-cache.yaml new file mode 100644 index 00000000..e590ae38 --- /dev/null +++ b/api-spec/paths/utils/cache/clear/clear-cache.yaml @@ -0,0 +1,23 @@ +summary: Clear Cache +description: Resets both the data and schema cache of Directus. +operationId: clear-cache +responses: + '200': + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, clearCache } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request(clearCache()); + - label: GraphQL + lang: GraphQL + source: | + mutation { + utils_cache_clear + } \ No newline at end of file diff --git a/api-spec/paths/utils/cache/clear/index.yaml b/api-spec/paths/utils/cache/clear/index.yaml new file mode 100644 index 00000000..8916579a --- /dev/null +++ b/api-spec/paths/utils/cache/clear/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: clear-cache.yaml diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml new file mode 100644 index 00000000..4d548e0b --- /dev/null +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -0,0 +1,66 @@ +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: + type: string + description: What file format to save the export to. One of csv, xml, + json + enum: + - csv + - xml + - json + query: + $ref: ../../../components/schemas/query.yaml + file: + $ref: ../../../components/schemas/files.yaml + required: + - format + - query + - file +responses: + '200': + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, utilsExport } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request( + utilsExport( + 'collection_name', + 'file_format', + { + query_type: { + field: { + query_operation: 'value', + }, + }, + }, + { + file: { + file_field: 'value', + }, + } + ) + ); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/utils/export/_collection/index.yaml b/api-spec/paths/utils/export/_collection/index.yaml new file mode 100644 index 00000000..b0fa4462 --- /dev/null +++ b/api-spec/paths/utils/export/_collection/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: export.yaml diff --git a/api-spec/paths/utils/hash/generate/hash-generate.yaml b/api-spec/paths/utils/hash/generate/hash-generate.yaml new file mode 100644 index 00000000..e7aa3afa --- /dev/null +++ b/api-spec/paths/utils/hash/generate/hash-generate.yaml @@ -0,0 +1,44 @@ +summary: Hash a string +description: Generate a hash for a given string. +operationId: hash-generate +requestBody: + content: + application/json: + schema: + properties: + string: + type: string + description: String to hash. + required: + - string +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: string + example: + $argon2i$v=19$m=4096,t=3,p=1$pOyIa/zmRAjCVLb2f7kOyg$DasoO6LzMM+6iKfzCDq6JbsYsZWLSm33p7i9NxL9mDc + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, generateHash } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(generateHash(string_to_hash)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + utils_hash_generate(string: String!): String + } diff --git a/api-spec/paths/utils/hash/generate/index.yaml b/api-spec/paths/utils/hash/generate/index.yaml new file mode 100644 index 00000000..43c816f6 --- /dev/null +++ b/api-spec/paths/utils/hash/generate/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: hash-generate.yaml diff --git a/api-spec/paths/utils/hash/verify/hash-verify.yaml b/api-spec/paths/utils/hash/verify/hash-verify.yaml new file mode 100644 index 00000000..37c21f59 --- /dev/null +++ b/api-spec/paths/utils/hash/verify/hash-verify.yaml @@ -0,0 +1,47 @@ +summary: Hash a string +description: Generate a hash for a given string. +operationId: hash-verify +requestBody: + content: + application/json: + schema: + properties: + string: + type: string + description: String to hash. + hash: + type: string + description: Hash you want to verify against. + required: + - string + - hash +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: boolean + example: true + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, verifyHash } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(verifyHash(string_to_verify, hash)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + utils_hash_verify(hash: String!, string: String!): Boolean + } \ No newline at end of file diff --git a/api-spec/paths/utils/hash/verify/index.yaml b/api-spec/paths/utils/hash/verify/index.yaml new file mode 100644 index 00000000..f3b4e0dd --- /dev/null +++ b/api-spec/paths/utils/hash/verify/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: hash-verify.yaml diff --git a/api-spec/paths/utils/import/_collection/import.yaml b/api-spec/paths/utils/import/_collection/import.yaml new file mode 100644 index 00000000..6f4131dd --- /dev/null +++ b/api-spec/paths/utils/import/_collection/import.yaml @@ -0,0 +1,40 @@ +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 +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, utilsImport } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const formData = new FormData(); + formData.append('file', raw_file); + + const result = await client.request(utilsImport(formData)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL \ No newline at end of file diff --git a/api-spec/paths/utils/import/_collection/index.yaml b/api-spec/paths/utils/import/_collection/index.yaml new file mode 100644 index 00000000..e8223fea --- /dev/null +++ b/api-spec/paths/utils/import/_collection/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: import.yaml diff --git a/api-spec/paths/utils/random/string/index.yaml b/api-spec/paths/utils/random/string/index.yaml new file mode 100644 index 00000000..137c5188 --- /dev/null +++ b/api-spec/paths/utils/random/string/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: random.yaml diff --git a/api-spec/paths/utils/random/string/random.yaml b/api-spec/paths/utils/random/string/random.yaml new file mode 100644 index 00000000..64ecef67 --- /dev/null +++ b/api-spec/paths/utils/random/string/random.yaml @@ -0,0 +1,40 @@ +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: + type: object + properties: + data: + type: string + example: 1>M3+4oh.S + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, randomString } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(randomString(length)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + utils_random_string(length: Int): String + } \ No newline at end of file diff --git a/api-spec/paths/utils/sort/_collection/index.yaml b/api-spec/paths/utils/sort/_collection/index.yaml new file mode 100644 index 00000000..c5cbbf52 --- /dev/null +++ b/api-spec/paths/utils/sort/_collection/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: sort.yaml diff --git a/api-spec/paths/utils/sort/_collection/sort.yaml b/api-spec/paths/utils/sort/_collection/sort.yaml new file mode 100644 index 00000000..9d11827f --- /dev/null +++ b/api-spec/paths/utils/sort/_collection/sort.yaml @@ -0,0 +1,43 @@ +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: + type: number + description: Primary key of item to move + to: + type: number + description: Primary key of item where to move the current item to +responses: + '200': + description: Successful request +tags: +- Utilities +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, utilitySort } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(utilitySort(collection_name, id_item_to_move, id_item_moving_to)); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + utils_sort(collection: String!, item: ID!, to: ID!): Boolean + } \ No newline at end of file diff --git a/api-spec/paths/versions/_id/compare/compareContentVersion.yaml b/api-spec/paths/versions/_id/compare/compareContentVersion.yaml new file mode 100644 index 00000000..0a8ff045 --- /dev/null +++ b/api-spec/paths/versions/_id/compare/compareContentVersion.yaml @@ -0,0 +1,34 @@ +summary: Compare a Content Version +description: Compare an existing Content Version with the main version of the item. +operationId: compareContentVersion +parameters: +- $ref: ../../../../components/parameters.yaml#/UUId +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: object + description: Successful request + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, compareContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(compareContentVersion(content_version_id)); +- label: GraphQL + lang: GraphQL + source: | + // Not supported in GraphQL diff --git a/api-spec/paths/versions/_id/compare/index.yaml b/api-spec/paths/versions/_id/compare/index.yaml new file mode 100644 index 00000000..a9d98a43 --- /dev/null +++ b/api-spec/paths/versions/_id/compare/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: compareContentVersion.yaml diff --git a/api-spec/paths/versions/_id/deleteContentVersion.yaml b/api-spec/paths/versions/_id/deleteContentVersion.yaml new file mode 100644 index 00000000..00971027 --- /dev/null +++ b/api-spec/paths/versions/_id/deleteContentVersion.yaml @@ -0,0 +1,31 @@ +summary: Delete a Content Version +description: Delete an existing Content Version. +operationId: deleteContentVersion +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Versions +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteContentVersion(content_version_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_versions_item(id: ID!): delete_one + } diff --git a/api-spec/paths/versions/_id/getContentVersion.yaml b/api-spec/paths/versions/_id/getContentVersion.yaml new file mode 100644 index 00000000..8d816fb7 --- /dev/null +++ b/api-spec/paths/versions/_id/getContentVersion.yaml @@ -0,0 +1,40 @@ +summary: Retrieve a Content Version +description: Retrieve a single Content Version by unique identifier. +operationId: getContentVersion +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/versions.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readContentVersion(content_version_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + versions_by_id(id: ID!): directus_versions + } diff --git a/api-spec/paths/versions/_id/index.yaml b/api-spec/paths/versions/_id/index.yaml new file mode 100644 index 00000000..7eaca2b8 --- /dev/null +++ b/api-spec/paths/versions/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getContentVersion.yaml +patch: + $ref: updateContentVersion.yaml +delete: + $ref: deleteContentVersion.yaml diff --git a/api-spec/paths/versions/_id/promote/index.yaml b/api-spec/paths/versions/_id/promote/index.yaml new file mode 100644 index 00000000..53569720 --- /dev/null +++ b/api-spec/paths/versions/_id/promote/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: promoteContentVersion.yaml diff --git a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml new file mode 100644 index 00000000..bd777777 --- /dev/null +++ b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml @@ -0,0 +1,47 @@ +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.yaml#/UUId +requestBody: + content: + application/json: + schema: + type: object + properties: + mainHash: + type: string + description: Hash of the main version of the item to be promoted. + fields: + type: string + description: Optional array of field names of which the values are to + be promoted. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: {} + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, promoteContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(promoteContentVersion(content_version_id, promote_object)); +- label: GraphQL + lang: GraphQL + source: | + // Not supported in GraphQL diff --git a/api-spec/paths/versions/_id/save/index.yaml b/api-spec/paths/versions/_id/save/index.yaml new file mode 100644 index 00000000..535c352b --- /dev/null +++ b/api-spec/paths/versions/_id/save/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: saveContentVersion.yaml diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml new file mode 100644 index 00000000..ba0b3947 --- /dev/null +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -0,0 +1,37 @@ +summary: Save to a Content Version +description: Save item changes to an existing Content Version. +operationId: saveContentVersion +parameters: +- $ref: ../../../../components/parameters.yaml#/UUId +requestBody: + content: + application/json: + schema: + type: object +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: {} + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, saveToContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(saveToContentVersion(content_version_id, partial_item_object)); + - label: GraphQL + lang: GraphQL + source: | + // Not supported in GraphQL diff --git a/api-spec/paths/versions/_id/updateContentVersion.yaml b/api-spec/paths/versions/_id/updateContentVersion.yaml new file mode 100644 index 00000000..1ea614e0 --- /dev/null +++ b/api-spec/paths/versions/_id/updateContentVersion.yaml @@ -0,0 +1,46 @@ +summary: Update a Content Version +description: Update an existing Content Version. +operationId: updateContentVersion +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/versions.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/versions.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateContentVersion(content_version_id, partial_content_version_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_versions_item(id: ID!, data: update_directus_versions_input!): directus_versions + } diff --git a/api-spec/paths/versions/createContentVersion.yaml b/api-spec/paths/versions/createContentVersion.yaml new file mode 100644 index 00000000..913d12df --- /dev/null +++ b/api-spec/paths/versions/createContentVersion.yaml @@ -0,0 +1,45 @@ +summary: Create Multiple Content Versions +description: Create multiple new Content Versions. +operationId: createContentVersion +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/versions.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/versions.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createContentVersion } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createContentVersion(content_version_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_versions_item(data: create_directus_versions_input!): directus_versions + } diff --git a/api-spec/paths/versions/deleteContentVersions.yaml b/api-spec/paths/versions/deleteContentVersions.yaml new file mode 100644 index 00000000..ceade4c7 --- /dev/null +++ b/api-spec/paths/versions/deleteContentVersions.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Content Versions +description: Delete multiple existing Content Versions. +operationId: deleteContentVersions +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteContentVersions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteContentVersions(content_version_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_versions_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/versions/getContentVersions.yaml b/api-spec/paths/versions/getContentVersions.yaml new file mode 100644 index 00000000..7427c557 --- /dev/null +++ b/api-spec/paths/versions/getContentVersions.yaml @@ -0,0 +1,48 @@ +summary: List Content Versions +description: Get all Content Versions. +operationId: getContentVersions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/versions.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readContentVersions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readContentVersions(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + versions: [directus_versions] + } diff --git a/api-spec/paths/versions/index.yaml b/api-spec/paths/versions/index.yaml new file mode 100644 index 00000000..af0b72b6 --- /dev/null +++ b/api-spec/paths/versions/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getContentVersions.yaml +post: + $ref: createContentVersion.yaml +patch: + $ref: updateContentVersions.yaml +delete: + $ref: deleteContentVersions.yaml diff --git a/api-spec/paths/versions/updateContentVersions.yaml b/api-spec/paths/versions/updateContentVersions.yaml new file mode 100644 index 00000000..b15de2b8 --- /dev/null +++ b/api-spec/paths/versions/updateContentVersions.yaml @@ -0,0 +1,59 @@ +summary: Update Multiple Content Versions +description: Update multiple Content Versions at the same time. +operationId: updateContentVersions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + anyOf: + - $ref: ../../components/schemas/versions.yaml + 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.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateContentVersions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateContentVersions(content_version_id_array, partial_content_version_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_versions_items(ids: [ID!]!, data: update_directus_versions_input!): [directus_versions] + } diff --git a/api-spec/paths/webhooks/_id/deleteWebhook.yaml b/api-spec/paths/webhooks/_id/deleteWebhook.yaml new file mode 100644 index 00000000..fa557c36 --- /dev/null +++ b/api-spec/paths/webhooks/_id/deleteWebhook.yaml @@ -0,0 +1,31 @@ +summary: Delete a Webhook +description: Delete an existing webhook +operationId: deleteWebhook +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Webhooks +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteWebhook } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteWebhook(webhook_id)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_webhooks_item(id: ID!): delete_one + } diff --git a/api-spec/paths/webhooks/_id/getWebhook.yaml b/api-spec/paths/webhooks/_id/getWebhook.yaml new file mode 100644 index 00000000..814005ce --- /dev/null +++ b/api-spec/paths/webhooks/_id/getWebhook.yaml @@ -0,0 +1,38 @@ +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.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Webhooks +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readWebhook } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readWebhook(webhook_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + webhooks_by_id(id: ID!): directus_webhooks + } diff --git a/api-spec/paths/webhooks/_id/index.yaml b/api-spec/paths/webhooks/_id/index.yaml new file mode 100644 index 00000000..ad746d5b --- /dev/null +++ b/api-spec/paths/webhooks/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getWebhook.yaml +patch: + $ref: updateWebhook.yaml +delete: + $ref: deleteWebhook.yaml diff --git a/api-spec/paths/webhooks/_id/updateWebhook.yaml b/api-spec/paths/webhooks/_id/updateWebhook.yaml new file mode 100644 index 00000000..225e23c2 --- /dev/null +++ b/api-spec/paths/webhooks/_id/updateWebhook.yaml @@ -0,0 +1,72 @@ +summary: Update a Webhook +description: Update an existing webhook +operationId: updateWebhook +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the webhook. + example: create articles + method: + type: string + description: Method used in the webhook. + example: POST + url: + type: string + description: The url of the webhook. + example: + status: + type: string + description: The status of the webhook. + example: active + data: + type: boolean + description: If yes, send the content of what was done + example: true + actions: + description: The actions that triggers this webhook. + example: + system-collections: + description: The collections that triggers this webhook. + example: +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/roles.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Webhooks +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateWebhook } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateWebhook(webhook_id, partal_webhook_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_webhooks_item(id: ID!, data: update_directus_webhooks_input!): directus_webhooks + } diff --git a/api-spec/paths/webhooks/createWebhook.yaml b/api-spec/paths/webhooks/createWebhook.yaml new file mode 100644 index 00000000..5e2c2af2 --- /dev/null +++ b/api-spec/paths/webhooks/createWebhook.yaml @@ -0,0 +1,71 @@ +summary: Create a Webhook +description: Create a new webhook. +operationId: createWebhook +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the webhook. + example: create articles + method: + type: string + description: Method used in the webhook. + example: POST + url: + type: string + description: The url of the webhook. + example: + status: + type: string + description: The status of the webhook. + example: active + data: + type: boolean + description: If yes, send the content of what was done + example: true + actions: + description: The actions that triggers this webhook. + example: + system-collections: + description: The collections that triggers this webhook. + example: +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/roles.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Webhooks +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createWebhook } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createWebhook(webhook_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_webhooks_item(data: create_directus_webhooks_input!): directus_webhooks + } diff --git a/api-spec/paths/webhooks/deleteWebhooks.yaml b/api-spec/paths/webhooks/deleteWebhooks.yaml new file mode 100644 index 00000000..7e818b6d --- /dev/null +++ b/api-spec/paths/webhooks/deleteWebhooks.yaml @@ -0,0 +1,27 @@ +summary: Delete Multiple Webhooks +description: Delete multiple existing webhooks. +tags: +- Webhooks +operationId: deleteWebhooks +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteWebhooks } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteWebhooks(webhook_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_webhooks_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/webhooks/getWebhooks.yaml b/api-spec/paths/webhooks/getWebhooks.yaml new file mode 100644 index 00000000..e0d976dd --- /dev/null +++ b/api-spec/paths/webhooks/getWebhooks.yaml @@ -0,0 +1,36 @@ +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.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Webhooks +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readWebhooks } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readWebhooks(query_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + webhooks: [directus_webhooks] + } diff --git a/api-spec/paths/webhooks/index.yaml b/api-spec/paths/webhooks/index.yaml new file mode 100644 index 00000000..c5570de2 --- /dev/null +++ b/api-spec/paths/webhooks/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getWebhooks.yaml +post: + $ref: createWebhook.yaml +patch: + $ref: updateWebhooks.yaml +delete: + $ref: deleteWebhooks.yaml diff --git a/api-spec/paths/webhooks/updateWebhooks.yaml b/api-spec/paths/webhooks/updateWebhooks.yaml new file mode 100644 index 00000000..534eb653 --- /dev/null +++ b/api-spec/paths/webhooks/updateWebhooks.yaml @@ -0,0 +1,85 @@ +summary: Update Multiple Webhooks +description: Update multiple webhooks at the same time. +tags: +- Webhooks +operationId: updateWebhooks +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + name: + type: string + description: The name of the webhook. + example: create articles + method: + type: string + description: Method used in the webhook. + example: POST + url: + type: string + description: The url of the webhook. + example: + status: + type: string + description: The status of the webhook. + example: active + data: + type: boolean + description: If yes, send the content of what was done + example: true + actions: + description: The actions that triggers this webhook. + example: + system-collections: + description: The collections that triggers this webhook. + example: + 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/webhooks.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateWebhooks } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateWebhooks(webhook_id_array, partial_webhook_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_webhooks_items(ids: [ID!]!, data: update_directus_webhooks_input!): [directus_webhooks] + } From 3d06b078da07408390b96ce059fa7bfc10be3cf3 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Sat, 19 Oct 2024 00:20:53 +0100 Subject: [PATCH 007/119] Adding all paths to api-spec/index.yaml --- api-spec/index.yaml | 131 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 3b87fae3..2b8a2508 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -11,11 +11,140 @@ servers: description: Your current Directus project. paths: + "/activity": + $ref: paths/permissions/index.yaml + "/activity/{id}": + $ref: paths/permissions/_id/index.yaml + "/activity/comment": + $ref: paths/permissions/comment/index.yaml + "/activity/comment/{id}": + $ref: paths/permissions/comment/_id/index.yaml + "/assets/{_id}": + $ref: paths/assets/_id/index.yaml + "/auth/login": + $ref: paths/auth/login/index.yaml + "/auth/logout": + $ref: paths/auth/logout/index.yaml + "/auth/oauth": + $ref: paths/auth/oauth/index.yaml + "/auth/oauth/{_provider}": + $ref: paths/auth/oauth/_provider/index.yaml + "/auth/password/request": + $ref: paths/auth/password/request/index.yaml + "/auth/password/reset": + $ref: paths/auth/password/reset/index.yaml + "/auth/refresh": + $ref: paths/auth/refresh/index.yaml + "/collections": + $ref: paths/collections/index.yaml + "/collections/{_id}": + $ref: paths/collections/_id/index.yaml + "/extensions": + $ref: paths/extensions/index.yaml + "/extensions/{_bundle}/{_name}": + $ref: paths/extensions/_bundle/_name/index.yaml + "/extensions/{_name}": + $ref: paths/extensions/_name/index.yaml + "/fields": + $ref: paths/fields/index.yaml + "/fields/{_collection}": + $ref: paths/fields/_collection/index.yaml + "/fields/{_collection}/{_id}": + $ref: paths/fields/_collection/_id/index.yaml + "/files": + $ref: paths/files/index.yaml + "/files/{_id}": + $ref: paths/files/_id/index.yaml + "/flows": + $ref: paths/flows/index.yaml + "/flows/{_id}": + $ref: paths/flows/_id/index.yaml + "/folders": + $ref: paths/folders/index.yaml + "/folders/{_id}": + $ref: paths/folders/_id/index.yaml + "/operations": + $ref: paths/operations/index.yaml + "/operations/{_id}": + $ref: paths/operations/_id/index.yaml "/permissions": $ref: paths/permissions/index.yaml "/permissions/{id}": $ref: paths/permissions/_id/index.yaml - + "/permissions/me": + $ref: paths/permissions/me/index.yaml + "/presets": + $ref: paths/presets/index.yaml + "/presets/{id}": + $ref: paths/presets/_id/index.yaml + "/relations": + $ref: paths/relations/index.yaml + "/relations/{id}": + $ref: paths/relations/_id/index.yaml + "/revisions": + $ref: paths/revisions/index.yaml + "/revisions/{id}": + $ref: paths/revisions/_id/index.yaml + "/roles": + $ref: paths/roles/index.yaml + "/roles/{id}": + $ref: paths/roles/_id/index.yaml + "/schema/apply": + $ref: paths/schema/apply/index.yaml + "/schema/diff": + $ref: paths/schema/diff/index.yaml + "/schema/snapshot": + $ref: paths/schema/snapshot/index.yaml + "/server/info": + $ref: paths/server/info/index.yaml + "/server/ping": + $ref: paths/server/ping/index.yaml + "/settings": + $ref: paths/settings/index.yaml + "/users": + $ref: paths/users/index.yaml + "/users/{id}": + $ref: paths/users/_id/index.yaml + "/users/invite": + $ref: paths/users/invite/index.yaml + "/users/invite/accept": + $ref: paths/users/invite/accept/index.yaml + "/users/me": + $ref: paths/users/me/index.yaml + "/users/me/tfa": + $ref: paths/users/me/tfa/index.yaml + "/users/me/tfa/disable": + $ref: paths/users/me/tfa/disable/index.yaml + "/users/me/tfa/enable": + $ref: paths/users/me/tfa/enable/index.yaml + "/users/me/track/page": + $ref: paths/users/me/track/page/index.yaml + "/utils/cache/clear" + $ref: paths/utils/cache/clear/index.yaml + "/utils/export/{_collection}" + $ref: paths/utils/export/_collection/index.yaml + "/utils/hash" + $ref: paths/utils/hash/index.yaml + "/utils/import/{_collection}" + $ref: paths/utils/import/_collection/index.yaml + "/utils/random/string" + $ref: paths/utils/random/string/index.yaml + "/utils/sort/{_collection}" + $ref: paths/utils/sort/_collection/index.yaml + "/versions": + $ref: paths/versions/index.yaml + "/versions/{id}": + $ref: paths/versions/id/index.yaml + "/versions/{id}/compare": + $ref: paths/versions/id/compare/index.yaml + "/versions/{id}/promote": + $ref: paths/versions/id/promote/index.yaml + "/versions/{id}/save": + $ref: paths/versions/id/save/index.yaml + "/webhooks/": + $ref: paths/webhooks/index.yaml + "/webhooks/{id}": + $ref: paths/webhooks/_id/index.yaml components: parameters: $ref: components/parameters.yaml From d4bc5ba77644d0b096859954ee12a97136ac2677 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Tue, 29 Oct 2024 18:43:19 +0000 Subject: [PATCH 008/119] fixing malformed paths --- api-spec/index.yaml | 34 +++++++++---------- .../activity/comment/_id/deleteComment.yaml | 6 ++-- .../activity/comment/_id/updateComment.yaml | 10 +++--- api-spec/paths/assets/_id/getAsset.yaml | 4 +-- api-spec/paths/auth/oauth/oauth.yaml | 2 +- api-spec/paths/auth/refresh/refresh.yaml | 2 +- .../_bundle/_name/updateExtensionBundle.yaml | 6 ++-- .../fields/_collection/_id/updateField.yaml | 2 +- api-spec/paths/files/_id/updateFile.yaml | 8 ++--- .../me/track/page/updateLastUsedPageMe.yaml | 4 +-- .../utils/export/_collection/export.yaml | 4 +-- .../paths/webhooks/_id/updateWebhook.yaml | 6 ++-- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 2b8a2508..57d3542e 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -12,13 +12,13 @@ servers: paths: "/activity": - $ref: paths/permissions/index.yaml + $ref: paths/activity/index.yaml "/activity/{id}": - $ref: paths/permissions/_id/index.yaml + $ref: paths/activity/_id/index.yaml "/activity/comment": - $ref: paths/permissions/comment/index.yaml + $ref: paths/activity/comment/index.yaml "/activity/comment/{id}": - $ref: paths/permissions/comment/_id/index.yaml + $ref: paths/activity/comment/_id/index.yaml "/assets/{_id}": $ref: paths/assets/_id/index.yaml "/auth/login": @@ -111,36 +111,36 @@ paths: $ref: paths/users/invite/accept/index.yaml "/users/me": $ref: paths/users/me/index.yaml - "/users/me/tfa": - $ref: paths/users/me/tfa/index.yaml "/users/me/tfa/disable": $ref: paths/users/me/tfa/disable/index.yaml "/users/me/tfa/enable": $ref: paths/users/me/tfa/enable/index.yaml "/users/me/track/page": $ref: paths/users/me/track/page/index.yaml - "/utils/cache/clear" + "/utils/cache/clear": $ref: paths/utils/cache/clear/index.yaml - "/utils/export/{_collection}" + "/utils/export/{_collection}": $ref: paths/utils/export/_collection/index.yaml - "/utils/hash" - $ref: paths/utils/hash/index.yaml - "/utils/import/{_collection}" + "/utils/hash/generate": + $ref: paths/utils/hash/generate/index.yaml + "/utils/hash/verify": + $ref: paths/utils/hash/verify/index.yaml + "/utils/import/{_collection}": $ref: paths/utils/import/_collection/index.yaml - "/utils/random/string" + "/utils/random/string": $ref: paths/utils/random/string/index.yaml - "/utils/sort/{_collection}" + "/utils/sort/{_collection}": $ref: paths/utils/sort/_collection/index.yaml "/versions": $ref: paths/versions/index.yaml "/versions/{id}": - $ref: paths/versions/id/index.yaml + $ref: paths/versions/_id/index.yaml "/versions/{id}/compare": - $ref: paths/versions/id/compare/index.yaml + $ref: paths/versions/_id/compare/index.yaml "/versions/{id}/promote": - $ref: paths/versions/id/promote/index.yaml + $ref: paths/versions/_id/promote/index.yaml "/versions/{id}/save": - $ref: paths/versions/id/save/index.yaml + $ref: paths/versions/_id/save/index.yaml "/webhooks/": $ref: paths/webhooks/index.yaml "/webhooks/{id}": diff --git a/api-spec/paths/activity/comment/_id/deleteComment.yaml b/api-spec/paths/activity/comment/_id/deleteComment.yaml index f9240bd9..e58d942e 100644 --- a/api-spec/paths/activity/comment/_id/deleteComment.yaml +++ b/api-spec/paths/activity/comment/_id/deleteComment.yaml @@ -2,14 +2,14 @@ summary: Delete a Comment description: Delete an existing comment. Deleted comments can not be retrieved. operationId: deleteComment parameters: -- $ref: ../../components/parameters.yaml#/Id +- $ref: ../../../../components/parameters.yaml#/Id responses: '203': description: Deleted successfully '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/activity/comment/_id/updateComment.yaml index 873a8662..3af18dfd 100644 --- a/api-spec/paths/activity/comment/_id/updateComment.yaml +++ b/api-spec/paths/activity/comment/_id/updateComment.yaml @@ -2,8 +2,8 @@ summary: Update a Comment description: Update the content of an existing comment. operationId: updateComment parameters: -- $ref: ../../components/parameters.yaml#/Id -- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../../../components/parameters.yaml#/Id +- $ref: ../../../../components/parameters.yaml#/Meta requestBody: content: application/json: @@ -21,12 +21,12 @@ responses: type: object properties: data: - $ref: ../../components/schemas/activity.yaml + $ref: ../../../../components/schemas/activity.yaml description: Successful request '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Activity x-codeSamples: diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml index f430e199..30d5be9b 100644 --- a/api-spec/paths/assets/_id/getAsset.yaml +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -34,11 +34,11 @@ responses: schema: type: string '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError x-codeSamples: - label: Directus SDK lang: JavaScript - source: + source: - label: GraphQL lang: GraphQL source: | diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml index c9319260..1946ed64 100644 --- a/api-spec/paths/auth/oauth/oauth.yaml +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -21,7 +21,7 @@ responses: items: type: string '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml index c11b4cf3..27b66740 100644 --- a/api-spec/paths/auth/refresh/refresh.yaml +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -44,7 +44,7 @@ responses: type: string example: Gy-caJMpmGTA... '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml index d0eca72c..d412b522 100644 --- a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -35,11 +35,11 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/extensions.yaml + $ref: ../../../../components/schemas/extensions.yaml description: Successful request '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Extensions diff --git a/api-spec/paths/fields/_collection/_id/updateField.yaml b/api-spec/paths/fields/_collection/_id/updateField.yaml index 8535b272..2895dbd0 100644 --- a/api-spec/paths/fields/_collection/_id/updateField.yaml +++ b/api-spec/paths/fields/_collection/_id/updateField.yaml @@ -219,5 +219,5 @@ x-codeSamples: lang: GraphQL source: | type Mutation { - update_fields_item(collection: String!, field: String!, data: update_directus_fields_input!): directus_fields + update_fields_item(collection: String!, field: String!, data: update_directus_fields_input!): directus_fields } diff --git a/api-spec/paths/files/_id/updateFile.yaml b/api-spec/paths/files/_id/updateFile.yaml index 094bbcb4..8c9263b5 100644 --- a/api-spec/paths/files/_id/updateFile.yaml +++ b/api-spec/paths/files/_id/updateFile.yaml @@ -32,7 +32,7 @@ requestBody: example: oneOf: - type: string - - $ref: ../../components/schemas/folders.yaml + - $ref: ../../../components/schemas/folders.yaml nullable: true tags: type: array @@ -65,7 +65,7 @@ requestBody: example: oneOf: - type: string - - $ref: ../../components/schemas/folders.yaml + - $ref: ../../../components/schemas/folders.yaml nullable: true tags: type: array @@ -83,9 +83,9 @@ responses: type: object properties: data: - $ref: ../../components/schemas/files.yaml + $ref: ../../../components/schemas/files.yaml '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml index d13b7ffe..01f99c68 100644 --- a/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml +++ b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml @@ -16,8 +16,8 @@ responses: '200': description: Successful request '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../../components/responses.yaml#/NotFoundError + $ref: ../../../../../components/responses.yaml#/NotFoundError tags: - Users diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index 4d548e0b..b542f46e 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -22,9 +22,9 @@ requestBody: - xml - json query: - $ref: ../../../components/schemas/query.yaml + $ref: ../../../../components/schemas/query.yaml file: - $ref: ../../../components/schemas/files.yaml + $ref: ../../../../components/schemas/files.yaml required: - format - query diff --git a/api-spec/paths/webhooks/_id/updateWebhook.yaml b/api-spec/paths/webhooks/_id/updateWebhook.yaml index 225e23c2..8c0050b7 100644 --- a/api-spec/paths/webhooks/_id/updateWebhook.yaml +++ b/api-spec/paths/webhooks/_id/updateWebhook.yaml @@ -46,11 +46,11 @@ responses: type: object properties: data: - $ref: ../../components/schemas/roles.yaml + $ref: ../../../components/schemas/roles.yaml '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Webhooks x-codeSamples: From 5ad5b6ad20c877e85cf73f93a5b411abdcf6f8f2 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:19:51 +0100 Subject: [PATCH 009/119] Update api-spec/paths/assets/_id/getAsset.yaml --- api-spec/paths/assets/_id/getAsset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml index 30d5be9b..afffd6cc 100644 --- a/api-spec/paths/assets/_id/getAsset.yaml +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -2,7 +2,7 @@ summary: Get an Asset tags: - Assets operationId: getAsset -description: Image typed files can be dynamically resized and transformed to fit any +description: Image typed files can be retrieved, dynamically resized and transformed to fit any need. parameters: - name: id From 90ede79668e74872e036424024f0eb1d592c39ad Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:20:16 +0100 Subject: [PATCH 010/119] Update api-spec/paths/assets/_id/getAsset.yaml --- api-spec/paths/assets/_id/getAsset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml index afffd6cc..272f951b 100644 --- a/api-spec/paths/assets/_id/getAsset.yaml +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -18,7 +18,7 @@ parameters: type: string - name: transforms in: query - description: A JSON array of image transformations + description: A JSON array of image transformations. schema: type: string - name: download From 5482b90f4978c2191b2cff38bafef8f3032d9f2b Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:20:30 +0100 Subject: [PATCH 011/119] Update api-spec/paths/auth/login/login.yaml --- api-spec/paths/auth/login/login.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index 2e3cd93c..b8a1ab06 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -1,4 +1,4 @@ -summary: Retrieve a Temporary Access Token +summary: Login description: Retrieve a Temporary Access Token tags: - Authentication From c581f65681fbf79d9be88d96d992a658b88768e9 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:21:00 +0100 Subject: [PATCH 012/119] Update api-spec/paths/auth/login/login.yaml --- api-spec/paths/auth/login/login.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index b8a1ab06..c5801671 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -1,5 +1,5 @@ summary: Login -description: Retrieve a Temporary Access Token +description: Authenticate as a user. tags: - Authentication operationId: login From 29501d49b5834f935e84b7f4660a817871451755 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:22:07 +0100 Subject: [PATCH 013/119] Update api-spec/components/schemas/permissions.yaml --- api-spec/components/schemas/permissions.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/components/schemas/permissions.yaml b/api-spec/components/schemas/permissions.yaml index da8819f2..3cd16e9f 100644 --- a/api-spec/components/schemas/permissions.yaml +++ b/api-spec/components/schemas/permissions.yaml @@ -13,10 +13,10 @@ properties: example: create type: string enum: - - create - - read - - update - - delete + - `create` + - `read` + - `update` + - `delete` permissions: description: JSON structure containing the permissions checks for this permission. type: object From 44403a46e5d46b0b2ca508a25159a886dc4dad66 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:22:15 +0100 Subject: [PATCH 014/119] Update api-spec/components/schemas/settings.yaml --- api-spec/components/schemas/settings.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index ae454305..de23e63a 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -93,12 +93,11 @@ properties: description: Reformat output image type: string enum: - - "" - - jpeg - - png - - webp - - tiff - - avif + - `jpeg` + - `png` + - `webp` + - `tiff` + - `avif` transforms: description: Additional transformations to apply type: array From c56dc7680480b311e7491715e429981b05a2e247 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:26:51 +0100 Subject: [PATCH 015/119] Update api-spec/components/schemas/settings.yaml --- api-spec/components/schemas/settings.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index de23e63a..fef3f513 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -55,9 +55,9 @@ properties: description: What transformations are allowed in the assets endpoint. type: string enum: - - all - - none - - presets + - `all` + - `none` + - `presets` example: all nullable: true storage_asset_presets: From 5bbb7bd413f9b6081119af7488e357f397ee0984 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:30:19 +0100 Subject: [PATCH 016/119] Update api-spec/components/schemas/settings.yaml --- api-spec/components/schemas/settings.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index fef3f513..339e1c43 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -73,10 +73,10 @@ properties: description: Whether to crop the thumbnail to match the size, or maintain the aspect ratio. type: string enum: - - cover - - contain - - inside - - outside + - `cover` + - `contain` + - `inside` + - `outside` width: description: Width of the thumbnail. type: integer From ffee3a54e8fe7268573f260741ef2dd45c903244 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:30:27 +0100 Subject: [PATCH 017/119] Update api-spec/components/schemas/users.yaml --- api-spec/components/schemas/users.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index 9e09a2c0..322cc03b 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -63,11 +63,11 @@ properties: example: active type: string enum: - - active - - invited - - draft - - suspended - - deleted + - `active` + - `invited` + - `draft` + - `suspended` + - `deleted` role: description: Unique identifier of the role of this user. example: 2f24211d-d928-469a-aea3-3c8f53d4e426 From 5b46fac8e45b0e5b300fdfd1baecfd2da0d372f3 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:32:43 +0100 Subject: [PATCH 018/119] Update api-spec/paths/auth/login/login.yaml --- api-spec/paths/auth/login/login.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index c5801671..ec7cb611 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -15,7 +15,7 @@ requestBody: email: type: string example: admin@example.com - description: Email address of the user you're retrieving the access token + description: Email address of the user you're logging in as. for. password: type: string From 21c833ce9f4bff9930531e1302e5cb15096eba3d Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:32:59 +0100 Subject: [PATCH 019/119] Update api-spec/paths/auth/login/login.yaml --- api-spec/paths/auth/login/login.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index ec7cb611..727b2911 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -30,7 +30,7 @@ requestBody: - session default: json description: Whether to retrieve the refresh token in the JSON response, - or in a httpOnly cookie. + or in a `httpOnly` cookie. otp: type: string description: The user's one-time-password (if MFA is enabled). From 7d4ea0a49767ca0920fee7268faf5d4b3416fd5a Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:34:28 +0100 Subject: [PATCH 020/119] Update api-spec/paths/auth/logout/logout.yaml --- api-spec/paths/auth/logout/logout.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index 0d7e2f20..13367788 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -1,5 +1,5 @@ -summary: Log Out -description: Log Out +summary: Logout +description: Invalidate the refresh token thus destroying the user's session. tags: - Authentication operationId: logout From fec1c61d0091afc21e18f194fb2c843baaf699b3 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:35:08 +0100 Subject: [PATCH 021/119] Update api-spec/paths/auth/logout/logout.yaml --- api-spec/paths/auth/logout/logout.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index 13367788..9dda3dc3 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -17,11 +17,11 @@ requestBody: mode: type: string enum: - - json - - cookie - - session + - `json` + - `cookie` + - `session` description: Whether the refresh token is submitted in the JSON response, - or in a httpOnly cookie. + or in a `httpOnly` cookie. responses: '200': description: Request successful From 73748ed6d199865dffdb88bb59cff678da98609d Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:35:22 +0100 Subject: [PATCH 022/119] Update api-spec/paths/auth/oauth/oauth.yaml --- api-spec/paths/auth/oauth/oauth.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml index 1946ed64..344b9e69 100644 --- a/api-spec/paths/auth/oauth/oauth.yaml +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -1,4 +1,4 @@ -summary: List OAuth Providers +summary: List Auth Providers tags: - Authentication operationId: oauth From a626d5593f09a0ecfd4ce9b2308690323f6c97e5 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:35:34 +0100 Subject: [PATCH 023/119] Update api-spec/paths/auth/oauth/oauth.yaml --- api-spec/paths/auth/oauth/oauth.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml index 344b9e69..40a466ad 100644 --- a/api-spec/paths/auth/oauth/oauth.yaml +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -2,7 +2,7 @@ summary: List Auth Providers tags: - Authentication operationId: oauth -description: List configured OAuth providers. +description: List all the configured auth providers. responses: '200': description: Successful request From 74d08a3546395da94d10a1e239c90e9a94a46ed9 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:36:00 +0100 Subject: [PATCH 024/119] Update api-spec/paths/auth/oauth/_provider/oauthProvider.yaml --- api-spec/paths/auth/oauth/_provider/oauthProvider.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml index 52346c61..4441913a 100644 --- a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml +++ b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml @@ -1,4 +1,4 @@ -summary: Authenticated using an OAuth provider +summary: Log in Using an OAuth Provider description: Start OAuth flow using the specified provider operationId: oauthProvider parameters: From 408aec0f6605517908f506295cd33272cc786b5b Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:36:14 +0100 Subject: [PATCH 025/119] Update api-spec/paths/auth/oauth/_provider/oauthProvider.yaml --- api-spec/paths/auth/oauth/_provider/oauthProvider.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml index 4441913a..85a1e0a5 100644 --- a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml +++ b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml @@ -1,5 +1,5 @@ summary: Log in Using an OAuth Provider -description: Start OAuth flow using the specified provider +description: Start OAuth flow using the specified provider. operationId: oauthProvider parameters: - name: provider From 59ccbde4b8bee7a32c5b91851b52f1a3f3767057 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:36:27 +0100 Subject: [PATCH 026/119] Update api-spec/paths/auth/password/request/passwordRequest.yaml --- api-spec/paths/auth/password/request/passwordRequest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml index d953e16a..29487b3f 100644 --- a/api-spec/paths/auth/password/request/passwordRequest.yaml +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -2,7 +2,7 @@ summary: Request a Password Reset tags: - Authentication operationId: passwordRequest -description: Request a reset password email to be send. +description: Request a reset password email to be sent. requestBody: content: application/json: From a485c3c24aa974f9acca8a330bae0efd74499bb4 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:36:38 +0100 Subject: [PATCH 027/119] Update api-spec/paths/auth/login/login.yaml --- api-spec/paths/auth/login/login.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index 727b2911..1ed73a8e 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -25,10 +25,10 @@ requestBody: mode: type: string enum: - - json - - cookie - - session - default: json + - `json` + - `cookie` + - `session` + default: `json` description: Whether to retrieve the refresh token in the JSON response, or in a `httpOnly` cookie. otp: From 630a070c475594ae44c9a27a1b378ada651fadf7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:39:40 +0100 Subject: [PATCH 028/119] Update api-spec/paths/utils/cache/clear/clear-cache.yaml --- api-spec/paths/utils/cache/clear/clear-cache.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/cache/clear/clear-cache.yaml b/api-spec/paths/utils/cache/clear/clear-cache.yaml index e590ae38..d8cc158f 100644 --- a/api-spec/paths/utils/cache/clear/clear-cache.yaml +++ b/api-spec/paths/utils/cache/clear/clear-cache.yaml @@ -1,5 +1,5 @@ summary: Clear Cache -description: Resets both the data and schema cache of Directus. +description: Resets the data cache of Directus. Optionally, can also clear system cache. This endpoint is only available to admin users. operationId: clear-cache responses: '200': From c4a96d95c917a95669184f26dc9b85882d22b218 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:39:54 +0100 Subject: [PATCH 029/119] Update api-spec/paths/utils/export/_collection/export.yaml --- api-spec/paths/utils/export/_collection/export.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index b542f46e..b7f20731 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -15,12 +15,12 @@ requestBody: properties: format: type: string - description: What file format to save the export to. One of csv, xml, - json + description: What file format to save the export to. One of `csv`, `xml`, + `json` enum: - - csv - - xml - - json + - `csv` + - `xml` + - `json` query: $ref: ../../../../components/schemas/query.yaml file: From 058cb8847838996bcaa2e1b1b266ed7b3d9e1109 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:43:28 +0100 Subject: [PATCH 030/119] Update api-spec/paths/utils/export/_collection/export.yaml --- api-spec/paths/utils/export/_collection/export.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index b7f20731..19c1d83b 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -1,5 +1,5 @@ summary: Export Items -description: Export a larger data set to a file in the File Library +description: Export a larger data set to a file in the file library. operationId: export parameters: - description: Collection identifier From 906f779948c7ff50c9ef3b6c02cd9e30fdaac5eb Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:43:48 +0100 Subject: [PATCH 031/119] Update api-spec/paths/utils/cache/clear/clear-cache.yaml --- api-spec/paths/utils/cache/clear/clear-cache.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/cache/clear/clear-cache.yaml b/api-spec/paths/utils/cache/clear/clear-cache.yaml index d8cc158f..946eb53e 100644 --- a/api-spec/paths/utils/cache/clear/clear-cache.yaml +++ b/api-spec/paths/utils/cache/clear/clear-cache.yaml @@ -1,4 +1,4 @@ -summary: Clear Cache +summary: Clear the Internal Cache description: Resets the data cache of Directus. Optionally, can also clear system cache. This endpoint is only available to admin users. operationId: clear-cache responses: From b0cfb0770f20d755e4e52147c9a7fe2e95069ed2 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:45:24 +0100 Subject: [PATCH 032/119] Update api-spec/paths/utils/hash/generate/hash-generate.yaml --- api-spec/paths/utils/hash/generate/hash-generate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/hash/generate/hash-generate.yaml b/api-spec/paths/utils/hash/generate/hash-generate.yaml index e7aa3afa..aa3545bc 100644 --- a/api-spec/paths/utils/hash/generate/hash-generate.yaml +++ b/api-spec/paths/utils/hash/generate/hash-generate.yaml @@ -1,4 +1,4 @@ -summary: Hash a string +summary: Generate a Hash. description: Generate a hash for a given string. operationId: hash-generate requestBody: From 404909f3fa509771f9d8f46f351de54d0f031f27 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:45:41 +0100 Subject: [PATCH 033/119] Update api-spec/paths/utils/hash/verify/hash-verify.yaml --- api-spec/paths/utils/hash/verify/hash-verify.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/utils/hash/verify/hash-verify.yaml b/api-spec/paths/utils/hash/verify/hash-verify.yaml index 37c21f59..2960bc0b 100644 --- a/api-spec/paths/utils/hash/verify/hash-verify.yaml +++ b/api-spec/paths/utils/hash/verify/hash-verify.yaml @@ -1,5 +1,5 @@ -summary: Hash a string -description: Generate a hash for a given string. +summary: Verify a Hash. +description: Verify a string with a hash. operationId: hash-verify requestBody: content: From 52f26359b16e12e6580245422fb2f05b6033f4ce Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 12:45:56 +0100 Subject: [PATCH 034/119] Update api-spec/paths/utils/sort/_collection/sort.yaml --- api-spec/paths/utils/sort/_collection/sort.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/sort/_collection/sort.yaml b/api-spec/paths/utils/sort/_collection/sort.yaml index 9d11827f..4370ec0f 100644 --- a/api-spec/paths/utils/sort/_collection/sort.yaml +++ b/api-spec/paths/utils/sort/_collection/sort.yaml @@ -1,4 +1,4 @@ -summary: Sort Items +summary: Manually Sort Items in Collection description: Re-sort items in collection based on start and to value of item operationId: sort parameters: From b6b2672b8375e89e872f5dc0ec9712c91cf6b285 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:32:02 +0100 Subject: [PATCH 035/119] Update api-spec/paths/utils/export/_collection/export.yaml --- api-spec/paths/utils/export/_collection/export.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index 19c1d83b..b66e993a 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -1,4 +1,4 @@ -summary: Export Items +summary: Export Data to a File description: Export a larger data set to a file in the file library. operationId: export parameters: From 85259048a41985c16fd813c1bd2396abfd4de1ec Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:45:33 +0100 Subject: [PATCH 036/119] Update api-spec/paths/utils/import/_collection/import.yaml --- api-spec/paths/utils/import/_collection/import.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/utils/import/_collection/import.yaml b/api-spec/paths/utils/import/_collection/import.yaml index 6f4131dd..c1db08ba 100644 --- a/api-spec/paths/utils/import/_collection/import.yaml +++ b/api-spec/paths/utils/import/_collection/import.yaml @@ -1,4 +1,4 @@ -summary: Import Items +summary: Import Data from File description: Import multiple records from a JSON or CSV file into a collection. operationId: import parameters: From 7faa6c81b1e9d87ce9af2285d4e89e4230d0b3af Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:45:52 +0100 Subject: [PATCH 037/119] Update api-spec/paths/auth/refresh/refresh.yaml --- api-spec/paths/auth/refresh/refresh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml index 27b66740..3739907a 100644 --- a/api-spec/paths/auth/refresh/refresh.yaml +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -1,5 +1,5 @@ summary: Refresh Token -description: Refresh a Temporary Access Token. +description: Retrieve a new access token using a refresh token. tags: - Authentication operationId: refresh From a268ae0d5880865cacde6220b082a20eb929129e Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:46:02 +0100 Subject: [PATCH 038/119] Update api-spec/paths/auth/refresh/refresh.yaml --- api-spec/paths/auth/refresh/refresh.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml index 3739907a..b86d84ae 100644 --- a/api-spec/paths/auth/refresh/refresh.yaml +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -17,12 +17,12 @@ requestBody: mode: type: string enum: - - json - - cookie - - session + - `json` + - `cookie` + - `session` default: json description: Whether to submit and retrieve the refresh token in the JSON - response, or in a httpOnly cookie. + response, or in a `httpOnly` cookie. responses: '200': description: Successful request From da257d96c757d1c88d6363c9ff6abe94087872f4 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:46:15 +0100 Subject: [PATCH 039/119] Update api-spec/paths/schema/diff/schemaDiff.yaml --- api-spec/paths/schema/diff/schemaDiff.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index 69fcd8a7..6925631d 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -1,7 +1,11 @@ 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. +description: | + Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. + + Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. + + This endpoint does not allow different Directus versions and database vendors by default. This is to avoid any +unintentional diffs from being generated. You can opt in to bypass these checks by passing the `force` query parameter. operationId: schemaDiff parameters: - name: force From 97e695e203bd4df5167a3abe593aab85dca47e13 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:46:58 +0100 Subject: [PATCH 040/119] Update api-spec/components/parameters.yaml --- api-spec/components/parameters.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api-spec/components/parameters.yaml b/api-spec/components/parameters.yaml index 5f00deaa..c080a7b6 100644 --- a/api-spec/components/parameters.yaml +++ b/api-spec/components/parameters.yaml @@ -90,16 +90,16 @@ Fields: type: string Export: name: export - description: Saves the API response to a file. Accepts one of "csv", "json", "xml", "yaml". + 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 + - `csv` + - `json` + - `xml` + - `yaml` Version: name: version description: >- From 02abfd1bc1e266b76b2777beb79748e05cf3c123 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:47:12 +0100 Subject: [PATCH 041/119] Update api-spec/paths/server/info/serverInfo.yaml --- api-spec/paths/server/info/serverInfo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml index b0f50cb3..259dcb66 100644 --- a/api-spec/paths/server/info/serverInfo.yaml +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -1,5 +1,5 @@ summary: System Info -description: Perform a system status check and return the options. +description: Provides detailed information about the project server, its schema, and its health. operationId: serverInfo parameters: - description: The first time you create a project, the provided token will be saved From 727fb235630f8ff0ee5afa394b45e94412555e04 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:47:35 +0100 Subject: [PATCH 042/119] Update api-spec/index.yaml --- api-spec/index.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 57d3542e..d379eecc 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -176,7 +176,7 @@ tags: - Users - Roles - name: Folders - description: Group files by virtual folders. + description: Folders can be used to organize files within the platform. Folders are virtual, and aren't mirrored within the storage adapter. 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. From ca74f1c3a0298d99ce266303c98b1d6855b563b7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:52:37 +0100 Subject: [PATCH 043/119] Update api-spec/paths/operations/_id/updateOperation.yaml --- api-spec/paths/operations/_id/updateOperation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/operations/_id/updateOperation.yaml b/api-spec/paths/operations/_id/updateOperation.yaml index b091c256..f2ce2141 100644 --- a/api-spec/paths/operations/_id/updateOperation.yaml +++ b/api-spec/paths/operations/_id/updateOperation.yaml @@ -1,5 +1,5 @@ summary: Update an Operation -description: Update an existing operation +description: Update an existing operation. operationId: updateOperation parameters: - $ref: ../../../components/parameters.yaml#/UUId From a5fda094caf120f6bb85c6e22a59105df3f24265 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:53:54 +0100 Subject: [PATCH 044/119] Update api-spec/paths/versions/getContentVersions.yaml --- api-spec/paths/versions/getContentVersions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/versions/getContentVersions.yaml b/api-spec/paths/versions/getContentVersions.yaml index 7427c557..cfcd5d59 100644 --- a/api-spec/paths/versions/getContentVersions.yaml +++ b/api-spec/paths/versions/getContentVersions.yaml @@ -1,5 +1,5 @@ summary: List Content Versions -description: Get all Content Versions. +description: List all Content Versions that exist in Directus. operationId: getContentVersions parameters: - $ref: ../../components/parameters.yaml#/Fields From 434623f41ecabacea05f5392acbb09d10f41cb48 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:54:32 +0100 Subject: [PATCH 045/119] Update api-spec/paths/versions/createContentVersion.yaml --- api-spec/paths/versions/createContentVersion.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/versions/createContentVersion.yaml b/api-spec/paths/versions/createContentVersion.yaml index 913d12df..253c3919 100644 --- a/api-spec/paths/versions/createContentVersion.yaml +++ b/api-spec/paths/versions/createContentVersion.yaml @@ -30,11 +30,11 @@ x-codeSamples: - label: Directus SDK lang: JavaScript source: | - import { createDirectus, rest, createContentVersion } from '@directus/sdk'; + import { createDirectus, rest, createContentVersions } from '@directus/sdk'; const client = createDirectus('directus_project_url').with(rest()); - const result = await client.request(createContentVersion(content_version_object)); + const result = await client.request(createContentVersions(content_version_objects)); - label: GraphQL lang: GraphQL source: | From d4fd81b10509330caf3ecfc3c9bdc2c68e61c662 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:57:21 +0100 Subject: [PATCH 046/119] Update api-spec/paths/folders/getFolders.yaml --- api-spec/paths/folders/getFolders.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/folders/getFolders.yaml b/api-spec/paths/folders/getFolders.yaml index 49c4176f..acccf1b3 100644 --- a/api-spec/paths/folders/getFolders.yaml +++ b/api-spec/paths/folders/getFolders.yaml @@ -1,5 +1,5 @@ summary: List Folders -description: List the folders. +description: List all folders that exist in Directus. operationId: getFolders parameters: - $ref: ../../components/parameters.yaml#/Fields From e21a858a4bfc0162139b799ced0a155fe872eac6 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:57:36 +0100 Subject: [PATCH 047/119] Update api-spec/paths/folders/createFolder.yaml --- api-spec/paths/folders/createFolder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/folders/createFolder.yaml b/api-spec/paths/folders/createFolder.yaml index f4c2e56a..b58c9a74 100644 --- a/api-spec/paths/folders/createFolder.yaml +++ b/api-spec/paths/folders/createFolder.yaml @@ -1,5 +1,5 @@ summary: Create a Folder -description: Create a new folder. +description: Create a new (virtual) folder. operationId: createFolder parameters: - $ref: ../../components/parameters.yaml#/Fields From 4daeecb35af0be85a96f60ef2da39787c28bb210 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:57:58 +0100 Subject: [PATCH 048/119] Update api-spec/paths/folders/_id/getFolder.yaml --- api-spec/paths/folders/_id/getFolder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/folders/_id/getFolder.yaml b/api-spec/paths/folders/_id/getFolder.yaml index fba8acea..441ff16e 100644 --- a/api-spec/paths/folders/_id/getFolder.yaml +++ b/api-spec/paths/folders/_id/getFolder.yaml @@ -1,5 +1,5 @@ summary: Retrieve a Folder -description: Retrieve a single folder by unique identifier. +description: List an existing folder by primary key. operationId: getFolder parameters: - $ref: ../../../components/parameters.yaml#/UUId From ecca66b7de18718ee94f8693dc57f18bd28854d5 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:58:19 +0100 Subject: [PATCH 049/119] Update api-spec/paths/folders/_id/updateFolder.yaml --- api-spec/paths/folders/_id/updateFolder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/folders/_id/updateFolder.yaml b/api-spec/paths/folders/_id/updateFolder.yaml index 9cfe4c64..a7cff815 100644 --- a/api-spec/paths/folders/_id/updateFolder.yaml +++ b/api-spec/paths/folders/_id/updateFolder.yaml @@ -1,5 +1,5 @@ summary: Update a Folder -description: Update an existing folder +description: Update an existing folder. operationId: updateFolder parameters: - $ref: ../../../components/parameters.yaml#/UUId From 8638989f801224471310992f331bd3e2a4aab852 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:58:46 +0100 Subject: [PATCH 050/119] Update api-spec/paths/folders/_id/deleteFolder.yaml --- api-spec/paths/folders/_id/deleteFolder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/folders/_id/deleteFolder.yaml b/api-spec/paths/folders/_id/deleteFolder.yaml index bfdf3216..58633d5f 100644 --- a/api-spec/paths/folders/_id/deleteFolder.yaml +++ b/api-spec/paths/folders/_id/deleteFolder.yaml @@ -1,5 +1,5 @@ summary: Delete a Folder -description: Delete an existing folder +description: Delete an existing folder. Any files in this folder will be moved to the root folder. operationId: deleteFolder responses: '200': From 95def419079b0c788266b4c967a09e64678bfe4f Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:59:10 +0100 Subject: [PATCH 051/119] Update api-spec/paths/relations/getRelations.yaml --- api-spec/paths/relations/getRelations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/relations/getRelations.yaml b/api-spec/paths/relations/getRelations.yaml index 7c7cacd9..68b99307 100644 --- a/api-spec/paths/relations/getRelations.yaml +++ b/api-spec/paths/relations/getRelations.yaml @@ -1,5 +1,5 @@ summary: List Relations -description: List the relations. +description: List all relations that exist in Directus. operationId: getRelations parameters: - $ref: ../../components/parameters.yaml#/Fields From 342e333f2d6987e199f3f4a6f01ca1cc90261f87 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 14:59:35 +0100 Subject: [PATCH 052/119] Update api-spec/index.yaml --- api-spec/index.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index d379eecc..0cf7aae8 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -182,7 +182,7 @@ tags: 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. + description: Every file managed by the platform is uploaded to the configured storage adapter, and its associated metadata is tracked within the `directus_files` system collection. Any requested file transformations are handled on the fly, and are only saved to storage. x-collection: directus_files - name: Fields description: Fields are individual pieces of content within an item. They are mapped to columns in the database. From 806e3eb2e3a2185000f69f5cc389b5e6bc96ad57 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:00:39 +0100 Subject: [PATCH 053/119] Update api-spec/paths/files/getFiles.yaml --- api-spec/paths/files/getFiles.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/files/getFiles.yaml b/api-spec/paths/files/getFiles.yaml index 7cb9111e..4c632111 100644 --- a/api-spec/paths/files/getFiles.yaml +++ b/api-spec/paths/files/getFiles.yaml @@ -1,5 +1,5 @@ summary: List Files -description: List the files. +description: List all files that exist in Directus. tags: - Files operationId: getFiles From a5dee70ba11f101008cc71b370b0dadc40e2d60b Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:01:45 +0100 Subject: [PATCH 054/119] Update api-spec/paths/files/deleteFiles.yaml --- api-spec/paths/files/deleteFiles.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/files/deleteFiles.yaml b/api-spec/paths/files/deleteFiles.yaml index 147feea5..541fbcca 100644 --- a/api-spec/paths/files/deleteFiles.yaml +++ b/api-spec/paths/files/deleteFiles.yaml @@ -1,5 +1,5 @@ summary: Delete Multiple Files -description: Delete multiple existing files. +description: Delete multiple existing files at once. This will also delete the files from disk. tags: - Files operationId: deleteFiles From ca9d0970bfa52ad11843d49ecb9d1346e8e27f15 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:02:04 +0100 Subject: [PATCH 055/119] Update api-spec/paths/files/_id/getFile.yaml --- api-spec/paths/files/_id/getFile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/files/_id/getFile.yaml b/api-spec/paths/files/_id/getFile.yaml index 3bf639db..c3bbf463 100644 --- a/api-spec/paths/files/_id/getFile.yaml +++ b/api-spec/paths/files/_id/getFile.yaml @@ -1,5 +1,5 @@ -summary: Retrieve a Files -description: Retrieve a single file by unique identifier. +summary: Retrieve a File +description: Retrieve a single file by primary key. tags: - Files operationId: getFile From 3ff540c981a0a48afecf0369fe349e091aada2cd Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:02:45 +0100 Subject: [PATCH 056/119] Update api-spec/paths/files/_id/deleteFile.yaml --- api-spec/paths/files/_id/deleteFile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/files/_id/deleteFile.yaml b/api-spec/paths/files/_id/deleteFile.yaml index bc3eb92f..0d55b6bf 100644 --- a/api-spec/paths/files/_id/deleteFile.yaml +++ b/api-spec/paths/files/_id/deleteFile.yaml @@ -1,5 +1,5 @@ summary: Delete a File -description: Delete an existing file. +description: Delete an existing file. This will also delete the file from disk. tags: - Files operationId: deleteFile From 383be426adf5d58b352911384ce2c48eab1c7a88 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:28:32 +0100 Subject: [PATCH 057/119] Update api-spec/paths/fields/_collection/_id/deleteField.yaml --- api-spec/paths/fields/_collection/_id/deleteField.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/fields/_collection/_id/deleteField.yaml b/api-spec/paths/fields/_collection/_id/deleteField.yaml index 3122c7db..bc446db7 100644 --- a/api-spec/paths/fields/_collection/_id/deleteField.yaml +++ b/api-spec/paths/fields/_collection/_id/deleteField.yaml @@ -1,5 +1,5 @@ summary: Delete a Field -description: Delete an existing field. +description: Delete an existing field. This action can't be undone. operationId: deleteField responses: '200': From 29ed94c262de6cba0100949b33010c819946b60b Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:29:43 +0100 Subject: [PATCH 058/119] Update api-spec/paths/operations/getOperations.yaml --- api-spec/paths/operations/getOperations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml index 3e7aebd2..d54ad010 100644 --- a/api-spec/paths/operations/getOperations.yaml +++ b/api-spec/paths/operations/getOperations.yaml @@ -1,5 +1,5 @@ summary: List Operations -description: Get all operations. +description: List all operations that exist in Directus. operationId: getOperations responses: '200': From 081be53823d4e45138c8f0398fe4a05266896f37 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:30:01 +0100 Subject: [PATCH 059/119] Update api-spec/paths/operations/_id/getOperation.yaml --- api-spec/paths/operations/_id/getOperation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml index 5e5e0c4f..ee2857a5 100644 --- a/api-spec/paths/operations/_id/getOperation.yaml +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -1,5 +1,5 @@ summary: Retrieve an Operation -description: Retrieve a single operation by unique identifier. +description: Retrieve a single operation by primary key. operationId: getOperation responses: '200': From ca91e3700160e51a4dfe858befab655b9c95232a Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:37:44 +0100 Subject: [PATCH 060/119] Update api-spec/components/schemas/flows.yaml --- api-spec/components/schemas/flows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/components/schemas/flows.yaml b/api-spec/components/schemas/flows.yaml index b31fa6c5..b651c874 100644 --- a/api-spec/components/schemas/flows.yaml +++ b/api-spec/components/schemas/flows.yaml @@ -26,8 +26,8 @@ properties: example: active default: active enum: - - active - - inactive + - `active` + - `inactive` trigger: description: Type of trigger for the flow. One of `hook`, `webhook`, `operation`, `schedule`, `manual`. type: string From f87bd0678ebc277f963b571f26dbd91c9e06772e Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:39:15 +0100 Subject: [PATCH 061/119] Update api-spec/paths/versions/_id/promote/promoteContentVersion.yaml --- .../paths/versions/_id/promote/promoteContentVersion.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml index bd777777..1ad99b82 100644 --- a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml +++ b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml @@ -1,7 +1,5 @@ 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). +description: Promote an existing Content Version to become the new main version of the item. operationId: promoteContentVersion parameters: - $ref: ../../../../components/parameters.yaml#/UUId From 4f21f33963ef616226a2c27d83d28e837ff0ace7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:40:21 +0100 Subject: [PATCH 062/119] Update api-spec/paths/revisions/_id/getRevision.yaml --- api-spec/paths/revisions/_id/getRevision.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/revisions/_id/getRevision.yaml b/api-spec/paths/revisions/_id/getRevision.yaml index 901eb8c9..87e1dc53 100644 --- a/api-spec/paths/revisions/_id/getRevision.yaml +++ b/api-spec/paths/revisions/_id/getRevision.yaml @@ -1,5 +1,5 @@ summary: Retrieve a Revision -description: Retrieve a single revision by unique identifier. +description: List an existing revision by primary key. operationId: getRevision parameters: - $ref: ../../../components/parameters.yaml#/Id From 7205e6ec23d052fd2f34679d6d7e0420d2464ad3 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:41:19 +0100 Subject: [PATCH 063/119] Update api-spec/index.yaml --- api-spec/index.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 0cf7aae8..486f7443 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -197,7 +197,7 @@ tags: 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. + description: Directus Users are the individual accounts that let you authenticate into the API and App. Each user can belong to a Role. 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. From 874f3731c016aee70d02497d2257178636581abc Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:41:57 +0100 Subject: [PATCH 064/119] Update api-spec/paths/users/getUsers.yaml --- api-spec/paths/users/getUsers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/users/getUsers.yaml b/api-spec/paths/users/getUsers.yaml index a699e391..f9862c12 100644 --- a/api-spec/paths/users/getUsers.yaml +++ b/api-spec/paths/users/getUsers.yaml @@ -1,5 +1,5 @@ summary: List Users -description: List the users. +description: List all users that exist in Directus. operationId: getUsers parameters: - $ref: ../../components/parameters.yaml#/Fields From 86ea1b9a8687a92494f059e067502f976f7ac113 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:43:24 +0100 Subject: [PATCH 065/119] Update api-spec/paths/users/_id/getUser.yaml --- api-spec/paths/users/_id/getUser.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/users/_id/getUser.yaml b/api-spec/paths/users/_id/getUser.yaml index 8be97ee5..7a47de7d 100644 --- a/api-spec/paths/users/_id/getUser.yaml +++ b/api-spec/paths/users/_id/getUser.yaml @@ -1,5 +1,5 @@ summary: Retrieve a User -description: Retrieve a single user by unique identifier. +description: List an existing user by primary key. operationId: getUser parameters: - $ref: ../../../components/parameters.yaml#/UUId From 7915f8ee77fd1a223abb0d9523a7d8530d6ba506 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:44:43 +0100 Subject: [PATCH 066/119] Update api-spec/paths/users/invite/accept/acceptInvite.yaml --- api-spec/paths/users/invite/accept/acceptInvite.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/users/invite/accept/acceptInvite.yaml b/api-spec/paths/users/invite/accept/acceptInvite.yaml index 122cd9ed..5c7a1f28 100644 --- a/api-spec/paths/users/invite/accept/acceptInvite.yaml +++ b/api-spec/paths/users/invite/accept/acceptInvite.yaml @@ -1,5 +1,5 @@ summary: Accept User Invite -description: Accepts and enables an invited user using a JWT invitation token. +description: Accept your invite. The invite user endpoint sends the email a link to the Data Studio. This link includes a token, which is then used to activate the invited user. operationId: acceptInvite requestBody: required: true From 0bae3031043190214187486f3a1fc290d1a665f7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:46:19 +0100 Subject: [PATCH 067/119] Update api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml --- api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml index 56fd9cd3..67336074 100644 --- a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml +++ b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml @@ -1,4 +1,4 @@ -summary: Disable 2FA +summary: Disable Two-Factor Authentication description: Disables two-factor authentication for the currently authenticated user. operationId: meTfaDisable responses: From 58a1bfd553171c0dd55188604504bb205169ab4c Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:47:49 +0100 Subject: [PATCH 068/119] Update api-spec/paths/permissions/createPermission.yaml --- api-spec/paths/permissions/createPermission.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml index 33e8fe9c..dace225c 100644 --- a/api-spec/paths/permissions/createPermission.yaml +++ b/api-spec/paths/permissions/createPermission.yaml @@ -1,5 +1,5 @@ -summary: Create a Permission -description: Create a new permission. +summary: Create a Permission Rule +description: Create a new permission rule. operationId: createPermission parameters: - $ref: ../../components/parameters.yaml#/Meta From 3171f3baa43713001d0abc6da660e8f66dd54f6b Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:48:52 +0100 Subject: [PATCH 069/119] Update api-spec/paths/permissions/createPermission.yaml --- .../paths/permissions/createPermission.yaml | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml index dace225c..0658dcdc 100644 --- a/api-spec/paths/permissions/createPermission.yaml +++ b/api-spec/paths/permissions/createPermission.yaml @@ -17,41 +17,41 @@ requestBody: type: string description: If the user can post comments. enum: - - none - - create - - update - - full + - `none` + - `create` + - `update` + - `full` create: type: string description: If the user can create items. enum: - - none - - full + - `none` + - `full` delete: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` explain: type: string description: If the user is required to leave a comment explaining what was changed. enum: - - none - - create - - update - - always + - `none` + - `create` + - `update` + - `always` read: type: string description: If the user can read items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` role: type: integer description: Unique identifier of the role this permission applies to. @@ -62,7 +62,7 @@ requestBody: items: type: string example: - - featured_image + - `featured_image` status: type: string description: What status this permission applies to. @@ -75,10 +75,10 @@ requestBody: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` write_field_blacklist: type: array description: Explicitly denies write access for specific fields. From e8c8604db88bac39ce8ca5470b9fbb21953312ff Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:49:29 +0100 Subject: [PATCH 070/119] Update api-spec/paths/permissions/updatePermissions.yaml --- .../paths/permissions/updatePermissions.yaml | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index 45cd3328..c10b604e 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -32,41 +32,41 @@ requestBody: type: string description: If the user can post comments. enum: - - none - - create - - update - - full + - `none` + - `create` + - `update` + - `full` create: type: string description: If the user can create items. enum: - - none - - full + - `none` + - `full` delete: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` explain: type: string description: If the user is required to leave a comment explaining what was changed. enum: - - none - - create - - update - - always + - `none` + - `create` + - `update` + - `always` read: type: string description: If the user can read items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` role: type: integer description: Unique identifier of the role this permission applies @@ -78,7 +78,7 @@ requestBody: items: type: string example: - - featured_image + - `featured_image` status: type: string description: What status this permission applies to. @@ -91,10 +91,10 @@ requestBody: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` write_field_blacklist: type: array description: Explicitly denies write access for specific fields. From c0b67f26d01642d7d39ae20e2d5fd07be07f228e Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 15:50:13 +0100 Subject: [PATCH 071/119] Update api-spec/paths/permissions/_id/updatePermission.yaml --- .../permissions/_id/updatePermission.yaml | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml index 57738c84..fb550a0f 100644 --- a/api-spec/paths/permissions/_id/updatePermission.yaml +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -17,40 +17,40 @@ requestBody: type: string description: If the user can post comments. `full`. enum: - - none - - create - - update + - `none` + - `create` + - `update` create: type: string description: If the user can create items. enum: - - none - - full + - `none` + - `full` delete: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` explain: type: string description: If the user is required to leave a comment explaining what was changed. enum: - - none - - create - - update - - always + - `none` + - `create` + - `update` + - `always` read: type: string description: If the user can read items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` read_field_blacklist: type: object description: Explicitly denies read access for specific fields. @@ -67,10 +67,10 @@ requestBody: type: string description: If the user can update items. enum: - - none - - mine - - role - - full + - `none` + - `mine` + - `role` + - `full` write_field_blacklist: type: object description: Explicitly denies write access for specific fields. From 85899cce997735167c73ed1eb3c7cc2650cd3ad6 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 16:07:02 +0100 Subject: [PATCH 072/119] Update api-spec/paths/collections/_id/updateCollection.yaml --- api-spec/paths/collections/_id/updateCollection.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/collections/_id/updateCollection.yaml b/api-spec/paths/collections/_id/updateCollection.yaml index 44d19349..1ce81c49 100644 --- a/api-spec/paths/collections/_id/updateCollection.yaml +++ b/api-spec/paths/collections/_id/updateCollection.yaml @@ -1,5 +1,5 @@ summary: Update a Collection -description: Update an existing collection. +description: Update the metadata for an existing collection. operationId: updateCollection parameters: - name: id From 1dfb1bfcfd9dac5736a08969ccb37200a4420d27 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 16:08:46 +0100 Subject: [PATCH 073/119] Update api-spec/paths/flows/_id/updateFlow.yaml --- api-spec/paths/flows/_id/updateFlow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml index e37198cc..0c68977f 100644 --- a/api-spec/paths/flows/_id/updateFlow.yaml +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -1,5 +1,5 @@ summary: Update a Flow -description: Update an existing flow +description: Update an existing flow. operationId: updateFlow parameters: - $ref: ../../../components/parameters.yaml#/UUId From caec869dae0443085bad9792dee936e6126a32b5 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 16:09:07 +0100 Subject: [PATCH 074/119] Update api-spec/paths/presets/getPresets.yaml --- api-spec/paths/presets/getPresets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/presets/getPresets.yaml b/api-spec/paths/presets/getPresets.yaml index a1717352..29a94821 100644 --- a/api-spec/paths/presets/getPresets.yaml +++ b/api-spec/paths/presets/getPresets.yaml @@ -2,7 +2,7 @@ summary: List Presets tags: - Presets operationId: getPresets -description: List the presets. +description: List all presets that exist in Directus. The data returned in this endpoint will be filtered based on the user's permissions. For example, presets for a role other than the current user's role won't be returned. security: - Auth: [] parameters: From 0467fa06de38167e7e83d5fe03c32f1b133624c0 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 16:10:42 +0100 Subject: [PATCH 075/119] Update api-spec/components/schemas/activity.yaml --- api-spec/components/schemas/activity.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-spec/components/schemas/activity.yaml b/api-spec/components/schemas/activity.yaml index 5fd6597b..9b7a31e4 100644 --- a/api-spec/components/schemas/activity.yaml +++ b/api-spec/components/schemas/activity.yaml @@ -9,10 +9,10 @@ properties: example: update type: string enum: - - create - - update - - delete - - login + - `create` + - `update` + - `delete` + - `login` user: description: The user who performed this action. oneOf: From 7cb4b816bd2da2a98650796a0d4b521e6440a253 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 5 Nov 2024 16:25:15 +0100 Subject: [PATCH 076/119] Update api-spec/paths/permissions/getPermissions.yaml --- api-spec/paths/permissions/getPermissions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index 3f0ab8a9..5b63a4de 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -1,5 +1,5 @@ summary: List Permissions -description: List all permissions. +description: List all permissions that exist in Directus. operationId: getPermissions parameters: - $ref: ../../components/parameters.yaml#/Fields From 770072dd3f2035f9020b4fa22f66cf5ccdfd29e0 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Tue, 12 Nov 2024 17:54:34 +0000 Subject: [PATCH 077/119] Making all code snippet urls directus_project_url instead of directus.example... --- api-spec/paths/flows/getFlows.yaml | 2 +- api-spec/paths/operations/getOperations.yaml | 2 +- api-spec/paths/roles/deleteRoles.yaml | 2 +- api-spec/paths/schema/diff/schemaDiff.yaml | 8 ++++---- api-spec/paths/utils/cache/clear/clear-cache.yaml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api-spec/paths/flows/getFlows.yaml b/api-spec/paths/flows/getFlows.yaml index 89350279..99ae488b 100644 --- a/api-spec/paths/flows/getFlows.yaml +++ b/api-spec/paths/flows/getFlows.yaml @@ -27,7 +27,7 @@ x-codeSamples: source: | import { createDirectus, rest, readFlows } from '@directus/sdk'; - const client = createDirectus('https://directus.example.com').with(rest()); + const client = createDirectus('directus_project_url').with(rest()); const result = await client.request(readFlows(query)); - label: GraphQL diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml index d54ad010..ab8194c6 100644 --- a/api-spec/paths/operations/getOperations.yaml +++ b/api-spec/paths/operations/getOperations.yaml @@ -27,7 +27,7 @@ x-codeSamples: source: | import { createDirectus, rest, readOperations } from '@directus/sdk'; - const client = createDirectus('https://directus.example.com').with(rest()); + const client = createDirectus('directus_project_url').with(rest()); const result = await client.request(readOperations(query_object)); - label: GraphQL diff --git a/api-spec/paths/roles/deleteRoles.yaml b/api-spec/paths/roles/deleteRoles.yaml index 18d0d534..c1a9587f 100644 --- a/api-spec/paths/roles/deleteRoles.yaml +++ b/api-spec/paths/roles/deleteRoles.yaml @@ -14,7 +14,7 @@ x-codeSamples: source: | import { createDirectus, rest, deleteRoles } from '@directus/sdk'; - const client = createDirectus('https://directus.example.com').with(rest()); + const client = createDirectus('directus_project_url').with(rest()); const result = await client.request(deleteRoles(role_id_array)); - label: GraphQL diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index 6925631d..460f9108 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -1,9 +1,9 @@ summary: Retrieve Schema Difference description: | Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. - - Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. - + + Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. + This endpoint does not allow different Directus versions and database vendors by default. This is to avoid any unintentional diffs from being generated. You can opt in to bypass these checks by passing the `force` query parameter. operationId: schemaDiff @@ -54,7 +54,7 @@ x-codeSamples: import { createDirectus, rest, schemaDiff } from '@directus/sdk'; - const client = createDirectus('https://directus.example.com').with(rest()); + const client = createDirectus('directus_project_url').with(rest()); const result = await client.request( schemaDiff({ diff --git a/api-spec/paths/utils/cache/clear/clear-cache.yaml b/api-spec/paths/utils/cache/clear/clear-cache.yaml index 946eb53e..8f598a28 100644 --- a/api-spec/paths/utils/cache/clear/clear-cache.yaml +++ b/api-spec/paths/utils/cache/clear/clear-cache.yaml @@ -1,4 +1,4 @@ -summary: Clear the Internal Cache +summary: Clear the Internal Cache description: Resets the data cache of Directus. Optionally, can also clear system cache. This endpoint is only available to admin users. operationId: clear-cache responses: @@ -12,7 +12,7 @@ x-codeSamples: source: | import { createDirectus, rest, clearCache } from '@directus/sdk'; - const client = createDirectus('https://directus.example.com').with(rest()); + const client = createDirectus('directus_project_url').with(rest()); const result = await client.request(clearCache()); - label: GraphQL @@ -20,4 +20,4 @@ x-codeSamples: source: | mutation { utils_cache_clear - } \ No newline at end of file + } From 14e34efa2e34a2b14dd82a8b14ef46788adee2a0 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Sun, 24 Nov 2024 23:35:19 +0000 Subject: [PATCH 078/119] Added more missing endpoints and small fixes --- api-spec/components/schemas/_index.yaml | 15 +++- api-spec/components/schemas/comments.yaml | 39 +++++++++++ api-spec/components/schemas/dashboards.yaml | 39 +++++++++++ api-spec/components/schemas/items.yaml | 7 ++ .../components/schemas/notifications.yaml | 43 ++++++++++++ api-spec/components/schemas/panels.yaml | 67 ++++++++++++++++++ api-spec/components/schemas/policies.yaml | 53 ++++++++++++++ api-spec/components/schemas/shares.yaml | 57 +++++++++++++++ api-spec/components/schemas/translations.yaml | 19 +++++ api-spec/index.yaml | 34 +++++++++ .../activity/comment/_id/getComment.yaml | 38 ++++++++++ .../paths/activity/comment/_id/index.yaml | 2 + .../activity/comment/_id/updateComment.yaml | 19 +++-- .../activity/comment/createComments.yaml | 58 +++++++++++++++ .../activity/comment/deleteComments.yaml | 42 +++++++++++ .../paths/activity/comment/getComments.yaml | 47 +++++++++++++ api-spec/paths/activity/comment/index.yaml | 6 ++ .../activity/comment/updateComments.yaml | 61 ++++++++++++++++ api-spec/paths/assets/_id/getAsset.yaml | 9 ++- api-spec/paths/auth/oauth/oauth.yaml | 2 +- .../paths/dashboards/_id/deleteDashboard.yaml | 34 +++++++++ .../paths/dashboards/_id/getDashboard.yaml | 43 ++++++++++++ api-spec/paths/dashboards/_id/index.yaml | 6 ++ .../paths/dashboards/_id/updateDashboard.yaml | 49 +++++++++++++ .../paths/dashboards/createDashboard.yaml | 44 ++++++++++++ .../paths/dashboards/createDashboards.yaml | 56 +++++++++++++++ .../paths/dashboards/deleteDashboards.yaml | 40 +++++++++++ api-spec/paths/dashboards/getDashboards.yaml | 48 +++++++++++++ api-spec/paths/dashboards/index.yaml | 9 +++ .../paths/dashboards/updateDashboards.yaml | 59 ++++++++++++++++ .../_bundle/_name/updateExtensionBundle.yaml | 15 ++++ .../items/_collection/_id/deleteItem.yaml | 34 +++++++++ .../_collection/_id/getCollectionItem.yaml | 48 +++++++++++++ .../paths/items/_collection/_id/index.yaml | 7 ++ .../items/_collection/_id/updateItem.yaml | 49 +++++++++++++ .../paths/items/_collection/createItem.yaml | 44 ++++++++++++ .../paths/items/_collection/createItems.yaml | 59 ++++++++++++++++ .../paths/items/_collection/deleteItems.yaml | 52 ++++++++++++++ .../items/_collection/getCollectionItems.yaml | 50 +++++++++++++ api-spec/paths/items/_collection/index.yaml | 8 +++ .../_collection/singleton/getSingleton.yaml | 44 ++++++++++++ .../items/_collection/singleton/index.yaml | 4 ++ .../singleton/updateSingleton.yaml | 44 ++++++++++++ .../paths/items/_collection/updateItems.yaml | 60 ++++++++++++++++ .../notifications/_id/deleteNotification.yaml | 34 +++++++++ .../notifications/_id/getNotification.yaml | 43 ++++++++++++ api-spec/paths/notifications/_id/index.yaml | 6 ++ .../notifications/_id/updateNotification.yaml | 49 +++++++++++++ .../notifications/createNotification.yaml | 44 ++++++++++++ .../notifications/createNotifications.yaml | 57 +++++++++++++++ .../notifications/deleteNotifications.yaml | 48 +++++++++++++ .../paths/notifications/getNotifications.yaml | 48 +++++++++++++ api-spec/paths/notifications/index.yaml | 9 +++ .../notifications/updateNotifications.yaml | 59 ++++++++++++++++ api-spec/paths/panels/_id/deletePanel.yaml | 34 +++++++++ api-spec/paths/panels/_id/getPanel.yaml | 43 ++++++++++++ api-spec/paths/panels/_id/index.yaml | 6 ++ api-spec/paths/panels/_id/updatePanel.yaml | 49 +++++++++++++ api-spec/paths/panels/createPanel.yaml | 44 ++++++++++++ api-spec/paths/panels/createPanels.yaml | 57 +++++++++++++++ api-spec/paths/panels/deletePanels.yaml | 40 +++++++++++ api-spec/paths/panels/getPanels.yaml | 48 +++++++++++++ api-spec/paths/panels/index.yaml | 9 +++ api-spec/paths/panels/updatePanels.yaml | 59 ++++++++++++++++ api-spec/paths/policies/_id/deletePolicy.yaml | 34 +++++++++ api-spec/paths/policies/_id/getPolicy.yaml | 43 ++++++++++++ api-spec/paths/policies/_id/index.yaml | 6 ++ api-spec/paths/policies/_id/updatePolicy.yaml | 49 +++++++++++++ api-spec/paths/policies/createPolicies.yaml | 57 +++++++++++++++ api-spec/paths/policies/createPolicy.yaml | 44 ++++++++++++ api-spec/paths/policies/deletePolicies.yaml | 40 +++++++++++ api-spec/paths/policies/getPolicies.yaml | 48 +++++++++++++ api-spec/paths/policies/index.yaml | 9 +++ api-spec/paths/policies/updatePolicies.yaml | 59 ++++++++++++++++ api-spec/paths/server/info/serverInfo.yaml | 4 +- api-spec/paths/shares/_id/deleteShare.yaml | 34 +++++++++ api-spec/paths/shares/_id/getShare.yaml | 43 ++++++++++++ api-spec/paths/shares/_id/index.yaml | 6 ++ api-spec/paths/shares/_id/updateShare.yaml | 49 +++++++++++++ .../paths/shares/auth/authenticateShare.yaml | 70 +++++++++++++++++++ api-spec/paths/shares/auth/index.yaml | 2 + api-spec/paths/shares/createShare.yaml | 44 ++++++++++++ api-spec/paths/shares/createShares.yaml | 57 +++++++++++++++ api-spec/paths/shares/deleteShares.yaml | 40 +++++++++++ api-spec/paths/shares/getShares.yaml | 48 +++++++++++++ api-spec/paths/shares/index.yaml | 9 +++ .../paths/shares/info/_id/getShareInfo.yaml | 39 +++++++++++ api-spec/paths/shares/info/_id/index.yaml | 2 + api-spec/paths/shares/invite/index.yaml | 2 + api-spec/paths/shares/invite/inviteShare.yaml | 40 +++++++++++ api-spec/paths/shares/updateShares.yaml | 59 ++++++++++++++++ .../translations/_id/deleteTranslation.yaml | 32 +++++++++ .../translations/_id/getTranslation.yaml | 42 +++++++++++ api-spec/paths/translations/_id/index.yaml | 6 ++ .../translations/_id/updateTranslation.yaml | 47 +++++++++++++ .../paths/translations/createTranslation.yaml | 42 +++++++++++ .../translations/createTranslations.yaml | 55 +++++++++++++++ .../translations/deleteTranslations.yaml | 38 ++++++++++ .../paths/translations/getTranslations.yaml | 46 ++++++++++++ api-spec/paths/translations/index.yaml | 9 +++ .../translations/updateTranslations.yaml | 57 +++++++++++++++ 101 files changed, 3644 insertions(+), 16 deletions(-) create mode 100644 api-spec/components/schemas/comments.yaml create mode 100644 api-spec/components/schemas/dashboards.yaml create mode 100644 api-spec/components/schemas/items.yaml create mode 100644 api-spec/components/schemas/notifications.yaml create mode 100644 api-spec/components/schemas/panels.yaml create mode 100644 api-spec/components/schemas/policies.yaml create mode 100644 api-spec/components/schemas/shares.yaml create mode 100644 api-spec/components/schemas/translations.yaml create mode 100644 api-spec/paths/activity/comment/_id/getComment.yaml create mode 100644 api-spec/paths/activity/comment/createComments.yaml create mode 100644 api-spec/paths/activity/comment/deleteComments.yaml create mode 100644 api-spec/paths/activity/comment/getComments.yaml create mode 100644 api-spec/paths/activity/comment/updateComments.yaml create mode 100644 api-spec/paths/dashboards/_id/deleteDashboard.yaml create mode 100644 api-spec/paths/dashboards/_id/getDashboard.yaml create mode 100644 api-spec/paths/dashboards/_id/index.yaml create mode 100644 api-spec/paths/dashboards/_id/updateDashboard.yaml create mode 100644 api-spec/paths/dashboards/createDashboard.yaml create mode 100644 api-spec/paths/dashboards/createDashboards.yaml create mode 100644 api-spec/paths/dashboards/deleteDashboards.yaml create mode 100644 api-spec/paths/dashboards/getDashboards.yaml create mode 100644 api-spec/paths/dashboards/index.yaml create mode 100644 api-spec/paths/dashboards/updateDashboards.yaml create mode 100644 api-spec/paths/items/_collection/_id/deleteItem.yaml create mode 100644 api-spec/paths/items/_collection/_id/getCollectionItem.yaml create mode 100644 api-spec/paths/items/_collection/_id/index.yaml create mode 100644 api-spec/paths/items/_collection/_id/updateItem.yaml create mode 100644 api-spec/paths/items/_collection/createItem.yaml create mode 100644 api-spec/paths/items/_collection/createItems.yaml create mode 100644 api-spec/paths/items/_collection/deleteItems.yaml create mode 100644 api-spec/paths/items/_collection/getCollectionItems.yaml create mode 100644 api-spec/paths/items/_collection/index.yaml create mode 100644 api-spec/paths/items/_collection/singleton/getSingleton.yaml create mode 100644 api-spec/paths/items/_collection/singleton/index.yaml create mode 100644 api-spec/paths/items/_collection/singleton/updateSingleton.yaml create mode 100644 api-spec/paths/items/_collection/updateItems.yaml create mode 100644 api-spec/paths/notifications/_id/deleteNotification.yaml create mode 100644 api-spec/paths/notifications/_id/getNotification.yaml create mode 100644 api-spec/paths/notifications/_id/index.yaml create mode 100644 api-spec/paths/notifications/_id/updateNotification.yaml create mode 100644 api-spec/paths/notifications/createNotification.yaml create mode 100644 api-spec/paths/notifications/createNotifications.yaml create mode 100644 api-spec/paths/notifications/deleteNotifications.yaml create mode 100644 api-spec/paths/notifications/getNotifications.yaml create mode 100644 api-spec/paths/notifications/index.yaml create mode 100644 api-spec/paths/notifications/updateNotifications.yaml create mode 100644 api-spec/paths/panels/_id/deletePanel.yaml create mode 100644 api-spec/paths/panels/_id/getPanel.yaml create mode 100644 api-spec/paths/panels/_id/index.yaml create mode 100644 api-spec/paths/panels/_id/updatePanel.yaml create mode 100644 api-spec/paths/panels/createPanel.yaml create mode 100644 api-spec/paths/panels/createPanels.yaml create mode 100644 api-spec/paths/panels/deletePanels.yaml create mode 100644 api-spec/paths/panels/getPanels.yaml create mode 100644 api-spec/paths/panels/index.yaml create mode 100644 api-spec/paths/panels/updatePanels.yaml create mode 100644 api-spec/paths/policies/_id/deletePolicy.yaml create mode 100644 api-spec/paths/policies/_id/getPolicy.yaml create mode 100644 api-spec/paths/policies/_id/index.yaml create mode 100644 api-spec/paths/policies/_id/updatePolicy.yaml create mode 100644 api-spec/paths/policies/createPolicies.yaml create mode 100644 api-spec/paths/policies/createPolicy.yaml create mode 100644 api-spec/paths/policies/deletePolicies.yaml create mode 100644 api-spec/paths/policies/getPolicies.yaml create mode 100644 api-spec/paths/policies/index.yaml create mode 100644 api-spec/paths/policies/updatePolicies.yaml create mode 100644 api-spec/paths/shares/_id/deleteShare.yaml create mode 100644 api-spec/paths/shares/_id/getShare.yaml create mode 100644 api-spec/paths/shares/_id/index.yaml create mode 100644 api-spec/paths/shares/_id/updateShare.yaml create mode 100644 api-spec/paths/shares/auth/authenticateShare.yaml create mode 100644 api-spec/paths/shares/auth/index.yaml create mode 100644 api-spec/paths/shares/createShare.yaml create mode 100644 api-spec/paths/shares/createShares.yaml create mode 100644 api-spec/paths/shares/deleteShares.yaml create mode 100644 api-spec/paths/shares/getShares.yaml create mode 100644 api-spec/paths/shares/index.yaml create mode 100644 api-spec/paths/shares/info/_id/getShareInfo.yaml create mode 100644 api-spec/paths/shares/info/_id/index.yaml create mode 100644 api-spec/paths/shares/invite/index.yaml create mode 100644 api-spec/paths/shares/invite/inviteShare.yaml create mode 100644 api-spec/paths/shares/updateShares.yaml create mode 100644 api-spec/paths/translations/_id/deleteTranslation.yaml create mode 100644 api-spec/paths/translations/_id/getTranslation.yaml create mode 100644 api-spec/paths/translations/_id/index.yaml create mode 100644 api-spec/paths/translations/_id/updateTranslation.yaml create mode 100644 api-spec/paths/translations/createTranslation.yaml create mode 100644 api-spec/paths/translations/createTranslations.yaml create mode 100644 api-spec/paths/translations/deleteTranslations.yaml create mode 100644 api-spec/paths/translations/getTranslations.yaml create mode 100644 api-spec/paths/translations/index.yaml create mode 100644 api-spec/paths/translations/updateTranslations.yaml diff --git a/api-spec/components/schemas/_index.yaml b/api-spec/components/schemas/_index.yaml index 1c1d61b2..a7156e4f 100644 --- a/api-spec/components/schemas/_index.yaml +++ b/api-spec/components/schemas/_index.yaml @@ -6,7 +6,8 @@ Schema: $ref: schema.yaml x-metadata: $ref: x-metadata.yaml - +items: + $ref: items.yaml Activity: $ref: activity.yaml Collections: @@ -21,10 +22,18 @@ Flows: $ref: flows.yaml Folders: $ref: folders.yaml +Items: + $ref: items.yaml +Notifications: + $ref: notifications.yaml Operations: $ref: operations.yaml +Panels: + $ref: panels.yaml Permissions: $ref: permissions.yaml +Policies: + $ref: policies.yaml Presets: $ref: presets.yaml Relations: @@ -35,6 +44,10 @@ Roles: $ref: roles.yaml Settings: $ref: settings.yaml +Shares: + $ref: shares.yaml +Translations: + $ref: translations.yaml Users: $ref: users.yaml Versions: diff --git a/api-spec/components/schemas/comments.yaml b/api-spec/components/schemas/comments.yaml new file mode 100644 index 00000000..cad8f243 --- /dev/null +++ b/api-spec/components/schemas/comments.yaml @@ -0,0 +1,39 @@ +type: object +properties: + collection: + description: Collection identifier in which the item resides. + example: articles + type: string + id: + description: Unique identifier for the object. + example: 2fab3b9d-0543-4b87-8a30-3c5ee66fedf1 + type: uuid + item: + description: The item the comment is created for. + example: 15 + 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 Data Studio. + example: This is a comment on an article + type: string + date_created: + description: Timestamp in ISO8601 when the comment was created. + example: 2023-01-15T09:14:52Z + type: timestamp + date_updated: + description: Timestamp in ISO8601 when the comment was last updated. + example: 2023-01-15T09:00:00Z + type: timestamp + user_created: + description: The user who created the comment. Many-to-one to users. + example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af + oneOf: + - type: string + - $ref: users.yaml + user_updated: + description: The user who last updated the comment. Many-to-one to users. + example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af + oneOf: + - type: string + - $ref: users.yaml +x-collection: directus_comments diff --git a/api-spec/components/schemas/dashboards.yaml b/api-spec/components/schemas/dashboards.yaml new file mode 100644 index 00000000..ad787d8f --- /dev/null +++ b/api-spec/components/schemas/dashboards.yaml @@ -0,0 +1,39 @@ +type: object +properties: + id: + description: Primary key of the dashboard; + example: a79bd1b2-beb2-49fc-8a26-0b3eec0e2697 + type: uuid + name: + description: Name of the dashboard. + example: My dashboard + type: string + icon: + description: Material icon for dashboard. + example: space_dashboard + type: string + note: + description: Descriptive text about the dashboard. + example: Test + type: string + date_created: + description: When the dashboard was created. + example: 2023-01-25T19:16:49.009Z + type: Date + user_created: + description: User that created the dashboard. Many-to-one to users. + example: fd066644-c8e5-499d-947b-fe6c6e1a1473 + oneOf: + - type: many-to-one + - $ref: users.yaml + color: + description: Accent color for the dashboard. + example: #6644FF + type: string + panels: + description: Panels that are in this dashboard. One-to-may to panels. + example: 22640672-eef0-4ee9-ab04-591f3afb2883 + oneOf: + - type: one-to-many + - $ref: panels.yaml +x-collection: directus_shares diff --git a/api-spec/components/schemas/items.yaml b/api-spec/components/schemas/items.yaml new file mode 100644 index 00000000..dcfd96d7 --- /dev/null +++ b/api-spec/components/schemas/items.yaml @@ -0,0 +1,7 @@ +type: object +properties: + id: + description: Unique identifier for the object. + example: 2 + type: integer +x-collection: directus_items diff --git a/api-spec/components/schemas/notifications.yaml b/api-spec/components/schemas/notifications.yaml new file mode 100644 index 00000000..9ff33d43 --- /dev/null +++ b/api-spec/components/schemas/notifications.yaml @@ -0,0 +1,43 @@ +type: object +properties: + id: + description: Primary key of the revision. + example: 2 + type: integer + timestamp: + description: Timestamp in ISO8601 when the notification was created. + example: '2021-11-24T13:57:35Z' + type: string + status: + description: Current status of the notification. One of "inbox", "archived" + example: inbox + type: string + recipient: + description: User that received the notification. + example: 3EE34828-B43C-4FB2-A721-5151579B08EA + oneOf: + - type: string + - $ref: users.yaml + sender: + description: User that sent the notification, if any. + example: 497a495e-5529-4e46-8feb-2f35e9b85601 + oneOf: + - type: string + - $ref: users.yaml + subject: + description: Subject line of the message. + example: inbox + type: string + message: + description: Subject line of the message. + example: \nHello admin@example.com,\n\rijk@directus.io has mentioned you in a comment:\n\n> Hello admin@example.com!\n\nClick here to view.\n + type: string + collection: + description: Collection this notification references. + example: articles + type: string + item: + description: Primary key of the item this notification references. + example: '1' + type: string +x-collection: directus_notifications diff --git a/api-spec/components/schemas/panels.yaml b/api-spec/components/schemas/panels.yaml new file mode 100644 index 00000000..b78e9e97 --- /dev/null +++ b/api-spec/components/schemas/panels.yaml @@ -0,0 +1,67 @@ +type: object +properties: + id: + description: Primary key of the panel. + example: 22640672-eef0-4ee9-ab04-591f3afb288 + type: uuid + dashboard: + description: Dashboard where this panel is visible. Many-to-one to dashboards. + example: a79bd1b2-beb2-49fc-8a26-0b3eec0e269 + oneOf: + - type: string + - $ref: dashboards.yaml + name: + description: Name of the panel. + example: 30-day sales + type: string + icon: + description: Material design icon for the panel. + example: paid + type: string + color: + description: Accent color of the panel. + example: #6B8068 + type: string + show_header: + description: Whether or not the header should be rendered for this panel. + example: true + type: boolean + note: + description: Description for the panel. + example: Overview of the sales numbers in the last 30 day + type: string + type: + description: The panel type used for this panel. + example: time-series + type: string + position_x: + description: The X position on the workspace grid. + example: 1 + type: integer + position_y: + description: The Y position on the workspace grid. + example: 1 + type: integer + width: + description: Width of the panel in number of workspace dots. + example: 1 + type: integer + height: + description: Height of the panel in number of workspace dots. + example: 1 + type: integer + options: + description: Description for the panel. + example: {} + type: JSON + date_created: + description: When the panel was created + example: 2023-01-05T19:05:51.884Z + type: Date + user_created: + description: User that created the panel. Many-to-one to users. + example: fd066644-c8e5-499d-947b-fe6c6e1a1473 + oneOf: + - type: string + - $ref: users.yaml +x-collection: directus_panels diff --git a/api-spec/components/schemas/policies.yaml b/api-spec/components/schemas/policies.yaml new file mode 100644 index 00000000..c53facf2 --- /dev/null +++ b/api-spec/components/schemas/policies.yaml @@ -0,0 +1,53 @@ +type: object +properties: + id: + description: Primary key of the policy; + example: 22640672-eef0-4ee9-ab04-591f3afb288 + type: uuid + name: + description: Name of the policy. + example: Admin + type: string + icon: + description: Icon for the policy. Displayed in the Data Studio. + example: supervised_user_circle + type: string + description: + description: Description for the policy. Displayed in the Data Studio. + example: null + type: string + ip_access: + description: A CSV of IP addresses that this policy applies to. Allows you to configure an allowlist of IP addresses. If empty, no IP restrictions are applied. + example: null + type: csv + enforce_tfa: + description: Whether or not Two-Factor Authentication is required for users that have this policy. + example: false + type: boolean + admin_access: + description: If this policy grants the user admin access. This means that users with this policy have full permissions to everything. + example: true + type: boolean + app_access: + description: Whether or not users with this policy have access to use the Data Studio. + example: true + type: boolean + users: + description: The users this policy is assigned to directly, this does not include users which receive this policy through a role. It expects and returns data from the directus_access collection. Many-to-many to users via access. + example: ["0bc7b36a-9ba9-4ce0-83f0-0a526f354e07"] + oneOf: + - type: many-to-many + - $ref: users.yaml + roles: + description: The roles this policy is assigned to. It expects and returns data from the directus_access collection. Many-to-many to roles via access. + example: ["8b4474c0-288d-4bb8-b62e-8330646bb6aa"] + oneOf: + - type: many-to-many + - $ref: roles.yaml + permissions: + description: The permissions assigned to this policy. One-to-many to permissions. + example: ["5c74c86f-cab0-4b14-a3c4-cd4f2363e826"] + oneOf: + - type: one-to-many + - $ref: permissions.yaml +x-collection: directus_policies diff --git a/api-spec/components/schemas/shares.yaml b/api-spec/components/schemas/shares.yaml new file mode 100644 index 00000000..445c95ba --- /dev/null +++ b/api-spec/components/schemas/shares.yaml @@ -0,0 +1,57 @@ +type: object +properties: + id: + description: Primary key of the share; + example: 3a606c3e-9d4d-4556-b7bb-f00860613da3 + type: uuid + name: + description: Custom (optional) name for the share. + example: My Share + type: string + collection: + description: Collection in which the current item is shared. Many-to-one to Collections. + example: articles + oneOf: + - type: many-to-one + - $ref: collections.yaml + item: + description: Primary key of the item that's shared. + example: '1' + type: string + role: + description: Share of which the share will inherit the permissions. + example: 2b34fba4-a6cb-49f4-a070-2daee7ac44f0 + oneOf: + - type: many-to-one + - $ref: shares.yaml + password: + description: Optional password that's required to view this shared item. + example: '**********' + type: hash + user_created: + description: Reference to the user who created this share. Many-to-one to Users. + example: b13072b7-73e9-4904-89e0-34aaf4403766 + oneOf: + - type: many-to-one + - $ref: users.yaml + date_created: + description: When the share was created. + example: 2023-01-25T19:16:49.009Z + type: timestamp + date_start: + description: Optional timestamp that controls from what date/time the shared item can be viewed. + example: 2023-01-26T17:00:00.000Z + type: timestamp + date_end: + description: Optional timestamp that controls until what date/time the shared item can be viewed. + example: 2023-01-28T17:00:00.000Z + type: timestamp + times_used: + description: The number of times the shared item has been viewed. + example: 0 + type: number + max_uses: + description: The maximum number of times the shared item can be viewed. + example: 15 + type: number +x-collection: directus_shares diff --git a/api-spec/components/schemas/translations.yaml b/api-spec/components/schemas/translations.yaml new file mode 100644 index 00000000..e24f3b9b --- /dev/null +++ b/api-spec/components/schemas/translations.yaml @@ -0,0 +1,19 @@ +type: object +properties: + id: + description: Primary key of the translations. + example: sc4346aa4-81a8-4885-b3a8-f647e4f6f769 + type: uuid + key: + description: The translation key. + example: Test + type: string + language: + description: The language of the translation. + example: en-US + type: string + string: + description: The translation value. + example: Test + type: string +x-collection: directus_translations diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 486f7443..efe6d46e 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -39,6 +39,10 @@ paths: $ref: paths/collections/index.yaml "/collections/{_id}": $ref: paths/collections/_id/index.yaml + "/dashboards": + $ref: paths/dashboards/index.yaml + "/dashboards/{id}": + $ref: paths/dashboards/_id/index.yaml "/extensions": $ref: paths/extensions/index.yaml "/extensions/{_bundle}/{_name}": @@ -63,16 +67,34 @@ paths: $ref: paths/folders/index.yaml "/folders/{_id}": $ref: paths/folders/_id/index.yaml + "/items/{_collection}": + $ref: paths/items/_collection/index.yaml + "/items/{_collection}/singleton": + $ref: paths/items/_collection/singleton/index.yaml + "/items/{_collection}/{_id}": + $ref: paths/items/_collection/_id/index.yaml + "/notifications": + $ref: paths/notifications/index.yaml + "/notifications/{_id}": + $ref: paths/notifications/_id/index.yaml "/operations": $ref: paths/operations/index.yaml "/operations/{_id}": $ref: paths/operations/_id/index.yaml + "/panels": + $ref: paths/panels/index.yaml + "/panels/{_id}": + $ref: paths/panels/_id/index.yaml "/permissions": $ref: paths/permissions/index.yaml "/permissions/{id}": $ref: paths/permissions/_id/index.yaml "/permissions/me": $ref: paths/permissions/me/index.yaml + "/policies": + $ref: paths/policies/index.yaml + "/policies/{id}": + $ref: paths/policies/_id/index.yaml "/presets": $ref: paths/presets/index.yaml "/presets/{id}": @@ -101,6 +123,18 @@ paths: $ref: paths/server/ping/index.yaml "/settings": $ref: paths/settings/index.yaml + "/shares": + $ref: paths/shares/index.yaml + "/shares/{id}": + $ref: paths/shares/_id/index.yaml + "/shares/auth": + $ref: paths/shares/auth/index.yaml + "/shares/info/{id}": + $ref: paths/shares/info/_id/index.yaml + "/translations": + $ref: paths/translations/index.yaml + "/translations/{id}": + $ref: paths/translations/_id/index.yaml "/users": $ref: paths/users/index.yaml "/users/{id}": diff --git a/api-spec/paths/activity/comment/_id/getComment.yaml b/api-spec/paths/activity/comment/_id/getComment.yaml new file mode 100644 index 00000000..ee6099ca --- /dev/null +++ b/api-spec/paths/activity/comment/_id/getComment.yaml @@ -0,0 +1,38 @@ +summary: Get Comment by ID +description: Returns a single comment by primary key. +operationId: getComment +parameters: +- $ref: ../../../../components/parameters.yaml#/Id +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/comments.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readComment } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readComment(comment_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + comment_by_id(id: ID!): directus_comments + } diff --git a/api-spec/paths/activity/comment/_id/index.yaml b/api-spec/paths/activity/comment/_id/index.yaml index 71bd6c99..c8bd2274 100644 --- a/api-spec/paths/activity/comment/_id/index.yaml +++ b/api-spec/paths/activity/comment/_id/index.yaml @@ -1,3 +1,5 @@ +get: + $ref: getComment.yaml patch: $ref: updateComment.yaml delete: diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/activity/comment/_id/updateComment.yaml index 3af18dfd..54dc7353 100644 --- a/api-spec/paths/activity/comment/_id/updateComment.yaml +++ b/api-spec/paths/activity/comment/_id/updateComment.yaml @@ -8,11 +8,8 @@ requestBody: content: application/json: schema: - type: object - properties: - comment: - type: string - example: My updated comment + anyOf: + - $ref: ../../../../components/schemas/comments.yaml responses: '200': content: @@ -37,12 +34,14 @@ x-codeSamples: const client = createDirectus('directus_project_url').with(rest()); - const result = await client.request( - updateComment(comment_id, { - comment: comment_content, - }) - ); + const result = await client.request(updateComment(comment_id, partial_comment_object)); - label: GraphQL lang: GraphQL source: | + POST /graphql/system + + type Mutation { + update_comments_item(id: ID!, data: update_directus_comments_input): directus_comments + } + diff --git a/api-spec/paths/activity/comment/createComments.yaml b/api-spec/paths/activity/comment/createComments.yaml new file mode 100644 index 00000000..2b4494b8 --- /dev/null +++ b/api-spec/paths/activity/comment/createComments.yaml @@ -0,0 +1,58 @@ +summary: Create Multiple comments +description: Create multiple new comments. +operationId: createComments +parameters: +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/comments.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/comments.yaml + meta: + $ref: ../../../components/schemas/x-metadata.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createComments } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createComments(comments_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_comments_items(data: [create_directus_comments_input!]!): [directus_comments] + } diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/activity/comment/deleteComments.yaml new file mode 100644 index 00000000..66eb07b0 --- /dev/null +++ b/api-spec/paths/activity/comment/deleteComments.yaml @@ -0,0 +1,42 @@ + +summary: Delete Multiple Comments +description: Delete multiple existing Comments. +operationId: deleteComments +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/comments.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteComments } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteComments(comment_id_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + delete_Comments_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/activity/comment/getComments.yaml b/api-spec/paths/activity/comment/getComments.yaml new file mode 100644 index 00000000..b1c214b1 --- /dev/null +++ b/api-spec/paths/activity/comment/getComments.yaml @@ -0,0 +1,47 @@ + +summary: Get Comments +description: Returns a list of comments. +operationId: getActivities +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +responses: + '200': + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/comments.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readComments } from '@directus/sdk'; + + const client = createDirectus('directus_comment_example').with(rest()); + + const result = await client.request(readComments(query)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + flows: [directus_comments] + } diff --git a/api-spec/paths/activity/comment/index.yaml b/api-spec/paths/activity/comment/index.yaml index df54e4de..2a87c366 100644 --- a/api-spec/paths/activity/comment/index.yaml +++ b/api-spec/paths/activity/comment/index.yaml @@ -1,2 +1,8 @@ +get: + $ref: getComments.yaml post: $ref: createComment.yaml +patch: + $ref: updateComments.yaml +delete: + $ref: deleteComments.yaml diff --git a/api-spec/paths/activity/comment/updateComments.yaml b/api-spec/paths/activity/comment/updateComments.yaml new file mode 100644 index 00000000..70198cea --- /dev/null +++ b/api-spec/paths/activity/comment/updateComments.yaml @@ -0,0 +1,61 @@ + +summary: Update Multiple comments +description: Update multiple existing comments. +operationId: updateComments +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/comments.yaml + 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/comments.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Activity +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateComments } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateComments(comments_id_array, partial_comment_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_comments_items(ids: [ID!]!, data: update_directus_comments_input): [directus_comments] + } diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml index 272f951b..06a96812 100644 --- a/api-spec/paths/assets/_id/getAsset.yaml +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -38,7 +38,12 @@ responses: x-codeSamples: - label: Directus SDK lang: JavaScript - source: + source: | + import { createDirectus, rest, readAssetRaw } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readAssetRaw('', { key: '' })); - label: GraphQL lang: GraphQL - source: | + source: Not available in Directus SDK/GraphQL diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml index 40a466ad..9531950f 100644 --- a/api-spec/paths/auth/oauth/oauth.yaml +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -33,4 +33,4 @@ x-codeSamples: const result = await client.request(readProviders()); - label: GraphQL lang: GraphQL - source: | + source: Not available in GraphQL diff --git a/api-spec/paths/dashboards/_id/deleteDashboard.yaml b/api-spec/paths/dashboards/_id/deleteDashboard.yaml new file mode 100644 index 00000000..443e6e43 --- /dev/null +++ b/api-spec/paths/dashboards/_id/deleteDashboard.yaml @@ -0,0 +1,34 @@ + +summary: Delete an Dashboard +description: Delete an existing dashboard. +operationId: deleteDashboard +parameters: +- name: id + in: path + description: Unique identifier of the dashboard. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteDashboard } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteDashboard(dashboard_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_dashboards_item(id: ID!): delete_one + } diff --git a/api-spec/paths/dashboards/_id/getDashboard.yaml b/api-spec/paths/dashboards/_id/getDashboard.yaml new file mode 100644 index 00000000..524cc381 --- /dev/null +++ b/api-spec/paths/dashboards/_id/getDashboard.yaml @@ -0,0 +1,43 @@ +summary: Retrieve a Dashboard +description: List an existing dashboard by primary key. +operationId: getDashboard +parameters: +- name: id + in: path + description: Unique identifier of the Dashboard. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/Dashboards.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readDashboard } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readDashboard(dashboard_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + dashboards_by_id(id: ID!): directus_dashboards + } diff --git a/api-spec/paths/dashboards/_id/index.yaml b/api-spec/paths/dashboards/_id/index.yaml new file mode 100644 index 00000000..3c243196 --- /dev/null +++ b/api-spec/paths/dashboards/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getDashboard.yaml +patch: + $ref: updatesDashboard.yaml +delete: + $ref: deleteDashboard.yaml diff --git a/api-spec/paths/dashboards/_id/updateDashboard.yaml b/api-spec/paths/dashboards/_id/updateDashboard.yaml new file mode 100644 index 00000000..8e27e4e5 --- /dev/null +++ b/api-spec/paths/dashboards/_id/updateDashboard.yaml @@ -0,0 +1,49 @@ +summary: Update a Dashboard +description: Update an existing dashboard. +operationId: updateDashboard +parameters: +- name: id + in: path + description: Unique identifier of the dashboard. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/dashboards.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/dashboards.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateDashboard } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateDashboard(dashboard_id, partial_dashboard_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_dashboards_item(id: ID!, data: update_directus_dashboards_input): directus_dashboards + } diff --git a/api-spec/paths/dashboards/createDashboard.yaml b/api-spec/paths/dashboards/createDashboard.yaml new file mode 100644 index 00000000..d5806644 --- /dev/null +++ b/api-spec/paths/dashboards/createDashboard.yaml @@ -0,0 +1,44 @@ + +summary: Create a Dashboard +description: Create a new dashboard. +operationId: createDashboard +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/dashboards.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/dashboards.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createDashboard } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createDashboard(dashboard_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_dashboards_item(data: create_directus_dashboards_input!): directus_dashboards + } diff --git a/api-spec/paths/dashboards/createDashboards.yaml b/api-spec/paths/dashboards/createDashboards.yaml new file mode 100644 index 00000000..75891507 --- /dev/null +++ b/api-spec/paths/dashboards/createDashboards.yaml @@ -0,0 +1,56 @@ +summary: Create Multiple Dashboards +description: Create multiple new dashboards. +operationId: createDashboards +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/dashboards.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Dashboards.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createDashboards } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createDashboards(dashboard_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_dashboards_items(data: [create_directus_dashboards_input!]!): [directus_dashboards] + } diff --git a/api-spec/paths/dashboards/deleteDashboards.yaml b/api-spec/paths/dashboards/deleteDashboards.yaml new file mode 100644 index 00000000..3742c81f --- /dev/null +++ b/api-spec/paths/dashboards/deleteDashboards.yaml @@ -0,0 +1,40 @@ + +summary: Delete Multiple Dashboards +description: Delete multiple existing dashboards. +operationId: deleteDashboards +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/dashboards.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteDashboards } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteDashboards(dashboard_id_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_dashboards_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/dashboards/getDashboards.yaml b/api-spec/paths/dashboards/getDashboards.yaml new file mode 100644 index 00000000..ffb04435 --- /dev/null +++ b/api-spec/paths/dashboards/getDashboards.yaml @@ -0,0 +1,48 @@ + +summary: List Dashboards +description: List all dashboards that exist in Directus. +operationId: getDashboards +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/dashboards.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, (readDashboards } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readDashboards(query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + dashboards: [directus_dashboards] + } diff --git a/api-spec/paths/dashboards/index.yaml b/api-spec/paths/dashboards/index.yaml new file mode 100644 index 00000000..c3aa4ed6 --- /dev/null +++ b/api-spec/paths/dashboards/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getDashboards.yaml +post: + - $ref: createDashboard.yaml + - $ref: createsDashboards.yaml +update: + $ref: updatesDashboards.yaml +delete: + $ref: deleteDashboards.yaml diff --git a/api-spec/paths/dashboards/updateDashboards.yaml b/api-spec/paths/dashboards/updateDashboards.yaml new file mode 100644 index 00000000..e6c4afd5 --- /dev/null +++ b/api-spec/paths/dashboards/updateDashboards.yaml @@ -0,0 +1,59 @@ + +summary: Update Multiple Dashboards +description: Update multiple dashboards at the same time. +operationId: updateDashboards +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/dashboards.yaml + 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/dashboards.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Dashboards +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateDashboards } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateDashboards(dashboard_id_array, partial_dashboard_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_dashboards_items(ids: [ID!]!, data: update_directus_dashboards_input): [directus_dashboards] + } diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml index d412b522..3dcfb5b4 100644 --- a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -43,3 +43,18 @@ responses: $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Extensions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateExtension } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateExtension(bundle, name, partial_extension_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_extensions_item(bundle: String, name: String!, data: update_directus_extensions_input!): directus_extensions + } diff --git a/api-spec/paths/items/_collection/_id/deleteItem.yaml b/api-spec/paths/items/_collection/_id/deleteItem.yaml new file mode 100644 index 00000000..b8d44cfa --- /dev/null +++ b/api-spec/paths/items/_collection/_id/deleteItem.yaml @@ -0,0 +1,34 @@ +summary: Delete an item +description: Delete an existing item. +operationId: deleteItem +parameters: +- name: id + in: path + description: Unique identifier of the item. + schema: + type: string +- $ref: ../../../../components/parameters.yaml#/Collection +responses: + '200': + description: Successful request + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteItem } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteItem(collection_name, item_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete__item(id: ID!): delete_one + } diff --git a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml new file mode 100644 index 00000000..bc784d93 --- /dev/null +++ b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml @@ -0,0 +1,48 @@ +summary: Retrieve an Item +description: Retrieves an item in a given collection. +operationId: getCollectionItem +parameters: +- name: id + in: path + description: Unique identifier of the item. + schema: + type: string + required: true +- $ref: ../../../../components/parameters.yaml#/Version +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/items.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readItem } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readItem(collection_name, item_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + _by_id(id: ID!, version: String): + } + + type Query { + _by_version(id: ID!, version: String!): + } diff --git a/api-spec/paths/items/_collection/_id/index.yaml b/api-spec/paths/items/_collection/_id/index.yaml new file mode 100644 index 00000000..02d714a2 --- /dev/null +++ b/api-spec/paths/items/_collection/_id/index.yaml @@ -0,0 +1,7 @@ +get: + $ref: getCollectionItem.yaml +patch: + $ref: updateItem.yaml +delete: + $ref: deleteItem.yaml + diff --git a/api-spec/paths/items/_collection/_id/updateItem.yaml b/api-spec/paths/items/_collection/_id/updateItem.yaml new file mode 100644 index 00000000..517484c7 --- /dev/null +++ b/api-spec/paths/items/_collection/_id/updateItem.yaml @@ -0,0 +1,49 @@ +summary: Update an item +description: Update an existing item. +operationId: updateItem +parameters: +- name: id + in: path + description: Unique identifier of the item. + schema: + type: string +- $ref: ../../../../components/parameters.yaml#/Collection +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../../components/schemas/items.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/items.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateItem } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateItem(collection_name, item_id, partial_item_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update__item(id: ID!, data: update__input!): + } diff --git a/api-spec/paths/items/_collection/createItem.yaml b/api-spec/paths/items/_collection/createItem.yaml new file mode 100644 index 00000000..970cc122 --- /dev/null +++ b/api-spec/paths/items/_collection/createItem.yaml @@ -0,0 +1,44 @@ +summary: Create an item +description: Create a new item in the given collection. +operationId: createItem +parameters: +- $ref: ../../../components/parameters.yaml#/Collection +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/items.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/items.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createItem } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createItem(collection_name, item_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create__item(data: create__input): + } diff --git a/api-spec/paths/items/_collection/createItems.yaml b/api-spec/paths/items/_collection/createItems.yaml new file mode 100644 index 00000000..306f257b --- /dev/null +++ b/api-spec/paths/items/_collection/createItems.yaml @@ -0,0 +1,59 @@ + +summary: Create Multiple Items +description: Create new items in the given collection. +operationId: createItems +parameters: +- $ref: ../../../components/parameters.yaml#/Collection +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/items.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/items.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createItems } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createItems(collection_name, item_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create__items(data: [create__input]): [] + } diff --git a/api-spec/paths/items/_collection/deleteItems.yaml b/api-spec/paths/items/_collection/deleteItems.yaml new file mode 100644 index 00000000..15692963 --- /dev/null +++ b/api-spec/paths/items/_collection/deleteItems.yaml @@ -0,0 +1,52 @@ +summary: Delete Multiple Items +description: Delete multiple items at the same time. +operationId: deleteItems +parameters: +- $ref: ../../../components/parameters.yaml#/Collection +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/items.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteItems } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request(deleteItems(collection_name, item_id_array)); + + //or + + const result = await client.request(deleteItems(collection_name, query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete__items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/items/_collection/getCollectionItems.yaml b/api-spec/paths/items/_collection/getCollectionItems.yaml new file mode 100644 index 00000000..292ccfd3 --- /dev/null +++ b/api-spec/paths/items/_collection/getCollectionItems.yaml @@ -0,0 +1,50 @@ +summary: List all items in a collection. +description: Returns a list of the items in the given collection. +operationId: getCollectionItems +parameters: +- description: Unique identifier of the collection the item resides in. + in: path + name: collection + required: true + schema: + type: string +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/items.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readItems } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readItems('collection_name', query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + : [] + } diff --git a/api-spec/paths/items/_collection/index.yaml b/api-spec/paths/items/_collection/index.yaml new file mode 100644 index 00000000..bae488d3 --- /dev/null +++ b/api-spec/paths/items/_collection/index.yaml @@ -0,0 +1,8 @@ +get: + $ref: getCollectionItems.yaml +post: + - $ref: createItem.yaml + - $ref: createItems.yaml +patch: + $ref: updateItems.yaml +delete: deleteItems.yaml diff --git a/api-spec/paths/items/_collection/singleton/getSingleton.yaml b/api-spec/paths/items/_collection/singleton/getSingleton.yaml new file mode 100644 index 00000000..deffe91b --- /dev/null +++ b/api-spec/paths/items/_collection/singleton/getSingleton.yaml @@ -0,0 +1,44 @@ + +summary: Retrieve an Singleton +description: Retrieves a singleton of a given collection. +operationId: getSingleton +parameters: +- $ref: ../../../../components/parameters.yaml#/Collection +- $ref: ../../../../components/parameters.yaml#/Version +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/items.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readSingleton } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readSingleton(collection_name)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + (version: String): + } + + type Query { + _by_version(version: String!): + } diff --git a/api-spec/paths/items/_collection/singleton/index.yaml b/api-spec/paths/items/_collection/singleton/index.yaml new file mode 100644 index 00000000..5a466884 --- /dev/null +++ b/api-spec/paths/items/_collection/singleton/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: getSingleton.yaml +patch: + $ref: updateSingleton.yaml diff --git a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml new file mode 100644 index 00000000..07803804 --- /dev/null +++ b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml @@ -0,0 +1,44 @@ +summary: Update Singleton +description: Update a singleton item. +operationId: updateSingleton +parameters: +- $ref: ../../../../components/parameters.yaml#/Collection +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../../components/schemas/items.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../components/schemas/items.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateSingleton } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateSingleton(collection_name, partial_item_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update__items(data: [update__input]): [] + } diff --git a/api-spec/paths/items/_collection/updateItems.yaml b/api-spec/paths/items/_collection/updateItems.yaml new file mode 100644 index 00000000..1fd9faa4 --- /dev/null +++ b/api-spec/paths/items/_collection/updateItems.yaml @@ -0,0 +1,60 @@ + +summary: Update Multiple Items +description: Update multiple items at the same time. +operationId: updateItems +parameters: +- $ref: ../../../components/parameters.yaml#/Collection +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/items.yaml + 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/items.yaml + meta: + $ref: ../../../components/schemas/x-metadata.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateItems } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateItems(collection_name, item_id_array, partial_item_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update__items(ids: [ID!]!, data: [update__input]): [] + } diff --git a/api-spec/paths/notifications/_id/deleteNotification.yaml b/api-spec/paths/notifications/_id/deleteNotification.yaml new file mode 100644 index 00000000..dff8eb19 --- /dev/null +++ b/api-spec/paths/notifications/_id/deleteNotification.yaml @@ -0,0 +1,34 @@ + +summary: Delete an notification +description: Delete an existing notification. +operationId: deleteNotification +parameters: +- name: id + in: path + description: Unique identifier of the notification. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteNotification } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteNotification(notification_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_notifications_item(id: ID!): delete_one + } diff --git a/api-spec/paths/notifications/_id/getNotification.yaml b/api-spec/paths/notifications/_id/getNotification.yaml new file mode 100644 index 00000000..a1542c69 --- /dev/null +++ b/api-spec/paths/notifications/_id/getNotification.yaml @@ -0,0 +1,43 @@ +summary: Retrieve a notification +description: List an existing notification by primary key. +operationId: getNotification +parameters: +- name: id + in: path + description: Unique identifier of the notification. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/notifications.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readNotification } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readNotification(notification_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + notifications_by_id(id: ID!): directus_notifications + } diff --git a/api-spec/paths/notifications/_id/index.yaml b/api-spec/paths/notifications/_id/index.yaml new file mode 100644 index 00000000..75214d12 --- /dev/null +++ b/api-spec/paths/notifications/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getNotification.yaml +patch: + $ref: updateNotification.yaml +delete: + $ref: deleteNotification.yaml diff --git a/api-spec/paths/notifications/_id/updateNotification.yaml b/api-spec/paths/notifications/_id/updateNotification.yaml new file mode 100644 index 00000000..56877549 --- /dev/null +++ b/api-spec/paths/notifications/_id/updateNotification.yaml @@ -0,0 +1,49 @@ +summary: Update a Notification +description: Update an existing notification. +operationId: getNotification +parameters: +- name: id + in: path + description: Unique identifier of the notification. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/notifications.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/notifications.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateNotification } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateNotification(notification_id, partial_notification_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_notifications_item(id: ID!, data: update_directus_notifications_input): directus_notifications + } diff --git a/api-spec/paths/notifications/createNotification.yaml b/api-spec/paths/notifications/createNotification.yaml new file mode 100644 index 00000000..046d6e24 --- /dev/null +++ b/api-spec/paths/notifications/createNotification.yaml @@ -0,0 +1,44 @@ + +summary: Create a Notification +description: Create a new notification. +operationId: createNotification +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/notifications.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/notifications.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createNotification } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createNotification(notification_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_notifications_item(data: create_directus_notifications_input!): directus_notifications + } diff --git a/api-spec/paths/notifications/createNotifications.yaml b/api-spec/paths/notifications/createNotifications.yaml new file mode 100644 index 00000000..84142de5 --- /dev/null +++ b/api-spec/paths/notifications/createNotifications.yaml @@ -0,0 +1,57 @@ +summary: Create Multiple notifications +description: Create multiple new notifications. +operationId: createNotifications +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/notifications.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/notifications.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createNotifications } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createNotifications(notification_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_notifications_items(data: [create_directus_notifications_input!]!): [directus_notifications] + } diff --git a/api-spec/paths/notifications/deleteNotifications.yaml b/api-spec/paths/notifications/deleteNotifications.yaml new file mode 100644 index 00000000..88041ead --- /dev/null +++ b/api-spec/paths/notifications/deleteNotifications.yaml @@ -0,0 +1,48 @@ + +summary: Delete Multiple notifications +description: Delete multiple existing notifications. +operationId: deleteNotifications +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/notifications.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteNotifications } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteNotifications(notification_id_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_notifications_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/notifications/getNotifications.yaml b/api-spec/paths/notifications/getNotifications.yaml new file mode 100644 index 00000000..20dadff5 --- /dev/null +++ b/api-spec/paths/notifications/getNotifications.yaml @@ -0,0 +1,48 @@ + +summary: List notifications +description: List all notifications that exist in Directus. +operationId: getNotifications +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/notifications.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readNotifications } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readNotifications(query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + notifications: [directus_notifications] + } diff --git a/api-spec/paths/notifications/index.yaml b/api-spec/paths/notifications/index.yaml new file mode 100644 index 00000000..de7fbe34 --- /dev/null +++ b/api-spec/paths/notifications/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getNotifications.yaml +post: + - $ref: createNotification.yaml + - $ref: createNotifications.yaml +update: + $ref: updateNotifications.yaml +delete: + $ref: deleteNotifications.yaml diff --git a/api-spec/paths/notifications/updateNotifications.yaml b/api-spec/paths/notifications/updateNotifications.yaml new file mode 100644 index 00000000..bdd2e0f2 --- /dev/null +++ b/api-spec/paths/notifications/updateNotifications.yaml @@ -0,0 +1,59 @@ + +summary: Update Multiple notifications +description: Update multiple notifications at the same time. +operationId: updateNotifications +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/notifications.yaml + 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/notifications.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Notifications +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateNotifications } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateNotifications(notification_id_array, partial_notification_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_notifications_items(ids: [ID!]!, data: update_directus_notifications_input): [directus_notifications] + } diff --git a/api-spec/paths/panels/_id/deletePanel.yaml b/api-spec/paths/panels/_id/deletePanel.yaml new file mode 100644 index 00000000..8a341317 --- /dev/null +++ b/api-spec/paths/panels/_id/deletePanel.yaml @@ -0,0 +1,34 @@ + +summary: Delete an panel +description: Delete an existing panel. +operationId: deletePanel +parameters: +- name: id + in: path + description: Unique identifier of the panel. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePanel } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePanel(panel_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_panels_item(id: ID!): delete_one + } diff --git a/api-spec/paths/panels/_id/getPanel.yaml b/api-spec/paths/panels/_id/getPanel.yaml new file mode 100644 index 00000000..362b8dda --- /dev/null +++ b/api-spec/paths/panels/_id/getPanel.yaml @@ -0,0 +1,43 @@ +summary: Retrieve a panel +description: List an existing panel by primary key. +operationId: getPanel +parameters: +- name: id + in: path + description: Unique identifier of the panel. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/panels.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPanel } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPanel(panel_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + panels_by_id(id: ID!): directus_panels + } diff --git a/api-spec/paths/panels/_id/index.yaml b/api-spec/paths/panels/_id/index.yaml new file mode 100644 index 00000000..4bf1388a --- /dev/null +++ b/api-spec/paths/panels/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getPanel.yaml +patch: + $ref: updatePanel.yaml +delete: + $ref: deletePanel.yaml diff --git a/api-spec/paths/panels/_id/updatePanel.yaml b/api-spec/paths/panels/_id/updatePanel.yaml new file mode 100644 index 00000000..4162a488 --- /dev/null +++ b/api-spec/paths/panels/_id/updatePanel.yaml @@ -0,0 +1,49 @@ +summary: Update a panel +description: Update an existing panel. +operationId: updatePanel +parameters: +- name: id + in: path + description: Unique identifier of the panel. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/panels.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/panels.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- panels +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePanel } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePanel(panel_id, partial_panel_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_panels_item(id: ID!, data: update_directus_panels_input): directus_panels + } diff --git a/api-spec/paths/panels/createPanel.yaml b/api-spec/paths/panels/createPanel.yaml new file mode 100644 index 00000000..9b1faa4a --- /dev/null +++ b/api-spec/paths/panels/createPanel.yaml @@ -0,0 +1,44 @@ + +summary: Create a panel +description: Create a new panel. +operationId: createPanel +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/panels.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/panels.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPanel } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createpanel(panel_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_panels_item(data: create_directus_panels_input!): directus_panels + } diff --git a/api-spec/paths/panels/createPanels.yaml b/api-spec/paths/panels/createPanels.yaml new file mode 100644 index 00000000..67999ba9 --- /dev/null +++ b/api-spec/paths/panels/createPanels.yaml @@ -0,0 +1,57 @@ +summary: Create Multiple panels +description: Create multiple new panels. +operationId: createPanels +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/panels.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/panels.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPanel } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPanels(panel_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_panels_items(data: [create_directus_panels_input!]!): [directus_panels] + } diff --git a/api-spec/paths/panels/deletePanels.yaml b/api-spec/paths/panels/deletePanels.yaml new file mode 100644 index 00000000..4114d068 --- /dev/null +++ b/api-spec/paths/panels/deletePanels.yaml @@ -0,0 +1,40 @@ + +summary: Delete Multiple panels +description: Delete multiple existing panels. +operationId: deletePanels +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/panels.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePanels } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePanels(panel_id_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_panels_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/panels/getPanels.yaml b/api-spec/paths/panels/getPanels.yaml new file mode 100644 index 00000000..c3113332 --- /dev/null +++ b/api-spec/paths/panels/getPanels.yaml @@ -0,0 +1,48 @@ + +summary: List panels +description: List all panels that exist in Directus. +operationId: getPanels +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/panels.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPanels } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPanels(query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + panels: [directus_panels] + } diff --git a/api-spec/paths/panels/index.yaml b/api-spec/paths/panels/index.yaml new file mode 100644 index 00000000..68f73e08 --- /dev/null +++ b/api-spec/paths/panels/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getPanels.yaml +post: + - $ref: createPanel.yaml + - $ref: createPanels.yaml +update: + $ref: updatepanels.yaml +delete: + $ref: deletePanels.yaml diff --git a/api-spec/paths/panels/updatePanels.yaml b/api-spec/paths/panels/updatePanels.yaml new file mode 100644 index 00000000..3b980a62 --- /dev/null +++ b/api-spec/paths/panels/updatePanels.yaml @@ -0,0 +1,59 @@ + +summary: Update Multiple panels +description: Update multiple panels at the same time. +operationId: updatePanels +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/panels.yaml + 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/panels.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Panels +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePanels } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePanels(panel_id_array, partial_panel_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_panels_items(ids: [ID!]!, data: update_directus_panels_input): [directus_panels] + } diff --git a/api-spec/paths/policies/_id/deletePolicy.yaml b/api-spec/paths/policies/_id/deletePolicy.yaml new file mode 100644 index 00000000..01fd2ad3 --- /dev/null +++ b/api-spec/paths/policies/_id/deletePolicy.yaml @@ -0,0 +1,34 @@ + +summary: Delete an policy +description: Delete an existing policy. +operationId: deletePolicy +parameters: +- name: id + in: path + description: Unique identifier of the policy. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePolicy } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePolicy(policy_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_policies_item(id: ID!): delete_one + } diff --git a/api-spec/paths/policies/_id/getPolicy.yaml b/api-spec/paths/policies/_id/getPolicy.yaml new file mode 100644 index 00000000..c81357a7 --- /dev/null +++ b/api-spec/paths/policies/_id/getPolicy.yaml @@ -0,0 +1,43 @@ +summary: Retrieve a policy +description: List an existing policy by primary key. +operationId: getPolicy +parameters: +- name: id + in: path + description: Unique identifier of the Policy. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/policys.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Policys +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPolicy } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPolicy(policy_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + policies_by_id(id: ID!): directus_policies + } diff --git a/api-spec/paths/policies/_id/index.yaml b/api-spec/paths/policies/_id/index.yaml new file mode 100644 index 00000000..f002ab0e --- /dev/null +++ b/api-spec/paths/policies/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getPolicy.yaml +patch: + $ref: updatePolicy.yaml +delete: + $ref: deletePolicy.yaml diff --git a/api-spec/paths/policies/_id/updatePolicy.yaml b/api-spec/paths/policies/_id/updatePolicy.yaml new file mode 100644 index 00000000..6a18824c --- /dev/null +++ b/api-spec/paths/policies/_id/updatePolicy.yaml @@ -0,0 +1,49 @@ +summary: Update a policy +description: Update an existing policy. +operationId: updatePolicy +parameters: +- name: id + in: path + description: Unique identifier of the policy. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/policies.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/policies.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePolicy } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePolicy(policy_id, partial_policy_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_policies_item(id: ID!, data: update_directus_policys_input): directus_policies + } diff --git a/api-spec/paths/policies/createPolicies.yaml b/api-spec/paths/policies/createPolicies.yaml new file mode 100644 index 00000000..2dba0282 --- /dev/null +++ b/api-spec/paths/policies/createPolicies.yaml @@ -0,0 +1,57 @@ +summary: Create Multiple policies +description: Create multiple new policies. +operationId: createPolicies +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/policies.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/policies.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPolies } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPolicies(policy_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_policies_items(data: [create_directus_policies_input!]!): [directus_policies] + } diff --git a/api-spec/paths/policies/createPolicy.yaml b/api-spec/paths/policies/createPolicy.yaml new file mode 100644 index 00000000..b59a2567 --- /dev/null +++ b/api-spec/paths/policies/createPolicy.yaml @@ -0,0 +1,44 @@ + +summary: Create a policy +description: Create a new policy. +operationId: createPolicy +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/policies.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/policies.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPolicy } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPolicy(policy_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_policies_item(data: create_directus_policies_input!): directus_policies + } diff --git a/api-spec/paths/policies/deletePolicies.yaml b/api-spec/paths/policies/deletePolicies.yaml new file mode 100644 index 00000000..92dbdc97 --- /dev/null +++ b/api-spec/paths/policies/deletePolicies.yaml @@ -0,0 +1,40 @@ + +summary: Delete Multiple policies +description: Delete multiple existing policies. +operationId: deletePolicies +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/policies.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deletePolicies } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deletePolicies(policy_id_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_policies_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/policies/getPolicies.yaml b/api-spec/paths/policies/getPolicies.yaml new file mode 100644 index 00000000..2a283766 --- /dev/null +++ b/api-spec/paths/policies/getPolicies.yaml @@ -0,0 +1,48 @@ + +summary: List policies +description: List all policies that exist in Directus. +operationId: getPolicies +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/policies.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readPolicies } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readPolicies(query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + policies: [directus_policies] + } diff --git a/api-spec/paths/policies/index.yaml b/api-spec/paths/policies/index.yaml new file mode 100644 index 00000000..e6c87dcc --- /dev/null +++ b/api-spec/paths/policies/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getpolicies.yaml +post: + - $ref: createpolicy.yaml + - $ref: createpolicies.yaml +update: + $ref: updatepolicies.yaml +delete: + $ref: deletepolicy.yaml diff --git a/api-spec/paths/policies/updatePolicies.yaml b/api-spec/paths/policies/updatePolicies.yaml new file mode 100644 index 00000000..a2c1bd13 --- /dev/null +++ b/api-spec/paths/policies/updatePolicies.yaml @@ -0,0 +1,59 @@ + +summary: Update Multiple policies +description: Update multiple existing policies. +operationId: updatePolicies +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/policies.yaml + 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/policies.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Policies +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updatePolicies } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updatePolicies(policies_id_array, partial_policy_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_policies_items(ids: [ID!]!, data: update_directus_policies_input): [directus_policies] + } diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml index 259dcb66..04ad3c2c 100644 --- a/api-spec/paths/server/info/serverInfo.yaml +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -12,14 +12,14 @@ parameters: type: integer responses: '200': + description: Successful request content: application/json: schema: type: object properties: data: - type: object - description: Successful request + $ref: ../../../components/schemas/settings.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/_id/deleteShare.yaml b/api-spec/paths/shares/_id/deleteShare.yaml new file mode 100644 index 00000000..973b9b1f --- /dev/null +++ b/api-spec/paths/shares/_id/deleteShare.yaml @@ -0,0 +1,34 @@ + +summary: Delete an share +description: Delete an existing share. +operationId: deleteShare +parameters: +- name: id + in: path + description: Unique identifier of the share. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteShare(share_id)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_shares_item(id: ID!): delete_one + } diff --git a/api-spec/paths/shares/_id/getShare.yaml b/api-spec/paths/shares/_id/getShare.yaml new file mode 100644 index 00000000..2327bd29 --- /dev/null +++ b/api-spec/paths/shares/_id/getShare.yaml @@ -0,0 +1,43 @@ +summary: Retrieve a share +description: List an existing share by primary key. +operationId: getShare +parameters: +- name: id + in: path + description: Unique identifier of the share. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/shares.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readShare(share_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + type Query { + shares_by_id(id: ID!): directus_shares + } diff --git a/api-spec/paths/shares/_id/index.yaml b/api-spec/paths/shares/_id/index.yaml new file mode 100644 index 00000000..c58f5cb8 --- /dev/null +++ b/api-spec/paths/shares/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getShare.yaml +patch: + $ref: updateShare.yaml +delete: + $ref: deleteShare.yaml diff --git a/api-spec/paths/shares/_id/updateShare.yaml b/api-spec/paths/shares/_id/updateShare.yaml new file mode 100644 index 00000000..ec68b72c --- /dev/null +++ b/api-spec/paths/shares/_id/updateShare.yaml @@ -0,0 +1,49 @@ +summary: Update a share +description: Update an existing share. +operationId: updateShare +parameters: +- name: id + in: path + description: Unique identifier of the share. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/shares.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/shares.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateShare(share_id, partial_share_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_shares_item(id: ID!, data: update_directus_shares_input): directus_shares + } diff --git a/api-spec/paths/shares/auth/authenticateShare.yaml b/api-spec/paths/shares/auth/authenticateShare.yaml new file mode 100644 index 00000000..cc7b29da --- /dev/null +++ b/api-spec/paths/shares/auth/authenticateShare.yaml @@ -0,0 +1,70 @@ +summary: Authenticate a Share +description: Authenticate as a share user. Shares work by returning a token, as it is the case with the regular login endpoint. These tokens are limited to a permissions set that only allows access to the item that was shared, and any relationally linked items that that associated role has access to. This means that all regular endpoints can be used with the token returned by this endpoint. +operationId: authenticateShare +requestBody: + content: + application/json: + schema: + type: object + required: + - share + properties: + share: + type: uuid + description: Primary key of the share you're authenticating against. + example: 3a606c3e-9d4d-4556-b7bb-f00860613da3 + password: + type: hash + description: Password for the share, if one is configured. + example: '**********' + 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. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + access_token: + type: string + description: 'Temporary access token to be used in follow-up requests. Note: if you used `session` as the mode in the request, the access token won't be returned in the JSON.' + example: eyJhbGciOiJI... + expires: + type: integer + description: How long before the access token will expire. Value is in milliseconds. + example: 900 + refresh_token: + type: string + description: 'The token that can be used to retrieve a new access token through `/auth/refresh`. Note: if you used `cookie` or `session` as the mode in the request, the refresh token won't be returned in the JSON.' + example: yuOJkjdPXMd... + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, authenticateShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(authenticateShare('share_key', 'password')); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/shares/auth/index.yaml b/api-spec/paths/shares/auth/index.yaml new file mode 100644 index 00000000..1b8441e1 --- /dev/null +++ b/api-spec/paths/shares/auth/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: authenticateShare.yaml diff --git a/api-spec/paths/shares/createShare.yaml b/api-spec/paths/shares/createShare.yaml new file mode 100644 index 00000000..272f94ee --- /dev/null +++ b/api-spec/paths/shares/createShare.yaml @@ -0,0 +1,44 @@ + +summary: Create a share +description: Create a new share. +operationId: createShare +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/shares.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/shares.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createShare(share_object)); + - label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_shares_item(data: create_directus_shares_input!): directus_shares + } diff --git a/api-spec/paths/shares/createShares.yaml b/api-spec/paths/shares/createShares.yaml new file mode 100644 index 00000000..334f38ab --- /dev/null +++ b/api-spec/paths/shares/createShares.yaml @@ -0,0 +1,57 @@ +summary: Create Multiple shares +description: Create multiple new shares. +operationId: createShares +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/shares.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/shares.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createShares(share_object_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + create_shares_items(data: [create_directus_shares_input!]!): [directus_shares] + } diff --git a/api-spec/paths/shares/deleteShares.yaml b/api-spec/paths/shares/deleteShares.yaml new file mode 100644 index 00000000..6b696e00 --- /dev/null +++ b/api-spec/paths/shares/deleteShares.yaml @@ -0,0 +1,40 @@ + +summary: Delete Multiple shares +description: Delete multiple existing shares. +operationId: deleteShares +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/shares.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteShares } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteShares(share_id_array)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + delete_shares_items(ids: [ID!]!): delete_many + } diff --git a/api-spec/paths/shares/getShares.yaml b/api-spec/paths/shares/getShares.yaml new file mode 100644 index 00000000..b0b51b0f --- /dev/null +++ b/api-spec/paths/shares/getShares.yaml @@ -0,0 +1,48 @@ + +summary: List shares +description: List all shares that exist in Directus. +operationId: getShares +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/shares.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readShares } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readShares(query_object)); +- label: GraphQL + lang: GraphQL + source: | + type Query { + shares: [directus_shares] + } diff --git a/api-spec/paths/shares/index.yaml b/api-spec/paths/shares/index.yaml new file mode 100644 index 00000000..56def863 --- /dev/null +++ b/api-spec/paths/shares/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getShares.yaml +post: + - $ref: createShare.yaml + - $ref: createShares.yaml +update: + $ref: updateShares.yaml +delete: + $ref: deleteShares.yaml diff --git a/api-spec/paths/shares/info/_id/getShareInfo.yaml b/api-spec/paths/shares/info/_id/getShareInfo.yaml new file mode 100644 index 00000000..2dd8639d --- /dev/null +++ b/api-spec/paths/shares/info/_id/getShareInfo.yaml @@ -0,0 +1,39 @@ +summary: Get Share Public Info +description: Allows unauthenticated users to retrieve information about the share. +operationId: getShareInfo +parameters: +- name: id + in: path + description: Unique identifier of the share. + schema: + type: string + required: true +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../../omponents/schemas/shares.yaml + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readShareInfo } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readShareInfo(share_id)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/shares/info/_id/index.yaml b/api-spec/paths/shares/info/_id/index.yaml new file mode 100644 index 00000000..6247dd2d --- /dev/null +++ b/api-spec/paths/shares/info/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getShareInfo.yaml diff --git a/api-spec/paths/shares/invite/index.yaml b/api-spec/paths/shares/invite/index.yaml new file mode 100644 index 00000000..4f1289cc --- /dev/null +++ b/api-spec/paths/shares/invite/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: inviteShare.yaml diff --git a/api-spec/paths/shares/invite/inviteShare.yaml b/api-spec/paths/shares/invite/inviteShare.yaml new file mode 100644 index 00000000..5e5667f3 --- /dev/null +++ b/api-spec/paths/shares/invite/inviteShare.yaml @@ -0,0 +1,40 @@ +summary: Send a Share by Email +description: Sends an email to the provided email addresses with a link to the share. +operationId: inviteShare +requestBody: + content: + application/json: + schema: + type: object + required: + - share + properties: + share: + type: uuid + description: Primary key of the share you're authenticating against. + example: 3a606c3e-9d4d-4556-b7bb-f00860613da3 + emails: + type: array + description: Array of email strings to send the share link to. +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, inviteShare } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(inviteShare(share_id, email_address_array)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/shares/updateShares.yaml b/api-spec/paths/shares/updateShares.yaml new file mode 100644 index 00000000..fa411047 --- /dev/null +++ b/api-spec/paths/shares/updateShares.yaml @@ -0,0 +1,59 @@ + +summary: Update Multiple shares +description: Update multiple shares at the same time. +operationId: updatesShares +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/shares.yaml + 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/shares.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Shares +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateShares } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateShares(share_id_array, partial_share_object)); +- label: GraphQL + lang: GraphQL + source: | + type Mutation { + update_shares_items(ids: [ID!]!, data: update_directus_shares_input): [directus_shares] + } diff --git a/api-spec/paths/translations/_id/deleteTranslation.yaml b/api-spec/paths/translations/_id/deleteTranslation.yaml new file mode 100644 index 00000000..bb6bdce6 --- /dev/null +++ b/api-spec/paths/translations/_id/deleteTranslation.yaml @@ -0,0 +1,32 @@ + +summary: Delete an Translation +description: Delete an existing Translation. +operationId: deleteTranslation +parameters: +- name: id + in: path + description: Unique identifier of the Translation. + schema: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteTranslation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteTranslation(translation_id)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/_id/getTranslation.yaml b/api-spec/paths/translations/_id/getTranslation.yaml new file mode 100644 index 00000000..af64920e --- /dev/null +++ b/api-spec/paths/translations/_id/getTranslation.yaml @@ -0,0 +1,42 @@ +summary: Retrieve a Translation +description: List an existing Translation by primary key. +operationId: getTranslations +parameters: +- name: id + in: path + description: Unique identifier of the Translation. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/Translations.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readTranslation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readTranslation(translation_id, query_object)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL + diff --git a/api-spec/paths/translations/_id/index.yaml b/api-spec/paths/translations/_id/index.yaml new file mode 100644 index 00000000..76fc5c32 --- /dev/null +++ b/api-spec/paths/translations/_id/index.yaml @@ -0,0 +1,6 @@ +get: + $ref: getTranslation.yaml +patch: + $ref: updatesTranslation.yaml +delete: + $ref: deleteTranslation.yaml diff --git a/api-spec/paths/translations/_id/updateTranslation.yaml b/api-spec/paths/translations/_id/updateTranslation.yaml new file mode 100644 index 00000000..61f7de32 --- /dev/null +++ b/api-spec/paths/translations/_id/updateTranslation.yaml @@ -0,0 +1,47 @@ +summary: Update a Translation +description: Update an existing Translation. +operationId: updateTranslation +parameters: +- name: id + in: path + description: Unique identifier of the Translation. + schema: + type: string + required: true +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../../components/schemas/Translations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/Translations.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateTranslation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateTranslation(translation_id, partial_translation_object)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/createTranslation.yaml b/api-spec/paths/translations/createTranslation.yaml new file mode 100644 index 00000000..84669587 --- /dev/null +++ b/api-spec/paths/translations/createTranslation.yaml @@ -0,0 +1,42 @@ + +summary: Create a Translation +description: Create a new Translation. +operationId: createTranslation +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/Translations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/Translations.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createTranslation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createTranslation(translation_object)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/createTranslations.yaml b/api-spec/paths/translations/createTranslations.yaml new file mode 100644 index 00000000..e6e03a81 --- /dev/null +++ b/api-spec/paths/translations/createTranslations.yaml @@ -0,0 +1,55 @@ +summary: Create Multiple Translations +description: Create multiple new translations. +operationId: createTranslations +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/Translations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Translations.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createtranslations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createtranslations(translation_object_array)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/deleteTranslations.yaml b/api-spec/paths/translations/deleteTranslations.yaml new file mode 100644 index 00000000..0e64c4ae --- /dev/null +++ b/api-spec/paths/translations/deleteTranslations.yaml @@ -0,0 +1,38 @@ + +summary: Delete Multiple Translations +description: Delete multiple existing translations. +operationId: deleteTranslations +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/Translations.yaml + keys: + type: array + items: + type: string +responses: + '200': + description: Successful request + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, deleteTranslations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(deleteTranslations(translation_id_array)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/getTranslations.yaml b/api-spec/paths/translations/getTranslations.yaml new file mode 100644 index 00000000..ed8c059d --- /dev/null +++ b/api-spec/paths/translations/getTranslations.yaml @@ -0,0 +1,46 @@ + +summary: List Translations +description: List all Translations that exist in Directus. +operationId: getTranslations +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Translations.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readTranlations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readTranslations(query_object)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/translations/index.yaml b/api-spec/paths/translations/index.yaml new file mode 100644 index 00000000..12a90a90 --- /dev/null +++ b/api-spec/paths/translations/index.yaml @@ -0,0 +1,9 @@ +get: + $ref: getTranslations.yaml +post: + - $ref: createTranslation.yaml + - $ref: createsTranslations.yaml +update: + $ref: updatesTranslations.yaml +delete: + $ref: deleteTranslations.yaml diff --git a/api-spec/paths/translations/updateTranslations.yaml b/api-spec/paths/translations/updateTranslations.yaml new file mode 100644 index 00000000..50705d83 --- /dev/null +++ b/api-spec/paths/translations/updateTranslations.yaml @@ -0,0 +1,57 @@ + +summary: Update Multiple Translations +description: Update multiple Translations at the same time. +operationId: updateTranslations +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/Translations.yaml + 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/Translations.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Translations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateTranslations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateTranslations(translation_id_array, partial_translation_object)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL From 423206cac55b5e27f6702895984af7318c827fe1 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Wed, 4 Dec 2024 11:33:18 +0000 Subject: [PATCH 079/119] some more endpoints and fixes --- api-spec/components/parameters.yaml | 10 +-- api-spec/index.yaml | 46 ++++++++------ api-spec/paths/files/createFile.yaml | 25 -------- api-spec/paths/files/importFile.yaml | 50 +++++++++++++++ api-spec/paths/files/index.yaml | 3 +- api-spec/paths/files/uploadFile.yaml | 42 +++++++++++++ api-spec/paths/flows/createFlows.yaml | 58 +++++++++++++++++ api-spec/paths/flows/index.yaml | 3 +- .../paths/flows/trigger/_flow_uuid/index.yaml | 4 ++ .../trigger/_flow_uuid/triggerFlowGET.yaml | 35 +++++++++++ .../trigger/_flow_uuid/triggerFlowPOST.yaml | 42 +++++++++++++ api-spec/paths/folders/createFolders.yaml | 58 +++++++++++++++++ .../paths/permissions/createPermissions.yaml | 62 +++++++++++++++++++ api-spec/paths/permissions/index.yaml | 3 +- .../_collection/_id/getItemPermissions.yaml | 32 ++++++++++ .../permissions/me/_collection/_id/index.yaml | 2 + .../permissions/me/getMyPermissions.yaml | 28 --------- .../permissions/me/getUserPermissions.yaml | 29 +++++++++ api-spec/paths/permissions/me/index.yaml | 2 +- api-spec/paths/presets/createPresets.yaml | 58 +++++++++++++++++ api-spec/paths/presets/index.yaml | 3 +- api-spec/paths/roles/createRoles.yaml | 58 +++++++++++++++++ api-spec/paths/roles/index.yaml | 3 +- api-spec/paths/shares/createShares.yaml | 1 - api-spec/paths/users/createUser.yaml | 10 ++- api-spec/paths/users/createUsers.yaml | 62 +++++++++++++++++++ api-spec/paths/users/index.yaml | 3 +- .../tfa/generate/generateTwoFactorSecret.yaml | 49 +++++++++++++++ .../paths/users/me/tfa/generate/index.yaml | 2 + api-spec/paths/users/register/index.yaml | 2 + .../paths/users/register/registerUser.yaml | 46 ++++++++++++++ .../register/verify-email/_token/index.yaml | 2 + .../_token/registerUserVerify.yaml | 36 +++++++++++ .../paths/versions/createContentVersion.yaml | 8 +-- .../paths/versions/createContentVersions.yaml | 56 +++++++++++++++++ api-spec/paths/versions/index.yaml | 3 +- 36 files changed, 844 insertions(+), 92 deletions(-) delete mode 100644 api-spec/paths/files/createFile.yaml create mode 100644 api-spec/paths/files/importFile.yaml create mode 100644 api-spec/paths/files/uploadFile.yaml create mode 100644 api-spec/paths/flows/createFlows.yaml create mode 100644 api-spec/paths/flows/trigger/_flow_uuid/index.yaml create mode 100644 api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml create mode 100644 api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml create mode 100644 api-spec/paths/folders/createFolders.yaml create mode 100644 api-spec/paths/permissions/createPermissions.yaml create mode 100644 api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml create mode 100644 api-spec/paths/permissions/me/_collection/_id/index.yaml delete mode 100644 api-spec/paths/permissions/me/getMyPermissions.yaml create mode 100644 api-spec/paths/permissions/me/getUserPermissions.yaml create mode 100644 api-spec/paths/presets/createPresets.yaml create mode 100644 api-spec/paths/roles/createRoles.yaml create mode 100644 api-spec/paths/users/createUsers.yaml create mode 100644 api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml create mode 100644 api-spec/paths/users/me/tfa/generate/index.yaml create mode 100644 api-spec/paths/users/register/index.yaml create mode 100644 api-spec/paths/users/register/registerUser.yaml create mode 100644 api-spec/paths/users/register/verify-email/_token/index.yaml create mode 100644 api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml create mode 100644 api-spec/paths/versions/createContentVersions.yaml diff --git a/api-spec/components/parameters.yaml b/api-spec/components/parameters.yaml index c080a7b6..2311f3b7 100644 --- a/api-spec/components/parameters.yaml +++ b/api-spec/components/parameters.yaml @@ -96,10 +96,10 @@ Export: schema: type: string enum: - - `csv` - - `json` - - `xml` - - `yaml` + - csv + - json + - xml + - yaml Version: name: version description: >- @@ -107,4 +107,4 @@ Version: in: query required: false schema: - type: string \ No newline at end of file + type: string diff --git a/api-spec/index.yaml b/api-spec/index.yaml index efe6d46e..bd7f6e14 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -19,7 +19,7 @@ paths: $ref: paths/activity/comment/index.yaml "/activity/comment/{id}": $ref: paths/activity/comment/_id/index.yaml - "/assets/{_id}": + "/assets/{id}": $ref: paths/assets/_id/index.yaml "/auth/login": $ref: paths/auth/login/index.yaml @@ -27,7 +27,7 @@ paths: $ref: paths/auth/logout/index.yaml "/auth/oauth": $ref: paths/auth/oauth/index.yaml - "/auth/oauth/{_provider}": + "/auth/oauth/{provider}": $ref: paths/auth/oauth/_provider/index.yaml "/auth/password/request": $ref: paths/auth/password/request/index.yaml @@ -37,7 +37,7 @@ paths: $ref: paths/auth/refresh/index.yaml "/collections": $ref: paths/collections/index.yaml - "/collections/{_id}": + "/collections/{id}": $ref: paths/collections/_id/index.yaml "/dashboards": $ref: paths/dashboards/index.yaml @@ -45,45 +45,47 @@ paths: $ref: paths/dashboards/_id/index.yaml "/extensions": $ref: paths/extensions/index.yaml - "/extensions/{_bundle}/{_name}": + "/extensions/{bundle}/{name}": $ref: paths/extensions/_bundle/_name/index.yaml - "/extensions/{_name}": + "/extensions/{name}": $ref: paths/extensions/_name/index.yaml "/fields": $ref: paths/fields/index.yaml - "/fields/{_collection}": + "/fields/{collection}": $ref: paths/fields/_collection/index.yaml - "/fields/{_collection}/{_id}": + "/fields/{collection}/{id}": $ref: paths/fields/_collection/_id/index.yaml "/files": $ref: paths/files/index.yaml - "/files/{_id}": + "/files/{id}": $ref: paths/files/_id/index.yaml "/flows": $ref: paths/flows/index.yaml - "/flows/{_id}": + "/flows/{id}": $ref: paths/flows/_id/index.yaml + "/flows/trigger/{flow_uuid}": + $ref: paths/flows/trigger/_flow_uuid/index.yaml "/folders": $ref: paths/folders/index.yaml - "/folders/{_id}": + "/folders/{id}": $ref: paths/folders/_id/index.yaml - "/items/{_collection}": + "/items/{collection}": $ref: paths/items/_collection/index.yaml - "/items/{_collection}/singleton": + "/items/{collection}/singleton": $ref: paths/items/_collection/singleton/index.yaml - "/items/{_collection}/{_id}": + "/items/{collection}/{id}": $ref: paths/items/_collection/_id/index.yaml "/notifications": $ref: paths/notifications/index.yaml - "/notifications/{_id}": + "/notifications/{id}": $ref: paths/notifications/_id/index.yaml "/operations": $ref: paths/operations/index.yaml - "/operations/{_id}": + "/operations/{id}": $ref: paths/operations/_id/index.yaml "/panels": $ref: paths/panels/index.yaml - "/panels/{_id}": + "/panels/{id}": $ref: paths/panels/_id/index.yaml "/permissions": $ref: paths/permissions/index.yaml @@ -91,6 +93,8 @@ paths: $ref: paths/permissions/_id/index.yaml "/permissions/me": $ref: paths/permissions/me/index.yaml + "/permissions/me/{collection}/{id}": + $ref: paths/permissions/me/_collection/_id/index.yaml "/policies": $ref: paths/policies/index.yaml "/policies/{id}": @@ -151,19 +155,23 @@ paths: $ref: paths/users/me/tfa/enable/index.yaml "/users/me/track/page": $ref: paths/users/me/track/page/index.yaml + "/users/register/": + $ref: paths/users/register/index.yaml + "/users/register/verify-email/{token}": + $ref: paths/users/register/verify-email/_token/index.yaml "/utils/cache/clear": $ref: paths/utils/cache/clear/index.yaml - "/utils/export/{_collection}": + "/utils/export/{collection}": $ref: paths/utils/export/_collection/index.yaml "/utils/hash/generate": $ref: paths/utils/hash/generate/index.yaml "/utils/hash/verify": $ref: paths/utils/hash/verify/index.yaml - "/utils/import/{_collection}": + "/utils/import/{collection}": $ref: paths/utils/import/_collection/index.yaml "/utils/random/string": $ref: paths/utils/random/string/index.yaml - "/utils/sort/{_collection}": + "/utils/sort/{collection}": $ref: paths/utils/sort/_collection/index.yaml "/versions": $ref: paths/versions/index.yaml diff --git a/api-spec/paths/files/createFile.yaml b/api-spec/paths/files/createFile.yaml deleted file mode 100644 index 4dd9ab4c..00000000 --- a/api-spec/paths/files/createFile.yaml +++ /dev/null @@ -1,25 +0,0 @@ -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.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/files/importFile.yaml b/api-spec/paths/files/importFile.yaml new file mode 100644 index 00000000..887c8443 --- /dev/null +++ b/api-spec/paths/files/importFile.yaml @@ -0,0 +1,50 @@ +summary: Import a File +description: Import a file from the web +operationId: importFile +requestBody: + content: + application/json: + schema: + type: object + required: + - url + properties: + url: + type: string + description: The URL to download the file from. + anyOf: + - $ref: ../../components/schemas/files.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/files.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Files +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, importFile } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(importFile(file_url, file_object)); + + const result = await client.request(uploadFiles(formData)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + import_file(url: String!, data: create_directus_files_input!): directus_files + } + diff --git a/api-spec/paths/files/index.yaml b/api-spec/paths/files/index.yaml index f664e543..c13b2c41 100644 --- a/api-spec/paths/files/index.yaml +++ b/api-spec/paths/files/index.yaml @@ -1,7 +1,8 @@ get: $ref: getFiles.yaml post: - $ref: createFile.yaml + - $ref: uploadFile.yaml + - $ref: importFile.yaml patch: $ref: updateFiles.yaml delete: diff --git a/api-spec/paths/files/uploadFile.yaml b/api-spec/paths/files/uploadFile.yaml new file mode 100644 index 00000000..ae10c1f2 --- /dev/null +++ b/api-spec/paths/files/uploadFile.yaml @@ -0,0 +1,42 @@ +summary: Upload a File +description: Upload a new file. +operationId: uploadFile +requestBody: + content: + application/json: + schema: + anyOf: + - $ref: ../../components/schemas/files.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../components/schemas/files.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Files +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, uploadFiles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const formData = new FormData(); + formData.append('file_1_property', 'Value'); + formData.append('file', raw_file); + formData.append('file_2_property', 'Value'); + formData.append('file', raw_file_2); + + const result = await client.request(uploadFiles(formData)); +- label: GraphQL + lang: GraphQL + source: | + //Not currently supported by GraphQL. diff --git a/api-spec/paths/flows/createFlows.yaml b/api-spec/paths/flows/createFlows.yaml new file mode 100644 index 00000000..6eee6371 --- /dev/null +++ b/api-spec/paths/flows/createFlows.yaml @@ -0,0 +1,58 @@ +summary: Create Multiple Flows +description: Create multiple new flows. +operationId: createFlows +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/flows.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/flows.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createFlows } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createFlows(flows_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_flows_items(data: [create_directus_flows_input!]!): [directus_flows] + } diff --git a/api-spec/paths/flows/index.yaml b/api-spec/paths/flows/index.yaml index 125ad4f6..325a3a05 100644 --- a/api-spec/paths/flows/index.yaml +++ b/api-spec/paths/flows/index.yaml @@ -1,7 +1,8 @@ get: $ref: getFlows.yaml post: - $ref: createFlow.yaml + - $ref: createFlow.yaml + - $ref: createFlows.yaml patch: $ref: updateFlows.yaml delete: diff --git a/api-spec/paths/flows/trigger/_flow_uuid/index.yaml b/api-spec/paths/flows/trigger/_flow_uuid/index.yaml new file mode 100644 index 00000000..81cda9c5 --- /dev/null +++ b/api-spec/paths/flows/trigger/_flow_uuid/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: triggerFlowGET +post: + $ref: triggerFlowPOST diff --git a/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml b/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml new file mode 100644 index 00000000..380345c4 --- /dev/null +++ b/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml @@ -0,0 +1,35 @@ +summary: Flow with GET webhook trigger +description: Start a flow with GET webhook trigger. +operationId: triggerFlowGET +parameters: +- $ref: ../../../../components/parameters.yaml#/UUId +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: Result of the flow, if any. + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, triggerFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(triggerFlow('GET', flow_id, query_object)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml b/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml new file mode 100644 index 00000000..ebd74259 --- /dev/null +++ b/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml @@ -0,0 +1,42 @@ +summary: Flow with POST webhook trigger +description: Start a flow with POST webhook trigger. +operationId: triggerFlowPOST +parameters: +- $ref: ../../../../components/parameters.yaml#/UUId +- $ref: ../../../../components/parameters.yaml#/Fields +- $ref: ../../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + properties: + data: Payload for the POST request. +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: Result of the flow, if any. + '401': + $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Flows +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, triggerFlow } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(triggerFlow('POST', flow_id, webhook_payload)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/folders/createFolders.yaml b/api-spec/paths/folders/createFolders.yaml new file mode 100644 index 00000000..571ed7d3 --- /dev/null +++ b/api-spec/paths/folders/createFolders.yaml @@ -0,0 +1,58 @@ +summary: Create Multiple Folders +description: Create multiple new folders. +operationId: createFolders +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/folders.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/folders.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Folders +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createFolders } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createFolders(folder_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_folders_items(data: [create_directus_folders_input!]!): [directus_folders] + } diff --git a/api-spec/paths/permissions/createPermissions.yaml b/api-spec/paths/permissions/createPermissions.yaml new file mode 100644 index 00000000..606fd386 --- /dev/null +++ b/api-spec/paths/permissions/createPermissions.yaml @@ -0,0 +1,62 @@ +summary: Create Multiple Permission Rules +description: Create multiple new permission rules +operationId: getPermissions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +requestBody: + content: + application/json: + schema: + type: object + required: + - action + - collection + properties: + data: + type: array + items: + $ref: ../../components/schemas/permissions.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/permissions.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Permissions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPermissions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPermissions(permission_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_permissions_items(data: [create_directus_permissions_input!]!): [directus_permissions] + } diff --git a/api-spec/paths/permissions/index.yaml b/api-spec/paths/permissions/index.yaml index a8d9cc7f..1b6aab89 100644 --- a/api-spec/paths/permissions/index.yaml +++ b/api-spec/paths/permissions/index.yaml @@ -1,7 +1,8 @@ get: $ref: getPermissions.yaml post: - $ref: createPermission.yaml + - $ref: createPermission.yaml + - $ref: createPermissions.yaml patch: $ref: updatePermissions.yaml delete: diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml new file mode 100644 index 00000000..84194180 --- /dev/null +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -0,0 +1,32 @@ +summary: Check Permissions for a Specific Item +description: Check the current user's permissions on a specific item. +operationId: readItemPermissions +parameters: + - $ref: ../../components/parameters.yaml#/collection + - $ref: ../../components/parameters.yaml#/id +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readItemPermissions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + // collection item + const result = await client.request(readItemPermissions(collection_name, item_id)); + + // singleton + const result = await client.request(readItemPermissions(collection_name)); + - label: GraphQL + lang: GraphQL + source: | + //Currently not supported in GraphQL. diff --git a/api-spec/paths/permissions/me/_collection/_id/index.yaml b/api-spec/paths/permissions/me/_collection/_id/index.yaml new file mode 100644 index 00000000..14aa0205 --- /dev/null +++ b/api-spec/paths/permissions/me/_collection/_id/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getItemPermissions.yaml diff --git a/api-spec/paths/permissions/me/getMyPermissions.yaml b/api-spec/paths/permissions/me/getMyPermissions.yaml deleted file mode 100644 index 9ed2b9f1..00000000 --- a/api-spec/paths/permissions/me/getMyPermissions.yaml +++ /dev/null @@ -1,28 +0,0 @@ -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.yaml - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Permissions -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - - label: GraphQL - lang: GraphQL - source: | diff --git a/api-spec/paths/permissions/me/getUserPermissions.yaml b/api-spec/paths/permissions/me/getUserPermissions.yaml new file mode 100644 index 00000000..0c804628 --- /dev/null +++ b/api-spec/paths/permissions/me/getUserPermissions.yaml @@ -0,0 +1,29 @@ +summary: Get Current User Permissions +description: Check the current user's permissions across all collections. +operationId: getUserPermissions +responses: + '200': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Permissions +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readUserPermissions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readUserPermissions()); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + query { + permissions_me + } diff --git a/api-spec/paths/permissions/me/index.yaml b/api-spec/paths/permissions/me/index.yaml index 525fd0d4..fd6ed7e9 100644 --- a/api-spec/paths/permissions/me/index.yaml +++ b/api-spec/paths/permissions/me/index.yaml @@ -1,2 +1,2 @@ get: - $ref: getMyPermissions.yaml + $ref: getUserPermissions.yaml diff --git a/api-spec/paths/presets/createPresets.yaml b/api-spec/paths/presets/createPresets.yaml new file mode 100644 index 00000000..01407951 --- /dev/null +++ b/api-spec/paths/presets/createPresets.yaml @@ -0,0 +1,58 @@ +summary: Create Multiple Presets +description: Create multiple new Presets. +operationId: createPresets +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/presets.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/presets.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Presets +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createPresets } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createPresets(presets_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_presets_items(data: [create_directus_presets_input!]!): [directus_presets] + } diff --git a/api-spec/paths/presets/index.yaml b/api-spec/paths/presets/index.yaml index 3d407b56..eb2927e1 100644 --- a/api-spec/paths/presets/index.yaml +++ b/api-spec/paths/presets/index.yaml @@ -1,7 +1,8 @@ get: $ref: getPresets.yaml post: - $ref: createPreset.yaml + - $ref: createPreset.yaml + - $ref: createPresets.yaml patch: $ref: updatePresets.yaml delete: diff --git a/api-spec/paths/roles/createRoles.yaml b/api-spec/paths/roles/createRoles.yaml new file mode 100644 index 00000000..489031e0 --- /dev/null +++ b/api-spec/paths/roles/createRoles.yaml @@ -0,0 +1,58 @@ +summary: Create Multiple Roles +description: Create multiple new roles. +operationId: createRoles +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Roles.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Roles.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Roles +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createRoles } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createRoles(roles_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_roles_items(data: [create_directus_roles_input!]!): [directus_roles] + } diff --git a/api-spec/paths/roles/index.yaml b/api-spec/paths/roles/index.yaml index 06cddf26..22952513 100644 --- a/api-spec/paths/roles/index.yaml +++ b/api-spec/paths/roles/index.yaml @@ -1,7 +1,8 @@ get: $ref: getRoles.yaml post: - $ref: createRole.yaml + - $ref: createRole.yaml + - $ref: createRoles.yaml patch: $ref: updateRoles.yaml delete: diff --git a/api-spec/paths/shares/createShares.yaml b/api-spec/paths/shares/createShares.yaml index 334f38ab..28746459 100644 --- a/api-spec/paths/shares/createShares.yaml +++ b/api-spec/paths/shares/createShares.yaml @@ -9,7 +9,6 @@ parameters: - $ref: ../../components/parameters.yaml#/Sort - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search -- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: diff --git a/api-spec/paths/users/createUser.yaml b/api-spec/paths/users/createUser.yaml index 0b414a2b..80875fe1 100644 --- a/api-spec/paths/users/createUser.yaml +++ b/api-spec/paths/users/createUser.yaml @@ -1,13 +1,19 @@ -summary: Create a User +summary: Create an User description: Create a new user. operationId: createUser parameters: +- $ref: ../../components/parameters.yaml#/Fields - $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: schema: - $ref: ../../components/schemas/users.yaml + type: object + required: + - email + - password + anyOf: + $ref: ../../components/schemas/users.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/users/createUsers.yaml b/api-spec/paths/users/createUsers.yaml new file mode 100644 index 00000000..2678f638 --- /dev/null +++ b/api-spec/paths/users/createUsers.yaml @@ -0,0 +1,62 @@ +summary: Create Multiple User +description: Create multiple new user. +operationId: createUsers +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Page +requestBody: + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + data: + type: array + items: + $ref: ../../components/schemas/Users.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Users.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createUsers } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createUsers(user_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_users_items(data: [create_directus_users_input!]!): [directus_users] + } diff --git a/api-spec/paths/users/index.yaml b/api-spec/paths/users/index.yaml index 2d2cf83b..6401587f 100644 --- a/api-spec/paths/users/index.yaml +++ b/api-spec/paths/users/index.yaml @@ -1,7 +1,8 @@ get: $ref: getUsers.yaml post: - $ref: createUser.yaml + - $ref: createUser.yaml + - $ref: createUsers.yaml patch: $ref: updateUsers.yaml delete: diff --git a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml new file mode 100644 index 00000000..8c731828 --- /dev/null +++ b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml @@ -0,0 +1,49 @@ +summary: Generate Two-Factor Authentication Secret +description: Generates a secret and returns the URL to be used in an authenticator app. +operationId: generateTwoFactorSecret +requestBody: + content: + application/json: + schema: + type: object + required: + - password + properties: + -$ref: ../../../components/schemas/users.yaml#/properties/password +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + secret: + type: string + description: OTP secret to be saved in the authenticator app. + otpauth_url: + type: string + description: 'otpauth:// formatted URL. Can be rendered as QR code and used in most authenticator apps.' + '401': + $ref: ../../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, generateTwoFactorSecret } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(generateTwoFactorSecret(user_password)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + users_me_tfa_generate(password: String!): users_me_tfa_generate_data + } diff --git a/api-spec/paths/users/me/tfa/generate/index.yaml b/api-spec/paths/users/me/tfa/generate/index.yaml new file mode 100644 index 00000000..bccc7c83 --- /dev/null +++ b/api-spec/paths/users/me/tfa/generate/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: generate.yaml diff --git a/api-spec/paths/users/register/index.yaml b/api-spec/paths/users/register/index.yaml new file mode 100644 index 00000000..b3983b93 --- /dev/null +++ b/api-spec/paths/users/register/index.yaml @@ -0,0 +1,2 @@ +post: + $ref: registerUser.yaml diff --git a/api-spec/paths/users/register/registerUser.yaml b/api-spec/paths/users/register/registerUser.yaml new file mode 100644 index 00000000..649465e7 --- /dev/null +++ b/api-spec/paths/users/register/registerUser.yaml @@ -0,0 +1,46 @@ +summary: Register a new User +description: Register a new user. +operationId: registerUser +parameters: +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta +requestBody: + content: + application/json: + schema: + type: object + required: + - email + - password + anyOf: + $ref: ../../../components/schemas/users.yaml + properties: + verification_url: + type: string + description: 'Provide a custom verification url which the link in the email will lead to. The verification token will be passed as a parameter. Note: You need to configure the USER_REGISTER_URL_ALLOW_LIST environment variable to enable this feature.' +responses: + '204': + description: Successful request + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, registerUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + await client.request(registerUser(user_email, user_password)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + users_register(email: String!, password: String!): True + } diff --git a/api-spec/paths/users/register/verify-email/_token/index.yaml b/api-spec/paths/users/register/verify-email/_token/index.yaml new file mode 100644 index 00000000..01c5d843 --- /dev/null +++ b/api-spec/paths/users/register/verify-email/_token/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: verify-email.yaml diff --git a/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml b/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml new file mode 100644 index 00000000..f7f84a28 --- /dev/null +++ b/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml @@ -0,0 +1,36 @@ +summary: Verify Registered Email +description: Verify the registered email address. The register user endpoint sends the email a link for verification. This link includes a token, which is then used to activate the registered user. +operationId: registerUserVerify +parameters: +- description: Emailed registration token. + in: path + name: token + required: true + schema: + type: string +responses: + '204': + description: Successful request + '401': + $ref: ../../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../../components/responses.yaml#/NotFoundError +tags: +- Users +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, verifyUserEmail } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + await client.request(registerUserVerify(emailed_token)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + users_register_verify(token: String!): True + } diff --git a/api-spec/paths/versions/createContentVersion.yaml b/api-spec/paths/versions/createContentVersion.yaml index 253c3919..eabc9102 100644 --- a/api-spec/paths/versions/createContentVersion.yaml +++ b/api-spec/paths/versions/createContentVersion.yaml @@ -1,5 +1,5 @@ -summary: Create Multiple Content Versions -description: Create multiple new Content Versions. +summary: Create a Content Versions +description: Create a new Content Version for an item. operationId: createContentVersion parameters: - $ref: ../../components/parameters.yaml#/Fields @@ -30,11 +30,11 @@ x-codeSamples: - label: Directus SDK lang: JavaScript source: | - import { createDirectus, rest, createContentVersions } from '@directus/sdk'; + import { createDirectus, rest, createContentVersion } from '@directus/sdk'; const client = createDirectus('directus_project_url').with(rest()); - const result = await client.request(createContentVersions(content_version_objects)); + const result = await client.request(createContentVersion(content_version_object)); - label: GraphQL lang: GraphQL source: | diff --git a/api-spec/paths/versions/createContentVersions.yaml b/api-spec/paths/versions/createContentVersions.yaml new file mode 100644 index 00000000..93c80303 --- /dev/null +++ b/api-spec/paths/versions/createContentVersions.yaml @@ -0,0 +1,56 @@ +summary: Create Multiple Content Versions +description: Create multiple new Content Versions. +operationId: createContentVersions +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/Versions.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/versions.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Versions +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, updateContentVersions } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(updateContentVersions(content_version_id_array, partial_content_version_object)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + update_versions_items(ids: [ID!]!, data: update_directus_versions_input!): [directus_versions] + } diff --git a/api-spec/paths/versions/index.yaml b/api-spec/paths/versions/index.yaml index af0b72b6..40eee7d5 100644 --- a/api-spec/paths/versions/index.yaml +++ b/api-spec/paths/versions/index.yaml @@ -1,7 +1,8 @@ get: $ref: getContentVersions.yaml post: - $ref: createContentVersion.yaml + - $ref: createContentVersion.yaml + - $ref: createContentVersions.yaml patch: $ref: updateContentVersions.yaml delete: From b9b84eda88691380a3c8f0baf1c709ec6bb4a241 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Wed, 4 Dec 2024 14:59:58 +0000 Subject: [PATCH 080/119] last of the endpoints --- api-spec/index.yaml | 8 +++ .../paths/items/_collection/createItems.yaml | 1 - api-spec/paths/operations/_id/index.yaml | 2 + .../operations/_id/triggerOperation.yaml | 29 +++++++++ .../paths/operations/createOperations.yaml | 60 +++++++++++++++++++ api-spec/paths/operations/index.yaml | 3 +- .../_collection/getRelationByCollection.yaml | 38 ++++++++++++ .../paths/relations/_collection/index.yaml | 3 + api-spec/paths/server/health/index.yaml | 2 + .../paths/server/health/serverHealth.yaml | 46 ++++++++++++++ .../paths/server/specs/graphql/index.yaml | 2 + .../server/specs/graphql/readGraphqlSdl.yaml | 29 +++++++++ api-spec/paths/server/specs/oas/index.yaml | 2 + .../server/specs/oas/readOpenApiSpec.yaml | 34 +++++++++++ 14 files changed, 257 insertions(+), 2 deletions(-) create mode 100644 api-spec/paths/operations/_id/triggerOperation.yaml create mode 100644 api-spec/paths/operations/createOperations.yaml create mode 100644 api-spec/paths/relations/_collection/getRelationByCollection.yaml create mode 100644 api-spec/paths/relations/_collection/index.yaml create mode 100644 api-spec/paths/server/health/index.yaml create mode 100644 api-spec/paths/server/health/serverHealth.yaml create mode 100644 api-spec/paths/server/specs/graphql/index.yaml create mode 100644 api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml create mode 100644 api-spec/paths/server/specs/oas/index.yaml create mode 100644 api-spec/paths/server/specs/oas/readOpenApiSpec.yaml diff --git a/api-spec/index.yaml b/api-spec/index.yaml index bd7f6e14..02ba3c68 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -125,6 +125,12 @@ paths: $ref: paths/server/info/index.yaml "/server/ping": $ref: paths/server/ping/index.yaml + "/server/specs/graphql": + $ref: paths/server/specs/index.yaml + "/server/specs": + $ref: paths/server/specs/index.yaml + "/server/health": + $ref: paths/server/health/index.yaml "/settings": $ref: paths/settings/index.yaml "/shares": @@ -153,6 +159,8 @@ paths: $ref: paths/users/me/tfa/disable/index.yaml "/users/me/tfa/enable": $ref: paths/users/me/tfa/enable/index.yaml + "/users/me/tfa/generate": + $ref: paths/users/me/tfa/generate/index.yaml "/users/me/track/page": $ref: paths/users/me/track/page/index.yaml "/users/register/": diff --git a/api-spec/paths/items/_collection/createItems.yaml b/api-spec/paths/items/_collection/createItems.yaml index 306f257b..c480efe9 100644 --- a/api-spec/paths/items/_collection/createItems.yaml +++ b/api-spec/paths/items/_collection/createItems.yaml @@ -6,7 +6,6 @@ parameters: - $ref: ../../../components/parameters.yaml#/Collection - $ref: ../../../components/parameters.yaml#/Fields - $ref: ../../../components/parameters.yaml#/Limit -- $ref: ../../../components/parameters.yaml#/Meta - $ref: ../../../components/parameters.yaml#/Offset - $ref: ../../../components/parameters.yaml#/Sort - $ref: ../../../components/parameters.yaml#/Filter diff --git a/api-spec/paths/operations/_id/index.yaml b/api-spec/paths/operations/_id/index.yaml index b42cc849..542617f4 100644 --- a/api-spec/paths/operations/_id/index.yaml +++ b/api-spec/paths/operations/_id/index.yaml @@ -1,5 +1,7 @@ get: $ref: getOperation.yaml +post: + $ref: triggerOperation.yaml patch: $ref: updateOperation.yaml delete: diff --git a/api-spec/paths/operations/_id/triggerOperation.yaml b/api-spec/paths/operations/_id/triggerOperation.yaml new file mode 100644 index 00000000..2b35510b --- /dev/null +++ b/api-spec/paths/operations/_id/triggerOperation.yaml @@ -0,0 +1,29 @@ +summary: Triggering an Operation +description: Trigger an operation based on primary key. +operationId: triggerOperation +parameters: +- $ref: ../../../components/parameters.yaml#/UUId +requestBody: + description: Payload for the operation, if needed. +responses: + '200': + description: Result of the operation, if any. + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +tags: +- Operations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, triggerOperation } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(triggerOperation(operation_id, webhook_payload_object)); +- label: GraphQL + lang: GraphQL + source: | + // Not currently supported in GraphQL diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml new file mode 100644 index 00000000..aed9b71f --- /dev/null +++ b/api-spec/paths/operations/createOperations.yaml @@ -0,0 +1,60 @@ + +summary: Create Multiple Operations +description: Create multiple new operations. +operationId: createOperations +parameters: +- $ref: ../../components/parameters.yaml#/Collection +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search +requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../../components/schemas/operations.yaml +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/operations.yaml + meta: + $ref: ../../components/schemas/x-metadata.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Items +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, createOperations } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(createOperations(operations_object_array)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Mutation { + create_operations_items(data: [create_directus_operations_input!]!): [directus_operations] + } diff --git a/api-spec/paths/operations/index.yaml b/api-spec/paths/operations/index.yaml index 8d3c9f9b..ed47671c 100644 --- a/api-spec/paths/operations/index.yaml +++ b/api-spec/paths/operations/index.yaml @@ -1,7 +1,8 @@ get: $ref: getOperations.yaml post: - $ref: createOperation.yaml + - $ref: createOperation.yaml + - $ref: createOperations.yaml patch: $ref: updateOperations.yaml delete: diff --git a/api-spec/paths/relations/_collection/getRelationByCollection.yaml b/api-spec/paths/relations/_collection/getRelationByCollection.yaml new file mode 100644 index 00000000..c74adfe1 --- /dev/null +++ b/api-spec/paths/relations/_collection/getRelationByCollection.yaml @@ -0,0 +1,38 @@ +summary: List relations in collection +description: List all relations that exist in a given collection. +operationId: getRelationByCollection +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: ../../components/schemas/relations.yaml + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Relations +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readRelationByCollection } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readRelationByCollection(collection_name)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + relations_in_collection(collection: String!): [directus_relations] + } diff --git a/api-spec/paths/relations/_collection/index.yaml b/api-spec/paths/relations/_collection/index.yaml new file mode 100644 index 00000000..48e39768 --- /dev/null +++ b/api-spec/paths/relations/_collection/index.yaml @@ -0,0 +1,3 @@ +post: + $ref: getRelationByCollection.yaml + diff --git a/api-spec/paths/server/health/index.yaml b/api-spec/paths/server/health/index.yaml new file mode 100644 index 00000000..970ff89e --- /dev/null +++ b/api-spec/paths/server/health/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: serverHealth.yaml diff --git a/api-spec/paths/server/health/serverHealth.yaml b/api-spec/paths/server/health/serverHealth.yaml new file mode 100644 index 00000000..763e3777 --- /dev/null +++ b/api-spec/paths/server/health/serverHealth.yaml @@ -0,0 +1,46 @@ +summary: Health +description: 'The /server/health endpoint shows you a general health status for the server and all connected (third party) services, such as Redis or S3. The output is based on the "Health Check Response for HTTP APIs" draft spec: Health Check Response Format for HTTP APIs Draft Specification. This endpoint can be used to ensure a healthy system when running in a horizontally scaled setup, like Kubernetes, Google Cloud Platform or AWS Elastic Beanstalk. By default, the endpoint only returns a status of ok, warn or error. By authenticating as an admin, it will return more in-depth information about the current health status of the system.' +operationId: serverHealth +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + items: + status: + description: One of ok, warn, error. + type: string + example: warn + releaseId: + description: Directus version in use. + type: string + example: '10.0.0' + serviceId: + description: Public URL of the current Directus instance. + type: string + example: https://directus.example.com + checks: + description: Array with the status of all individually connected services. + type: array +tags: +- Server +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, serverHealth } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(serverHealth()); + - label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + server_health: JSON + } diff --git a/api-spec/paths/server/specs/graphql/index.yaml b/api-spec/paths/server/specs/graphql/index.yaml new file mode 100644 index 00000000..91dfb692 --- /dev/null +++ b/api-spec/paths/server/specs/graphql/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: readGraphqlSdl.yaml diff --git a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml new file mode 100644 index 00000000..44c60971 --- /dev/null +++ b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml @@ -0,0 +1,29 @@ +summary: Get GraphQL SDL +description: Retrieve the GraphQL SDL for the current project. +operationId: readGraphqlSdl +responses: + '200': + description: GraphQL SDL file. + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Server +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readGraphqlSdl } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readGraphqlSdl(scope)); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + server_specs_graphql(scope: graphql_sdl_scope): String + } diff --git a/api-spec/paths/server/specs/oas/index.yaml b/api-spec/paths/server/specs/oas/index.yaml new file mode 100644 index 00000000..145ffe8a --- /dev/null +++ b/api-spec/paths/server/specs/oas/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: readOpenApiSpec.yaml diff --git a/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml new file mode 100644 index 00000000..2bacf00c --- /dev/null +++ b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml @@ -0,0 +1,34 @@ +summary: Get OpenAPI Specification +description: Retrieve the OpenAPI spec for the current project. +operationId: readOpenApiSpec +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + description: Object conforming to the OpenAPI Specification + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../../components/responses.yaml#/NotFoundError +tags: +- Server +x-codeSamples: +- label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readOpenApiSpec } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readOpenApiSpec()); +- label: GraphQL + lang: GraphQL + source: | + POST /graphql/system + + type Query { + server_specs_oas: String + } From 8c8197d9d7f244fd1027301931badea63b571ae2 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Wed, 4 Dec 2024 19:39:39 +0000 Subject: [PATCH 081/119] Fixes, primarily schema files --- api-spec/components/parameters.yaml | 2 +- api-spec/components/schemas/activity.yaml | 19 +++-- api-spec/components/schemas/collections.yaml | 3 +- api-spec/components/schemas/comments.yaml | 9 +- api-spec/components/schemas/dashboards.yaml | 10 ++- api-spec/components/schemas/fields.yaml | 4 +- api-spec/components/schemas/files.yaml | 16 ++-- api-spec/components/schemas/flows.yaml | 13 +-- api-spec/components/schemas/folders.yaml | 3 +- api-spec/components/schemas/items.yaml | 2 +- .../components/schemas/notifications.yaml | 1 + api-spec/components/schemas/operations.yaml | 5 +- api-spec/components/schemas/panels.yaml | 9 +- api-spec/components/schemas/permissions.yaml | 15 ++-- api-spec/components/schemas/policies.yaml | 15 ++-- api-spec/components/schemas/presets.yaml | 16 ++-- api-spec/components/schemas/revisions.yaml | 11 ++- api-spec/components/schemas/roles.yaml | 26 ++++-- api-spec/components/schemas/settings.yaml | 82 +++++++++++++------ api-spec/components/schemas/shares.yaml | 32 +++++--- api-spec/components/schemas/translations.yaml | 3 +- api-spec/components/schemas/users.yaml | 51 +++++++++--- api-spec/components/schemas/versions.yaml | 20 +++-- api-spec/index.yaml | 4 +- api-spec/paths/dashboards/_id/index.yaml | 2 +- .../_collection/getCollectionFields.yaml | 2 +- api-spec/paths/files/_id/updateFile.yaml | 56 +------------ api-spec/paths/flows/_id/updateFlow.yaml | 2 +- api-spec/paths/flows/index.yaml | 5 +- .../paths/flows/trigger/_flow_uuid/index.yaml | 4 - api-spec/paths/flows/trigger/_id/index.yaml | 4 + .../{_flow_uuid => _id}/triggerFlowGET.yaml | 0 .../{_flow_uuid => _id}/triggerFlowPOST.yaml | 0 api-spec/paths/flows/updateFlows.yaml | 2 +- .../_collection/_id/getCollectionItem.yaml | 8 +- api-spec/paths/items/_collection/index.yaml | 3 +- 36 files changed, 256 insertions(+), 203 deletions(-) delete mode 100644 api-spec/paths/flows/trigger/_flow_uuid/index.yaml create mode 100644 api-spec/paths/flows/trigger/_id/index.yaml rename api-spec/paths/flows/trigger/{_flow_uuid => _id}/triggerFlowGET.yaml (100%) rename api-spec/paths/flows/trigger/{_flow_uuid => _id}/triggerFlowPOST.yaml (100%) diff --git a/api-spec/components/parameters.yaml b/api-spec/components/parameters.yaml index 2311f3b7..21ca0632 100644 --- a/api-spec/components/parameters.yaml +++ b/api-spec/components/parameters.yaml @@ -1,5 +1,5 @@ Id: - description: Index + description: Identifier for the object. name: id in: path required: true diff --git a/api-spec/components/schemas/activity.yaml b/api-spec/components/schemas/activity.yaml index 9b7a31e4..e5318262 100644 --- a/api-spec/components/schemas/activity.yaml +++ b/api-spec/components/schemas/activity.yaml @@ -9,27 +9,28 @@ properties: example: update type: string enum: - - `create` - - `update` - - `delete` - - `login` + - create + - update + - delete + - login user: description: The user who performed this action. + type: string + relation: many-to-one oneOf: - - type: string - $ref: users.yaml nullable: true timestamp: description: When the action happened. example: '2019-12-05T22:52:09Z' type: string - format: date-time + format: timestamp 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 + - 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 @@ -53,10 +54,12 @@ properties: example: https://directus.io type: string revisions: + description: Any changes that were made in this activity. One-to-many to revisions. nullable: true type: array + relation: one-to-many items: oneOf: - type: integer - $ref: revisions.yaml -x-collection: directus_activity \ No newline at end of file +x-collection: directus_activity diff --git a/api-spec/components/schemas/collections.yaml b/api-spec/components/schemas/collections.yaml index f3f50a99..816c62db 100644 --- a/api-spec/components/schemas/collections.yaml +++ b/api-spec/components/schemas/collections.yaml @@ -44,6 +44,7 @@ properties: type: string item_duplication_fields: nullable: true + type: array sort: nullable: true type: integer @@ -61,4 +62,4 @@ properties: versioning: nullable: false type: boolean -x-collection: directus_collections \ No newline at end of file +x-collection: directus_collections diff --git a/api-spec/components/schemas/comments.yaml b/api-spec/components/schemas/comments.yaml index cad8f243..358dbaed 100644 --- a/api-spec/components/schemas/comments.yaml +++ b/api-spec/components/schemas/comments.yaml @@ -7,7 +7,8 @@ properties: id: description: Unique identifier for the object. example: 2fab3b9d-0543-4b87-8a30-3c5ee66fedf1 - type: uuid + type: string + format: uuid item: description: The item the comment is created for. example: 15 @@ -19,11 +20,13 @@ properties: date_created: description: Timestamp in ISO8601 when the comment was created. example: 2023-01-15T09:14:52Z - type: timestamp + type: string + format: timestamp date_updated: description: Timestamp in ISO8601 when the comment was last updated. example: 2023-01-15T09:00:00Z - type: timestamp + type: string + format: timestamp user_created: description: The user who created the comment. Many-to-one to users. example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af diff --git a/api-spec/components/schemas/dashboards.yaml b/api-spec/components/schemas/dashboards.yaml index ad787d8f..3942f75f 100644 --- a/api-spec/components/schemas/dashboards.yaml +++ b/api-spec/components/schemas/dashboards.yaml @@ -3,7 +3,8 @@ properties: id: description: Primary key of the dashboard; example: a79bd1b2-beb2-49fc-8a26-0b3eec0e2697 - type: uuid + type: string + format: uuid name: description: Name of the dashboard. example: My dashboard @@ -19,17 +20,20 @@ properties: date_created: description: When the dashboard was created. example: 2023-01-25T19:16:49.009Z - type: Date + type: string + format: timestamp user_created: description: User that created the dashboard. Many-to-one to users. example: fd066644-c8e5-499d-947b-fe6c6e1a1473 oneOf: - - type: many-to-one + - type: string + - format: many-to-one - $ref: users.yaml color: description: Accent color for the dashboard. example: #6644FF type: string + format: hexcode panels: description: Panels that are in this dashboard. One-to-may to panels. example: 22640672-eef0-4ee9-ab04-591f3afb2883 diff --git a/api-spec/components/schemas/fields.yaml b/api-spec/components/schemas/fields.yaml index f1535450..bf63013b 100644 --- a/api-spec/components/schemas/fields.yaml +++ b/api-spec/components/schemas/fields.yaml @@ -20,11 +20,13 @@ properties: nullable: true type: string options: + type: object nullable: true display: nullable: true type: string display_options: + type: string nullable: true readonly: nullable: false @@ -58,4 +60,4 @@ properties: validation_message: nullable: true type: string -x-collection: directus_fields \ No newline at end of file +x-collection: directus_fields diff --git a/api-spec/components/schemas/files.yaml b/api-spec/components/schemas/files.yaml index 54d280dd..e7d270e2 100644 --- a/api-spec/components/schemas/files.yaml +++ b/api-spec/components/schemas/files.yaml @@ -4,6 +4,7 @@ properties: description: Unique identifier for the file. example: 8cbb43fe-4cdf-4991-8352-c461779cec02 type: string + format: uuid 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 @@ -39,9 +40,9 @@ properties: - $ref: users.yaml created_on: description: When the file was created. - example: '2019-12-03T00:10:15+00:00' + example: 2019-12-03T00:10:15+00:00 type: string - format: date-time + format: timestamp modified_by: nullable: true oneOf: @@ -51,7 +52,7 @@ properties: modified_on: nullable: false type: string - format: date-time + format: timestamp charset: description: Character set of the file. example: binary @@ -105,14 +106,9 @@ properties: 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 \ No newline at end of file + format: timestamp +x-collection: directus_files diff --git a/api-spec/components/schemas/flows.yaml b/api-spec/components/schemas/flows.yaml index b651c874..849dc54f 100644 --- a/api-spec/components/schemas/flows.yaml +++ b/api-spec/components/schemas/flows.yaml @@ -3,6 +3,7 @@ properties: id: description: Unique identifier for the flow. type: string + format: uuid example: 2f24211d-d928-469a-aea3-3c8f53d4e426 name: description: The name of the flow. @@ -15,7 +16,8 @@ properties: color: description: Color of the icon displayed in the Admin App for the flow. type: string - example: '#112233' + example: #112233 + format: hexcode nullable: true description: nullable: true @@ -26,8 +28,8 @@ properties: example: active default: active enum: - - `active` - - `inactive` + - active + - inactive trigger: description: Type of trigger for the flow. One of `hook`, `webhook`, `operation`, `schedule`, `manual`. type: string @@ -46,12 +48,13 @@ properties: example: 92e82998-e421-412f-a513-13701e83e4ce oneOf: - type: string + - format: uuid - $ref: operations.yaml date_created: description: Timestamp in ISO8601 when the flow was created. type: string example: '2022-05-11T13:14:52Z' - format: date-time + format: timestamp nullable: true user_created: description: The user who created the flow. @@ -67,4 +70,4 @@ properties: - type: string format: uuid - $ref: operations.yaml -x-collection: directus_flows \ No newline at end of file +x-collection: directus_flows diff --git a/api-spec/components/schemas/folders.yaml b/api-spec/components/schemas/folders.yaml index 9507bd86..b99885e4 100644 --- a/api-spec/components/schemas/folders.yaml +++ b/api-spec/components/schemas/folders.yaml @@ -4,6 +4,7 @@ properties: description: Unique identifier for the folder. example: 0cf0e03d-4364-45df-b77b-ca61f61869d2 type: string + format: uuid name: description: Name of the folder. example: New York @@ -15,4 +16,4 @@ properties: - type: string - $ref: folders.yaml nullable: true -x-collection: directus_folders \ No newline at end of file +x-collection: directus_folders diff --git a/api-spec/components/schemas/items.yaml b/api-spec/components/schemas/items.yaml index dcfd96d7..7ae728e2 100644 --- a/api-spec/components/schemas/items.yaml +++ b/api-spec/components/schemas/items.yaml @@ -1,7 +1,7 @@ type: object properties: id: - description: Unique identifier for the object. + description: Unique identifier for the item. example: 2 type: integer x-collection: directus_items diff --git a/api-spec/components/schemas/notifications.yaml b/api-spec/components/schemas/notifications.yaml index 9ff33d43..f78e2b5e 100644 --- a/api-spec/components/schemas/notifications.yaml +++ b/api-spec/components/schemas/notifications.yaml @@ -8,6 +8,7 @@ properties: description: Timestamp in ISO8601 when the notification was created. example: '2021-11-24T13:57:35Z' type: string + format: timestamp status: description: Current status of the notification. One of "inbox", "archived" example: inbox diff --git a/api-spec/components/schemas/operations.yaml b/api-spec/components/schemas/operations.yaml index 7a44fbc6..dca0345b 100644 --- a/api-spec/components/schemas/operations.yaml +++ b/api-spec/components/schemas/operations.yaml @@ -3,6 +3,7 @@ properties: id: description: Unique identifier for the operation. type: string + format: uuid example: 2f24211d-d928-469a-aea3-3c8f53d4e426 name: description: The name of the operation. @@ -51,7 +52,7 @@ properties: description: Timestamp in ISO8601 when the operation was created. type: string example: '2022-05-11T13:14:52Z' - format: date-time + format: timestamp nullable: true user_created: description: The user who created the operation. @@ -59,4 +60,4 @@ properties: oneOf: - type: string - $ref: users.yaml -x-collection: directus_operations \ No newline at end of file +x-collection: directus_operations diff --git a/api-spec/components/schemas/panels.yaml b/api-spec/components/schemas/panels.yaml index b78e9e97..bdc8b2b0 100644 --- a/api-spec/components/schemas/panels.yaml +++ b/api-spec/components/schemas/panels.yaml @@ -3,7 +3,8 @@ properties: id: description: Primary key of the panel. example: 22640672-eef0-4ee9-ab04-591f3afb288 - type: uuid + type: string + format: uuid dashboard: description: Dashboard where this panel is visible. Many-to-one to dashboards. example: a79bd1b2-beb2-49fc-8a26-0b3eec0e269 @@ -22,6 +23,7 @@ properties: description: Accent color of the panel. example: #6B8068 type: string + format: hexcode show_header: description: Whether or not the header should be rendered for this panel. example: true @@ -53,11 +55,12 @@ properties: options: description: Description for the panel. example: {} - type: JSON + type: object date_created: description: When the panel was created example: 2023-01-05T19:05:51.884Z - type: Date + type: string + format: timestamp user_created: description: User that created the panel. Many-to-one to users. example: fd066644-c8e5-499d-947b-fe6c6e1a1473 diff --git a/api-spec/components/schemas/permissions.yaml b/api-spec/components/schemas/permissions.yaml index 3cd16e9f..53466f0c 100644 --- a/api-spec/components/schemas/permissions.yaml +++ b/api-spec/components/schemas/permissions.yaml @@ -13,10 +13,10 @@ properties: example: create type: string enum: - - `create` - - `read` - - `update` - - `delete` + - create + - read + - update + - delete permissions: description: JSON structure containing the permissions checks for this permission. type: object @@ -37,4 +37,9 @@ properties: nullable: true policy: nullable: false -x-collection: directus_permissions \ No newline at end of file + format: uuid + relation: many-to-one + type: string + oneOf: + - $ref: policies.yaml +x-collection: directus_permissions diff --git a/api-spec/components/schemas/policies.yaml b/api-spec/components/schemas/policies.yaml index c53facf2..18bb5494 100644 --- a/api-spec/components/schemas/policies.yaml +++ b/api-spec/components/schemas/policies.yaml @@ -3,7 +3,8 @@ properties: id: description: Primary key of the policy; example: 22640672-eef0-4ee9-ab04-591f3afb288 - type: uuid + type: string + format: uuid name: description: Name of the policy. example: Admin @@ -19,7 +20,8 @@ properties: ip_access: description: A CSV of IP addresses that this policy applies to. Allows you to configure an allowlist of IP addresses. If empty, no IP restrictions are applied. example: null - type: csv + type: string + format: csv enforce_tfa: description: Whether or not Two-Factor Authentication is required for users that have this policy. example: false @@ -36,18 +38,21 @@ properties: description: The users this policy is assigned to directly, this does not include users which receive this policy through a role. It expects and returns data from the directus_access collection. Many-to-many to users via access. example: ["0bc7b36a-9ba9-4ce0-83f0-0a526f354e07"] oneOf: - - type: many-to-many + - type: array + - format: many-to-many - $ref: users.yaml roles: description: The roles this policy is assigned to. It expects and returns data from the directus_access collection. Many-to-many to roles via access. example: ["8b4474c0-288d-4bb8-b62e-8330646bb6aa"] oneOf: - - type: many-to-many + - type: array + - format: many-to-many - $ref: roles.yaml permissions: description: The permissions assigned to this policy. One-to-many to permissions. example: ["5c74c86f-cab0-4b14-a3c4-cd4f2363e826"] oneOf: - - type: one-to-many + - type: array + - format: one-to-many - $ref: permissions.yaml x-collection: directus_policies diff --git a/api-spec/components/schemas/presets.yaml b/api-spec/components/schemas/presets.yaml index d4b8cd45..789d7c89 100644 --- a/api-spec/components/schemas/presets.yaml +++ b/api-spec/components/schemas/presets.yaml @@ -38,12 +38,14 @@ properties: 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. + type: object example: cards: sort: -published_on nullable: true layout_options: description: Options of the views. The properties in here are controlled by the layout. + type: object example: cards: icon: account_circle @@ -51,15 +53,7 @@ properties: subtitle: "{{ title }}" size: 3 nullable: true - refresh_interval: + filters: + type: array nullable: true - type: integer - filter: - nullable: true - icon: - nullable: true - type: string - color: - nullable: true - type: string -x-collection: directus_presets \ No newline at end of file +x-collection: directus_presets diff --git a/api-spec/components/schemas/revisions.yaml b/api-spec/components/schemas/revisions.yaml index 159f070d..9fb18dc5 100644 --- a/api-spec/components/schemas/revisions.yaml +++ b/api-spec/components/schemas/revisions.yaml @@ -7,14 +7,15 @@ properties: activity: description: Unique identifier for the activity record. example: 2 + type: integer + relation: many-to-one oneOf: - - type: integer - $ref: activity.yaml collection: description: Collection of the updated item. example: articles + type: string oneOf: - - type: string - $ref: collections.yaml item: description: Primary key of updated item. @@ -39,11 +40,13 @@ properties: description: If the current item was updated relationally, this is the id of the parent revision record example: null type: integer + relation: many-to-one nullable: true version: description: Associated version of this revision. example: draft + type: string + relation: many-to-one oneOf: - - type: string - $ref: versions.yaml -x-collection: directus_revisions \ No newline at end of file +x-collection: directus_revisions diff --git a/api-spec/components/schemas/roles.yaml b/api-spec/components/schemas/roles.yaml index a6a55484..011bd230 100644 --- a/api-spec/components/schemas/roles.yaml +++ b/api-spec/components/schemas/roles.yaml @@ -4,6 +4,7 @@ properties: description: Unique identifier for the role. example: 2f24211d-d928-469a-aea3-3c8f53d4e426 type: string + format: uuid name: description: Name of the role. example: Administrator @@ -20,27 +21,36 @@ properties: parent: nullable: true description: Optional parent role that this role inherits permissions from. + type: string + format: uuid + relation: many-to-one oneOf: - - type: string - format: uuid - $ref: roles.yaml children: nullable: true - description: Nested child roles that inherit this roles permissions + description: Nested child roles that inherit this roles permissions. One-to-many to roles. type: array + format: uuid + relation: one-to-many items: oneOf: - - type: string - format: uuid - $ref: roles.yaml policies: nullable: true + description: The roles in this role. One-to-many to roles. + type: array + format: uuid + relation: many-to-many + items: + oneOf: + - $ref: roles.yaml users: nullable: true + description: The users in this role. One-to-many to users. type: array + format: uuid + relation: one-to-many items: oneOf: - - type: string - format: uuid - $ref: users.yaml -x-collection: directus_roles \ No newline at end of file +x-collection: directus_roles diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index 339e1c43..1f0683a1 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -5,17 +5,18 @@ properties: type: integer example: 1 project_name: - description: The name of the project. + description: Name of the project, shown in the Data Studio. type: string example: Directus project_url: - description: The url of the project. + description: The url of the project. Link to the (public) website that goes with this project. type: string example: null nullable: true project_color: description: The brand color of the project. type: string + format: hexcode example: null nullable: true project_logo: @@ -23,21 +24,25 @@ properties: type: string example: null nullable: true + relation: many-to-one + oneOf: + - $ref: files.yaml public_foreground: description: The foreground of the project. type: string example: null nullable: true + relation: many-to-one + oneOf: + - $ref: files.yaml public_background: description: The background of the project. type: object - properties: - id: - type: string - type: - type: string example: null nullable: true + relation: many-to-one + oneOf: + - $ref: files.yaml public_note: description: Note rendered on the public pages of the app. type: string @@ -48,20 +53,21 @@ properties: type: integer example: 25 auth_password_policy: - description: Authentication password policy. + description: Authentication password policy. What regex passwords must pass in order to be valid. type: string + format: regex nullable: true storage_asset_transform: - description: What transformations are allowed in the assets endpoint. + description: If the transform endpoints are allowed to be used on the assets endpoint. One of all, none or presets. type: string enum: - - `all` - - `none` - - `presets` + - all + - none + - presets example: all nullable: true storage_asset_presets: - description: Array of allowed + description: What preset keys exist in the assets endpoint. type: array items: type: object @@ -73,10 +79,10 @@ properties: description: Whether to crop the thumbnail to match the size, or maintain the aspect ratio. type: string enum: - - `cover` - - `contain` - - `inside` - - `outside` + - cover + - contain + - inside + - outside width: description: Width of the thumbnail. type: integer @@ -93,11 +99,11 @@ properties: description: Reformat output image type: string enum: - - `jpeg` - - `png` - - `webp` - - `tiff` - - `avif` + - jpeg + - png + - webp + - tiff + - avif transforms: description: Additional transformations to apply type: array @@ -121,18 +127,24 @@ properties: example: null nullable: true custom_css: + description: CSS rules to override the App's default styling. nullable: true type: string storage_default_folder: - description: Default folder to place files + description: Folder for uploaded files. Does not affect existing files. type: string format: uuid basemaps: + description: Custom tiles to overriding the Mapbox defaults. + type: array nullable: true mapbox_key: + description: Mapbox Access Token. nullable: true type: string module_bar: + description: What modules are enabled/added globally. + type: array nullable: true project_descriptor: nullable: true @@ -141,34 +153,50 @@ properties: nullable: false type: string custom_aspect_ratios: + description: Custom aspect ratios in the image editor. + type: array nullable: true public_favicon: nullable: true - description: $t:field_options.directus_settings.project_favicon_note + description: Favicon for the Data Studio. Many-to-one to files. + type: string + relation: many-to-one oneOf: - - type: string - format: uuid - $ref: files.yaml default_appearance: + description: One of auto, light, dark. nullable: false type: string + enum: + - auto + - light + - dark default_theme_light: + description: Default theme to use in light mode. nullable: true type: string theme_light_overrides: + description: Default customization for light theme in use. + type: object nullable: true default_theme_dark: + description: Default theme to use in dark mode. nullable: true type: string theme_dark_overrides: + description: Default customization for dark theme in use. + type: object nullable: true report_error_url: + description: Link to the error report page. This is a template URL that has access to the following object nullable: true type: string report_bug_url: + description: Link to the bug report page. nullable: true type: string report_feature_url: + description: Link to the feature request page. nullable: true type: string public_registration: @@ -189,4 +217,4 @@ properties: public_registration_email_filter: nullable: true description: $t:fields.directus_settings.public_registration_email_filter_note -x-collection: directus_settings \ No newline at end of file +x-collection: directus_settings diff --git a/api-spec/components/schemas/shares.yaml b/api-spec/components/schemas/shares.yaml index 445c95ba..f11e4e5a 100644 --- a/api-spec/components/schemas/shares.yaml +++ b/api-spec/components/schemas/shares.yaml @@ -3,7 +3,8 @@ properties: id: description: Primary key of the share; example: 3a606c3e-9d4d-4556-b7bb-f00860613da3 - type: uuid + type: string + format: uuid name: description: Custom (optional) name for the share. example: My Share @@ -11,47 +12,56 @@ properties: collection: description: Collection in which the current item is shared. Many-to-one to Collections. example: articles + relation: many-to-one + type: string oneOf: - - type: many-to-one - $ref: collections.yaml item: description: Primary key of the item that's shared. example: '1' type: string role: - description: Share of which the share will inherit the permissions. + description: Role of which the share will inherit the permissions. example: 2b34fba4-a6cb-49f4-a070-2daee7ac44f0 + type: string + format: uuid + relation: many-to-one oneOf: - - type: many-to-one - $ref: shares.yaml password: description: Optional password that's required to view this shared item. example: '**********' - type: hash + type: string + format: hash user_created: description: Reference to the user who created this share. Many-to-one to Users. example: b13072b7-73e9-4904-89e0-34aaf4403766 + type: string + format: uuid + relation: many-to-one oneOf: - - type: many-to-one - $ref: users.yaml date_created: description: When the share was created. example: 2023-01-25T19:16:49.009Z - type: timestamp + type: string + format: timestamp date_start: description: Optional timestamp that controls from what date/time the shared item can be viewed. example: 2023-01-26T17:00:00.000Z - type: timestamp + type: string + format: timestamp date_end: description: Optional timestamp that controls until what date/time the shared item can be viewed. example: 2023-01-28T17:00:00.000Z - type: timestamp + type: string + format: timestamp times_used: description: The number of times the shared item has been viewed. example: 0 - type: number + type: integer max_uses: description: The maximum number of times the shared item can be viewed. example: 15 - type: number + type: integer x-collection: directus_shares diff --git a/api-spec/components/schemas/translations.yaml b/api-spec/components/schemas/translations.yaml index e24f3b9b..a3cec5c9 100644 --- a/api-spec/components/schemas/translations.yaml +++ b/api-spec/components/schemas/translations.yaml @@ -3,7 +3,8 @@ properties: id: description: Primary key of the translations. example: sc4346aa4-81a8-4885-b3a8-f647e4f6f769 - type: uuid + type: string + format: uuid key: description: The translation key. example: Test diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index 322cc03b..59ee9609 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -20,6 +20,7 @@ properties: password: description: Password of the user. type: string + format: hash location: description: The user's location. example: null @@ -43,14 +44,15 @@ properties: items: type: string avatar: - description: The user's avatar. + description: The user's avatar. Many-to-one to files. example: null + relation: many-to-one + type: string oneOf: - - type: string - $ref: files.yaml nullable: true language: - description: The user's language used in Directus. + description: The user's language used in Directus. Language the Data Studio is rendered in. See our Crowdin page for all available languages and translations. example: en-US type: string tfa_secret: @@ -63,56 +65,79 @@ properties: example: active type: string enum: - - `active` - - `invited` - - `draft` - - `suspended` - - `deleted` + - active + - invited + - draft + - suspended + - deleted role: description: Unique identifier of the role of this user. example: 2f24211d-d928-469a-aea3-3c8f53d4e426 + type: string + relation: many-to-one oneOf: - - type: string - $ref: roles.yaml token: description: Static token for the user. type: string nullable: true + policies: + nullable: true + description: The policies associated with this user. Many-to-many to policies. + example: 2f24211d-d928-469a-aea3-3c8f53d4e426 + type: string + relation: many-to-many + oneOf: + - $ref: policies.yaml last_access: description: When this user used the API last. example: '2020-05-31T14:32:37Z' type: string nullable: true - format: date-time + format: timestamp last_page: description: Last page that the user was on. example: /my-project/settings/collections/a type: string nullable: true provider: + description: What auth provider was used to register this user. nullable: false type: string external_identifier: + description: Primary key of the user in the third party authentication provider, if used. nullable: true type: string auth_data: + description: Required data about the user as provided by the third party auth provider, if used. nullable: true + type: object email_notifications: + description: When this is enabled, the user will receive emails for notifications. nullable: true type: boolean appearance: + description: One of auto, light, dark. nullable: true type: string + enum: + - auto + - light + - dark theme_dark: + description: Theme to use in dark mode. nullable: true type: string theme_light: + description: Theme to use in light mode. nullable: true type: string theme_light_overrides: + description: Customization for light theme in use. nullable: true + type: object theme_dark_overrides: + description: Customization for dark theme in use. nullable: true - policies: - nullable: true -x-collection: directus_users \ No newline at end of file + type: object +x-collection: directus_users diff --git a/api-spec/components/schemas/versions.yaml b/api-spec/components/schemas/versions.yaml index 15764b15..0a3c367c 100644 --- a/api-spec/components/schemas/versions.yaml +++ b/api-spec/components/schemas/versions.yaml @@ -15,13 +15,16 @@ properties: collection: description: Name of the collection the Content Version is created on. example: articles + type: string oneOf: - - type: string - $ref: collections.yaml item: description: The item the Content Version is created on. example: '168' type: string + relation: many-to-one + oneOf: + - $ref: items.yaml hash: nullable: true type: string @@ -29,24 +32,29 @@ properties: description: When the Content Version was created. type: string example: '2022-05-11T13:14:52Z' - format: date-time + format: timestamp nullable: true date_updated: description: When the Content Version was updated. type: string example: '2022-05-11T13:14:53Z' - format: date-time + format: timestamp nullable: true user_created: description: User that created the Content Version. example: 63716273-0f29-4648-8a2a-2af2948f6f78 + type: string + relation: many-to-one oneOf: - - type: string - $ref: users.yaml user_updated: description: User that updated the Content Version. example: 63716273-0f29-4648-8a2a-2af2948f6f78 + type: string + relation: many-to-one oneOf: - - type: string - $ref: users.yaml -x-collection: directus_versions \ No newline at end of file + delta: + description: The current changes compared to the main version of the item. + type: object +x-collection: directus_versions diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 02ba3c68..77d8567f 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -63,8 +63,8 @@ paths: $ref: paths/flows/index.yaml "/flows/{id}": $ref: paths/flows/_id/index.yaml - "/flows/trigger/{flow_uuid}": - $ref: paths/flows/trigger/_flow_uuid/index.yaml + "/flows/trigger/{_id}": + $ref: paths/flows/trigger/_id/index.yaml "/folders": $ref: paths/folders/index.yaml "/folders/{id}": diff --git a/api-spec/paths/dashboards/_id/index.yaml b/api-spec/paths/dashboards/_id/index.yaml index 3c243196..d26268ce 100644 --- a/api-spec/paths/dashboards/_id/index.yaml +++ b/api-spec/paths/dashboards/_id/index.yaml @@ -1,6 +1,6 @@ get: $ref: getDashboard.yaml patch: - $ref: updatesDashboard.yaml + $ref: updateDashboard.yaml delete: $ref: deleteDashboard.yaml diff --git a/api-spec/paths/fields/_collection/getCollectionFields.yaml b/api-spec/paths/fields/_collection/getCollectionFields.yaml index c93947a1..3d75c2f1 100644 --- a/api-spec/paths/fields/_collection/getCollectionFields.yaml +++ b/api-spec/paths/fields/_collection/getCollectionFields.yaml @@ -8,7 +8,7 @@ parameters: required: true schema: type: string -- $ref": ../../../components/parameters/Sort +- $ref: ../../../components/parameters.yaml#/Sort responses: '200': description: Successful request diff --git a/api-spec/paths/files/_id/updateFile.yaml b/api-spec/paths/files/_id/updateFile.yaml index 8c9263b5..e2ea08cf 100644 --- a/api-spec/paths/files/_id/updateFile.yaml +++ b/api-spec/paths/files/_id/updateFile.yaml @@ -15,65 +15,13 @@ requestBody: required: - file properties: - title: - type: string - description: Title for the file. Is extracted from the filename on upload, - but can be edited by the user. - example: User Avatar - filename_download: - type: string - description: Preferred filename when file is downloaded. - description: - type: string - description: Description for the file. - nullable: true - folder: - description: Virtual folder where this file resides in. - example: - oneOf: - - type: string - - $ref: ../../../components/schemas/folders.yaml - nullable: true - tags: - type: array - description: Tags for the file. Is automatically populated based on Exif - data for images. - nullable: true - items: - type: string file: description: File contents. format: binary application/json: schema: - type: object - properties: - title: - type: string - description: Title for the file. Is extracted from the filename on upload, - but can be edited by the user. - example: User Avatar - filename_download: - type: string - description: Preferred filename when file is downloaded. - description: - type: string - description: Description for the file. - nullable: true - folder: - description: Virtual folder where this file resides in. - example: - oneOf: - - type: string - - $ref: ../../../components/schemas/folders.yaml - nullable: true - tags: - type: array - description: Tags for the file. Is automatically populated based on Exif - data for images. - nullable: true - items: - type: string + anyOf: + - $ref: ../../../components/schemas/items.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml index 0c68977f..ae307b9e 100644 --- a/api-spec/paths/flows/_id/updateFlow.yaml +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -20,7 +20,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/flows.yaml + - $ref: ../../../components/schemas/flows.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/index.yaml b/api-spec/paths/flows/index.yaml index 325a3a05..016c88da 100644 --- a/api-spec/paths/flows/index.yaml +++ b/api-spec/paths/flows/index.yaml @@ -1,8 +1,9 @@ get: $ref: getFlows.yaml post: - - $ref: createFlow.yaml - - $ref: createFlows.yaml + oneOf: + - $ref: createFlow.yaml + - $ref: createFlows.yaml patch: $ref: updateFlows.yaml delete: diff --git a/api-spec/paths/flows/trigger/_flow_uuid/index.yaml b/api-spec/paths/flows/trigger/_flow_uuid/index.yaml deleted file mode 100644 index 81cda9c5..00000000 --- a/api-spec/paths/flows/trigger/_flow_uuid/index.yaml +++ /dev/null @@ -1,4 +0,0 @@ -get: - $ref: triggerFlowGET -post: - $ref: triggerFlowPOST diff --git a/api-spec/paths/flows/trigger/_id/index.yaml b/api-spec/paths/flows/trigger/_id/index.yaml new file mode 100644 index 00000000..ad9ff77f --- /dev/null +++ b/api-spec/paths/flows/trigger/_id/index.yaml @@ -0,0 +1,4 @@ +get: + $ref: triggerFlowGET.yaml +post: + $ref: triggerFlowPOST.yaml diff --git a/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml similarity index 100% rename from api-spec/paths/flows/trigger/_flow_uuid/triggerFlowGET.yaml rename to api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml diff --git a/api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml similarity index 100% rename from api-spec/paths/flows/trigger/_flow_uuid/triggerFlowPOST.yaml rename to api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml diff --git a/api-spec/paths/flows/updateFlows.yaml b/api-spec/paths/flows/updateFlows.yaml index 0fbcae4c..de1d416f 100644 --- a/api-spec/paths/flows/updateFlows.yaml +++ b/api-spec/paths/flows/updateFlows.yaml @@ -19,7 +19,7 @@ requestBody: properties: data: anyOf: - - $ref: ../../components/schemas/flows.yaml + - $ref: ../../components/schemas/flows.yaml keys: type: array items: diff --git a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml index bc784d93..51fe343a 100644 --- a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml +++ b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml @@ -2,12 +2,8 @@ summary: Retrieve an Item description: Retrieves an item in a given collection. operationId: getCollectionItem parameters: -- name: id - in: path - description: Unique identifier of the item. - schema: - type: string - required: true +- $ref: ../../../../components/parameters.yaml#/Id +- $ref: ../../../../components/parameters.yaml#/Collection - $ref: ../../../../components/parameters.yaml#/Version - $ref: ../../../../components/parameters.yaml#/Fields - $ref: ../../../../components/parameters.yaml#/Meta diff --git a/api-spec/paths/items/_collection/index.yaml b/api-spec/paths/items/_collection/index.yaml index bae488d3..aed94429 100644 --- a/api-spec/paths/items/_collection/index.yaml +++ b/api-spec/paths/items/_collection/index.yaml @@ -5,4 +5,5 @@ post: - $ref: createItems.yaml patch: $ref: updateItems.yaml -delete: deleteItems.yaml +delete: + $ref: deleteItems.yaml From 903e5c96ddeac72e7696ba4be4e188e73f59a321 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Thu, 5 Dec 2024 17:50:31 +0000 Subject: [PATCH 082/119] removed single create endpoints to endforce restfulness, removed webhooks, cleaned some of schemas and fixing oas linting errors --- api-spec/components/schemas/_index.yaml | 2 - api-spec/components/schemas/activity.yaml | 7 +- api-spec/components/schemas/collections.yaml | 4 +- api-spec/components/schemas/comments.yaml | 8 +- api-spec/components/schemas/dashboards.yaml | 8 +- api-spec/components/schemas/extensions.yaml | 3 +- api-spec/components/schemas/fields.yaml | 3 +- api-spec/components/schemas/files.yaml | 14 +-- api-spec/components/schemas/flows.yaml | 2 +- api-spec/components/schemas/folders.yaml | 2 +- .../components/schemas/notifications.yaml | 2 +- api-spec/components/schemas/operations.yaml | 6 +- api-spec/components/schemas/panels.yaml | 2 +- api-spec/components/schemas/permissions.yaml | 2 +- api-spec/components/schemas/presets.yaml | 4 +- api-spec/components/schemas/revisions.yaml | 9 +- api-spec/components/schemas/roles.yaml | 10 +- api-spec/components/schemas/settings.yaml | 15 +-- api-spec/components/schemas/shares.yaml | 11 +- api-spec/components/schemas/users.yaml | 7 +- api-spec/components/schemas/versions.yaml | 13 +- api-spec/components/schemas/webhooks.yaml | 51 -------- api-spec/index.yaml | 14 +-- .../paths/activity/comment/createComment.yaml | 63 ---------- .../activity/comment/deleteComments.yaml | 6 +- .../paths/activity/comment/getComments.yaml | 24 ++-- api-spec/paths/activity/comment/index.yaml | 2 +- .../activity/comment/updateComments.yaml | 24 ++-- api-spec/paths/auth/login/login.yaml | 8 +- api-spec/paths/auth/logout/logout.yaml | 6 +- api-spec/paths/auth/refresh/refresh.yaml | 6 +- .../paths/dashboards/_id/getDashboard.yaml | 2 +- .../paths/dashboards/createDashboard.yaml | 44 ------- .../paths/dashboards/createDashboards.yaml | 4 +- api-spec/paths/dashboards/index.yaml | 7 +- .../paths/files/{ => import}/importFile.yaml | 0 api-spec/paths/files/import/index.yaml | 3 + api-spec/paths/files/index.yaml | 3 +- api-spec/paths/flows/_id/updateFlow.yaml | 2 +- api-spec/paths/flows/createFlow.yaml | 45 ------- api-spec/paths/flows/index.yaml | 4 +- .../flows/trigger/_id/triggerFlowGET.yaml | 6 +- .../flows/trigger/_id/triggerFlowPOST.yaml | 13 +- api-spec/paths/folders/createFolder.yaml | 55 -------- api-spec/paths/folders/index.yaml | 2 +- .../paths/items/_collection/createItem.yaml | 44 ------- .../paths/items/_collection/createItems.yaml | 2 +- api-spec/paths/items/_collection/index.yaml | 3 +- .../notifications/_id/updateNotification.yaml | 20 +-- .../notifications/createNotification.yaml | 44 ------- .../notifications/createNotifications.yaml | 3 +- api-spec/paths/notifications/index.yaml | 5 +- .../paths/operations/_id/getOperation.yaml | 4 +- .../operations/_id/triggerOperation.yaml | 14 ++- .../paths/operations/createOperation.yaml | 45 ------- .../paths/operations/createOperations.yaml | 2 +- api-spec/paths/operations/index.yaml | 3 +- api-spec/paths/panels/createPanel.yaml | 44 ------- api-spec/paths/panels/createPanels.yaml | 3 +- api-spec/paths/panels/index.yaml | 7 +- .../permissions/_id/updatePermission.yaml | 44 +++---- .../paths/permissions/createPermission.yaml | 119 ------------------ .../paths/permissions/createPermissions.yaml | 2 +- api-spec/paths/permissions/index.yaml | 3 +- .../_collection/_id/getItemPermissions.yaml | 8 +- .../paths/permissions/updatePermissions.yaml | 46 +++---- api-spec/paths/policies/_id/getPolicy.yaml | 2 +- api-spec/paths/policies/createPolicies.yaml | 3 +- api-spec/paths/policies/createPolicy.yaml | 44 ------- api-spec/paths/policies/index.yaml | 11 +- api-spec/paths/presets/createPreset.yaml | 93 -------------- api-spec/paths/presets/index.yaml | 3 +- api-spec/paths/roles/createRole.yaml | 67 ---------- api-spec/paths/roles/createRoles.yaml | 4 +- api-spec/paths/roles/index.yaml | 3 +- api-spec/paths/schema/diff/schemaDiff.yaml | 8 +- .../server/specs/graphql/readGraphqlSdl.yaml | 2 +- .../server/specs/oas/readOpenApiSpec.yaml | 2 +- .../paths/shares/auth/authenticateShare.yaml | 18 +-- api-spec/paths/shares/createShare.yaml | 44 ------- api-spec/paths/shares/createShares.yaml | 2 +- api-spec/paths/shares/index.yaml | 5 +- .../paths/shares/info/_id/getShareInfo.yaml | 2 +- .../translations/_id/getTranslation.yaml | 4 +- api-spec/paths/translations/_id/index.yaml | 2 +- .../translations/_id/updateTranslation.yaml | 4 +- .../paths/translations/createTranslation.yaml | 42 ------- .../translations/createTranslations.yaml | 5 +- .../translations/deleteTranslations.yaml | 2 +- .../paths/translations/getTranslations.yaml | 2 +- api-spec/paths/translations/index.yaml | 7 +- .../translations/updateTranslations.yaml | 4 +- api-spec/paths/users/createUser.yaml | 49 -------- api-spec/paths/users/createUsers.yaml | 4 +- api-spec/paths/users/index.yaml | 3 +- .../tfa/generate/generateTwoFactorSecret.yaml | 2 +- .../paths/users/me/tfa/generate/index.yaml | 2 +- .../register/verify-email/_token/index.yaml | 2 +- .../utils/export/_collection/export.yaml | 11 +- .../paths/versions/createContentVersion.yaml | 45 ------- .../paths/versions/createContentVersions.yaml | 2 +- api-spec/paths/versions/index.yaml | 3 +- .../paths/webhooks/_id/deleteWebhook.yaml | 31 ----- api-spec/paths/webhooks/_id/getWebhook.yaml | 38 ------ api-spec/paths/webhooks/_id/index.yaml | 6 - .../paths/webhooks/_id/updateWebhook.yaml | 72 ----------- api-spec/paths/webhooks/createWebhook.yaml | 71 ----------- api-spec/paths/webhooks/deleteWebhooks.yaml | 27 ---- api-spec/paths/webhooks/getWebhooks.yaml | 36 ------ api-spec/paths/webhooks/index.yaml | 8 -- api-spec/paths/webhooks/updateWebhooks.yaml | 85 ------------- package.json | 2 +- 112 files changed, 265 insertions(+), 1612 deletions(-) delete mode 100644 api-spec/components/schemas/webhooks.yaml delete mode 100644 api-spec/paths/activity/comment/createComment.yaml delete mode 100644 api-spec/paths/dashboards/createDashboard.yaml rename api-spec/paths/files/{ => import}/importFile.yaml (100%) create mode 100644 api-spec/paths/files/import/index.yaml delete mode 100644 api-spec/paths/flows/createFlow.yaml delete mode 100644 api-spec/paths/folders/createFolder.yaml delete mode 100644 api-spec/paths/items/_collection/createItem.yaml delete mode 100644 api-spec/paths/notifications/createNotification.yaml delete mode 100644 api-spec/paths/operations/createOperation.yaml delete mode 100644 api-spec/paths/panels/createPanel.yaml delete mode 100644 api-spec/paths/permissions/createPermission.yaml delete mode 100644 api-spec/paths/policies/createPolicy.yaml delete mode 100644 api-spec/paths/presets/createPreset.yaml delete mode 100644 api-spec/paths/roles/createRole.yaml delete mode 100644 api-spec/paths/shares/createShare.yaml delete mode 100644 api-spec/paths/translations/createTranslation.yaml delete mode 100644 api-spec/paths/users/createUser.yaml delete mode 100644 api-spec/paths/versions/createContentVersion.yaml delete mode 100644 api-spec/paths/webhooks/_id/deleteWebhook.yaml delete mode 100644 api-spec/paths/webhooks/_id/getWebhook.yaml delete mode 100644 api-spec/paths/webhooks/_id/index.yaml delete mode 100644 api-spec/paths/webhooks/_id/updateWebhook.yaml delete mode 100644 api-spec/paths/webhooks/createWebhook.yaml delete mode 100644 api-spec/paths/webhooks/deleteWebhooks.yaml delete mode 100644 api-spec/paths/webhooks/getWebhooks.yaml delete mode 100644 api-spec/paths/webhooks/index.yaml delete mode 100644 api-spec/paths/webhooks/updateWebhooks.yaml diff --git a/api-spec/components/schemas/_index.yaml b/api-spec/components/schemas/_index.yaml index a7156e4f..3bddc003 100644 --- a/api-spec/components/schemas/_index.yaml +++ b/api-spec/components/schemas/_index.yaml @@ -52,5 +52,3 @@ Users: $ref: users.yaml Versions: $ref: versions.yaml -Webhooks: - $ref: webhooks.yaml diff --git a/api-spec/components/schemas/activity.yaml b/api-spec/components/schemas/activity.yaml index e5318262..a43e6db8 100644 --- a/api-spec/components/schemas/activity.yaml +++ b/api-spec/components/schemas/activity.yaml @@ -14,9 +14,8 @@ properties: - delete - login user: - description: The user who performed this action. + description: The user who performed this action. Many-to-one to users. type: string - relation: many-to-one oneOf: - $ref: users.yaml nullable: true @@ -24,7 +23,7 @@ properties: description: When the action happened. example: '2019-12-05T22:52:09Z' type: string - format: timestamp + format: date-time ip: description: The IP address of the user at the time the action took place. example: 127.0.0.1 @@ -57,9 +56,7 @@ properties: description: Any changes that were made in this activity. One-to-many to revisions. nullable: true type: array - relation: one-to-many items: oneOf: - - type: integer - $ref: revisions.yaml x-collection: directus_activity diff --git a/api-spec/components/schemas/collections.yaml b/api-spec/components/schemas/collections.yaml index 816c62db..3890f2ed 100644 --- a/api-spec/components/schemas/collections.yaml +++ b/api-spec/components/schemas/collections.yaml @@ -20,6 +20,8 @@ properties: nullable: false type: boolean translations: + description: How this collection's name is displayed in the different languages in the Data Studio. + type: array nullable: true archive_field: nullable: true @@ -50,8 +52,8 @@ properties: type: integer group: nullable: true + type: string oneOf: - - type: string - $ref: collections.yaml collapse: nullable: false diff --git a/api-spec/components/schemas/comments.yaml b/api-spec/components/schemas/comments.yaml index 358dbaed..d34fbc8a 100644 --- a/api-spec/components/schemas/comments.yaml +++ b/api-spec/components/schemas/comments.yaml @@ -21,22 +21,22 @@ properties: description: Timestamp in ISO8601 when the comment was created. example: 2023-01-15T09:14:52Z type: string - format: timestamp + format: date-time date_updated: description: Timestamp in ISO8601 when the comment was last updated. example: 2023-01-15T09:00:00Z type: string - format: timestamp + format: date-time user_created: description: The user who created the comment. Many-to-one to users. example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af + type: string oneOf: - - type: string - $ref: users.yaml user_updated: description: The user who last updated the comment. Many-to-one to users. example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af + type: string oneOf: - - type: string - $ref: users.yaml x-collection: directus_comments diff --git a/api-spec/components/schemas/dashboards.yaml b/api-spec/components/schemas/dashboards.yaml index 3942f75f..ec8cdfc6 100644 --- a/api-spec/components/schemas/dashboards.yaml +++ b/api-spec/components/schemas/dashboards.yaml @@ -21,13 +21,13 @@ properties: description: When the dashboard was created. example: 2023-01-25T19:16:49.009Z type: string - format: timestamp + format: date-time user_created: description: User that created the dashboard. Many-to-one to users. example: fd066644-c8e5-499d-947b-fe6c6e1a1473 + type: string + format: relation oneOf: - - type: string - - format: many-to-one - $ref: users.yaml color: description: Accent color for the dashboard. @@ -37,7 +37,7 @@ properties: panels: description: Panels that are in this dashboard. One-to-may to panels. example: 22640672-eef0-4ee9-ab04-591f3afb2883 + type: string oneOf: - - type: one-to-many - $ref: panels.yaml x-collection: directus_shares diff --git a/api-spec/components/schemas/extensions.yaml b/api-spec/components/schemas/extensions.yaml index 35715c12..0d1b06a1 100644 --- a/api-spec/components/schemas/extensions.yaml +++ b/api-spec/components/schemas/extensions.yaml @@ -1,6 +1,7 @@ type: object properties: enabled: + description: Whether or not the extension is enabled. nullable: false type: boolean id: @@ -18,4 +19,4 @@ properties: example: my-bundle type: string nullable: true -x-collection: directus_extensions \ No newline at end of file +x-collection: directus_extensions diff --git a/api-spec/components/schemas/fields.yaml b/api-spec/components/schemas/fields.yaml index bf63013b..242498c6 100644 --- a/api-spec/components/schemas/fields.yaml +++ b/api-spec/components/schemas/fields.yaml @@ -42,6 +42,7 @@ properties: type: string translations: nullable: true + type: array note: nullable: true type: string @@ -52,8 +53,8 @@ properties: type: boolean group: nullable: true + type: integer oneOf: - - type: integer - $ref: fields.yaml validation: nullable: true diff --git a/api-spec/components/schemas/files.yaml b/api-spec/components/schemas/files.yaml index e7d270e2..de1f4edc 100644 --- a/api-spec/components/schemas/files.yaml +++ b/api-spec/components/schemas/files.yaml @@ -28,8 +28,8 @@ properties: folder: description: Virtual folder where this file resides in. example: null + type: string oneOf: - - type: string - $ref: folders.yaml nullable: true uploaded_by: @@ -42,17 +42,17 @@ properties: description: When the file was created. example: 2019-12-03T00:10:15+00:00 type: string - format: timestamp + format: date-time modified_by: - nullable: true + type: string + format: uuid oneOf: - - type: string - format: uuid - $ref: users.yaml + nullable: true modified_on: nullable: false type: string - format: timestamp + format: date-time charset: description: Character set of the file. example: binary @@ -110,5 +110,5 @@ properties: description: When the file was last uploaded/replaced. example: '2019-12-03T00:10:15+00:00' type: string - format: timestamp + format: date-time x-collection: directus_files diff --git a/api-spec/components/schemas/flows.yaml b/api-spec/components/schemas/flows.yaml index 849dc54f..ad4ee51b 100644 --- a/api-spec/components/schemas/flows.yaml +++ b/api-spec/components/schemas/flows.yaml @@ -54,7 +54,7 @@ properties: description: Timestamp in ISO8601 when the flow was created. type: string example: '2022-05-11T13:14:52Z' - format: timestamp + format: date-time nullable: true user_created: description: The user who created the flow. diff --git a/api-spec/components/schemas/folders.yaml b/api-spec/components/schemas/folders.yaml index b99885e4..0f25e4aa 100644 --- a/api-spec/components/schemas/folders.yaml +++ b/api-spec/components/schemas/folders.yaml @@ -12,8 +12,8 @@ properties: parent: description: Unique identifier of the parent folder. This allows for nested folders. example: null + type: string oneOf: - - type: string - $ref: folders.yaml nullable: true x-collection: directus_folders diff --git a/api-spec/components/schemas/notifications.yaml b/api-spec/components/schemas/notifications.yaml index f78e2b5e..27db4870 100644 --- a/api-spec/components/schemas/notifications.yaml +++ b/api-spec/components/schemas/notifications.yaml @@ -8,7 +8,7 @@ properties: description: Timestamp in ISO8601 when the notification was created. example: '2021-11-24T13:57:35Z' type: string - format: timestamp + format: date-time status: description: Current status of the notification. One of "inbox", "archived" example: inbox diff --git a/api-spec/components/schemas/operations.yaml b/api-spec/components/schemas/operations.yaml index dca0345b..50704019 100644 --- a/api-spec/components/schemas/operations.yaml +++ b/api-spec/components/schemas/operations.yaml @@ -44,15 +44,15 @@ properties: - $ref: operations.yaml flow: nullable: false + type: string + format: uuid oneOf: - - type: string - format: uuid - $ref: flows.yaml date_created: description: Timestamp in ISO8601 when the operation was created. type: string example: '2022-05-11T13:14:52Z' - format: timestamp + format: date-time nullable: true user_created: description: The user who created the operation. diff --git a/api-spec/components/schemas/panels.yaml b/api-spec/components/schemas/panels.yaml index bdc8b2b0..0bbbbe24 100644 --- a/api-spec/components/schemas/panels.yaml +++ b/api-spec/components/schemas/panels.yaml @@ -60,7 +60,7 @@ properties: description: When the panel was created example: 2023-01-05T19:05:51.884Z type: string - format: timestamp + format: date-time user_created: description: User that created the panel. Many-to-one to users. example: fd066644-c8e5-499d-947b-fe6c6e1a1473 diff --git a/api-spec/components/schemas/permissions.yaml b/api-spec/components/schemas/permissions.yaml index 53466f0c..3184b934 100644 --- a/api-spec/components/schemas/permissions.yaml +++ b/api-spec/components/schemas/permissions.yaml @@ -36,9 +36,9 @@ properties: type: string nullable: true policy: + description: Policy this permission applies to. Many-to-one to policies. nullable: false format: uuid - relation: many-to-one type: string oneOf: - $ref: policies.yaml diff --git a/api-spec/components/schemas/presets.yaml b/api-spec/components/schemas/presets.yaml index 789d7c89..86562862 100644 --- a/api-spec/components/schemas/presets.yaml +++ b/api-spec/components/schemas/presets.yaml @@ -12,15 +12,15 @@ properties: description: The unique identifier of the user to whom this collection preset applies. example: 63716273-0f29-4648-8a2a-2af2948f6f78 nullable: true + type: string oneOf: - - type: string - $ref: users.yaml 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 + type: string oneOf: - - type: string - $ref: roles.yaml collection: description: What collection this collection preset is used for. diff --git a/api-spec/components/schemas/revisions.yaml b/api-spec/components/schemas/revisions.yaml index 9fb18dc5..9b608f30 100644 --- a/api-spec/components/schemas/revisions.yaml +++ b/api-spec/components/schemas/revisions.yaml @@ -5,10 +5,9 @@ properties: example: 1 type: integer activity: - description: Unique identifier for the activity record. + description: Unique identifier for the activity record. Many-to-one to activity. example: 2 type: integer - relation: many-to-one oneOf: - $ref: activity.yaml collection: @@ -37,16 +36,14 @@ properties: title: Hello, World! type: object parent: - description: If the current item was updated relationally, this is the id of the parent revision record + description: If the current item was updated relationally, this is the id of the parent revision record. Many-to-one to revisions. example: null type: integer - relation: many-to-one nullable: true version: - description: Associated version of this revision. + description: Associated version of this revision. Many-to-one to versions. example: draft type: string - relation: many-to-one oneOf: - $ref: versions.yaml x-collection: directus_revisions diff --git a/api-spec/components/schemas/roles.yaml b/api-spec/components/schemas/roles.yaml index 011bd230..4bea542a 100644 --- a/api-spec/components/schemas/roles.yaml +++ b/api-spec/components/schemas/roles.yaml @@ -20,27 +20,24 @@ properties: nullable: true parent: nullable: true - description: Optional parent role that this role inherits permissions from. + description: Optional parent role that this role inherits permissions from. Many-to-one to roles. type: string format: uuid - relation: many-to-one oneOf: - $ref: roles.yaml children: nullable: true - description: Nested child roles that inherit this roles permissions. One-to-many to roles. + description: Nested child roles that inherit this roles permissions. One-to-many to roles. One-to-many to roles. type: array format: uuid - relation: one-to-many items: oneOf: - $ref: roles.yaml policies: nullable: true - description: The roles in this role. One-to-many to roles. + description: The policies in this role. Many-to-many to roles. type: array format: uuid - relation: many-to-many items: oneOf: - $ref: roles.yaml @@ -49,7 +46,6 @@ properties: description: The users in this role. One-to-many to users. type: array format: uuid - relation: one-to-many items: oneOf: - $ref: users.yaml diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index 1f0683a1..31eee938 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -20,27 +20,24 @@ properties: example: null nullable: true project_logo: - description: The logo of the project. + description: The logo of the project. Many-to-one to files. type: string example: null nullable: true - relation: many-to-one oneOf: - $ref: files.yaml public_foreground: - description: The foreground of the project. + description: The foreground of the project. Many-to-one to files. type: string example: null nullable: true - relation: many-to-one oneOf: - $ref: files.yaml public_background: - description: The background of the project. + description: The background of the project. Many-to-one to files. type: object example: null nullable: true - relation: many-to-one oneOf: - $ref: files.yaml public_note: @@ -160,7 +157,6 @@ properties: nullable: true description: Favicon for the Data Studio. Many-to-one to files. type: string - relation: many-to-one oneOf: - $ref: files.yaml default_appearance: @@ -210,11 +206,12 @@ properties: public_registration_role: nullable: true description: $t:fields.directus_settings.public_registration_role_note + type: string + format: uuid oneOf: - - type: string - format: uuid - $ref: roles.yaml public_registration_email_filter: + type: string nullable: true description: $t:fields.directus_settings.public_registration_email_filter_note x-collection: directus_settings diff --git a/api-spec/components/schemas/shares.yaml b/api-spec/components/schemas/shares.yaml index f11e4e5a..ab77b552 100644 --- a/api-spec/components/schemas/shares.yaml +++ b/api-spec/components/schemas/shares.yaml @@ -12,7 +12,6 @@ properties: collection: description: Collection in which the current item is shared. Many-to-one to Collections. example: articles - relation: many-to-one type: string oneOf: - $ref: collections.yaml @@ -21,11 +20,10 @@ properties: example: '1' type: string role: - description: Role of which the share will inherit the permissions. + description: Role of which the share will inherit the permissions. Many-to-one to shares. example: 2b34fba4-a6cb-49f4-a070-2daee7ac44f0 type: string format: uuid - relation: many-to-one oneOf: - $ref: shares.yaml password: @@ -38,24 +36,23 @@ properties: example: b13072b7-73e9-4904-89e0-34aaf4403766 type: string format: uuid - relation: many-to-one oneOf: - $ref: users.yaml date_created: description: When the share was created. example: 2023-01-25T19:16:49.009Z type: string - format: timestamp + format: date-time date_start: description: Optional timestamp that controls from what date/time the shared item can be viewed. example: 2023-01-26T17:00:00.000Z type: string - format: timestamp + format: date-time date_end: description: Optional timestamp that controls until what date/time the shared item can be viewed. example: 2023-01-28T17:00:00.000Z type: string - format: timestamp + format: date-time times_used: description: The number of times the shared item has been viewed. example: 0 diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index 59ee9609..c50fb433 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -46,7 +46,6 @@ properties: avatar: description: The user's avatar. Many-to-one to files. example: null - relation: many-to-one type: string oneOf: - $ref: files.yaml @@ -71,10 +70,9 @@ properties: - suspended - deleted role: - description: Unique identifier of the role of this user. + description: Unique identifier of the role of this user. Many-to-one to roles. example: 2f24211d-d928-469a-aea3-3c8f53d4e426 type: string - relation: many-to-one oneOf: - $ref: roles.yaml token: @@ -86,7 +84,6 @@ properties: description: The policies associated with this user. Many-to-many to policies. example: 2f24211d-d928-469a-aea3-3c8f53d4e426 type: string - relation: many-to-many oneOf: - $ref: policies.yaml last_access: @@ -94,7 +91,7 @@ properties: example: '2020-05-31T14:32:37Z' type: string nullable: true - format: timestamp + format: date-time last_page: description: Last page that the user was on. example: /my-project/settings/collections/a diff --git a/api-spec/components/schemas/versions.yaml b/api-spec/components/schemas/versions.yaml index 0a3c367c..b6f547a7 100644 --- a/api-spec/components/schemas/versions.yaml +++ b/api-spec/components/schemas/versions.yaml @@ -19,10 +19,9 @@ properties: oneOf: - $ref: collections.yaml item: - description: The item the Content Version is created on. + description: The item the Content Version is created on. Many-to-one to items. example: '168' type: string - relation: many-to-one oneOf: - $ref: items.yaml hash: @@ -32,26 +31,24 @@ properties: description: When the Content Version was created. type: string example: '2022-05-11T13:14:52Z' - format: timestamp + format: date-time nullable: true date_updated: description: When the Content Version was updated. type: string example: '2022-05-11T13:14:53Z' - format: timestamp + format: date-time nullable: true user_created: - description: User that created the Content Version. + description: User that created the Content Version. Many-to-one to users. example: 63716273-0f29-4648-8a2a-2af2948f6f78 type: string - relation: many-to-one oneOf: - $ref: users.yaml user_updated: - description: User that updated the Content Version. + description: User that updated the Content Version. Many-to-one to users. example: 63716273-0f29-4648-8a2a-2af2948f6f78 type: string - relation: many-to-one oneOf: - $ref: users.yaml delta: diff --git a/api-spec/components/schemas/webhooks.yaml b/api-spec/components/schemas/webhooks.yaml deleted file mode 100644 index 4ba55f26..00000000 --- a/api-spec/components/schemas/webhooks.yaml +++ /dev/null @@ -1,51 +0,0 @@ -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: flows.yaml -x-collection: directus_webhooks \ No newline at end of file diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 77d8567f..2bf65ebf 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -63,7 +63,7 @@ paths: $ref: paths/flows/index.yaml "/flows/{id}": $ref: paths/flows/_id/index.yaml - "/flows/trigger/{_id}": + "/flows/trigger/{id}": $ref: paths/flows/trigger/_id/index.yaml "/folders": $ref: paths/folders/index.yaml @@ -126,9 +126,9 @@ paths: "/server/ping": $ref: paths/server/ping/index.yaml "/server/specs/graphql": - $ref: paths/server/specs/index.yaml - "/server/specs": - $ref: paths/server/specs/index.yaml + $ref: paths/server/specs/graphql/index.yaml + "/server/specs/oas": + $ref: paths/server/specs/oas/index.yaml "/server/health": $ref: paths/server/health/index.yaml "/settings": @@ -163,7 +163,7 @@ paths: $ref: paths/users/me/tfa/generate/index.yaml "/users/me/track/page": $ref: paths/users/me/track/page/index.yaml - "/users/register/": + "/users/register": $ref: paths/users/register/index.yaml "/users/register/verify-email/{token}": $ref: paths/users/register/verify-email/_token/index.yaml @@ -191,10 +191,6 @@ paths: $ref: paths/versions/_id/promote/index.yaml "/versions/{id}/save": $ref: paths/versions/_id/save/index.yaml - "/webhooks/": - $ref: paths/webhooks/index.yaml - "/webhooks/{id}": - $ref: paths/webhooks/_id/index.yaml components: parameters: $ref: components/parameters.yaml diff --git a/api-spec/paths/activity/comment/createComment.yaml b/api-spec/paths/activity/comment/createComment.yaml deleted file mode 100644 index 3918cb2a..00000000 --- a/api-spec/paths/activity/comment/createComment.yaml +++ /dev/null @@ -1,63 +0,0 @@ -summary: Create a Comment -description: Creates a new comment. -operationId: createComment -parameters: -- $ref: ../../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - required: - - collection - - item - - comment - properties: - collection: - type: string - example: projects - item: - type: integer - example: 1 - comment: - type: string - example: A new comment -responses: - '200': - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../../components/schemas/activity.yaml - description: Successful request - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Activity -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createComment } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request( - createComment({ - collection: collection_name, - item: item_id, - comment: comment_content, - }) - ); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_comment(collection: String!, item: ID!, comment: String!): directus_activity - } diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/activity/comment/deleteComments.yaml index 66eb07b0..b189c99e 100644 --- a/api-spec/paths/activity/comment/deleteComments.yaml +++ b/api-spec/paths/activity/comment/deleteComments.yaml @@ -9,7 +9,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/comments.yaml + $ref: ../../../components/schemas/comments.yaml keys: type: array items: @@ -18,9 +18,9 @@ responses: '200': description: Successful request '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/getComments.yaml b/api-spec/paths/activity/comment/getComments.yaml index b1c214b1..2646cb5d 100644 --- a/api-spec/paths/activity/comment/getComments.yaml +++ b/api-spec/paths/activity/comment/getComments.yaml @@ -1,15 +1,15 @@ summary: Get Comments description: Returns a list of comments. -operationId: getActivities +operationId: getComments parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Limit -- $ref: ../../components/parameters.yaml#/Meta -- $ref: ../../components/parameters.yaml#/Offset -- $ref: ../../components/parameters.yaml#/Sort -- $ref: ../../components/parameters.yaml#/Filter -- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search responses: '200': content: @@ -20,14 +20,14 @@ responses: data: type: array items: - $ref: ../../components/schemas/comments.yaml + $ref: ../../../components/schemas/comments.yaml meta: - $ref: ../../components/schemas/x-metadata.yaml + $ref: ../../../components/schemas/x-metadata.yaml description: Successful request '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/index.yaml b/api-spec/paths/activity/comment/index.yaml index 2a87c366..a7cbc056 100644 --- a/api-spec/paths/activity/comment/index.yaml +++ b/api-spec/paths/activity/comment/index.yaml @@ -1,7 +1,7 @@ get: $ref: getComments.yaml post: - $ref: createComment.yaml + $ref: createComments.yaml patch: $ref: updateComments.yaml delete: diff --git a/api-spec/paths/activity/comment/updateComments.yaml b/api-spec/paths/activity/comment/updateComments.yaml index 70198cea..f28fec1d 100644 --- a/api-spec/paths/activity/comment/updateComments.yaml +++ b/api-spec/paths/activity/comment/updateComments.yaml @@ -3,13 +3,13 @@ summary: Update Multiple comments description: Update multiple existing comments. operationId: updateComments parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Limit -- $ref: ../../components/parameters.yaml#/Meta -- $ref: ../../components/parameters.yaml#/Offset -- $ref: ../../components/parameters.yaml#/Sort -- $ref: ../../components/parameters.yaml#/Filter -- $ref: ../../components/parameters.yaml#/Search +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Limit +- $ref: ../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Offset +- $ref: ../../../components/parameters.yaml#/Sort +- $ref: ../../../components/parameters.yaml#/Filter +- $ref: ../../../components/parameters.yaml#/Search requestBody: content: application/json: @@ -17,7 +17,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/comments.yaml + $ref: ../../../components/schemas/comments.yaml keys: type: array items: @@ -33,13 +33,13 @@ responses: data: type: array items: - $ref: ../../components/schemas/comments.yaml + $ref: ../../../components/schemas/comments.yaml meta: - $ref: ../../components/schemas/x-metadata.yaml + $ref: ../../../components/schemas/x-metadata.yaml '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Activity x-codeSamples: diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index 1ed73a8e..ab3b0ea0 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -25,10 +25,10 @@ requestBody: mode: type: string enum: - - `json` - - `cookie` - - `session` - default: `json` + - json + - cookie + - session + default: json description: Whether to retrieve the refresh token in the JSON response, or in a `httpOnly` cookie. otp: diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index 9dda3dc3..70c2ce1e 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -17,9 +17,9 @@ requestBody: mode: type: string enum: - - `json` - - `cookie` - - `session` + - json + - cookie + - session description: Whether the refresh token is submitted in the JSON response, or in a `httpOnly` cookie. responses: diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml index b86d84ae..178fc586 100644 --- a/api-spec/paths/auth/refresh/refresh.yaml +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -17,9 +17,9 @@ requestBody: mode: type: string enum: - - `json` - - `cookie` - - `session` + - json + - cookie + - session default: json description: Whether to submit and retrieve the refresh token in the JSON response, or in a `httpOnly` cookie. diff --git a/api-spec/paths/dashboards/_id/getDashboard.yaml b/api-spec/paths/dashboards/_id/getDashboard.yaml index 524cc381..33c4ad6b 100644 --- a/api-spec/paths/dashboards/_id/getDashboard.yaml +++ b/api-spec/paths/dashboards/_id/getDashboard.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/Dashboards.yaml + $ref: ../../../components/schemas/dashboards.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/createDashboard.yaml b/api-spec/paths/dashboards/createDashboard.yaml deleted file mode 100644 index d5806644..00000000 --- a/api-spec/paths/dashboards/createDashboard.yaml +++ /dev/null @@ -1,44 +0,0 @@ - -summary: Create a Dashboard -description: Create a new dashboard. -operationId: createDashboard -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/dashboards.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/dashboards.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Dashboards -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createDashboard } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createDashboard(dashboard_object)); - - label: GraphQL - lang: GraphQL - source: | - type Mutation { - create_dashboards_item(data: create_directus_dashboards_input!): directus_dashboards - } diff --git a/api-spec/paths/dashboards/createDashboards.yaml b/api-spec/paths/dashboards/createDashboards.yaml index 75891507..c6cf04ba 100644 --- a/api-spec/paths/dashboards/createDashboards.yaml +++ b/api-spec/paths/dashboards/createDashboards.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/dashboards.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Dashboards.yaml + $ref: ../../components/schemas/dashboards.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/dashboards/index.yaml b/api-spec/paths/dashboards/index.yaml index c3aa4ed6..9b328ed0 100644 --- a/api-spec/paths/dashboards/index.yaml +++ b/api-spec/paths/dashboards/index.yaml @@ -1,9 +1,8 @@ get: $ref: getDashboards.yaml post: - - $ref: createDashboard.yaml - - $ref: createsDashboards.yaml -update: - $ref: updatesDashboards.yaml + $ref: createDashboards.yaml +patch: + $ref: updateDashboards.yaml delete: $ref: deleteDashboards.yaml diff --git a/api-spec/paths/files/importFile.yaml b/api-spec/paths/files/import/importFile.yaml similarity index 100% rename from api-spec/paths/files/importFile.yaml rename to api-spec/paths/files/import/importFile.yaml diff --git a/api-spec/paths/files/import/index.yaml b/api-spec/paths/files/import/index.yaml new file mode 100644 index 00000000..ff6549c4 --- /dev/null +++ b/api-spec/paths/files/import/index.yaml @@ -0,0 +1,3 @@ +post: + $ref: importFile.yaml + diff --git a/api-spec/paths/files/index.yaml b/api-spec/paths/files/index.yaml index c13b2c41..2706eaee 100644 --- a/api-spec/paths/files/index.yaml +++ b/api-spec/paths/files/index.yaml @@ -1,8 +1,7 @@ get: $ref: getFiles.yaml post: - - $ref: uploadFile.yaml - - $ref: importFile.yaml + $ref: uploadFile.yaml patch: $ref: updateFiles.yaml delete: diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml index ae307b9e..0c68977f 100644 --- a/api-spec/paths/flows/_id/updateFlow.yaml +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -20,7 +20,7 @@ responses: type: object properties: data: - - $ref: ../../../components/schemas/flows.yaml + $ref: ../../../components/schemas/flows.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/createFlow.yaml b/api-spec/paths/flows/createFlow.yaml deleted file mode 100644 index b563c63a..00000000 --- a/api-spec/paths/flows/createFlow.yaml +++ /dev/null @@ -1,45 +0,0 @@ -summary: Create a Flow -description: Create a new flow. -operationId: createFlow -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/flows.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/flows.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Flows -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createFlow } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createFlow(flow_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_flows_item(data: create_directus_flows_input!): directus_flows - } diff --git a/api-spec/paths/flows/index.yaml b/api-spec/paths/flows/index.yaml index 016c88da..28552ce9 100644 --- a/api-spec/paths/flows/index.yaml +++ b/api-spec/paths/flows/index.yaml @@ -1,9 +1,7 @@ get: $ref: getFlows.yaml post: - oneOf: - - $ref: createFlow.yaml - - $ref: createFlows.yaml + $ref: createFlows.yaml patch: $ref: updateFlows.yaml delete: diff --git a/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml index 380345c4..37fe0b77 100644 --- a/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml +++ b/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml @@ -2,18 +2,18 @@ summary: Flow with GET webhook trigger description: Start a flow with GET webhook trigger. operationId: triggerFlowGET parameters: -- $ref: ../../../../components/parameters.yaml#/UUId +- $ref: ../../../../components/parameters.yaml#/Id - $ref: ../../../../components/parameters.yaml#/Fields - $ref: ../../../../components/parameters.yaml#/Meta responses: '200': - description: Successful request + description: Result of the flow, if any. content: application/json: schema: type: object properties: - data: Result of the flow, if any. + data: {} '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml index ebd74259..82eb1baf 100644 --- a/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml +++ b/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml @@ -2,25 +2,26 @@ summary: Flow with POST webhook trigger description: Start a flow with POST webhook trigger. operationId: triggerFlowPOST parameters: -- $ref: ../../../../components/parameters.yaml#/UUId -- $ref: ../../../../components/parameters.yaml#/Fields -- $ref: ../../../../components/parameters.yaml#/Meta + - $ref: ../../../../components/parameters.yaml#/Id + - $ref: ../../../../components/parameters.yaml#/Fields + - $ref: ../../../../components/parameters.yaml#/Meta requestBody: + description: Payload for the POST request. content: application/json: schema: type: object properties: - data: Payload for the POST request. + data: {} responses: '200': - description: Successful request + description: Result of the flow, if any. content: application/json: schema: type: object properties: - data: Result of the flow, if any. + data: {} '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/folders/createFolder.yaml b/api-spec/paths/folders/createFolder.yaml deleted file mode 100644 index b58c9a74..00000000 --- a/api-spec/paths/folders/createFolder.yaml +++ /dev/null @@ -1,55 +0,0 @@ -summary: Create a Folder -description: Create a new (virtual) folder. -operationId: createFolder -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - example: Amsterdam - description: Name of the folder. - parent: - type: integer - description: Unique identifier of the parent folder. This allows for nested - folders. - required: - - name -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/folders.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Folders -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createFolder } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createFolder(folder_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_folders_item(data: create_directus_folders_input): directus_folders - } diff --git a/api-spec/paths/folders/index.yaml b/api-spec/paths/folders/index.yaml index 24b4cb99..657aae67 100644 --- a/api-spec/paths/folders/index.yaml +++ b/api-spec/paths/folders/index.yaml @@ -1,7 +1,7 @@ get: $ref: getFolders.yaml post: - $ref: createFolder.yaml + $ref: createFolders.yaml patch: $ref: updateFolders.yaml delete: diff --git a/api-spec/paths/items/_collection/createItem.yaml b/api-spec/paths/items/_collection/createItem.yaml deleted file mode 100644 index 970cc122..00000000 --- a/api-spec/paths/items/_collection/createItem.yaml +++ /dev/null @@ -1,44 +0,0 @@ -summary: Create an item -description: Create a new item in the given collection. -operationId: createItem -parameters: -- $ref: ../../../components/parameters.yaml#/Collection -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../../components/schemas/items.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../../components/schemas/items.yaml - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Items -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createItem } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createItem(collection_name, item_object)); -- label: GraphQL - lang: GraphQL - source: | - type Mutation { - create__item(data: create__input): - } diff --git a/api-spec/paths/items/_collection/createItems.yaml b/api-spec/paths/items/_collection/createItems.yaml index c480efe9..6b59f6ff 100644 --- a/api-spec/paths/items/_collection/createItems.yaml +++ b/api-spec/paths/items/_collection/createItems.yaml @@ -34,7 +34,7 @@ responses: items: $ref: ../../../components/schemas/items.yaml meta: - $ref: ../../components/schemas/x-metadata.yaml + $ref: ../../../components/schemas/x-metadata.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/index.yaml b/api-spec/paths/items/_collection/index.yaml index aed94429..f372168d 100644 --- a/api-spec/paths/items/_collection/index.yaml +++ b/api-spec/paths/items/_collection/index.yaml @@ -1,8 +1,7 @@ get: $ref: getCollectionItems.yaml post: - - $ref: createItem.yaml - - $ref: createItems.yaml + $ref: createItems.yaml patch: $ref: updateItems.yaml delete: diff --git a/api-spec/paths/notifications/_id/updateNotification.yaml b/api-spec/paths/notifications/_id/updateNotification.yaml index 56877549..aa51a4b9 100644 --- a/api-spec/paths/notifications/_id/updateNotification.yaml +++ b/api-spec/paths/notifications/_id/updateNotification.yaml @@ -1,21 +1,21 @@ summary: Update a Notification description: Update an existing notification. -operationId: getNotification +operationId: updateNotification parameters: -- name: id - in: path - description: Unique identifier of the notification. - schema: - type: string - required: true -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Meta + - name: id + in: path + description: Unique identifier of the notification. + schema: + type: string + required: true + - $ref: ../../../components/parameters.yaml#/Fields + - $ref: ../../../components/parameters.yaml#/Meta requestBody: content: application/json: schema: anyOf: - - $ref: ../../../components/schemas/notifications.yaml + - $ref: ../../../components/schemas/notifications.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/notifications/createNotification.yaml b/api-spec/paths/notifications/createNotification.yaml deleted file mode 100644 index 046d6e24..00000000 --- a/api-spec/paths/notifications/createNotification.yaml +++ /dev/null @@ -1,44 +0,0 @@ - -summary: Create a Notification -description: Create a new notification. -operationId: createNotification -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/notifications.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/notifications.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Notifications -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createNotification } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createNotification(notification_object)); - - label: GraphQL - lang: GraphQL - source: | - type Mutation { - create_notifications_item(data: create_directus_notifications_input!): directus_notifications - } diff --git a/api-spec/paths/notifications/createNotifications.yaml b/api-spec/paths/notifications/createNotifications.yaml index 84142de5..fd8ef2e7 100644 --- a/api-spec/paths/notifications/createNotifications.yaml +++ b/api-spec/paths/notifications/createNotifications.yaml @@ -9,7 +9,6 @@ parameters: - $ref: ../../components/parameters.yaml#/Sort - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search -- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: @@ -19,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/notifications.yaml + $ref: ../../components/schemas/notifications.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/notifications/index.yaml b/api-spec/paths/notifications/index.yaml index de7fbe34..8568cbd1 100644 --- a/api-spec/paths/notifications/index.yaml +++ b/api-spec/paths/notifications/index.yaml @@ -1,9 +1,8 @@ get: $ref: getNotifications.yaml post: - - $ref: createNotification.yaml - - $ref: createNotifications.yaml -update: + $ref: createNotifications.yaml +patch: $ref: updateNotifications.yaml delete: $ref: deleteNotifications.yaml diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml index ee2857a5..08dfaf0f 100644 --- a/api-spec/paths/operations/_id/getOperation.yaml +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -1,6 +1,8 @@ summary: Retrieve an Operation description: Retrieve a single operation by primary key. operationId: getOperation +parameters: + - $ref: ../../../components/parameters.yaml#/UUId responses: '200': description: Successful request @@ -17,8 +19,6 @@ responses: $ref: ../../../components/responses.yaml#/NotFoundError tags: - Operations -parameters: -- $ref: ../../../components/parameters.yaml#/UUId x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/operations/_id/triggerOperation.yaml b/api-spec/paths/operations/_id/triggerOperation.yaml index 2b35510b..e81eb483 100644 --- a/api-spec/paths/operations/_id/triggerOperation.yaml +++ b/api-spec/paths/operations/_id/triggerOperation.yaml @@ -2,18 +2,28 @@ summary: Triggering an Operation description: Trigger an operation based on primary key. operationId: triggerOperation parameters: -- $ref: ../../../components/parameters.yaml#/UUId + - $ref: ../../../components/parameters.yaml#/Id requestBody: description: Payload for the operation, if needed. + content: + application/json: + schema: + type: object responses: '200': description: Result of the operation, if any. + content: + application/json: + schema: + type: object + properties: + data: {} '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError tags: -- Operations + - Operations x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/operations/createOperation.yaml b/api-spec/paths/operations/createOperation.yaml deleted file mode 100644 index d1cf4774..00000000 --- a/api-spec/paths/operations/createOperation.yaml +++ /dev/null @@ -1,45 +0,0 @@ -summary: Create an Operation -description: Create a new operation. -operationId: createOperation -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/operations.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/operations.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Operations -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createOperations } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createOperations(operations_object_array)); - - label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_operations_items(data: [create_directus_operations_input!]!): [directus_operations] - } diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml index aed9b71f..4f7d16c0 100644 --- a/api-spec/paths/operations/createOperations.yaml +++ b/api-spec/paths/operations/createOperations.yaml @@ -20,7 +20,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/operations.yaml + $ref: ../../components/schemas/operations.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/operations/index.yaml b/api-spec/paths/operations/index.yaml index ed47671c..d3a7d90e 100644 --- a/api-spec/paths/operations/index.yaml +++ b/api-spec/paths/operations/index.yaml @@ -1,8 +1,7 @@ get: $ref: getOperations.yaml post: - - $ref: createOperation.yaml - - $ref: createOperations.yaml + $ref: createOperations.yaml patch: $ref: updateOperations.yaml delete: diff --git a/api-spec/paths/panels/createPanel.yaml b/api-spec/paths/panels/createPanel.yaml deleted file mode 100644 index 9b1faa4a..00000000 --- a/api-spec/paths/panels/createPanel.yaml +++ /dev/null @@ -1,44 +0,0 @@ - -summary: Create a panel -description: Create a new panel. -operationId: createPanel -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/panels.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/panels.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Panels -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createPanel } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createpanel(panel_object)); - - label: GraphQL - lang: GraphQL - source: | - type Mutation { - create_panels_item(data: create_directus_panels_input!): directus_panels - } diff --git a/api-spec/paths/panels/createPanels.yaml b/api-spec/paths/panels/createPanels.yaml index 67999ba9..1fee4c96 100644 --- a/api-spec/paths/panels/createPanels.yaml +++ b/api-spec/paths/panels/createPanels.yaml @@ -9,7 +9,6 @@ parameters: - $ref: ../../components/parameters.yaml#/Sort - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search -- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: @@ -19,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/panels.yaml + $ref: ../../components/schemas/panels.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/panels/index.yaml b/api-spec/paths/panels/index.yaml index 68f73e08..40dc6123 100644 --- a/api-spec/paths/panels/index.yaml +++ b/api-spec/paths/panels/index.yaml @@ -1,9 +1,8 @@ get: $ref: getPanels.yaml post: - - $ref: createPanel.yaml - - $ref: createPanels.yaml -update: - $ref: updatepanels.yaml + $ref: createPanels.yaml +patch: + $ref: updatePanels.yaml delete: $ref: deletePanels.yaml diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml index fb550a0f..6e531222 100644 --- a/api-spec/paths/permissions/_id/updatePermission.yaml +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -15,42 +15,42 @@ requestBody: description: What collection this permission applies to. comment: type: string - description: If the user can post comments. `full`. + description: If the user can post comments. full. enum: - - `none` - - `create` - - `update` + - none + - create + - update create: type: string description: If the user can create items. enum: - - `none` - - `full` + - none + - full delete: type: string description: If the user can update items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full explain: type: string description: If the user is required to leave a comment explaining what was changed. enum: - - `none` - - `create` - - `update` - - `always` + - none + - create + - update + - always read: type: string description: If the user can read items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full read_field_blacklist: type: object description: Explicitly denies read access for specific fields. @@ -67,10 +67,10 @@ requestBody: type: string description: If the user can update items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full write_field_blacklist: type: object description: Explicitly denies write access for specific fields. diff --git a/api-spec/paths/permissions/createPermission.yaml b/api-spec/paths/permissions/createPermission.yaml deleted file mode 100644 index 0658dcdc..00000000 --- a/api-spec/paths/permissions/createPermission.yaml +++ /dev/null @@ -1,119 +0,0 @@ -summary: Create a Permission Rule -description: Create a new permission rule. -operationId: createPermission -parameters: -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - properties: - collection: - type: string - description: What collection this permission applies to. - example: customers - comment: - type: string - description: If the user can post comments. - enum: - - `none` - - `create` - - `update` - - `full` - create: - type: string - description: If the user can create items. - enum: - - `none` - - `full` - delete: - type: string - description: If the user can update items. - enum: - - `none` - - `mine` - - `role` - - `full` - explain: - type: string - description: If the user is required to leave a comment explaining what - was changed. - enum: - - `none` - - `create` - - `update` - - `always` - read: - type: string - description: If the user can read items. - enum: - - `none` - - `mine` - - `role` - - `full` - role: - type: integer - description: Unique identifier of the role this permission applies to. - example: 3 - read_field_blacklist: - type: array - description: Explicitly denies read access for specific fields. - items: - type: string - example: - - `featured_image` - status: - type: string - description: What status this permission applies to. - status_blacklist: - type: array - description: Explicitly denies specific statuses to be used. - items: - type: string - update: - type: string - description: If the user can update items. - enum: - - `none` - - `mine` - - `role` - - `full` - write_field_blacklist: - type: array - description: Explicitly denies write access for specific fields. - items: - type: string -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/permissions.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Permissions -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createPermission } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createPermission(permission_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_permissions_item(data: create_directus_permissions_input!): directus_permissions - } diff --git a/api-spec/paths/permissions/createPermissions.yaml b/api-spec/paths/permissions/createPermissions.yaml index 606fd386..eb85e709 100644 --- a/api-spec/paths/permissions/createPermissions.yaml +++ b/api-spec/paths/permissions/createPermissions.yaml @@ -1,6 +1,6 @@ summary: Create Multiple Permission Rules description: Create multiple new permission rules -operationId: getPermissions +operationId: createPermissions parameters: - $ref: ../../components/parameters.yaml#/Fields - $ref: ../../components/parameters.yaml#/Limit diff --git a/api-spec/paths/permissions/index.yaml b/api-spec/paths/permissions/index.yaml index 1b6aab89..349bd9a1 100644 --- a/api-spec/paths/permissions/index.yaml +++ b/api-spec/paths/permissions/index.yaml @@ -1,8 +1,7 @@ get: $ref: getPermissions.yaml post: - - $ref: createPermission.yaml - - $ref: createPermissions.yaml + $ref: createPermissions.yaml patch: $ref: updatePermissions.yaml delete: diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index 84194180..034cd301 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -2,15 +2,15 @@ summary: Check Permissions for a Specific Item description: Check the current user's permissions on a specific item. operationId: readItemPermissions parameters: - - $ref: ../../components/parameters.yaml#/collection - - $ref: ../../components/parameters.yaml#/id + - $ref: ../../../../../components/parameters.yaml#/Collection + - $ref: ../../../../../components/parameters.yaml#/Id responses: '200': description: Successful request '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../../../../components/responses.yaml#/NotFoundError tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index c10b604e..0718f3d8 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -32,41 +32,41 @@ requestBody: type: string description: If the user can post comments. enum: - - `none` - - `create` - - `update` - - `full` + - none + - create + - update + - full create: type: string description: If the user can create items. enum: - - `none` - - `full` + - none + - full delete: type: string description: If the user can update items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full explain: type: string description: If the user is required to leave a comment explaining what was changed. enum: - - `none` - - `create` - - `update` - - `always` + - none + - create + - update + - always read: type: string description: If the user can read items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full role: type: integer description: Unique identifier of the role this permission applies @@ -78,7 +78,7 @@ requestBody: items: type: string example: - - `featured_image` + - featured_image status: type: string description: What status this permission applies to. @@ -91,10 +91,10 @@ requestBody: type: string description: If the user can update items. enum: - - `none` - - `mine` - - `role` - - `full` + - none + - mine + - role + - full write_field_blacklist: type: array description: Explicitly denies write access for specific fields. diff --git a/api-spec/paths/policies/_id/getPolicy.yaml b/api-spec/paths/policies/_id/getPolicy.yaml index c81357a7..cca3ef6b 100644 --- a/api-spec/paths/policies/_id/getPolicy.yaml +++ b/api-spec/paths/policies/_id/getPolicy.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/policys.yaml + $ref: ../../../components/schemas/policies.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/policies/createPolicies.yaml b/api-spec/paths/policies/createPolicies.yaml index 2dba0282..03011e8c 100644 --- a/api-spec/paths/policies/createPolicies.yaml +++ b/api-spec/paths/policies/createPolicies.yaml @@ -9,7 +9,6 @@ parameters: - $ref: ../../components/parameters.yaml#/Sort - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search -- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: @@ -19,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/policies.yaml + $ref: ../../components/schemas/policies.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/policies/createPolicy.yaml b/api-spec/paths/policies/createPolicy.yaml deleted file mode 100644 index b59a2567..00000000 --- a/api-spec/paths/policies/createPolicy.yaml +++ /dev/null @@ -1,44 +0,0 @@ - -summary: Create a policy -description: Create a new policy. -operationId: createPolicy -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/policies.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/policies.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Policies -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createPolicy } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createPolicy(policy_object)); - - label: GraphQL - lang: GraphQL - source: | - type Mutation { - create_policies_item(data: create_directus_policies_input!): directus_policies - } diff --git a/api-spec/paths/policies/index.yaml b/api-spec/paths/policies/index.yaml index e6c87dcc..9eed50e8 100644 --- a/api-spec/paths/policies/index.yaml +++ b/api-spec/paths/policies/index.yaml @@ -1,9 +1,8 @@ get: - $ref: getpolicies.yaml + $ref: getPolicies.yaml post: - - $ref: createpolicy.yaml - - $ref: createpolicies.yaml -update: - $ref: updatepolicies.yaml + $ref: createPolicies.yaml +patch: + $ref: updatePolicies.yaml delete: - $ref: deletepolicy.yaml + $ref: deletePolicies.yaml diff --git a/api-spec/paths/presets/createPreset.yaml b/api-spec/paths/presets/createPreset.yaml deleted file mode 100644 index c07fde2c..00000000 --- a/api-spec/paths/presets/createPreset.yaml +++ /dev/null @@ -1,93 +0,0 @@ -summary: Create a Preset -tags: -- Presets -operationId: createPreset -description: Create a new preset. -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/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: - 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.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createPreset } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createPreset(presets_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_presets_item(data: create_directus_presets_input!): directus_presets - } diff --git a/api-spec/paths/presets/index.yaml b/api-spec/paths/presets/index.yaml index eb2927e1..ab55a860 100644 --- a/api-spec/paths/presets/index.yaml +++ b/api-spec/paths/presets/index.yaml @@ -1,8 +1,7 @@ get: $ref: getPresets.yaml post: - - $ref: createPreset.yaml - - $ref: createPresets.yaml + $ref: createPresets.yaml patch: $ref: updatePresets.yaml delete: diff --git a/api-spec/paths/roles/createRole.yaml b/api-spec/paths/roles/createRole.yaml deleted file mode 100644 index 9898698b..00000000 --- a/api-spec/paths/roles/createRole.yaml +++ /dev/null @@ -1,67 +0,0 @@ -summary: Create a Role -description: Create a new role. -operationId: createRole -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - properties: - description: - type: string - description: Description of the role. - enforce_tfa: - type: boolean - description: Whether or not this role enforces the use of 2FA. - external_id: - type: string - description: ID used with external services in SCIM. - ip_access: - type: array - description: Array of IP addresses that are allowed to connect to the - API as a user of this role. - items: - type: string - module_listing: - type: string - description: Custom override for the admin app module bar navigation. - name: - type: string - description: Name of the role. - example: Interns -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/roles.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Roles -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createRole } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createRole(role_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_roles_item(data: create_directus_roles_input!): directus_roles - } diff --git a/api-spec/paths/roles/createRoles.yaml b/api-spec/paths/roles/createRoles.yaml index 489031e0..9e71734e 100644 --- a/api-spec/paths/roles/createRoles.yaml +++ b/api-spec/paths/roles/createRoles.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/Roles.yaml + $ref: ../../components/schemas/roles.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Roles.yaml + $ref: ../../components/schemas/roles.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/roles/index.yaml b/api-spec/paths/roles/index.yaml index 22952513..36fc1245 100644 --- a/api-spec/paths/roles/index.yaml +++ b/api-spec/paths/roles/index.yaml @@ -1,8 +1,7 @@ get: $ref: getRoles.yaml post: - - $ref: createRole.yaml - - $ref: createRoles.yaml + $ref: createRoles.yaml patch: $ref: updateRoles.yaml delete: diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index 460f9108..3de855a1 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -1,11 +1,5 @@ summary: Retrieve Schema Difference -description: | - Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. - - Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. - - This endpoint does not allow different Directus versions and database vendors by default. This is to avoid any -unintentional diffs from being generated. You can opt in to bypass these checks by passing the `force` query parameter. +description: Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. This endpoint does not allow different Directus versions and database vendors by default. This is to avoid any unintentional diffs from being generated. You can opt in to bypass these checks by passing the `force` query parameter. operationId: schemaDiff parameters: - name: force diff --git a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml index 44c60971..2ff78bf1 100644 --- a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml +++ b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml @@ -5,7 +5,7 @@ responses: '200': description: GraphQL SDL file. '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError tags: diff --git a/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml index 2bacf00c..0de09e4f 100644 --- a/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml +++ b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml @@ -10,7 +10,7 @@ responses: type: object description: Object conforming to the OpenAPI Specification '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError tags: diff --git a/api-spec/paths/shares/auth/authenticateShare.yaml b/api-spec/paths/shares/auth/authenticateShare.yaml index cc7b29da..9841eff0 100644 --- a/api-spec/paths/shares/auth/authenticateShare.yaml +++ b/api-spec/paths/shares/auth/authenticateShare.yaml @@ -10,20 +10,22 @@ requestBody: - share properties: share: - type: uuid + type: string + format: uuid description: Primary key of the share you're authenticating against. example: 3a606c3e-9d4d-4556-b7bb-f00860613da3 password: - type: hash + type: string + format: hash description: Password for the share, if one is configured. example: '**********' mode: type: string enum: - - `json` - - `cookie` - - `session` - default: `json` + - json + - cookie + - session + default: json description: Whether to retrieve the refresh token in the JSON response, or in a `httpOnly` cookie. responses: @@ -39,7 +41,7 @@ responses: properties: access_token: type: string - description: 'Temporary access token to be used in follow-up requests. Note: if you used `session` as the mode in the request, the access token won't be returned in the JSON.' + description: 'Temporary access token to be used in follow-up requests. Note: if you used `session` as the mode in the request, the access token won\u0027t be returned in the JSON.' example: eyJhbGciOiJI... expires: type: integer @@ -47,7 +49,7 @@ responses: example: 900 refresh_token: type: string - description: 'The token that can be used to retrieve a new access token through `/auth/refresh`. Note: if you used `cookie` or `session` as the mode in the request, the refresh token won't be returned in the JSON.' + description: 'The token that can be used to retrieve a new access token through `/auth/refresh`. Note: if you used `cookie` or `session` as the mode in the request, the refresh token won\u0027t be returned in the JSON.' example: yuOJkjdPXMd... '401': $ref: ../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/shares/createShare.yaml b/api-spec/paths/shares/createShare.yaml deleted file mode 100644 index 272f94ee..00000000 --- a/api-spec/paths/shares/createShare.yaml +++ /dev/null @@ -1,44 +0,0 @@ - -summary: Create a share -description: Create a new share. -operationId: createShare -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/shares.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/shares.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Shares -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createShare } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createShare(share_object)); - - label: GraphQL - lang: GraphQL - source: | - type Mutation { - create_shares_item(data: create_directus_shares_input!): directus_shares - } diff --git a/api-spec/paths/shares/createShares.yaml b/api-spec/paths/shares/createShares.yaml index 28746459..640e4bdf 100644 --- a/api-spec/paths/shares/createShares.yaml +++ b/api-spec/paths/shares/createShares.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/shares.yaml + $ref: ../../components/schemas/shares.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/shares/index.yaml b/api-spec/paths/shares/index.yaml index 56def863..354697ee 100644 --- a/api-spec/paths/shares/index.yaml +++ b/api-spec/paths/shares/index.yaml @@ -1,9 +1,8 @@ get: $ref: getShares.yaml post: - - $ref: createShare.yaml - - $ref: createShares.yaml -update: + $ref: createShares.yaml +patch: $ref: updateShares.yaml delete: $ref: deleteShares.yaml diff --git a/api-spec/paths/shares/info/_id/getShareInfo.yaml b/api-spec/paths/shares/info/_id/getShareInfo.yaml index 2dd8639d..76e6f66e 100644 --- a/api-spec/paths/shares/info/_id/getShareInfo.yaml +++ b/api-spec/paths/shares/info/_id/getShareInfo.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../../omponents/schemas/shares.yaml + $ref: ../../../../components/schemas/shares.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/_id/getTranslation.yaml b/api-spec/paths/translations/_id/getTranslation.yaml index af64920e..34b244d8 100644 --- a/api-spec/paths/translations/_id/getTranslation.yaml +++ b/api-spec/paths/translations/_id/getTranslation.yaml @@ -1,6 +1,6 @@ summary: Retrieve a Translation description: List an existing Translation by primary key. -operationId: getTranslations +operationId: getTranslation parameters: - name: id in: path @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/Translations.yaml + $ref: ../../../components/schemas/translations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/_id/index.yaml b/api-spec/paths/translations/_id/index.yaml index 76fc5c32..c0aaec91 100644 --- a/api-spec/paths/translations/_id/index.yaml +++ b/api-spec/paths/translations/_id/index.yaml @@ -1,6 +1,6 @@ get: $ref: getTranslation.yaml patch: - $ref: updatesTranslation.yaml + $ref: updateTranslation.yaml delete: $ref: deleteTranslation.yaml diff --git a/api-spec/paths/translations/_id/updateTranslation.yaml b/api-spec/paths/translations/_id/updateTranslation.yaml index 61f7de32..ebfb971a 100644 --- a/api-spec/paths/translations/_id/updateTranslation.yaml +++ b/api-spec/paths/translations/_id/updateTranslation.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/Translations.yaml + - $ref: ../../../components/schemas/translations.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/Translations.yaml + $ref: ../../../components/schemas/translations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/createTranslation.yaml b/api-spec/paths/translations/createTranslation.yaml deleted file mode 100644 index 84669587..00000000 --- a/api-spec/paths/translations/createTranslation.yaml +++ /dev/null @@ -1,42 +0,0 @@ - -summary: Create a Translation -description: Create a new Translation. -operationId: createTranslation -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/Translations.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/Translations.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Translations -x-codeSamples: - - label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createTranslation } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createTranslation(translation_object)); - - label: GraphQL - lang: GraphQL - source: | - // Not currently available in GraphQL diff --git a/api-spec/paths/translations/createTranslations.yaml b/api-spec/paths/translations/createTranslations.yaml index e6e03a81..804a533d 100644 --- a/api-spec/paths/translations/createTranslations.yaml +++ b/api-spec/paths/translations/createTranslations.yaml @@ -9,7 +9,6 @@ parameters: - $ref: ../../components/parameters.yaml#/Sort - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search -- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: @@ -19,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml responses: '200': description: Successful request @@ -31,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/translations/deleteTranslations.yaml b/api-spec/paths/translations/deleteTranslations.yaml index 0e64c4ae..5cf1cb66 100644 --- a/api-spec/paths/translations/deleteTranslations.yaml +++ b/api-spec/paths/translations/deleteTranslations.yaml @@ -9,7 +9,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml keys: type: array items: diff --git a/api-spec/paths/translations/getTranslations.yaml b/api-spec/paths/translations/getTranslations.yaml index ed8c059d..2c0ba72e 100644 --- a/api-spec/paths/translations/getTranslations.yaml +++ b/api-spec/paths/translations/getTranslations.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/translations/index.yaml b/api-spec/paths/translations/index.yaml index 12a90a90..cd48acac 100644 --- a/api-spec/paths/translations/index.yaml +++ b/api-spec/paths/translations/index.yaml @@ -1,9 +1,8 @@ get: $ref: getTranslations.yaml post: - - $ref: createTranslation.yaml - - $ref: createsTranslations.yaml -update: - $ref: updatesTranslations.yaml + $ref: createTranslations.yaml +patch: + $ref: updateTranslations.yaml delete: $ref: deleteTranslations.yaml diff --git a/api-spec/paths/translations/updateTranslations.yaml b/api-spec/paths/translations/updateTranslations.yaml index 50705d83..22cef0a0 100644 --- a/api-spec/paths/translations/updateTranslations.yaml +++ b/api-spec/paths/translations/updateTranslations.yaml @@ -17,7 +17,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml keys: type: array items: @@ -33,7 +33,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Translations.yaml + $ref: ../../components/schemas/translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/users/createUser.yaml b/api-spec/paths/users/createUser.yaml deleted file mode 100644 index 80875fe1..00000000 --- a/api-spec/paths/users/createUser.yaml +++ /dev/null @@ -1,49 +0,0 @@ -summary: Create an User -description: Create a new user. -operationId: createUser -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - required: - - email - - password - anyOf: - $ref: ../../components/schemas/users.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/users.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Users -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createUser } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createUser(user_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_users_item(data: create_directus_users_input!): directus_users - } diff --git a/api-spec/paths/users/createUsers.yaml b/api-spec/paths/users/createUsers.yaml index 2678f638..1d8279ee 100644 --- a/api-spec/paths/users/createUsers.yaml +++ b/api-spec/paths/users/createUsers.yaml @@ -22,7 +22,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/Users.yaml + $ref: ../../components/schemas/users.yaml responses: '200': description: Successful request @@ -34,7 +34,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/Users.yaml + $ref: ../../components/schemas/users.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/users/index.yaml b/api-spec/paths/users/index.yaml index 6401587f..88835cd1 100644 --- a/api-spec/paths/users/index.yaml +++ b/api-spec/paths/users/index.yaml @@ -1,8 +1,7 @@ get: $ref: getUsers.yaml post: - - $ref: createUser.yaml - - $ref: createUsers.yaml + $ref: createUsers.yaml patch: $ref: updateUsers.yaml delete: diff --git a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml index 8c731828..54d2f910 100644 --- a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml +++ b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml @@ -9,7 +9,7 @@ requestBody: required: - password properties: - -$ref: ../../../components/schemas/users.yaml#/properties/password + $ref: ../../../../../components/schemas/users.yaml#/properties/password responses: '200': description: Successful request diff --git a/api-spec/paths/users/me/tfa/generate/index.yaml b/api-spec/paths/users/me/tfa/generate/index.yaml index bccc7c83..b32fdce9 100644 --- a/api-spec/paths/users/me/tfa/generate/index.yaml +++ b/api-spec/paths/users/me/tfa/generate/index.yaml @@ -1,2 +1,2 @@ post: - $ref: generate.yaml + $ref: generateTwoFactorSecret.yaml diff --git a/api-spec/paths/users/register/verify-email/_token/index.yaml b/api-spec/paths/users/register/verify-email/_token/index.yaml index 01c5d843..446e9475 100644 --- a/api-spec/paths/users/register/verify-email/_token/index.yaml +++ b/api-spec/paths/users/register/verify-email/_token/index.yaml @@ -1,2 +1,2 @@ get: - $ref: verify-email.yaml + $ref: registerUserVerify.yaml diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index b66e993a..5f1c841c 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -1,4 +1,4 @@ -summary: Export Data to a File +summary: Export Data to a File description: Export a larger data set to a file in the file library. operationId: export parameters: @@ -15,12 +15,11 @@ requestBody: properties: format: type: string - description: What file format to save the export to. One of `csv`, `xml`, - `json` + description: 'What file format to save the export to. One of `csv`, `xml`,`json`' enum: - - `csv` - - `xml` - - `json` + - csv + - xml + - json query: $ref: ../../../../components/schemas/query.yaml file: diff --git a/api-spec/paths/versions/createContentVersion.yaml b/api-spec/paths/versions/createContentVersion.yaml deleted file mode 100644 index eabc9102..00000000 --- a/api-spec/paths/versions/createContentVersion.yaml +++ /dev/null @@ -1,45 +0,0 @@ -summary: Create a Content Versions -description: Create a new Content Version for an item. -operationId: createContentVersion -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../components/schemas/versions.yaml -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/versions.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Versions -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createContentVersion } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createContentVersion(content_version_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_versions_item(data: create_directus_versions_input!): directus_versions - } diff --git a/api-spec/paths/versions/createContentVersions.yaml b/api-spec/paths/versions/createContentVersions.yaml index 93c80303..1ba5b358 100644 --- a/api-spec/paths/versions/createContentVersions.yaml +++ b/api-spec/paths/versions/createContentVersions.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/Versions.yaml + $ref: ../../components/schemas/versions.yaml responses: '200': description: Successful request diff --git a/api-spec/paths/versions/index.yaml b/api-spec/paths/versions/index.yaml index 40eee7d5..3cbbe567 100644 --- a/api-spec/paths/versions/index.yaml +++ b/api-spec/paths/versions/index.yaml @@ -1,8 +1,7 @@ get: $ref: getContentVersions.yaml post: - - $ref: createContentVersion.yaml - - $ref: createContentVersions.yaml + $ref: createContentVersions.yaml patch: $ref: updateContentVersions.yaml delete: diff --git a/api-spec/paths/webhooks/_id/deleteWebhook.yaml b/api-spec/paths/webhooks/_id/deleteWebhook.yaml deleted file mode 100644 index fa557c36..00000000 --- a/api-spec/paths/webhooks/_id/deleteWebhook.yaml +++ /dev/null @@ -1,31 +0,0 @@ -summary: Delete a Webhook -description: Delete an existing webhook -operationId: deleteWebhook -responses: - '200': - description: Successful request - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Webhooks -parameters: -- $ref: ../../../components/parameters.yaml#/UUId -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, deleteWebhook } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(deleteWebhook(webhook_id)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - delete_webhooks_item(id: ID!): delete_one - } diff --git a/api-spec/paths/webhooks/_id/getWebhook.yaml b/api-spec/paths/webhooks/_id/getWebhook.yaml deleted file mode 100644 index 814005ce..00000000 --- a/api-spec/paths/webhooks/_id/getWebhook.yaml +++ /dev/null @@ -1,38 +0,0 @@ -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.yaml - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Webhooks -parameters: -- $ref: ../../../components/parameters.yaml#/UUId -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, readWebhook } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(readWebhook(webhook_id, query_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Query { - webhooks_by_id(id: ID!): directus_webhooks - } diff --git a/api-spec/paths/webhooks/_id/index.yaml b/api-spec/paths/webhooks/_id/index.yaml deleted file mode 100644 index ad746d5b..00000000 --- a/api-spec/paths/webhooks/_id/index.yaml +++ /dev/null @@ -1,6 +0,0 @@ -get: - $ref: getWebhook.yaml -patch: - $ref: updateWebhook.yaml -delete: - $ref: deleteWebhook.yaml diff --git a/api-spec/paths/webhooks/_id/updateWebhook.yaml b/api-spec/paths/webhooks/_id/updateWebhook.yaml deleted file mode 100644 index 8c0050b7..00000000 --- a/api-spec/paths/webhooks/_id/updateWebhook.yaml +++ /dev/null @@ -1,72 +0,0 @@ -summary: Update a Webhook -description: Update an existing webhook -operationId: updateWebhook -parameters: -- $ref: ../../../components/parameters.yaml#/UUId -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the webhook. - example: create articles - method: - type: string - description: Method used in the webhook. - example: POST - url: - type: string - description: The url of the webhook. - example: - status: - type: string - description: The status of the webhook. - example: active - data: - type: boolean - description: If yes, send the content of what was done - example: true - actions: - description: The actions that triggers this webhook. - example: - system-collections: - description: The collections that triggers this webhook. - example: -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../../components/schemas/roles.yaml - '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../../components/responses.yaml#/NotFoundError -tags: -- Webhooks -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, updateWebhook } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(updateWebhook(webhook_id, partal_webhook_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - update_webhooks_item(id: ID!, data: update_directus_webhooks_input!): directus_webhooks - } diff --git a/api-spec/paths/webhooks/createWebhook.yaml b/api-spec/paths/webhooks/createWebhook.yaml deleted file mode 100644 index 5e2c2af2..00000000 --- a/api-spec/paths/webhooks/createWebhook.yaml +++ /dev/null @@ -1,71 +0,0 @@ -summary: Create a Webhook -description: Create a new webhook. -operationId: createWebhook -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Meta -requestBody: - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the webhook. - example: create articles - method: - type: string - description: Method used in the webhook. - example: POST - url: - type: string - description: The url of the webhook. - example: - status: - type: string - description: The status of the webhook. - example: active - data: - type: boolean - description: If yes, send the content of what was done - example: true - actions: - description: The actions that triggers this webhook. - example: - system-collections: - description: The collections that triggers this webhook. - example: -responses: - '200': - description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../components/schemas/roles.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Webhooks -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, createWebhook } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(createWebhook(webhook_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - create_webhooks_item(data: create_directus_webhooks_input!): directus_webhooks - } diff --git a/api-spec/paths/webhooks/deleteWebhooks.yaml b/api-spec/paths/webhooks/deleteWebhooks.yaml deleted file mode 100644 index 7e818b6d..00000000 --- a/api-spec/paths/webhooks/deleteWebhooks.yaml +++ /dev/null @@ -1,27 +0,0 @@ -summary: Delete Multiple Webhooks -description: Delete multiple existing webhooks. -tags: -- Webhooks -operationId: deleteWebhooks -responses: - '200': - description: Successful request - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, deleteWebhooks } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(deleteWebhooks(webhook_id_array)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - delete_webhooks_items(ids: [ID!]!): delete_many - } diff --git a/api-spec/paths/webhooks/getWebhooks.yaml b/api-spec/paths/webhooks/getWebhooks.yaml deleted file mode 100644 index e0d976dd..00000000 --- a/api-spec/paths/webhooks/getWebhooks.yaml +++ /dev/null @@ -1,36 +0,0 @@ -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.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError - '404': - $ref: ../../components/responses.yaml#/NotFoundError -tags: -- Webhooks -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, readWebhooks } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(readWebhooks(query_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Query { - webhooks: [directus_webhooks] - } diff --git a/api-spec/paths/webhooks/index.yaml b/api-spec/paths/webhooks/index.yaml deleted file mode 100644 index c5570de2..00000000 --- a/api-spec/paths/webhooks/index.yaml +++ /dev/null @@ -1,8 +0,0 @@ -get: - $ref: getWebhooks.yaml -post: - $ref: createWebhook.yaml -patch: - $ref: updateWebhooks.yaml -delete: - $ref: deleteWebhooks.yaml diff --git a/api-spec/paths/webhooks/updateWebhooks.yaml b/api-spec/paths/webhooks/updateWebhooks.yaml deleted file mode 100644 index 534eb653..00000000 --- a/api-spec/paths/webhooks/updateWebhooks.yaml +++ /dev/null @@ -1,85 +0,0 @@ -summary: Update Multiple Webhooks -description: Update multiple webhooks at the same time. -tags: -- Webhooks -operationId: updateWebhooks -parameters: -- $ref: ../../components/parameters.yaml#/Fields -- $ref: ../../components/parameters.yaml#/Limit -- $ref: ../../components/parameters.yaml#/Meta -- $ref: ../../components/parameters.yaml#/Offset -- $ref: ../../components/parameters.yaml#/Sort -- $ref: ../../components/parameters.yaml#/Filter -- $ref: ../../components/parameters.yaml#/Search -requestBody: - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - name: - type: string - description: The name of the webhook. - example: create articles - method: - type: string - description: Method used in the webhook. - example: POST - url: - type: string - description: The url of the webhook. - example: - status: - type: string - description: The status of the webhook. - example: active - data: - type: boolean - description: If yes, send the content of what was done - example: true - actions: - description: The actions that triggers this webhook. - example: - system-collections: - description: The collections that triggers this webhook. - example: - 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/webhooks.yaml - meta: - $ref: ../../components/schemas/x-metadata.yaml - '401': - $ref: ../../components/responses.yaml#/UnauthorizedError -x-codeSamples: -- label: Directus SDK - lang: JavaScript - source: | - import { createDirectus, rest, updateWebhooks } from '@directus/sdk'; - - const client = createDirectus('directus_project_url').with(rest()); - - const result = await client.request(updateWebhooks(webhook_id_array, partial_webhook_object)); -- label: GraphQL - lang: GraphQL - source: | - POST /graphql/system - - type Mutation { - update_webhooks_items(ids: [ID!]!, data: update_directus_webhooks_input!): [directus_webhooks] - } diff --git a/package.json b/package.json index aaff74d6..7f1bdeae 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "oas:dev": "nodemon --watch './api-spec/**/*.yaml' --exec 'pnpm oas:build && pnpm scalar serve ./public/oas.yaml -p 5001' --ext yaml", "oas:build": "redocly bundle ./api-spec/index.yaml -o ./public/oas.yaml --ext yaml", - "oas:lint": "redocly lint ./api-spec/index.yaml", + "oas:lint": "redocly lint --max-problems=1000 ./api-spec/index.yaml", "nuxt:build": "nuxt generate", "nuxt:dev": "nuxt dev", "nuxt:preview": "pnpm dlx serve .output/public -p 3000", From 2b37400377bb4283cb2bfaccc21041505c153335 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Thu, 5 Dec 2024 20:24:21 +0000 Subject: [PATCH 083/119] added missing parameters, requestBody and Responses --- api-spec/paths/flows/deleteFlows.yaml | 12 ++- api-spec/paths/folders/deleteFolders.yaml | 12 ++- .../paths/operations/deleteOperations.yaml | 12 ++- .../paths/permissions/deletePermissions.yaml | 12 ++- .../paths/permissions/updatePermissions.yaml | 81 +------------------ api-spec/paths/policies/updatePolicies.yaml | 1 - api-spec/paths/presets/deletePresets.yaml | 12 ++- api-spec/paths/roles/deleteRoles.yaml | 12 ++- api-spec/paths/settings/index.yaml | 2 +- ...updateSetting.yaml => updateSettings.yaml} | 14 ++-- api-spec/paths/users/deleteUsers.yaml | 12 ++- api-spec/paths/users/invite/invite.yaml | 33 ++++++-- .../users/me/tfa/disable/meTfaDisable.yaml | 21 ++++- .../users/me/tfa/enable/meTfaEnable.yaml | 23 +++++- api-spec/paths/users/me/updateMe.yaml | 3 + .../versions/_id/save/saveContentVersion.yaml | 9 ++- .../paths/versions/deleteContentVersions.yaml | 8 ++ 17 files changed, 168 insertions(+), 111 deletions(-) rename api-spec/paths/settings/{updateSetting.yaml => updateSettings.yaml} (82%) diff --git a/api-spec/paths/flows/deleteFlows.yaml b/api-spec/paths/flows/deleteFlows.yaml index dfc190ba..9af3b4e9 100644 --- a/api-spec/paths/flows/deleteFlows.yaml +++ b/api-spec/paths/flows/deleteFlows.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Flows description: Delete multiple existing flows. -tags: -- Flows operationId: deleteFlows +requestBody: + description: An array of flows primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Flows x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/folders/deleteFolders.yaml b/api-spec/paths/folders/deleteFolders.yaml index 174aef7e..e58f30e3 100644 --- a/api-spec/paths/folders/deleteFolders.yaml +++ b/api-spec/paths/folders/deleteFolders.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Folders description: Delete multiple existing folders. -tags: -- Folders operationId: deleteFolders +requestBody: + description: An array of folder primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Folders x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/operations/deleteOperations.yaml b/api-spec/paths/operations/deleteOperations.yaml index b5bd9ffd..9e608dd7 100644 --- a/api-spec/paths/operations/deleteOperations.yaml +++ b/api-spec/paths/operations/deleteOperations.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Operations description: Delete multiple existing operations. -tags: -- Operations operationId: deleteOperations +requestBody: + description: An array of operations primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Operations x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/permissions/deletePermissions.yaml b/api-spec/paths/permissions/deletePermissions.yaml index cd3253f6..c74c4a96 100644 --- a/api-spec/paths/permissions/deletePermissions.yaml +++ b/api-spec/paths/permissions/deletePermissions.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Permissions description: Delete multiple existing permissions. -tags: -- Permissions operationId: deletePermissions +requestBody: + description: An array of permissions primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Permissions x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index 0718f3d8..ea015b0f 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -17,89 +17,12 @@ requestBody: schema: type: object properties: + data: + $ref: ../../components/schemas/permissions.yaml keys: type: array items: type: string - data: - type: object - properties: - collection: - type: string - description: What collection this permission applies to. - example: customers - comment: - type: string - description: If the user can post comments. - enum: - - none - - create - - update - - full - create: - type: string - description: If the user can create items. - enum: - - none - - full - delete: - type: string - description: If the user can update items. - enum: - - none - - mine - - role - - full - explain: - type: string - description: If the user is required to leave a comment explaining - what was changed. - enum: - - none - - create - - update - - always - read: - type: string - description: If the user can read items. - enum: - - none - - mine - - role - - full - role: - type: integer - description: Unique identifier of the role this permission applies - to. - example: 3 - read_field_blacklist: - type: array - description: Explicitly denies read access for specific fields. - items: - type: string - example: - - featured_image - status: - type: string - description: What status this permission applies to. - status_blacklist: - type: array - description: Explicitly denies specific statuses to be used. - items: - type: string - update: - type: string - description: If the user can update items. - enum: - - none - - mine - - role - - full - write_field_blacklist: - type: array - description: Explicitly denies write access for specific fields. - items: - type: string responses: '200': description: Successful request diff --git a/api-spec/paths/policies/updatePolicies.yaml b/api-spec/paths/policies/updatePolicies.yaml index a2c1bd13..83c3a4ca 100644 --- a/api-spec/paths/policies/updatePolicies.yaml +++ b/api-spec/paths/policies/updatePolicies.yaml @@ -1,4 +1,3 @@ - summary: Update Multiple policies description: Update multiple existing policies. operationId: updatePolicies diff --git a/api-spec/paths/presets/deletePresets.yaml b/api-spec/paths/presets/deletePresets.yaml index a1b98d5b..94361008 100644 --- a/api-spec/paths/presets/deletePresets.yaml +++ b/api-spec/paths/presets/deletePresets.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Presets description: Delete multiple existing presets. -tags: -- Presets operationId: deletePresets +requestBody: + description: An array of preset primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Presets x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/roles/deleteRoles.yaml b/api-spec/paths/roles/deleteRoles.yaml index c1a9587f..bcd068c9 100644 --- a/api-spec/paths/roles/deleteRoles.yaml +++ b/api-spec/paths/roles/deleteRoles.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Roles description: Delete multiple existing roles. -tags: -- Roles operationId: deleteRoles +requestBody: + description: An array of role primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Roles x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/settings/index.yaml b/api-spec/paths/settings/index.yaml index fdd58afd..8af76254 100644 --- a/api-spec/paths/settings/index.yaml +++ b/api-spec/paths/settings/index.yaml @@ -1,4 +1,4 @@ get: $ref: getSettings.yaml patch: - $ref: updateSetting.yaml + $ref: updateSettings.yaml diff --git a/api-spec/paths/settings/updateSetting.yaml b/api-spec/paths/settings/updateSettings.yaml similarity index 82% rename from api-spec/paths/settings/updateSetting.yaml rename to api-spec/paths/settings/updateSettings.yaml index fc42f9ed..9d33f2e6 100644 --- a/api-spec/paths/settings/updateSetting.yaml +++ b/api-spec/paths/settings/updateSettings.yaml @@ -1,11 +1,15 @@ summary: Update Settings description: Update the settings -operationId: updateSetting +operationId: updateSettings +parameters: +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Meta requestBody: content: application/json: schema: - type: object + anyOf: + - $ref: ../../components/schemas/settings.yaml responses: '200': description: Successful request @@ -27,15 +31,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, updateSettings } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(updateSettings(settings_object)); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Mutation { update_settings(data: update_directus_settings_input!): directus_settings } diff --git a/api-spec/paths/users/deleteUsers.yaml b/api-spec/paths/users/deleteUsers.yaml index 01ae1ce9..d2c1846d 100644 --- a/api-spec/paths/users/deleteUsers.yaml +++ b/api-spec/paths/users/deleteUsers.yaml @@ -1,13 +1,21 @@ summary: Delete Multiple Users description: Delete multiple existing users. -tags: -- Users operationId: deleteUsers +requestBody: + description: An array of user primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +tags: +- Users x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/users/invite/invite.yaml b/api-spec/paths/users/invite/invite.yaml index 95db7e69..3920ccd2 100644 --- a/api-spec/paths/users/invite/invite.yaml +++ b/api-spec/paths/users/invite/invite.yaml @@ -8,21 +8,34 @@ requestBody: application/json: schema: type: object + required: + - email + - role properties: email: + oneOf: + - type: string + description: Email addres of the to-be-invited user. + - type: array + description: Array of email addresses of the to-be-invited users. + role: + description: Role of the new user type: string - description: Email address or array of email addresses of the to-be-invited - user(s). + oneOf: + - $ref: ../../../components/schemas/roles.yaml + invite_url: + description: 'Provide a custom invite url which the link in the email will lead to. The invite token will be passed as a parameter. Note: You need to configure the USER_INVITE_URL_ALLOW_LIST environment variable to enable this feature.' + type: string + format: url responses: - '200': + '204': description: Successful request content: application/json: schema: type: object properties: - data: - $ref: ../../../components/schemas/users.yaml + data: {} '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': @@ -33,6 +46,16 @@ x-codeSamples: - label: Directus SDK lang: JavaScript source: | + import { createDirectus, rest, inviteUser } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(inviteUser('another@example.com', 'c86c2761-65d3-43c3-897f-6f74ad6a5bd7')); - label: GraphQL lang: GraphQL source: | + POST /graphql/system + + type Mutation { + users_invite(email: String!, role: String!, invite_url: String): Boolean + } diff --git a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml index 67336074..5d2daa9e 100644 --- a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml +++ b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml @@ -1,9 +1,26 @@ -summary: Disable Two-Factor Authentication +summary: Disable Two-Factor Authentication description: Disables two-factor authentication for the currently authenticated user. operationId: meTfaDisable +requestBody: + content: + application/json: + schema: + type: object + required: + - otp + properties: + otp: + description: One-time password generated by the authenticator app. + type: string responses: - '200': + '204': description: Successful request + content: + application/json: + schema: + type: object + properties: + data: {} '401': $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml index f1a51c4d..5bebdf31 100644 --- a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml +++ b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml @@ -1,9 +1,30 @@ summary: Enable 2FA description: Enables two-factor authentication for the currently authenticated user. operationId: meTfaEnable +requestBody: + content: + application/json: + schema: + type: object + required: + - secret + - otp + properties: + secret: + description: 'The TFA secret from tfa/generate.' + type: string + otp: + description: OTP generated with the secret, to recheck if the user has a correct TFA setup + type: string responses: - '200': + '204': description: Successful request + content: + application/json: + schema: + type: object + properties: + data: {} '401': $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/updateMe.yaml b/api-spec/paths/users/me/updateMe.yaml index 047e52f8..11dd7baa 100644 --- a/api-spec/paths/users/me/updateMe.yaml +++ b/api-spec/paths/users/me/updateMe.yaml @@ -1,6 +1,9 @@ summary: Update Current User description: Update the currently authenticated user. operationId: updateMe +parameters: +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta responses: '200': description: Successful request diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml index ba0b3947..291697fc 100644 --- a/api-spec/paths/versions/_id/save/saveContentVersion.yaml +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -7,15 +7,18 @@ requestBody: content: application/json: schema: - type: object + anyOf: + - $ref: ../../components/schemas/items.yaml responses: '200': - description: Successful request + description: Successful request, Returns the item object with the new state after save. content: application/json: schema: type: object - properties: {} + properties: + data: + $ref: ../../../../components/schemas/items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/deleteContentVersions.yaml b/api-spec/paths/versions/deleteContentVersions.yaml index ceade4c7..f3c055f1 100644 --- a/api-spec/paths/versions/deleteContentVersions.yaml +++ b/api-spec/paths/versions/deleteContentVersions.yaml @@ -1,6 +1,14 @@ summary: Delete Multiple Content Versions description: Delete multiple existing Content Versions. operationId: deleteContentVersions +requestBody: + description: An array of content version primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '200': description: Successful request From d6aaea7d51faf002f48b616ee862d6b2f0e843f4 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Thu, 5 Dec 2024 20:29:35 +0000 Subject: [PATCH 084/119] some more missing responses --- api-spec/paths/auth/login/login.yaml | 8 ++++++-- api-spec/paths/auth/logout/logout.yaml | 18 ++++++++++++++---- .../auth/password/request/passwordRequest.yaml | 14 ++++++++++++-- .../auth/password/reset/passwordReset.yaml | 16 +++++++++++++--- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index ab3b0ea0..f1cf1d6a 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -1,7 +1,5 @@ summary: Login description: Authenticate as a user. -tags: -- Authentication operationId: login requestBody: content: @@ -54,6 +52,12 @@ responses: refresh_token: type: string example: yuOJkjdPXMd... + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Authentication x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index 70c2ce1e..7ef4e2aa 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -1,7 +1,5 @@ summary: Logout description: Invalidate the refresh token thus destroying the user's session. -tags: -- Authentication operationId: logout requestBody: content: @@ -23,8 +21,20 @@ requestBody: description: Whether the refresh token is submitted in the JSON response, or in a `httpOnly` cookie. responses: - '200': - description: Request successful + '204': + description: Successful request, empty body + content: + application/json: + schema: + type: object + properties: + data: {} + '401': + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Authentication x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml index 29487b3f..ac8789b2 100644 --- a/api-spec/paths/auth/password/request/passwordRequest.yaml +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -1,6 +1,4 @@ summary: Request a Password Reset -tags: -- Authentication operationId: passwordRequest description: Request a reset password email to be sent. requestBody: @@ -16,8 +14,20 @@ requestBody: example: admin@example.com description: Email address of the user you're requesting a reset for. responses: + '204': + description: Successful request, empty body + content: + application/json: + schema: + type: object + properties: + data: {} '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Authentication x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/auth/password/reset/passwordReset.yaml b/api-spec/paths/auth/password/reset/passwordReset.yaml index cd83daab..b99d960c 100644 --- a/api-spec/paths/auth/password/reset/passwordReset.yaml +++ b/api-spec/paths/auth/password/reset/passwordReset.yaml @@ -1,6 +1,4 @@ summary: Reset a Password -tags: -- Authentication operationId: passwordReset 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. @@ -23,8 +21,20 @@ requestBody: format: password description: New password for the user. responses: + '204': + description: Successful request, empty body + content: + application/json: + schema: + type: object + properties: + data: {} '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../components/responses.yaml#/NotFoundError +tags: +- Authentication x-codeSamples: - label: Directus SDK lang: JavaScript From 813122e9a3fd4ecdcb4a2321b3da937353295fd2 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 6 Dec 2024 13:11:31 +0100 Subject: [PATCH 085/119] Add missing 204 responses --- api-spec/paths/activity/comment/_id/deleteComment.yaml | 4 ++-- api-spec/paths/activity/comment/deleteComments.yaml | 4 ++-- api-spec/paths/collections/_id/deleteCollection.yaml | 4 ++-- api-spec/paths/dashboards/_id/deleteDashboard.yaml | 4 ++-- api-spec/paths/dashboards/deleteDashboards.yaml | 4 ++-- api-spec/paths/fields/_collection/_id/deleteField.yaml | 4 ++-- api-spec/paths/files/_id/deleteFile.yaml | 4 ++-- api-spec/paths/files/deleteFiles.yaml | 4 ++-- api-spec/paths/flows/_id/deleteFlow.yaml | 4 ++-- api-spec/paths/flows/deleteFlows.yaml | 4 ++-- api-spec/paths/folders/_id/deleteFolder.yaml | 4 ++-- api-spec/paths/folders/deleteFolders.yaml | 4 ++-- api-spec/paths/items/_collection/_id/deleteItem.yaml | 4 ++-- api-spec/paths/items/_collection/deleteItems.yaml | 4 ++-- api-spec/paths/notifications/_id/deleteNotification.yaml | 4 ++-- api-spec/paths/notifications/deleteNotifications.yaml | 4 ++-- api-spec/paths/operations/_id/deleteOperation.yaml | 4 ++-- api-spec/paths/operations/deleteOperations.yaml | 4 ++-- api-spec/paths/panels/_id/deletePanel.yaml | 4 ++-- api-spec/paths/panels/deletePanels.yaml | 4 ++-- api-spec/paths/permissions/_id/deletePermission.yaml | 4 ++-- api-spec/paths/permissions/deletePermissions.yaml | 4 ++-- api-spec/paths/policies/_id/deletePolicy.yaml | 4 ++-- api-spec/paths/policies/deletePolicies.yaml | 4 ++-- api-spec/paths/presets/_id/deletePreset.yaml | 4 ++-- api-spec/paths/presets/deletePresets.yaml | 4 ++-- api-spec/paths/relations/_id/deleteRelation.yaml | 4 ++-- api-spec/paths/roles/_id/deleteRole.yaml | 4 ++-- api-spec/paths/roles/deleteRoles.yaml | 4 ++-- api-spec/paths/shares/_id/deleteShare.yaml | 4 ++-- api-spec/paths/shares/deleteShares.yaml | 4 ++-- api-spec/paths/translations/_id/deleteTranslation.yaml | 4 ++-- api-spec/paths/translations/deleteTranslations.yaml | 4 ++-- api-spec/paths/users/_id/deleteUser.yaml | 4 ++-- api-spec/paths/users/deleteUsers.yaml | 4 ++-- api-spec/paths/versions/_id/deleteContentVersion.yaml | 4 ++-- api-spec/paths/versions/deleteContentVersions.yaml | 4 ++-- 37 files changed, 74 insertions(+), 74 deletions(-) diff --git a/api-spec/paths/activity/comment/_id/deleteComment.yaml b/api-spec/paths/activity/comment/_id/deleteComment.yaml index e58d942e..98f8bfa1 100644 --- a/api-spec/paths/activity/comment/_id/deleteComment.yaml +++ b/api-spec/paths/activity/comment/_id/deleteComment.yaml @@ -4,8 +4,8 @@ operationId: deleteComment parameters: - $ref: ../../../../components/parameters.yaml#/Id responses: - '203': - description: Deleted successfully + '204': + description: The resource was deleted successfully. '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/activity/comment/deleteComments.yaml index b189c99e..8964b484 100644 --- a/api-spec/paths/activity/comment/deleteComments.yaml +++ b/api-spec/paths/activity/comment/deleteComments.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/collections/_id/deleteCollection.yaml b/api-spec/paths/collections/_id/deleteCollection.yaml index 5d257e45..d57653f1 100644 --- a/api-spec/paths/collections/_id/deleteCollection.yaml +++ b/api-spec/paths/collections/_id/deleteCollection.yaml @@ -3,8 +3,8 @@ description: 'Delete an existing collection. Warning: This will delete the whole including the items within. Proceed with caution.' operationId: deleteCollection responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/_id/deleteDashboard.yaml b/api-spec/paths/dashboards/_id/deleteDashboard.yaml index 443e6e43..74761d4d 100644 --- a/api-spec/paths/dashboards/_id/deleteDashboard.yaml +++ b/api-spec/paths/dashboards/_id/deleteDashboard.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/deleteDashboards.yaml b/api-spec/paths/dashboards/deleteDashboards.yaml index 3742c81f..e25cf0b9 100644 --- a/api-spec/paths/dashboards/deleteDashboards.yaml +++ b/api-spec/paths/dashboards/deleteDashboards.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/fields/_collection/_id/deleteField.yaml b/api-spec/paths/fields/_collection/_id/deleteField.yaml index bc446db7..d0652d2e 100644 --- a/api-spec/paths/fields/_collection/_id/deleteField.yaml +++ b/api-spec/paths/fields/_collection/_id/deleteField.yaml @@ -2,8 +2,8 @@ summary: Delete a Field description: Delete an existing field. This action can't be undone. operationId: deleteField responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/files/_id/deleteFile.yaml b/api-spec/paths/files/_id/deleteFile.yaml index 0d55b6bf..37b49e5d 100644 --- a/api-spec/paths/files/_id/deleteFile.yaml +++ b/api-spec/paths/files/_id/deleteFile.yaml @@ -4,8 +4,8 @@ tags: - Files operationId: deleteFile responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError parameters: diff --git a/api-spec/paths/files/deleteFiles.yaml b/api-spec/paths/files/deleteFiles.yaml index 541fbcca..56dda47a 100644 --- a/api-spec/paths/files/deleteFiles.yaml +++ b/api-spec/paths/files/deleteFiles.yaml @@ -4,8 +4,8 @@ tags: - Files operationId: deleteFiles responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError x-codeSamples: diff --git a/api-spec/paths/flows/_id/deleteFlow.yaml b/api-spec/paths/flows/_id/deleteFlow.yaml index 222e6227..5f53eccd 100644 --- a/api-spec/paths/flows/_id/deleteFlow.yaml +++ b/api-spec/paths/flows/_id/deleteFlow.yaml @@ -2,8 +2,8 @@ summary: Delete a Flow description: Delete an existing flow operationId: deleteFlow responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/deleteFlows.yaml b/api-spec/paths/flows/deleteFlows.yaml index 9af3b4e9..48af136c 100644 --- a/api-spec/paths/flows/deleteFlows.yaml +++ b/api-spec/paths/flows/deleteFlows.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/folders/_id/deleteFolder.yaml b/api-spec/paths/folders/_id/deleteFolder.yaml index 58633d5f..a0413db8 100644 --- a/api-spec/paths/folders/_id/deleteFolder.yaml +++ b/api-spec/paths/folders/_id/deleteFolder.yaml @@ -2,8 +2,8 @@ summary: Delete a Folder description: Delete an existing folder. Any files in this folder will be moved to the root folder. operationId: deleteFolder responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/folders/deleteFolders.yaml b/api-spec/paths/folders/deleteFolders.yaml index e58f30e3..72c12d7e 100644 --- a/api-spec/paths/folders/deleteFolders.yaml +++ b/api-spec/paths/folders/deleteFolders.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/items/_collection/_id/deleteItem.yaml b/api-spec/paths/items/_collection/_id/deleteItem.yaml index b8d44cfa..85aab84c 100644 --- a/api-spec/paths/items/_collection/_id/deleteItem.yaml +++ b/api-spec/paths/items/_collection/_id/deleteItem.yaml @@ -9,8 +9,8 @@ parameters: type: string - $ref: ../../../../components/parameters.yaml#/Collection responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/deleteItems.yaml b/api-spec/paths/items/_collection/deleteItems.yaml index 15692963..51d3ac2c 100644 --- a/api-spec/paths/items/_collection/deleteItems.yaml +++ b/api-spec/paths/items/_collection/deleteItems.yaml @@ -23,8 +23,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/notifications/_id/deleteNotification.yaml b/api-spec/paths/notifications/_id/deleteNotification.yaml index dff8eb19..8b784417 100644 --- a/api-spec/paths/notifications/_id/deleteNotification.yaml +++ b/api-spec/paths/notifications/_id/deleteNotification.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/notifications/deleteNotifications.yaml b/api-spec/paths/notifications/deleteNotifications.yaml index 88041ead..146b1918 100644 --- a/api-spec/paths/notifications/deleteNotifications.yaml +++ b/api-spec/paths/notifications/deleteNotifications.yaml @@ -23,8 +23,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/operations/_id/deleteOperation.yaml b/api-spec/paths/operations/_id/deleteOperation.yaml index fadf82e7..1fe46e09 100644 --- a/api-spec/paths/operations/_id/deleteOperation.yaml +++ b/api-spec/paths/operations/_id/deleteOperation.yaml @@ -2,8 +2,8 @@ summary: Delete an Operation description: Delete an existing operation operationId: deleteOperation responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/operations/deleteOperations.yaml b/api-spec/paths/operations/deleteOperations.yaml index 9e608dd7..159af00f 100644 --- a/api-spec/paths/operations/deleteOperations.yaml +++ b/api-spec/paths/operations/deleteOperations.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/panels/_id/deletePanel.yaml b/api-spec/paths/panels/_id/deletePanel.yaml index 8a341317..b414ab68 100644 --- a/api-spec/paths/panels/_id/deletePanel.yaml +++ b/api-spec/paths/panels/_id/deletePanel.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/panels/deletePanels.yaml b/api-spec/paths/panels/deletePanels.yaml index 4114d068..8739f772 100644 --- a/api-spec/paths/panels/deletePanels.yaml +++ b/api-spec/paths/panels/deletePanels.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/_id/deletePermission.yaml b/api-spec/paths/permissions/_id/deletePermission.yaml index 11037613..6cb3c5b2 100644 --- a/api-spec/paths/permissions/_id/deletePermission.yaml +++ b/api-spec/paths/permissions/_id/deletePermission.yaml @@ -2,8 +2,8 @@ summary: Delete a Permission description: Delete an existing permission operationId: deletePermission responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/deletePermissions.yaml b/api-spec/paths/permissions/deletePermissions.yaml index c74c4a96..c5c9f6da 100644 --- a/api-spec/paths/permissions/deletePermissions.yaml +++ b/api-spec/paths/permissions/deletePermissions.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/policies/_id/deletePolicy.yaml b/api-spec/paths/policies/_id/deletePolicy.yaml index 01fd2ad3..77bc4fbc 100644 --- a/api-spec/paths/policies/_id/deletePolicy.yaml +++ b/api-spec/paths/policies/_id/deletePolicy.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/policies/deletePolicies.yaml b/api-spec/paths/policies/deletePolicies.yaml index 92dbdc97..e372c077 100644 --- a/api-spec/paths/policies/deletePolicies.yaml +++ b/api-spec/paths/policies/deletePolicies.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/presets/_id/deletePreset.yaml b/api-spec/paths/presets/_id/deletePreset.yaml index 558405d7..bd0b3574 100644 --- a/api-spec/paths/presets/_id/deletePreset.yaml +++ b/api-spec/paths/presets/_id/deletePreset.yaml @@ -6,8 +6,8 @@ description: Delete an existing preset. security: - Auth: [] responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError parameters: diff --git a/api-spec/paths/presets/deletePresets.yaml b/api-spec/paths/presets/deletePresets.yaml index 94361008..8bb2451e 100644 --- a/api-spec/paths/presets/deletePresets.yaml +++ b/api-spec/paths/presets/deletePresets.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/relations/_id/deleteRelation.yaml b/api-spec/paths/relations/_id/deleteRelation.yaml index c774fc41..633092e0 100644 --- a/api-spec/paths/relations/_id/deleteRelation.yaml +++ b/api-spec/paths/relations/_id/deleteRelation.yaml @@ -2,8 +2,8 @@ summary: Delete a Relation description: Delete an existing relation. operationId: deleteRelation responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/roles/_id/deleteRole.yaml b/api-spec/paths/roles/_id/deleteRole.yaml index 5ce34ffe..40fc8b25 100644 --- a/api-spec/paths/roles/_id/deleteRole.yaml +++ b/api-spec/paths/roles/_id/deleteRole.yaml @@ -2,8 +2,8 @@ summary: Delete a Role description: Delete an existing role operationId: deleteRole responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/roles/deleteRoles.yaml b/api-spec/paths/roles/deleteRoles.yaml index bcd068c9..0f879829 100644 --- a/api-spec/paths/roles/deleteRoles.yaml +++ b/api-spec/paths/roles/deleteRoles.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/shares/_id/deleteShare.yaml b/api-spec/paths/shares/_id/deleteShare.yaml index 973b9b1f..f3cbe545 100644 --- a/api-spec/paths/shares/_id/deleteShare.yaml +++ b/api-spec/paths/shares/_id/deleteShare.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/deleteShares.yaml b/api-spec/paths/shares/deleteShares.yaml index 6b696e00..4f0c82b1 100644 --- a/api-spec/paths/shares/deleteShares.yaml +++ b/api-spec/paths/shares/deleteShares.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/_id/deleteTranslation.yaml b/api-spec/paths/translations/_id/deleteTranslation.yaml index bb6bdce6..003ed1e8 100644 --- a/api-spec/paths/translations/_id/deleteTranslation.yaml +++ b/api-spec/paths/translations/_id/deleteTranslation.yaml @@ -9,8 +9,8 @@ parameters: schema: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/deleteTranslations.yaml b/api-spec/paths/translations/deleteTranslations.yaml index 5cf1cb66..05681c17 100644 --- a/api-spec/paths/translations/deleteTranslations.yaml +++ b/api-spec/paths/translations/deleteTranslations.yaml @@ -15,8 +15,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/_id/deleteUser.yaml b/api-spec/paths/users/_id/deleteUser.yaml index c91fa82e..90b69cf4 100644 --- a/api-spec/paths/users/_id/deleteUser.yaml +++ b/api-spec/paths/users/_id/deleteUser.yaml @@ -2,8 +2,8 @@ summary: Delete a User description: Delete an existing user operationId: deleteUser responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/deleteUsers.yaml b/api-spec/paths/users/deleteUsers.yaml index d2c1846d..2e1b28d0 100644 --- a/api-spec/paths/users/deleteUsers.yaml +++ b/api-spec/paths/users/deleteUsers.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: diff --git a/api-spec/paths/versions/_id/deleteContentVersion.yaml b/api-spec/paths/versions/_id/deleteContentVersion.yaml index 00971027..63b17391 100644 --- a/api-spec/paths/versions/_id/deleteContentVersion.yaml +++ b/api-spec/paths/versions/_id/deleteContentVersion.yaml @@ -2,8 +2,8 @@ summary: Delete a Content Version description: Delete an existing Content Version. operationId: deleteContentVersion responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/deleteContentVersions.yaml b/api-spec/paths/versions/deleteContentVersions.yaml index f3c055f1..b306d945 100644 --- a/api-spec/paths/versions/deleteContentVersions.yaml +++ b/api-spec/paths/versions/deleteContentVersions.yaml @@ -10,8 +10,8 @@ requestBody: items: type: string responses: - '200': - description: Successful request + '204': + description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError tags: From 4257cd79ff56ce34064e5a70e5f55496a8df5e08 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 6 Dec 2024 13:38:45 +0100 Subject: [PATCH 086/119] Fix running errors --- api-spec/paths/auth/login/login.yaml | 4 ++-- api-spec/paths/auth/logout/logout.yaml | 4 ++-- api-spec/paths/auth/password/request/passwordRequest.yaml | 2 +- api-spec/paths/auth/password/reset/passwordReset.yaml | 4 ++-- api-spec/paths/versions/_id/save/saveContentVersion.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index f1cf1d6a..a0b33f65 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -53,9 +53,9 @@ responses: type: string example: yuOJkjdPXMd... '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index 7ef4e2aa..f555273b 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -30,9 +30,9 @@ responses: properties: data: {} '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml index ac8789b2..0e34344f 100644 --- a/api-spec/paths/auth/password/request/passwordRequest.yaml +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -25,7 +25,7 @@ responses: '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/password/reset/passwordReset.yaml b/api-spec/paths/auth/password/reset/passwordReset.yaml index b99d960c..0bfd0ed3 100644 --- a/api-spec/paths/auth/password/reset/passwordReset.yaml +++ b/api-spec/paths/auth/password/reset/passwordReset.yaml @@ -30,9 +30,9 @@ responses: properties: data: {} '401': - $ref: ../../components/responses.yaml#/UnauthorizedError + $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../components/responses.yaml#/NotFoundError + $ref: ../../../../components/responses.yaml#/NotFoundError tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml index 291697fc..dfd662a0 100644 --- a/api-spec/paths/versions/_id/save/saveContentVersion.yaml +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -8,7 +8,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../components/schemas/items.yaml + - $ref: ../../../../components/schemas/items.yaml responses: '200': description: Successful request, Returns the item object with the new state after save. From ac977e8a407b19350bfb69da56a08d337d3176b6 Mon Sep 17 00:00:00 2001 From: Bevis Halsey-Perry Date: Fri, 6 Dec 2024 20:19:37 +0000 Subject: [PATCH 087/119] fixed security oas issue --- api-spec/components/schemas/files.yaml | 3 ++- api-spec/components/schemas/users.yaml | 3 ++- api-spec/index.yaml | 1 + api-spec/paths/activity/_id/getActivity.yaml | 1 + .../paths/activity/comment/_id/deleteComment.yaml | 1 + api-spec/paths/activity/comment/_id/getComment.yaml | 1 + .../paths/activity/comment/_id/updateComment.yaml | 1 + api-spec/paths/activity/comment/createComments.yaml | 1 + api-spec/paths/activity/comment/deleteComments.yaml | 1 + api-spec/paths/activity/comment/getComments.yaml | 1 + api-spec/paths/activity/comment/updateComments.yaml | 1 + api-spec/paths/activity/getActivities.yaml | 2 ++ api-spec/paths/assets/_id/getAsset.yaml | 1 + api-spec/paths/auth/login/login.yaml | 1 + api-spec/paths/auth/logout/logout.yaml | 1 + .../paths/auth/oauth/_provider/oauthProvider.yaml | 1 + api-spec/paths/auth/oauth/oauth.yaml | 1 + .../paths/auth/password/request/passwordRequest.yaml | 1 + api-spec/paths/auth/password/reset/passwordReset.yaml | 1 + api-spec/paths/auth/refresh/refresh.yaml | 1 + api-spec/paths/collections/_id/deleteCollection.yaml | 1 + api-spec/paths/collections/_id/getCollection.yaml | 1 + api-spec/paths/collections/_id/updateCollection.yaml | 1 + api-spec/paths/collections/createCollection.yaml | 1 + api-spec/paths/collections/getCollections.yaml | 1 + api-spec/paths/dashboards/_id/deleteDashboard.yaml | 1 + api-spec/paths/dashboards/_id/getDashboard.yaml | 1 + api-spec/paths/dashboards/_id/updateDashboard.yaml | 1 + api-spec/paths/dashboards/createDashboards.yaml | 1 + api-spec/paths/dashboards/deleteDashboards.yaml | 1 + api-spec/paths/dashboards/getDashboards.yaml | 1 + api-spec/paths/dashboards/updateDashboards.yaml | 1 + .../_bundle/_name/updateExtensionBundle.yaml | 1 + api-spec/paths/extensions/_name/updateExtensions.yaml | 1 + api-spec/paths/extensions/listExtensions.yaml | 9 +++++---- .../paths/fields/_collection/_id/deleteField.yaml | 1 + .../fields/_collection/_id/getCollectionField.yaml | 1 + .../paths/fields/_collection/_id/updateField.yaml | 1 + api-spec/paths/fields/_collection/createField.yaml | 1 + .../paths/fields/_collection/getCollectionFields.yaml | 1 + api-spec/paths/fields/getFields.yaml | 1 + api-spec/paths/files/_id/deleteFile.yaml | 1 + api-spec/paths/files/_id/getFile.yaml | 1 + api-spec/paths/files/_id/updateFile.yaml | 1 + api-spec/paths/files/deleteFiles.yaml | 1 + api-spec/paths/files/getFiles.yaml | 1 + api-spec/paths/files/import/importFile.yaml | 1 + api-spec/paths/files/updateFiles.yaml | 1 + api-spec/paths/files/uploadFile.yaml | 1 + api-spec/paths/flows/_id/deleteFlow.yaml | 1 + api-spec/paths/flows/_id/getFlow.yaml | 1 + api-spec/paths/flows/_id/updateFlow.yaml | 1 + api-spec/paths/flows/createFlows.yaml | 1 + api-spec/paths/flows/deleteFlows.yaml | 1 + api-spec/paths/flows/getFlows.yaml | 1 + api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml | 1 + api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml | 1 + api-spec/paths/flows/updateFlows.yaml | 1 + api-spec/paths/folders/_id/deleteFolder.yaml | 1 + api-spec/paths/folders/_id/getFolder.yaml | 1 + api-spec/paths/folders/_id/updateFolder.yaml | 1 + api-spec/paths/folders/createFolders.yaml | 1 + api-spec/paths/folders/deleteFolders.yaml | 1 + api-spec/paths/folders/getFolders.yaml | 1 + api-spec/paths/folders/updateFolders.yaml | 1 + api-spec/paths/items/_collection/_id/deleteItem.yaml | 1 + .../items/_collection/_id/getCollectionItem.yaml | 1 + api-spec/paths/items/_collection/_id/updateItem.yaml | 1 + api-spec/paths/items/_collection/createItems.yaml | 1 + api-spec/paths/items/_collection/deleteItems.yaml | 1 + .../paths/items/_collection/getCollectionItems.yaml | 1 + .../items/_collection/singleton/getSingleton.yaml | 1 + .../items/_collection/singleton/updateSingleton.yaml | 1 + api-spec/paths/items/_collection/updateItems.yaml | 1 + .../paths/notifications/_id/deleteNotification.yaml | 1 + api-spec/paths/notifications/_id/getNotification.yaml | 1 + .../paths/notifications/_id/updateNotification.yaml | 1 + api-spec/paths/notifications/createNotifications.yaml | 1 + api-spec/paths/notifications/deleteNotifications.yaml | 1 + api-spec/paths/notifications/getNotifications.yaml | 1 + api-spec/paths/notifications/updateNotifications.yaml | 1 + api-spec/paths/operations/_id/deleteOperation.yaml | 1 + api-spec/paths/operations/_id/getOperation.yaml | 1 + api-spec/paths/operations/_id/triggerOperation.yaml | 1 + api-spec/paths/operations/_id/updateOperation.yaml | 1 + api-spec/paths/operations/createOperations.yaml | 1 + api-spec/paths/operations/deleteOperations.yaml | 1 + api-spec/paths/operations/getOperations.yaml | 1 + api-spec/paths/operations/updateOperations.yaml | 1 + api-spec/paths/panels/_id/deletePanel.yaml | 1 + api-spec/paths/panels/_id/getPanel.yaml | 1 + api-spec/paths/panels/_id/updatePanel.yaml | 1 + api-spec/paths/panels/createPanels.yaml | 1 + api-spec/paths/panels/deletePanels.yaml | 1 + api-spec/paths/panels/getPanels.yaml | 1 + api-spec/paths/panels/updatePanels.yaml | 1 + api-spec/paths/permissions/_id/deletePermission.yaml | 1 + api-spec/paths/permissions/_id/getPermission.yaml | 1 + api-spec/paths/permissions/_id/updatePermission.yaml | 1 + api-spec/paths/permissions/createPermissions.yaml | 1 + api-spec/paths/permissions/deletePermissions.yaml | 1 + api-spec/paths/permissions/getPermissions.yaml | 1 + .../me/_collection/_id/getItemPermissions.yaml | 1 + api-spec/paths/permissions/me/getUserPermissions.yaml | 1 + api-spec/paths/permissions/updatePermissions.yaml | 1 + api-spec/paths/policies/_id/deletePolicy.yaml | 1 + api-spec/paths/policies/_id/getPolicy.yaml | 1 + api-spec/paths/policies/_id/updatePolicy.yaml | 1 + api-spec/paths/policies/createPolicies.yaml | 1 + api-spec/paths/policies/deletePolicies.yaml | 1 + api-spec/paths/policies/getPolicies.yaml | 1 + api-spec/paths/policies/updatePolicies.yaml | 1 + api-spec/paths/presets/_id/deletePreset.yaml | 1 + api-spec/paths/presets/_id/getPreset.yaml | 1 + api-spec/paths/presets/_id/updatePreset.yaml | 1 + api-spec/paths/presets/createPresets.yaml | 1 + api-spec/paths/presets/deletePresets.yaml | 1 + api-spec/paths/presets/getPresets.yaml | 1 + api-spec/paths/presets/updatePresets.yaml | 1 + .../_collection/getRelationByCollection.yaml | 1 + api-spec/paths/relations/_id/deleteRelation.yaml | 1 + api-spec/paths/relations/_id/getRelation.yaml | 1 + api-spec/paths/relations/_id/updateRelation.yaml | 1 + api-spec/paths/relations/createRelation.yaml | 1 + api-spec/paths/relations/getRelations.yaml | 1 + api-spec/paths/revisions/_id/getRevision.yaml | 1 + api-spec/paths/revisions/getRevisions.yaml | 1 + api-spec/paths/roles/_id/deleteRole.yaml | 1 + api-spec/paths/roles/_id/getRole.yaml | 1 + api-spec/paths/roles/_id/updateRole.yaml | 1 + api-spec/paths/roles/createRoles.yaml | 1 + api-spec/paths/roles/deleteRoles.yaml | 1 + api-spec/paths/roles/getRoles.yaml | 1 + api-spec/paths/roles/updateRoles.yaml | 1 + api-spec/paths/schema/apply/schemaApply.yaml | 1 + api-spec/paths/schema/diff/schemaDiff.yaml | 1 + api-spec/paths/schema/snapshot/schemaSnapshot.yaml | 1 + api-spec/paths/server/health/serverHealth.yaml | 1 + api-spec/paths/server/info/serverInfo.yaml | 1 + api-spec/paths/server/ping/ping.yaml | 9 +++++---- .../paths/server/specs/graphql/readGraphqlSdl.yaml | 1 + api-spec/paths/server/specs/oas/readOpenApiSpec.yaml | 1 + api-spec/paths/settings/getSettings.yaml | 1 + api-spec/paths/settings/updateSettings.yaml | 1 + api-spec/paths/shares/_id/deleteShare.yaml | 1 + api-spec/paths/shares/_id/getShare.yaml | 1 + api-spec/paths/shares/_id/updateShare.yaml | 1 + api-spec/paths/shares/auth/authenticateShare.yaml | 1 + api-spec/paths/shares/createShares.yaml | 1 + api-spec/paths/shares/deleteShares.yaml | 1 + api-spec/paths/shares/getShares.yaml | 1 + api-spec/paths/shares/info/_id/getShareInfo.yaml | 1 + api-spec/paths/shares/invite/inviteShare.yaml | 1 + api-spec/paths/shares/updateShares.yaml | 1 + .../paths/translations/_id/deleteTranslation.yaml | 1 + api-spec/paths/translations/_id/getTranslation.yaml | 1 + .../paths/translations/_id/updateTranslation.yaml | 1 + api-spec/paths/translations/createTranslations.yaml | 1 + api-spec/paths/translations/deleteTranslations.yaml | 1 + api-spec/paths/translations/getTranslations.yaml | 1 + api-spec/paths/translations/updateTranslations.yaml | 1 + api-spec/paths/users/_id/deleteUser.yaml | 1 + api-spec/paths/users/_id/getUser.yaml | 1 + api-spec/paths/users/_id/updateUser.yaml | 1 + api-spec/paths/users/createUsers.yaml | 1 + api-spec/paths/users/deleteUsers.yaml | 1 + api-spec/paths/users/getUsers.yaml | 1 + api-spec/paths/users/invite/accept/acceptInvite.yaml | 1 + api-spec/paths/users/invite/invite.yaml | 1 + api-spec/paths/users/me/getMe.yaml | 1 + api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml | 1 + api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml | 1 + .../me/tfa/generate/generateTwoFactorSecret.yaml | 1 + .../users/me/track/page/updateLastUsedPageMe.yaml | 1 + api-spec/paths/users/me/updateMe.yaml | 1 + api-spec/paths/users/register/registerUser.yaml | 1 + .../verify-email/_token/registerUserVerify.yaml | 1 + api-spec/paths/users/updateUsers.yaml | 1 + api-spec/paths/utils/cache/clear/clear-cache.yaml | 1 + api-spec/paths/utils/export/_collection/export.yaml | 1 + api-spec/paths/utils/hash/generate/hash-generate.yaml | 9 +++++---- api-spec/paths/utils/hash/verify/hash-verify.yaml | 9 +++++---- api-spec/paths/utils/import/_collection/import.yaml | 11 ++++++----- api-spec/paths/utils/random/string/random.yaml | 9 +++++---- api-spec/paths/utils/sort/_collection/sort.yaml | 11 ++++++----- .../versions/_id/compare/compareContentVersion.yaml | 1 + api-spec/paths/versions/_id/deleteContentVersion.yaml | 1 + api-spec/paths/versions/_id/getContentVersion.yaml | 1 + .../versions/_id/promote/promoteContentVersion.yaml | 1 + .../paths/versions/_id/save/saveContentVersion.yaml | 1 + api-spec/paths/versions/_id/updateContentVersion.yaml | 1 + api-spec/paths/versions/createContentVersions.yaml | 1 + api-spec/paths/versions/deleteContentVersions.yaml | 1 + api-spec/paths/versions/getContentVersions.yaml | 1 + api-spec/paths/versions/updateContentVersions.yaml | 1 + pnpm-lock.yaml | 6 ++++-- 196 files changed, 232 insertions(+), 34 deletions(-) diff --git a/api-spec/components/schemas/files.yaml b/api-spec/components/schemas/files.yaml index de1f4edc..c0168bb2 100644 --- a/api-spec/components/schemas/files.yaml +++ b/api-spec/components/schemas/files.yaml @@ -90,7 +90,8 @@ properties: description: Where the file was created. Is automatically populated based on Exif data for images. type: string nullable: true - tags: + security: [] +tags: description: Tags for the file. Is automatically populated based on Exif data for images. type: array nullable: true diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index c50fb433..2ffd3642 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -36,7 +36,8 @@ properties: example: null type: string nullable: true - tags: + security: [] +tags: description: The user's tags. example: null type: array diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 2bf65ebf..1ca71f1e 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -200,6 +200,7 @@ components: $ref: components/security.yaml schemas: $ref: components/schemas/_index.yaml +security: [] tags: - name: Assets description: Image typed files can be dynamically resized and transformed to fit any need. diff --git a/api-spec/paths/activity/_id/getActivity.yaml b/api-spec/paths/activity/_id/getActivity.yaml index 12d27865..13309de1 100644 --- a/api-spec/paths/activity/_id/getActivity.yaml +++ b/api-spec/paths/activity/_id/getActivity.yaml @@ -20,6 +20,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/_id/deleteComment.yaml b/api-spec/paths/activity/comment/_id/deleteComment.yaml index 98f8bfa1..ed66550b 100644 --- a/api-spec/paths/activity/comment/_id/deleteComment.yaml +++ b/api-spec/paths/activity/comment/_id/deleteComment.yaml @@ -10,6 +10,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/_id/getComment.yaml b/api-spec/paths/activity/comment/_id/getComment.yaml index ee6099ca..4cd85288 100644 --- a/api-spec/paths/activity/comment/_id/getComment.yaml +++ b/api-spec/paths/activity/comment/_id/getComment.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/activity/comment/_id/updateComment.yaml index 54dc7353..c7a2ba7d 100644 --- a/api-spec/paths/activity/comment/_id/updateComment.yaml +++ b/api-spec/paths/activity/comment/_id/updateComment.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/createComments.yaml b/api-spec/paths/activity/comment/createComments.yaml index 2b4494b8..e31e20ab 100644 --- a/api-spec/paths/activity/comment/createComments.yaml +++ b/api-spec/paths/activity/comment/createComments.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/activity/comment/deleteComments.yaml index 8964b484..73c0aad9 100644 --- a/api-spec/paths/activity/comment/deleteComments.yaml +++ b/api-spec/paths/activity/comment/deleteComments.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/getComments.yaml b/api-spec/paths/activity/comment/getComments.yaml index 2646cb5d..ad7a6137 100644 --- a/api-spec/paths/activity/comment/getComments.yaml +++ b/api-spec/paths/activity/comment/getComments.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/comment/updateComments.yaml b/api-spec/paths/activity/comment/updateComments.yaml index f28fec1d..3698d139 100644 --- a/api-spec/paths/activity/comment/updateComments.yaml +++ b/api-spec/paths/activity/comment/updateComments.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/activity/getActivities.yaml b/api-spec/paths/activity/getActivities.yaml index f26fa1c0..136f3980 100644 --- a/api-spec/paths/activity/getActivities.yaml +++ b/api-spec/paths/activity/getActivities.yaml @@ -27,6 +27,8 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] +security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/assets/_id/getAsset.yaml b/api-spec/paths/assets/_id/getAsset.yaml index 06a96812..d97703d3 100644 --- a/api-spec/paths/assets/_id/getAsset.yaml +++ b/api-spec/paths/assets/_id/getAsset.yaml @@ -1,4 +1,5 @@ summary: Get an Asset +security: [] tags: - Assets operationId: getAsset diff --git a/api-spec/paths/auth/login/login.yaml b/api-spec/paths/auth/login/login.yaml index a0b33f65..1b2d7f80 100644 --- a/api-spec/paths/auth/login/login.yaml +++ b/api-spec/paths/auth/login/login.yaml @@ -56,6 +56,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/logout/logout.yaml b/api-spec/paths/auth/logout/logout.yaml index f555273b..c4767c97 100644 --- a/api-spec/paths/auth/logout/logout.yaml +++ b/api-spec/paths/auth/logout/logout.yaml @@ -33,6 +33,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml index 85a1e0a5..e26062ad 100644 --- a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml +++ b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml @@ -32,5 +32,6 @@ responses: type: string '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Authentication diff --git a/api-spec/paths/auth/oauth/oauth.yaml b/api-spec/paths/auth/oauth/oauth.yaml index 9531950f..516cad37 100644 --- a/api-spec/paths/auth/oauth/oauth.yaml +++ b/api-spec/paths/auth/oauth/oauth.yaml @@ -1,4 +1,5 @@ summary: List Auth Providers +security: [] tags: - Authentication operationId: oauth diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml index 0e34344f..a560021b 100644 --- a/api-spec/paths/auth/password/request/passwordRequest.yaml +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -26,6 +26,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/password/reset/passwordReset.yaml b/api-spec/paths/auth/password/reset/passwordReset.yaml index 0bfd0ed3..1a381d15 100644 --- a/api-spec/paths/auth/password/reset/passwordReset.yaml +++ b/api-spec/paths/auth/password/reset/passwordReset.yaml @@ -33,6 +33,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Authentication x-codeSamples: diff --git a/api-spec/paths/auth/refresh/refresh.yaml b/api-spec/paths/auth/refresh/refresh.yaml index 178fc586..e23d1e41 100644 --- a/api-spec/paths/auth/refresh/refresh.yaml +++ b/api-spec/paths/auth/refresh/refresh.yaml @@ -1,5 +1,6 @@ summary: Refresh Token description: Retrieve a new access token using a refresh token. +security: [] tags: - Authentication operationId: refresh diff --git a/api-spec/paths/collections/_id/deleteCollection.yaml b/api-spec/paths/collections/_id/deleteCollection.yaml index d57653f1..d33dd62f 100644 --- a/api-spec/paths/collections/_id/deleteCollection.yaml +++ b/api-spec/paths/collections/_id/deleteCollection.yaml @@ -9,6 +9,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Collections parameters: diff --git a/api-spec/paths/collections/_id/getCollection.yaml b/api-spec/paths/collections/_id/getCollection.yaml index 1237f991..672ad45a 100644 --- a/api-spec/paths/collections/_id/getCollection.yaml +++ b/api-spec/paths/collections/_id/getCollection.yaml @@ -23,6 +23,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Collections x-codeSamples: diff --git a/api-spec/paths/collections/_id/updateCollection.yaml b/api-spec/paths/collections/_id/updateCollection.yaml index 1ce81c49..a14d52b5 100644 --- a/api-spec/paths/collections/_id/updateCollection.yaml +++ b/api-spec/paths/collections/_id/updateCollection.yaml @@ -101,6 +101,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Collections x-codeSamples: diff --git a/api-spec/paths/collections/createCollection.yaml b/api-spec/paths/collections/createCollection.yaml index 8b2d2ea4..1b0c38bd 100644 --- a/api-spec/paths/collections/createCollection.yaml +++ b/api-spec/paths/collections/createCollection.yaml @@ -98,6 +98,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Collections x-codeSamples: diff --git a/api-spec/paths/collections/getCollections.yaml b/api-spec/paths/collections/getCollections.yaml index 82ae6999..f0406e5f 100644 --- a/api-spec/paths/collections/getCollections.yaml +++ b/api-spec/paths/collections/getCollections.yaml @@ -20,6 +20,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Collections x-codeSamples: diff --git a/api-spec/paths/dashboards/_id/deleteDashboard.yaml b/api-spec/paths/dashboards/_id/deleteDashboard.yaml index 74761d4d..09216223 100644 --- a/api-spec/paths/dashboards/_id/deleteDashboard.yaml +++ b/api-spec/paths/dashboards/_id/deleteDashboard.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/_id/getDashboard.yaml b/api-spec/paths/dashboards/_id/getDashboard.yaml index 33c4ad6b..ab894f68 100644 --- a/api-spec/paths/dashboards/_id/getDashboard.yaml +++ b/api-spec/paths/dashboards/_id/getDashboard.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/_id/updateDashboard.yaml b/api-spec/paths/dashboards/_id/updateDashboard.yaml index 8e27e4e5..d4e7a2bd 100644 --- a/api-spec/paths/dashboards/_id/updateDashboard.yaml +++ b/api-spec/paths/dashboards/_id/updateDashboard.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/createDashboards.yaml b/api-spec/paths/dashboards/createDashboards.yaml index c6cf04ba..8be6d1aa 100644 --- a/api-spec/paths/dashboards/createDashboards.yaml +++ b/api-spec/paths/dashboards/createDashboards.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/deleteDashboards.yaml b/api-spec/paths/dashboards/deleteDashboards.yaml index e25cf0b9..f6cbee13 100644 --- a/api-spec/paths/dashboards/deleteDashboards.yaml +++ b/api-spec/paths/dashboards/deleteDashboards.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/getDashboards.yaml b/api-spec/paths/dashboards/getDashboards.yaml index ffb04435..e921a761 100644 --- a/api-spec/paths/dashboards/getDashboards.yaml +++ b/api-spec/paths/dashboards/getDashboards.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/dashboards/updateDashboards.yaml b/api-spec/paths/dashboards/updateDashboards.yaml index e6c4afd5..ebcf38f2 100644 --- a/api-spec/paths/dashboards/updateDashboards.yaml +++ b/api-spec/paths/dashboards/updateDashboards.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Dashboards x-codeSamples: diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml index 3dcfb5b4..a39c70e2 100644 --- a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -41,6 +41,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Extensions x-codeSamples: diff --git a/api-spec/paths/extensions/_name/updateExtensions.yaml b/api-spec/paths/extensions/_name/updateExtensions.yaml index fe5b6b09..89638529 100644 --- a/api-spec/paths/extensions/_name/updateExtensions.yaml +++ b/api-spec/paths/extensions/_name/updateExtensions.yaml @@ -36,6 +36,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Extensions x-codeSamples: diff --git a/api-spec/paths/extensions/listExtensions.yaml b/api-spec/paths/extensions/listExtensions.yaml index c41ec8ff..92f8be0e 100644 --- a/api-spec/paths/extensions/listExtensions.yaml +++ b/api-spec/paths/extensions/listExtensions.yaml @@ -15,6 +15,7 @@ responses: description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Extensions x-codeSamples: @@ -22,15 +23,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, readExtensions } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(readExtensions()); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Query { extensions: [extension] - } \ No newline at end of file + } diff --git a/api-spec/paths/fields/_collection/_id/deleteField.yaml b/api-spec/paths/fields/_collection/_id/deleteField.yaml index d0652d2e..e65ea59d 100644 --- a/api-spec/paths/fields/_collection/_id/deleteField.yaml +++ b/api-spec/paths/fields/_collection/_id/deleteField.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields parameters: diff --git a/api-spec/paths/fields/_collection/_id/getCollectionField.yaml b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml index b7a6b7f9..ed1d7bf1 100644 --- a/api-spec/paths/fields/_collection/_id/getCollectionField.yaml +++ b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields parameters: diff --git a/api-spec/paths/fields/_collection/_id/updateField.yaml b/api-spec/paths/fields/_collection/_id/updateField.yaml index 2895dbd0..203605b5 100644 --- a/api-spec/paths/fields/_collection/_id/updateField.yaml +++ b/api-spec/paths/fields/_collection/_id/updateField.yaml @@ -191,6 +191,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields parameters: diff --git a/api-spec/paths/fields/_collection/createField.yaml b/api-spec/paths/fields/_collection/createField.yaml index 3ca97ace..481daf66 100644 --- a/api-spec/paths/fields/_collection/createField.yaml +++ b/api-spec/paths/fields/_collection/createField.yaml @@ -196,6 +196,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields parameters: diff --git a/api-spec/paths/fields/_collection/getCollectionFields.yaml b/api-spec/paths/fields/_collection/getCollectionFields.yaml index 3d75c2f1..1356a525 100644 --- a/api-spec/paths/fields/_collection/getCollectionFields.yaml +++ b/api-spec/paths/fields/_collection/getCollectionFields.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields x-codeSamples: diff --git a/api-spec/paths/fields/getFields.yaml b/api-spec/paths/fields/getFields.yaml index ee2ddc06..4000325a 100644 --- a/api-spec/paths/fields/getFields.yaml +++ b/api-spec/paths/fields/getFields.yaml @@ -20,6 +20,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Fields x-codeSamples: diff --git a/api-spec/paths/files/_id/deleteFile.yaml b/api-spec/paths/files/_id/deleteFile.yaml index 37b49e5d..1593b059 100644 --- a/api-spec/paths/files/_id/deleteFile.yaml +++ b/api-spec/paths/files/_id/deleteFile.yaml @@ -1,5 +1,6 @@ summary: Delete a File description: Delete an existing file. This will also delete the file from disk. +security: [] tags: - Files operationId: deleteFile diff --git a/api-spec/paths/files/_id/getFile.yaml b/api-spec/paths/files/_id/getFile.yaml index c3bbf463..bd8610b4 100644 --- a/api-spec/paths/files/_id/getFile.yaml +++ b/api-spec/paths/files/_id/getFile.yaml @@ -1,5 +1,6 @@ summary: Retrieve a File description: Retrieve a single file by primary key. +security: [] tags: - Files operationId: getFile diff --git a/api-spec/paths/files/_id/updateFile.yaml b/api-spec/paths/files/_id/updateFile.yaml index e2ea08cf..a5c693c3 100644 --- a/api-spec/paths/files/_id/updateFile.yaml +++ b/api-spec/paths/files/_id/updateFile.yaml @@ -1,5 +1,6 @@ summary: Update a File description: Update an existing file, and/or replace it's file contents. +security: [] tags: - Files operationId: updateFile diff --git a/api-spec/paths/files/deleteFiles.yaml b/api-spec/paths/files/deleteFiles.yaml index 56dda47a..05b8cb84 100644 --- a/api-spec/paths/files/deleteFiles.yaml +++ b/api-spec/paths/files/deleteFiles.yaml @@ -1,5 +1,6 @@ summary: Delete Multiple Files description: Delete multiple existing files at once. This will also delete the files from disk. +security: [] tags: - Files operationId: deleteFiles diff --git a/api-spec/paths/files/getFiles.yaml b/api-spec/paths/files/getFiles.yaml index 4c632111..29466e77 100644 --- a/api-spec/paths/files/getFiles.yaml +++ b/api-spec/paths/files/getFiles.yaml @@ -1,5 +1,6 @@ summary: List Files description: List all files that exist in Directus. +security: [] tags: - Files operationId: getFiles diff --git a/api-spec/paths/files/import/importFile.yaml b/api-spec/paths/files/import/importFile.yaml index 887c8443..b749dd4b 100644 --- a/api-spec/paths/files/import/importFile.yaml +++ b/api-spec/paths/files/import/importFile.yaml @@ -26,6 +26,7 @@ responses: $ref: ../../components/schemas/files.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Files x-codeSamples: diff --git a/api-spec/paths/files/updateFiles.yaml b/api-spec/paths/files/updateFiles.yaml index 61e7068d..5fba6b39 100644 --- a/api-spec/paths/files/updateFiles.yaml +++ b/api-spec/paths/files/updateFiles.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Files description: Update multiple files at the same time. +security: [] tags: - Files operationId: updateFiles diff --git a/api-spec/paths/files/uploadFile.yaml b/api-spec/paths/files/uploadFile.yaml index ae10c1f2..e9b5ec4f 100644 --- a/api-spec/paths/files/uploadFile.yaml +++ b/api-spec/paths/files/uploadFile.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../components/schemas/files.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Files x-codeSamples: diff --git a/api-spec/paths/flows/_id/deleteFlow.yaml b/api-spec/paths/flows/_id/deleteFlow.yaml index 5f53eccd..1bf128db 100644 --- a/api-spec/paths/flows/_id/deleteFlow.yaml +++ b/api-spec/paths/flows/_id/deleteFlow.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows parameters: diff --git a/api-spec/paths/flows/_id/getFlow.yaml b/api-spec/paths/flows/_id/getFlow.yaml index e9a48a32..bd62f3b1 100644 --- a/api-spec/paths/flows/_id/getFlow.yaml +++ b/api-spec/paths/flows/_id/getFlow.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows parameters: diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml index 0c68977f..5d7ab8b9 100644 --- a/api-spec/paths/flows/_id/updateFlow.yaml +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/createFlows.yaml b/api-spec/paths/flows/createFlows.yaml index 6eee6371..e2df483c 100644 --- a/api-spec/paths/flows/createFlows.yaml +++ b/api-spec/paths/flows/createFlows.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/deleteFlows.yaml b/api-spec/paths/flows/deleteFlows.yaml index 48af136c..381b5434 100644 --- a/api-spec/paths/flows/deleteFlows.yaml +++ b/api-spec/paths/flows/deleteFlows.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/getFlows.yaml b/api-spec/paths/flows/getFlows.yaml index 99ae488b..f37f3bc8 100644 --- a/api-spec/paths/flows/getFlows.yaml +++ b/api-spec/paths/flows/getFlows.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml index 37fe0b77..0d898cf6 100644 --- a/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml +++ b/api-spec/paths/flows/trigger/_id/triggerFlowGET.yaml @@ -18,6 +18,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml b/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml index 82eb1baf..8cdeae32 100644 --- a/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml +++ b/api-spec/paths/flows/trigger/_id/triggerFlowPOST.yaml @@ -26,6 +26,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Flows x-codeSamples: diff --git a/api-spec/paths/flows/updateFlows.yaml b/api-spec/paths/flows/updateFlows.yaml index de1d416f..7df2591f 100644 --- a/api-spec/paths/flows/updateFlows.yaml +++ b/api-spec/paths/flows/updateFlows.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Flows description: Update multiple flows at the same time. +security: [] tags: - Flows operationId: updateFlows diff --git a/api-spec/paths/folders/_id/deleteFolder.yaml b/api-spec/paths/folders/_id/deleteFolder.yaml index a0413db8..07e6f6fa 100644 --- a/api-spec/paths/folders/_id/deleteFolder.yaml +++ b/api-spec/paths/folders/_id/deleteFolder.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Folders parameters: diff --git a/api-spec/paths/folders/_id/getFolder.yaml b/api-spec/paths/folders/_id/getFolder.yaml index 441ff16e..a293bc4e 100644 --- a/api-spec/paths/folders/_id/getFolder.yaml +++ b/api-spec/paths/folders/_id/getFolder.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Folders x-codeSamples: diff --git a/api-spec/paths/folders/_id/updateFolder.yaml b/api-spec/paths/folders/_id/updateFolder.yaml index a7cff815..02464475 100644 --- a/api-spec/paths/folders/_id/updateFolder.yaml +++ b/api-spec/paths/folders/_id/updateFolder.yaml @@ -33,6 +33,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Folders x-codeSamples: diff --git a/api-spec/paths/folders/createFolders.yaml b/api-spec/paths/folders/createFolders.yaml index 571ed7d3..2874bf52 100644 --- a/api-spec/paths/folders/createFolders.yaml +++ b/api-spec/paths/folders/createFolders.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Folders x-codeSamples: diff --git a/api-spec/paths/folders/deleteFolders.yaml b/api-spec/paths/folders/deleteFolders.yaml index 72c12d7e..a7138c4c 100644 --- a/api-spec/paths/folders/deleteFolders.yaml +++ b/api-spec/paths/folders/deleteFolders.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Folders x-codeSamples: diff --git a/api-spec/paths/folders/getFolders.yaml b/api-spec/paths/folders/getFolders.yaml index acccf1b3..21a3a2c6 100644 --- a/api-spec/paths/folders/getFolders.yaml +++ b/api-spec/paths/folders/getFolders.yaml @@ -27,6 +27,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Folders x-codeSamples: diff --git a/api-spec/paths/folders/updateFolders.yaml b/api-spec/paths/folders/updateFolders.yaml index 00628577..359a2812 100644 --- a/api-spec/paths/folders/updateFolders.yaml +++ b/api-spec/paths/folders/updateFolders.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Folders description: Update multiple folders at the same time. +security: [] tags: - Folders operationId: updateFolders diff --git a/api-spec/paths/items/_collection/_id/deleteItem.yaml b/api-spec/paths/items/_collection/_id/deleteItem.yaml index 85aab84c..b450dfe2 100644 --- a/api-spec/paths/items/_collection/_id/deleteItem.yaml +++ b/api-spec/paths/items/_collection/_id/deleteItem.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml index 51fe343a..902fe4a1 100644 --- a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml +++ b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/_id/updateItem.yaml b/api-spec/paths/items/_collection/_id/updateItem.yaml index 517484c7..c526faf7 100644 --- a/api-spec/paths/items/_collection/_id/updateItem.yaml +++ b/api-spec/paths/items/_collection/_id/updateItem.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/createItems.yaml b/api-spec/paths/items/_collection/createItems.yaml index 6b59f6ff..61295909 100644 --- a/api-spec/paths/items/_collection/createItems.yaml +++ b/api-spec/paths/items/_collection/createItems.yaml @@ -39,6 +39,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/deleteItems.yaml b/api-spec/paths/items/_collection/deleteItems.yaml index 51d3ac2c..2aefd7be 100644 --- a/api-spec/paths/items/_collection/deleteItems.yaml +++ b/api-spec/paths/items/_collection/deleteItems.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/getCollectionItems.yaml b/api-spec/paths/items/_collection/getCollectionItems.yaml index 292ccfd3..78a167c6 100644 --- a/api-spec/paths/items/_collection/getCollectionItems.yaml +++ b/api-spec/paths/items/_collection/getCollectionItems.yaml @@ -31,6 +31,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/singleton/getSingleton.yaml b/api-spec/paths/items/_collection/singleton/getSingleton.yaml index deffe91b..5d4c24a1 100644 --- a/api-spec/paths/items/_collection/singleton/getSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/getSingleton.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml index 07803804..4b975c89 100644 --- a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/items/_collection/updateItems.yaml b/api-spec/paths/items/_collection/updateItems.yaml index 1fd9faa4..1331d43f 100644 --- a/api-spec/paths/items/_collection/updateItems.yaml +++ b/api-spec/paths/items/_collection/updateItems.yaml @@ -41,6 +41,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/notifications/_id/deleteNotification.yaml b/api-spec/paths/notifications/_id/deleteNotification.yaml index 8b784417..a9b88856 100644 --- a/api-spec/paths/notifications/_id/deleteNotification.yaml +++ b/api-spec/paths/notifications/_id/deleteNotification.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/_id/getNotification.yaml b/api-spec/paths/notifications/_id/getNotification.yaml index a1542c69..62fb4250 100644 --- a/api-spec/paths/notifications/_id/getNotification.yaml +++ b/api-spec/paths/notifications/_id/getNotification.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/_id/updateNotification.yaml b/api-spec/paths/notifications/_id/updateNotification.yaml index aa51a4b9..0db001a8 100644 --- a/api-spec/paths/notifications/_id/updateNotification.yaml +++ b/api-spec/paths/notifications/_id/updateNotification.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/createNotifications.yaml b/api-spec/paths/notifications/createNotifications.yaml index fd8ef2e7..ab7cd386 100644 --- a/api-spec/paths/notifications/createNotifications.yaml +++ b/api-spec/paths/notifications/createNotifications.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/deleteNotifications.yaml b/api-spec/paths/notifications/deleteNotifications.yaml index 146b1918..5e083c47 100644 --- a/api-spec/paths/notifications/deleteNotifications.yaml +++ b/api-spec/paths/notifications/deleteNotifications.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/getNotifications.yaml b/api-spec/paths/notifications/getNotifications.yaml index 20dadff5..874254e0 100644 --- a/api-spec/paths/notifications/getNotifications.yaml +++ b/api-spec/paths/notifications/getNotifications.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/notifications/updateNotifications.yaml b/api-spec/paths/notifications/updateNotifications.yaml index bdd2e0f2..d63180f7 100644 --- a/api-spec/paths/notifications/updateNotifications.yaml +++ b/api-spec/paths/notifications/updateNotifications.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Notifications x-codeSamples: diff --git a/api-spec/paths/operations/_id/deleteOperation.yaml b/api-spec/paths/operations/_id/deleteOperation.yaml index 1fe46e09..e3e503a1 100644 --- a/api-spec/paths/operations/_id/deleteOperation.yaml +++ b/api-spec/paths/operations/_id/deleteOperation.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Operations parameters: diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml index 08dfaf0f..669d4df3 100644 --- a/api-spec/paths/operations/_id/getOperation.yaml +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -17,6 +17,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Operations x-codeSamples: diff --git a/api-spec/paths/operations/_id/triggerOperation.yaml b/api-spec/paths/operations/_id/triggerOperation.yaml index e81eb483..c4929fcd 100644 --- a/api-spec/paths/operations/_id/triggerOperation.yaml +++ b/api-spec/paths/operations/_id/triggerOperation.yaml @@ -22,6 +22,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Operations x-codeSamples: diff --git a/api-spec/paths/operations/_id/updateOperation.yaml b/api-spec/paths/operations/_id/updateOperation.yaml index f2ce2141..39934081 100644 --- a/api-spec/paths/operations/_id/updateOperation.yaml +++ b/api-spec/paths/operations/_id/updateOperation.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Operations x-codeSamples: diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml index 4f7d16c0..94a623e4 100644 --- a/api-spec/paths/operations/createOperations.yaml +++ b/api-spec/paths/operations/createOperations.yaml @@ -39,6 +39,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Items x-codeSamples: diff --git a/api-spec/paths/operations/deleteOperations.yaml b/api-spec/paths/operations/deleteOperations.yaml index 159af00f..c3485f41 100644 --- a/api-spec/paths/operations/deleteOperations.yaml +++ b/api-spec/paths/operations/deleteOperations.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Operations x-codeSamples: diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml index ab8194c6..3d461b5f 100644 --- a/api-spec/paths/operations/getOperations.yaml +++ b/api-spec/paths/operations/getOperations.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Operations x-codeSamples: diff --git a/api-spec/paths/operations/updateOperations.yaml b/api-spec/paths/operations/updateOperations.yaml index 0ff4f637..02422054 100644 --- a/api-spec/paths/operations/updateOperations.yaml +++ b/api-spec/paths/operations/updateOperations.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Operations description: Update multiple operations at the same time. +security: [] tags: - Operations operationId: updateOperations diff --git a/api-spec/paths/panels/_id/deletePanel.yaml b/api-spec/paths/panels/_id/deletePanel.yaml index b414ab68..842ccfef 100644 --- a/api-spec/paths/panels/_id/deletePanel.yaml +++ b/api-spec/paths/panels/_id/deletePanel.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/panels/_id/getPanel.yaml b/api-spec/paths/panels/_id/getPanel.yaml index 362b8dda..be184f32 100644 --- a/api-spec/paths/panels/_id/getPanel.yaml +++ b/api-spec/paths/panels/_id/getPanel.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/panels/_id/updatePanel.yaml b/api-spec/paths/panels/_id/updatePanel.yaml index 4162a488..83d701fe 100644 --- a/api-spec/paths/panels/_id/updatePanel.yaml +++ b/api-spec/paths/panels/_id/updatePanel.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - panels x-codeSamples: diff --git a/api-spec/paths/panels/createPanels.yaml b/api-spec/paths/panels/createPanels.yaml index 1fee4c96..383af6e9 100644 --- a/api-spec/paths/panels/createPanels.yaml +++ b/api-spec/paths/panels/createPanels.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/panels/deletePanels.yaml b/api-spec/paths/panels/deletePanels.yaml index 8739f772..0cd8d682 100644 --- a/api-spec/paths/panels/deletePanels.yaml +++ b/api-spec/paths/panels/deletePanels.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/panels/getPanels.yaml b/api-spec/paths/panels/getPanels.yaml index c3113332..933b7eb7 100644 --- a/api-spec/paths/panels/getPanels.yaml +++ b/api-spec/paths/panels/getPanels.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/panels/updatePanels.yaml b/api-spec/paths/panels/updatePanels.yaml index 3b980a62..80f1e46f 100644 --- a/api-spec/paths/panels/updatePanels.yaml +++ b/api-spec/paths/panels/updatePanels.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Panels x-codeSamples: diff --git a/api-spec/paths/permissions/_id/deletePermission.yaml b/api-spec/paths/permissions/_id/deletePermission.yaml index 6cb3c5b2..f7d2db5a 100644 --- a/api-spec/paths/permissions/_id/deletePermission.yaml +++ b/api-spec/paths/permissions/_id/deletePermission.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions parameters: diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index 3e010fc4..43afaf56 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml index 6e531222..3af82021 100644 --- a/api-spec/paths/permissions/_id/updatePermission.yaml +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -88,6 +88,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/createPermissions.yaml b/api-spec/paths/permissions/createPermissions.yaml index eb85e709..7f60e970 100644 --- a/api-spec/paths/permissions/createPermissions.yaml +++ b/api-spec/paths/permissions/createPermissions.yaml @@ -41,6 +41,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/deletePermissions.yaml b/api-spec/paths/permissions/deletePermissions.yaml index c5c9f6da..10a205ea 100644 --- a/api-spec/paths/permissions/deletePermissions.yaml +++ b/api-spec/paths/permissions/deletePermissions.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index 5b63a4de..a7ff734d 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index 034cd301..b0f2545a 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -11,6 +11,7 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/me/getUserPermissions.yaml b/api-spec/paths/permissions/me/getUserPermissions.yaml index 0c804628..d2891d08 100644 --- a/api-spec/paths/permissions/me/getUserPermissions.yaml +++ b/api-spec/paths/permissions/me/getUserPermissions.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Permissions x-codeSamples: diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index ea015b0f..456ae5cf 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Permissions description: Update multiple permissions at the same time. +security: [] tags: - Permissions operationId: updatePermissions diff --git a/api-spec/paths/policies/_id/deletePolicy.yaml b/api-spec/paths/policies/_id/deletePolicy.yaml index 77bc4fbc..378b63ee 100644 --- a/api-spec/paths/policies/_id/deletePolicy.yaml +++ b/api-spec/paths/policies/_id/deletePolicy.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/policies/_id/getPolicy.yaml b/api-spec/paths/policies/_id/getPolicy.yaml index cca3ef6b..1c934cf3 100644 --- a/api-spec/paths/policies/_id/getPolicy.yaml +++ b/api-spec/paths/policies/_id/getPolicy.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Policys x-codeSamples: diff --git a/api-spec/paths/policies/_id/updatePolicy.yaml b/api-spec/paths/policies/_id/updatePolicy.yaml index 6a18824c..c6ec62ba 100644 --- a/api-spec/paths/policies/_id/updatePolicy.yaml +++ b/api-spec/paths/policies/_id/updatePolicy.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/policies/createPolicies.yaml b/api-spec/paths/policies/createPolicies.yaml index 03011e8c..84ca9567 100644 --- a/api-spec/paths/policies/createPolicies.yaml +++ b/api-spec/paths/policies/createPolicies.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/policies/deletePolicies.yaml b/api-spec/paths/policies/deletePolicies.yaml index e372c077..6d34598c 100644 --- a/api-spec/paths/policies/deletePolicies.yaml +++ b/api-spec/paths/policies/deletePolicies.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/policies/getPolicies.yaml b/api-spec/paths/policies/getPolicies.yaml index 2a283766..ba1b9d6a 100644 --- a/api-spec/paths/policies/getPolicies.yaml +++ b/api-spec/paths/policies/getPolicies.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/policies/updatePolicies.yaml b/api-spec/paths/policies/updatePolicies.yaml index 83c3a4ca..9abd5f79 100644 --- a/api-spec/paths/policies/updatePolicies.yaml +++ b/api-spec/paths/policies/updatePolicies.yaml @@ -39,6 +39,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Policies x-codeSamples: diff --git a/api-spec/paths/presets/_id/deletePreset.yaml b/api-spec/paths/presets/_id/deletePreset.yaml index bd0b3574..acb8e83f 100644 --- a/api-spec/paths/presets/_id/deletePreset.yaml +++ b/api-spec/paths/presets/_id/deletePreset.yaml @@ -1,4 +1,5 @@ summary: Delete a Preset +security: [] tags: - Presets operationId: deletePreset diff --git a/api-spec/paths/presets/_id/getPreset.yaml b/api-spec/paths/presets/_id/getPreset.yaml index 062f3f85..da5cf280 100644 --- a/api-spec/paths/presets/_id/getPreset.yaml +++ b/api-spec/paths/presets/_id/getPreset.yaml @@ -1,4 +1,5 @@ summary: Retrieve a Preset +security: [] tags: - Presets operationId: getPreset diff --git a/api-spec/paths/presets/_id/updatePreset.yaml b/api-spec/paths/presets/_id/updatePreset.yaml index 7b7694b0..7ede3f5b 100644 --- a/api-spec/paths/presets/_id/updatePreset.yaml +++ b/api-spec/paths/presets/_id/updatePreset.yaml @@ -1,4 +1,5 @@ summary: Update a Preset +security: [] tags: - Presets operationId: updatePreset diff --git a/api-spec/paths/presets/createPresets.yaml b/api-spec/paths/presets/createPresets.yaml index 01407951..468b38a7 100644 --- a/api-spec/paths/presets/createPresets.yaml +++ b/api-spec/paths/presets/createPresets.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Presets x-codeSamples: diff --git a/api-spec/paths/presets/deletePresets.yaml b/api-spec/paths/presets/deletePresets.yaml index 8bb2451e..a35a7051 100644 --- a/api-spec/paths/presets/deletePresets.yaml +++ b/api-spec/paths/presets/deletePresets.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Presets x-codeSamples: diff --git a/api-spec/paths/presets/getPresets.yaml b/api-spec/paths/presets/getPresets.yaml index 29a94821..c719f340 100644 --- a/api-spec/paths/presets/getPresets.yaml +++ b/api-spec/paths/presets/getPresets.yaml @@ -1,4 +1,5 @@ summary: List Presets +security: [] tags: - Presets operationId: getPresets diff --git a/api-spec/paths/presets/updatePresets.yaml b/api-spec/paths/presets/updatePresets.yaml index 1339a98b..e9cf8a89 100644 --- a/api-spec/paths/presets/updatePresets.yaml +++ b/api-spec/paths/presets/updatePresets.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Presets description: Update multiple presets at the same time. +security: [] tags: - Presets operationId: updatePresets diff --git a/api-spec/paths/relations/_collection/getRelationByCollection.yaml b/api-spec/paths/relations/_collection/getRelationByCollection.yaml index c74adfe1..fbf783e8 100644 --- a/api-spec/paths/relations/_collection/getRelationByCollection.yaml +++ b/api-spec/paths/relations/_collection/getRelationByCollection.yaml @@ -17,6 +17,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations x-codeSamples: diff --git a/api-spec/paths/relations/_id/deleteRelation.yaml b/api-spec/paths/relations/_id/deleteRelation.yaml index 633092e0..dbd5a319 100644 --- a/api-spec/paths/relations/_id/deleteRelation.yaml +++ b/api-spec/paths/relations/_id/deleteRelation.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations parameters: diff --git a/api-spec/paths/relations/_id/getRelation.yaml b/api-spec/paths/relations/_id/getRelation.yaml index e847a6a2..c24544d5 100644 --- a/api-spec/paths/relations/_id/getRelation.yaml +++ b/api-spec/paths/relations/_id/getRelation.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations x-codeSamples: diff --git a/api-spec/paths/relations/_id/updateRelation.yaml b/api-spec/paths/relations/_id/updateRelation.yaml index cb886892..486da128 100644 --- a/api-spec/paths/relations/_id/updateRelation.yaml +++ b/api-spec/paths/relations/_id/updateRelation.yaml @@ -43,6 +43,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations x-codeSamples: diff --git a/api-spec/paths/relations/createRelation.yaml b/api-spec/paths/relations/createRelation.yaml index bbaac7c8..998da23d 100644 --- a/api-spec/paths/relations/createRelation.yaml +++ b/api-spec/paths/relations/createRelation.yaml @@ -45,6 +45,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations x-codeSamples: diff --git a/api-spec/paths/relations/getRelations.yaml b/api-spec/paths/relations/getRelations.yaml index 68b99307..8b8a6edc 100644 --- a/api-spec/paths/relations/getRelations.yaml +++ b/api-spec/paths/relations/getRelations.yaml @@ -26,6 +26,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Relations x-codeSamples: diff --git a/api-spec/paths/revisions/_id/getRevision.yaml b/api-spec/paths/revisions/_id/getRevision.yaml index 87e1dc53..8a015c85 100644 --- a/api-spec/paths/revisions/_id/getRevision.yaml +++ b/api-spec/paths/revisions/_id/getRevision.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Revisions x-codeSamples: diff --git a/api-spec/paths/revisions/getRevisions.yaml b/api-spec/paths/revisions/getRevisions.yaml index 8e04c6e5..d379d009 100644 --- a/api-spec/paths/revisions/getRevisions.yaml +++ b/api-spec/paths/revisions/getRevisions.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Revisions x-codeSamples: diff --git a/api-spec/paths/roles/_id/deleteRole.yaml b/api-spec/paths/roles/_id/deleteRole.yaml index 40fc8b25..78410a83 100644 --- a/api-spec/paths/roles/_id/deleteRole.yaml +++ b/api-spec/paths/roles/_id/deleteRole.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Roles parameters: diff --git a/api-spec/paths/roles/_id/getRole.yaml b/api-spec/paths/roles/_id/getRole.yaml index 163d8cc4..0c3737a4 100644 --- a/api-spec/paths/roles/_id/getRole.yaml +++ b/api-spec/paths/roles/_id/getRole.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Roles x-codeSamples: diff --git a/api-spec/paths/roles/_id/updateRole.yaml b/api-spec/paths/roles/_id/updateRole.yaml index fba40f63..dd8040b6 100644 --- a/api-spec/paths/roles/_id/updateRole.yaml +++ b/api-spec/paths/roles/_id/updateRole.yaml @@ -46,6 +46,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Roles x-codeSamples: diff --git a/api-spec/paths/roles/createRoles.yaml b/api-spec/paths/roles/createRoles.yaml index 9e71734e..c839e4f7 100644 --- a/api-spec/paths/roles/createRoles.yaml +++ b/api-spec/paths/roles/createRoles.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Roles x-codeSamples: diff --git a/api-spec/paths/roles/deleteRoles.yaml b/api-spec/paths/roles/deleteRoles.yaml index 0f879829..3ebef4e1 100644 --- a/api-spec/paths/roles/deleteRoles.yaml +++ b/api-spec/paths/roles/deleteRoles.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Roles x-codeSamples: diff --git a/api-spec/paths/roles/getRoles.yaml b/api-spec/paths/roles/getRoles.yaml index d2f73a2e..3337546b 100644 --- a/api-spec/paths/roles/getRoles.yaml +++ b/api-spec/paths/roles/getRoles.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Roles x-codeSamples: diff --git a/api-spec/paths/roles/updateRoles.yaml b/api-spec/paths/roles/updateRoles.yaml index 8a96c29c..d1473595 100644 --- a/api-spec/paths/roles/updateRoles.yaml +++ b/api-spec/paths/roles/updateRoles.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Roles description: Update multiple roles at the same time. +security: [] tags: - Roles operationId: updateRoles diff --git a/api-spec/paths/schema/apply/schemaApply.yaml b/api-spec/paths/schema/apply/schemaApply.yaml index 7d963312..a9b20568 100644 --- a/api-spec/paths/schema/apply/schemaApply.yaml +++ b/api-spec/paths/schema/apply/schemaApply.yaml @@ -24,6 +24,7 @@ responses: description: Successful request '403': $ref: ../../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Schema x-codeSamples: diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index 3de855a1..e5422481 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -38,6 +38,7 @@ responses: description: No schema difference. '403': $ref: ../../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Schema x-codeSamples: diff --git a/api-spec/paths/schema/snapshot/schemaSnapshot.yaml b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml index 6fc23786..c01fda73 100644 --- a/api-spec/paths/schema/snapshot/schemaSnapshot.yaml +++ b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml @@ -20,6 +20,7 @@ responses: format: binary '403': $ref: ../../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Schema x-codeSamples: diff --git a/api-spec/paths/server/health/serverHealth.yaml b/api-spec/paths/server/health/serverHealth.yaml index 763e3777..994a1d2a 100644 --- a/api-spec/paths/server/health/serverHealth.yaml +++ b/api-spec/paths/server/health/serverHealth.yaml @@ -25,6 +25,7 @@ responses: checks: description: Array with the status of all individually connected services. type: array +security: [] tags: - Server x-codeSamples: diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml index 04ad3c2c..06ab135c 100644 --- a/api-spec/paths/server/info/serverInfo.yaml +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Server x-codeSamples: diff --git a/api-spec/paths/server/ping/ping.yaml b/api-spec/paths/server/ping/ping.yaml index e16057f4..146c3929 100644 --- a/api-spec/paths/server/ping/ping.yaml +++ b/api-spec/paths/server/ping/ping.yaml @@ -10,6 +10,7 @@ responses: pattern: pong example: pong description: Successful request +security: [] tags: - Server x-codeSamples: @@ -17,15 +18,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, serverPing } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(serverPing()); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Query { server_ping: String - } \ No newline at end of file + } diff --git a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml index 2ff78bf1..b1d8f16d 100644 --- a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml +++ b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Server x-codeSamples: diff --git a/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml index 0de09e4f..8d74f1bc 100644 --- a/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml +++ b/api-spec/paths/server/specs/oas/readOpenApiSpec.yaml @@ -13,6 +13,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Server x-codeSamples: diff --git a/api-spec/paths/settings/getSettings.yaml b/api-spec/paths/settings/getSettings.yaml index d8dffdb3..964e1950 100644 --- a/api-spec/paths/settings/getSettings.yaml +++ b/api-spec/paths/settings/getSettings.yaml @@ -20,6 +20,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Settings x-codeSamples: diff --git a/api-spec/paths/settings/updateSettings.yaml b/api-spec/paths/settings/updateSettings.yaml index 9d33f2e6..8f7e8039 100644 --- a/api-spec/paths/settings/updateSettings.yaml +++ b/api-spec/paths/settings/updateSettings.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Settings x-codeSamples: diff --git a/api-spec/paths/shares/_id/deleteShare.yaml b/api-spec/paths/shares/_id/deleteShare.yaml index f3cbe545..9bb5095f 100644 --- a/api-spec/paths/shares/_id/deleteShare.yaml +++ b/api-spec/paths/shares/_id/deleteShare.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/_id/getShare.yaml b/api-spec/paths/shares/_id/getShare.yaml index 2327bd29..d4e47f72 100644 --- a/api-spec/paths/shares/_id/getShare.yaml +++ b/api-spec/paths/shares/_id/getShare.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/_id/updateShare.yaml b/api-spec/paths/shares/_id/updateShare.yaml index ec68b72c..cb8e072c 100644 --- a/api-spec/paths/shares/_id/updateShare.yaml +++ b/api-spec/paths/shares/_id/updateShare.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/auth/authenticateShare.yaml b/api-spec/paths/shares/auth/authenticateShare.yaml index 9841eff0..fd522ed2 100644 --- a/api-spec/paths/shares/auth/authenticateShare.yaml +++ b/api-spec/paths/shares/auth/authenticateShare.yaml @@ -55,6 +55,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/createShares.yaml b/api-spec/paths/shares/createShares.yaml index 640e4bdf..b55f2bc1 100644 --- a/api-spec/paths/shares/createShares.yaml +++ b/api-spec/paths/shares/createShares.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/deleteShares.yaml b/api-spec/paths/shares/deleteShares.yaml index 4f0c82b1..360ac86b 100644 --- a/api-spec/paths/shares/deleteShares.yaml +++ b/api-spec/paths/shares/deleteShares.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/getShares.yaml b/api-spec/paths/shares/getShares.yaml index b0b51b0f..aec2fd17 100644 --- a/api-spec/paths/shares/getShares.yaml +++ b/api-spec/paths/shares/getShares.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/info/_id/getShareInfo.yaml b/api-spec/paths/shares/info/_id/getShareInfo.yaml index 76e6f66e..01f0c9d1 100644 --- a/api-spec/paths/shares/info/_id/getShareInfo.yaml +++ b/api-spec/paths/shares/info/_id/getShareInfo.yaml @@ -22,6 +22,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/invite/inviteShare.yaml b/api-spec/paths/shares/invite/inviteShare.yaml index 5e5667f3..3934802b 100644 --- a/api-spec/paths/shares/invite/inviteShare.yaml +++ b/api-spec/paths/shares/invite/inviteShare.yaml @@ -23,6 +23,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/shares/updateShares.yaml b/api-spec/paths/shares/updateShares.yaml index fa411047..474387be 100644 --- a/api-spec/paths/shares/updateShares.yaml +++ b/api-spec/paths/shares/updateShares.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Shares x-codeSamples: diff --git a/api-spec/paths/translations/_id/deleteTranslation.yaml b/api-spec/paths/translations/_id/deleteTranslation.yaml index 003ed1e8..f3fe74ac 100644 --- a/api-spec/paths/translations/_id/deleteTranslation.yaml +++ b/api-spec/paths/translations/_id/deleteTranslation.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/_id/getTranslation.yaml b/api-spec/paths/translations/_id/getTranslation.yaml index 34b244d8..1aeb4be5 100644 --- a/api-spec/paths/translations/_id/getTranslation.yaml +++ b/api-spec/paths/translations/_id/getTranslation.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/_id/updateTranslation.yaml b/api-spec/paths/translations/_id/updateTranslation.yaml index ebfb971a..3f6725a0 100644 --- a/api-spec/paths/translations/_id/updateTranslation.yaml +++ b/api-spec/paths/translations/_id/updateTranslation.yaml @@ -30,6 +30,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/createTranslations.yaml b/api-spec/paths/translations/createTranslations.yaml index 804a533d..151bbd1d 100644 --- a/api-spec/paths/translations/createTranslations.yaml +++ b/api-spec/paths/translations/createTranslations.yaml @@ -37,6 +37,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/deleteTranslations.yaml b/api-spec/paths/translations/deleteTranslations.yaml index 05681c17..9bdbabb9 100644 --- a/api-spec/paths/translations/deleteTranslations.yaml +++ b/api-spec/paths/translations/deleteTranslations.yaml @@ -21,6 +21,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/getTranslations.yaml b/api-spec/paths/translations/getTranslations.yaml index 2c0ba72e..884cf5a6 100644 --- a/api-spec/paths/translations/getTranslations.yaml +++ b/api-spec/paths/translations/getTranslations.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/translations/updateTranslations.yaml b/api-spec/paths/translations/updateTranslations.yaml index 22cef0a0..00c5b4e3 100644 --- a/api-spec/paths/translations/updateTranslations.yaml +++ b/api-spec/paths/translations/updateTranslations.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Translations x-codeSamples: diff --git a/api-spec/paths/users/_id/deleteUser.yaml b/api-spec/paths/users/_id/deleteUser.yaml index 90b69cf4..92d95c51 100644 --- a/api-spec/paths/users/_id/deleteUser.yaml +++ b/api-spec/paths/users/_id/deleteUser.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users parameters: diff --git a/api-spec/paths/users/_id/getUser.yaml b/api-spec/paths/users/_id/getUser.yaml index 7a47de7d..6b4568ac 100644 --- a/api-spec/paths/users/_id/getUser.yaml +++ b/api-spec/paths/users/_id/getUser.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/_id/updateUser.yaml b/api-spec/paths/users/_id/updateUser.yaml index c97f64f1..7beeaa68 100644 --- a/api-spec/paths/users/_id/updateUser.yaml +++ b/api-spec/paths/users/_id/updateUser.yaml @@ -24,6 +24,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/createUsers.yaml b/api-spec/paths/users/createUsers.yaml index 1d8279ee..4da440d2 100644 --- a/api-spec/paths/users/createUsers.yaml +++ b/api-spec/paths/users/createUsers.yaml @@ -41,6 +41,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/deleteUsers.yaml b/api-spec/paths/users/deleteUsers.yaml index 2e1b28d0..49a4b8cb 100644 --- a/api-spec/paths/users/deleteUsers.yaml +++ b/api-spec/paths/users/deleteUsers.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/getUsers.yaml b/api-spec/paths/users/getUsers.yaml index f9862c12..0a5b0073 100644 --- a/api-spec/paths/users/getUsers.yaml +++ b/api-spec/paths/users/getUsers.yaml @@ -27,6 +27,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/invite/accept/acceptInvite.yaml b/api-spec/paths/users/invite/accept/acceptInvite.yaml index 5c7a1f28..0b30ff53 100644 --- a/api-spec/paths/users/invite/accept/acceptInvite.yaml +++ b/api-spec/paths/users/invite/accept/acceptInvite.yaml @@ -31,6 +31,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/invite/invite.yaml b/api-spec/paths/users/invite/invite.yaml index 3920ccd2..af4d6077 100644 --- a/api-spec/paths/users/invite/invite.yaml +++ b/api-spec/paths/users/invite/invite.yaml @@ -40,6 +40,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/me/getMe.yaml b/api-spec/paths/users/me/getMe.yaml index b867575a..8bd3a52e 100644 --- a/api-spec/paths/users/me/getMe.yaml +++ b/api-spec/paths/users/me/getMe.yaml @@ -18,6 +18,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml index 5d2daa9e..9c8027d0 100644 --- a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml +++ b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml index 5bebdf31..37a765c6 100644 --- a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml +++ b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml @@ -29,6 +29,7 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml index 54d2f910..6a10c45e 100644 --- a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml +++ b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml index 01f99c68..6270ddef 100644 --- a/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml +++ b/api-spec/paths/users/me/track/page/updateLastUsedPageMe.yaml @@ -19,5 +19,6 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users diff --git a/api-spec/paths/users/me/updateMe.yaml b/api-spec/paths/users/me/updateMe.yaml index 11dd7baa..fdc767e4 100644 --- a/api-spec/paths/users/me/updateMe.yaml +++ b/api-spec/paths/users/me/updateMe.yaml @@ -18,6 +18,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/register/registerUser.yaml b/api-spec/paths/users/register/registerUser.yaml index 649465e7..7151ddb8 100644 --- a/api-spec/paths/users/register/registerUser.yaml +++ b/api-spec/paths/users/register/registerUser.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml b/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml index f7f84a28..245d62d6 100644 --- a/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml +++ b/api-spec/paths/users/register/verify-email/_token/registerUserVerify.yaml @@ -15,6 +15,7 @@ responses: $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Users x-codeSamples: diff --git a/api-spec/paths/users/updateUsers.yaml b/api-spec/paths/users/updateUsers.yaml index a7f64d13..76bf3d2c 100644 --- a/api-spec/paths/users/updateUsers.yaml +++ b/api-spec/paths/users/updateUsers.yaml @@ -1,5 +1,6 @@ summary: Update Multiple Users description: Update multiple users at the same time. +security: [] tags: - Users operationId: updateUsers diff --git a/api-spec/paths/utils/cache/clear/clear-cache.yaml b/api-spec/paths/utils/cache/clear/clear-cache.yaml index 8f598a28..567d3b2a 100644 --- a/api-spec/paths/utils/cache/clear/clear-cache.yaml +++ b/api-spec/paths/utils/cache/clear/clear-cache.yaml @@ -4,6 +4,7 @@ operationId: clear-cache responses: '200': description: Successful request +security: [] tags: - Utilities x-codeSamples: diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index 5f1c841c..09296989 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -31,6 +31,7 @@ requestBody: responses: '200': description: Successful request +security: [] tags: - Utilities x-codeSamples: diff --git a/api-spec/paths/utils/hash/generate/hash-generate.yaml b/api-spec/paths/utils/hash/generate/hash-generate.yaml index aa3545bc..c19ce7b7 100644 --- a/api-spec/paths/utils/hash/generate/hash-generate.yaml +++ b/api-spec/paths/utils/hash/generate/hash-generate.yaml @@ -20,9 +20,10 @@ responses: properties: data: type: string - example: + example: $argon2i$v=19$m=4096,t=3,p=1$pOyIa/zmRAjCVLb2f7kOyg$DasoO6LzMM+6iKfzCDq6JbsYsZWLSm33p7i9NxL9mDc description: Successful request +security: [] tags: - Utilities x-codeSamples: @@ -30,15 +31,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, generateHash } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(generateHash(string_to_hash)); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Mutation { utils_hash_generate(string: String!): String } diff --git a/api-spec/paths/utils/hash/verify/hash-verify.yaml b/api-spec/paths/utils/hash/verify/hash-verify.yaml index 2960bc0b..1e10e838 100644 --- a/api-spec/paths/utils/hash/verify/hash-verify.yaml +++ b/api-spec/paths/utils/hash/verify/hash-verify.yaml @@ -26,6 +26,7 @@ responses: type: boolean example: true description: Successful request +security: [] tags: - Utilities x-codeSamples: @@ -33,15 +34,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, verifyHash } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(verifyHash(string_to_verify, hash)); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Mutation { utils_hash_verify(hash: String!, string: String!): Boolean - } \ No newline at end of file + } diff --git a/api-spec/paths/utils/import/_collection/import.yaml b/api-spec/paths/utils/import/_collection/import.yaml index c1db08ba..477cb4d0 100644 --- a/api-spec/paths/utils/import/_collection/import.yaml +++ b/api-spec/paths/utils/import/_collection/import.yaml @@ -1,4 +1,4 @@ -summary: Import Data from File +summary: Import Data from File description: Import multiple records from a JSON or CSV file into a collection. operationId: import parameters: @@ -20,6 +20,7 @@ requestBody: responses: '200': description: Successful request +security: [] tags: - Utilities x-codeSamples: @@ -27,14 +28,14 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, utilsImport } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const formData = new FormData(); formData.append('file', raw_file); - + const result = await client.request(utilsImport(formData)); - label: GraphQL lang: GraphQL source: | - // Not currently available in GraphQL \ No newline at end of file + // Not currently available in GraphQL diff --git a/api-spec/paths/utils/random/string/random.yaml b/api-spec/paths/utils/random/string/random.yaml index 64ecef67..1a8bffe0 100644 --- a/api-spec/paths/utils/random/string/random.yaml +++ b/api-spec/paths/utils/random/string/random.yaml @@ -19,6 +19,7 @@ responses: type: string example: 1>M3+4oh.S description: Successful request +security: [] tags: - Utilities x-codeSamples: @@ -26,15 +27,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, randomString } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(randomString(length)); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Mutation { utils_random_string(length: Int): String - } \ No newline at end of file + } diff --git a/api-spec/paths/utils/sort/_collection/sort.yaml b/api-spec/paths/utils/sort/_collection/sort.yaml index 4370ec0f..840cdbca 100644 --- a/api-spec/paths/utils/sort/_collection/sort.yaml +++ b/api-spec/paths/utils/sort/_collection/sort.yaml @@ -1,4 +1,4 @@ -summary: Manually Sort Items in Collection +summary: Manually Sort Items in Collection description: Re-sort items in collection based on start and to value of item operationId: sort parameters: @@ -22,6 +22,7 @@ requestBody: responses: '200': description: Successful request +security: [] tags: - Utilities x-codeSamples: @@ -29,15 +30,15 @@ x-codeSamples: lang: JavaScript source: | import { createDirectus, rest, utilitySort } from '@directus/sdk'; - + const client = createDirectus('directus_project_url').with(rest()); - + const result = await client.request(utilitySort(collection_name, id_item_to_move, id_item_moving_to)); - label: GraphQL lang: GraphQL source: | POST /graphql/system - + type Mutation { utils_sort(collection: String!, item: ID!, to: ID!): Boolean - } \ No newline at end of file + } diff --git a/api-spec/paths/versions/_id/compare/compareContentVersion.yaml b/api-spec/paths/versions/_id/compare/compareContentVersion.yaml index 0a8ff045..aaeaf726 100644 --- a/api-spec/paths/versions/_id/compare/compareContentVersion.yaml +++ b/api-spec/paths/versions/_id/compare/compareContentVersion.yaml @@ -17,6 +17,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/_id/deleteContentVersion.yaml b/api-spec/paths/versions/_id/deleteContentVersion.yaml index 63b17391..02deffb3 100644 --- a/api-spec/paths/versions/_id/deleteContentVersion.yaml +++ b/api-spec/paths/versions/_id/deleteContentVersion.yaml @@ -8,6 +8,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions parameters: diff --git a/api-spec/paths/versions/_id/getContentVersion.yaml b/api-spec/paths/versions/_id/getContentVersion.yaml index 8d816fb7..39114142 100644 --- a/api-spec/paths/versions/_id/getContentVersion.yaml +++ b/api-spec/paths/versions/_id/getContentVersion.yaml @@ -19,6 +19,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml index 1ad99b82..f7b52845 100644 --- a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml +++ b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml @@ -28,6 +28,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml index dfd662a0..5fd21bf0 100644 --- a/api-spec/paths/versions/_id/save/saveContentVersion.yaml +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -23,6 +23,7 @@ responses: $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/_id/updateContentVersion.yaml b/api-spec/paths/versions/_id/updateContentVersion.yaml index 1ea614e0..9a27b6e4 100644 --- a/api-spec/paths/versions/_id/updateContentVersion.yaml +++ b/api-spec/paths/versions/_id/updateContentVersion.yaml @@ -25,6 +25,7 @@ responses: $ref: ../../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/createContentVersions.yaml b/api-spec/paths/versions/createContentVersions.yaml index 1ba5b358..39bc7185 100644 --- a/api-spec/paths/versions/createContentVersions.yaml +++ b/api-spec/paths/versions/createContentVersions.yaml @@ -35,6 +35,7 @@ responses: $ref: ../../components/schemas/x-metadata.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/deleteContentVersions.yaml b/api-spec/paths/versions/deleteContentVersions.yaml index b306d945..7a416230 100644 --- a/api-spec/paths/versions/deleteContentVersions.yaml +++ b/api-spec/paths/versions/deleteContentVersions.yaml @@ -14,6 +14,7 @@ responses: description: The resource was deleted successfully. '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/getContentVersions.yaml b/api-spec/paths/versions/getContentVersions.yaml index cfcd5d59..d0db6ca0 100644 --- a/api-spec/paths/versions/getContentVersions.yaml +++ b/api-spec/paths/versions/getContentVersions.yaml @@ -27,6 +27,7 @@ responses: $ref: ../../components/responses.yaml#/UnauthorizedError '404': $ref: ../../components/responses.yaml#/NotFoundError +security: [] tags: - Versions x-codeSamples: diff --git a/api-spec/paths/versions/updateContentVersions.yaml b/api-spec/paths/versions/updateContentVersions.yaml index b15de2b8..1d27d3ec 100644 --- a/api-spec/paths/versions/updateContentVersions.yaml +++ b/api-spec/paths/versions/updateContentVersions.yaml @@ -38,6 +38,7 @@ responses: $ref: ../../components/schemas/x-metadata.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError +security: [] tags: - Versions x-codeSamples: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fae79e48..c680fba6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10676,8 +10676,10 @@ snapshots: '@vue/babel-helper-vue-transform-on': 1.2.2 '@vue/babel-plugin-resolve-type': 1.2.2(@babel/core@7.25.2) camelcase: 6.3.0 - html-tags: 3.3.1 - svg-tags: 1.0.0 + html-security: [] +tags: 3.3.1 + svg-security: [] +tags: 1.0.0 optionalDependencies: '@babel/core': 7.25.2 transitivePeerDependencies: From d8c59e7d8b2cb2c25b6d0fc80e26971d696a0dce Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Mon, 9 Dec 2024 13:20:28 +0100 Subject: [PATCH 088/119] Fix linting errors --- api-spec/components/schemas/fields.yaml | 8 ++--- api-spec/components/schemas/files.yaml | 3 +- api-spec/components/schemas/users.yaml | 5 ++- api-spec/paths/activity/getActivities.yaml | 1 - .../paths/operations/createOperations.yaml | 1 - api-spec/paths/presets/_id/deletePreset.yaml | 2 -- api-spec/paths/presets/_id/getPreset.yaml | 2 -- api-spec/paths/presets/getPresets.yaml | 2 -- .../paths/server/health/serverHealth.yaml | 31 +++++++++---------- .../tfa/generate/generateTwoFactorSecret.yaml | 4 +-- .../paths/users/register/registerUser.yaml | 2 +- 11 files changed, 24 insertions(+), 37 deletions(-) diff --git a/api-spec/components/schemas/fields.yaml b/api-spec/components/schemas/fields.yaml index 242498c6..68c62678 100644 --- a/api-spec/components/schemas/fields.yaml +++ b/api-spec/components/schemas/fields.yaml @@ -46,8 +46,8 @@ properties: note: nullable: true type: string - conditions: - nullable: true + # conditions: + # nullable: true required: nullable: true type: boolean @@ -56,8 +56,8 @@ properties: type: integer oneOf: - $ref: fields.yaml - validation: - nullable: true + # validation: + # nullable: true validation_message: nullable: true type: string diff --git a/api-spec/components/schemas/files.yaml b/api-spec/components/schemas/files.yaml index c0168bb2..de1f4edc 100644 --- a/api-spec/components/schemas/files.yaml +++ b/api-spec/components/schemas/files.yaml @@ -90,8 +90,7 @@ properties: description: Where the file was created. Is automatically populated based on Exif data for images. type: string nullable: true - security: [] -tags: + tags: description: Tags for the file. Is automatically populated based on Exif data for images. type: array nullable: true diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index 2ffd3642..849ad127 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -20,7 +20,7 @@ properties: password: description: Password of the user. type: string - format: hash + format: string location: description: The user's location. example: null @@ -36,8 +36,7 @@ properties: example: null type: string nullable: true - security: [] -tags: + tags: description: The user's tags. example: null type: array diff --git a/api-spec/paths/activity/getActivities.yaml b/api-spec/paths/activity/getActivities.yaml index 136f3980..72e25d4c 100644 --- a/api-spec/paths/activity/getActivities.yaml +++ b/api-spec/paths/activity/getActivities.yaml @@ -28,7 +28,6 @@ responses: '404': $ref: ../../components/responses.yaml#/NotFoundError security: [] -security: [] tags: - Activity x-codeSamples: diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml index 94a623e4..dab3d08d 100644 --- a/api-spec/paths/operations/createOperations.yaml +++ b/api-spec/paths/operations/createOperations.yaml @@ -3,7 +3,6 @@ summary: Create Multiple Operations description: Create multiple new operations. operationId: createOperations parameters: -- $ref: ../../components/parameters.yaml#/Collection - $ref: ../../components/parameters.yaml#/Fields - $ref: ../../components/parameters.yaml#/Limit - $ref: ../../components/parameters.yaml#/Meta diff --git a/api-spec/paths/presets/_id/deletePreset.yaml b/api-spec/paths/presets/_id/deletePreset.yaml index acb8e83f..a21a30ca 100644 --- a/api-spec/paths/presets/_id/deletePreset.yaml +++ b/api-spec/paths/presets/_id/deletePreset.yaml @@ -4,8 +4,6 @@ tags: - Presets operationId: deletePreset description: Delete an existing preset. -security: -- Auth: [] responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/presets/_id/getPreset.yaml b/api-spec/paths/presets/_id/getPreset.yaml index da5cf280..507ce5d8 100644 --- a/api-spec/paths/presets/_id/getPreset.yaml +++ b/api-spec/paths/presets/_id/getPreset.yaml @@ -4,8 +4,6 @@ tags: - Presets operationId: getPreset description: Retrieve a single preset by unique identifier. -security: -- Auth: [] parameters: - $ref: ../../../components/parameters.yaml#/Id - $ref: ../../../components/parameters.yaml#/Fields diff --git a/api-spec/paths/presets/getPresets.yaml b/api-spec/paths/presets/getPresets.yaml index c719f340..0994a7a2 100644 --- a/api-spec/paths/presets/getPresets.yaml +++ b/api-spec/paths/presets/getPresets.yaml @@ -4,8 +4,6 @@ tags: - Presets operationId: getPresets description: List all presets that exist in Directus. The data returned in this endpoint will be filtered based on the user's permissions. For example, presets for a role other than the current user's role won't be returned. -security: -- Auth: [] parameters: - $ref: ../../components/parameters.yaml#/Fields - $ref: ../../components/parameters.yaml#/Limit diff --git a/api-spec/paths/server/health/serverHealth.yaml b/api-spec/paths/server/health/serverHealth.yaml index 994a1d2a..315df60a 100644 --- a/api-spec/paths/server/health/serverHealth.yaml +++ b/api-spec/paths/server/health/serverHealth.yaml @@ -9,22 +9,21 @@ responses: schema: type: object properties: - items: - status: - description: One of ok, warn, error. - type: string - example: warn - releaseId: - description: Directus version in use. - type: string - example: '10.0.0' - serviceId: - description: Public URL of the current Directus instance. - type: string - example: https://directus.example.com - checks: - description: Array with the status of all individually connected services. - type: array + status: + description: One of ok, warn, error. + type: string + example: warn + releaseId: + description: Directus version in use. + type: string + example: '10.0.0' + serviceId: + description: Public URL of the current Directus instance. + type: string + example: https://directus.example.com + checks: + description: Array with the status of all individually connected services. + type: array security: [] tags: - Server diff --git a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml index 6a10c45e..987f5c4a 100644 --- a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml +++ b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml @@ -5,11 +5,9 @@ requestBody: content: application/json: schema: - type: object + type: string required: - password - properties: - $ref: ../../../../../components/schemas/users.yaml#/properties/password responses: '200': description: Successful request diff --git a/api-spec/paths/users/register/registerUser.yaml b/api-spec/paths/users/register/registerUser.yaml index 7151ddb8..ad0e880a 100644 --- a/api-spec/paths/users/register/registerUser.yaml +++ b/api-spec/paths/users/register/registerUser.yaml @@ -13,7 +13,7 @@ requestBody: - email - password anyOf: - $ref: ../../../components/schemas/users.yaml + - $ref: ../../../components/schemas/users.yaml properties: verification_url: type: string From 6f5759f3ad868decb2d443090cb6da53d7dc06c3 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Mon, 9 Dec 2024 15:17:37 +0100 Subject: [PATCH 089/119] Fix auth params --- api-spec/paths/auth/oauth/_provider/oauthProvider.yaml | 2 +- api-spec/paths/auth/password/request/passwordRequest.yaml | 3 +++ api-spec/paths/auth/password/reset/passwordReset.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml index e26062ad..824227d7 100644 --- a/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml +++ b/api-spec/paths/auth/oauth/_provider/oauthProvider.yaml @@ -1,4 +1,4 @@ -summary: Log in Using an OAuth Provider +summary: Login Using an OAuth Provider description: Start OAuth flow using the specified provider. operationId: oauthProvider parameters: diff --git a/api-spec/paths/auth/password/request/passwordRequest.yaml b/api-spec/paths/auth/password/request/passwordRequest.yaml index a560021b..7bfa2e73 100644 --- a/api-spec/paths/auth/password/request/passwordRequest.yaml +++ b/api-spec/paths/auth/password/request/passwordRequest.yaml @@ -13,6 +13,9 @@ requestBody: type: string example: admin@example.com description: Email address of the user you're requesting a reset for. + reset_url: + type: string + description: Provide a custom reset url which the link in the email will lead to. The reset token will be passed as a parameter. You need to configure the `PASSWORD_RESET_URL_ALLOW_LIST` environment variable to enable this feature. responses: '204': description: Successful request, empty body diff --git a/api-spec/paths/auth/password/reset/passwordReset.yaml b/api-spec/paths/auth/password/reset/passwordReset.yaml index 1a381d15..95d6958a 100644 --- a/api-spec/paths/auth/password/reset/passwordReset.yaml +++ b/api-spec/paths/auth/password/reset/passwordReset.yaml @@ -14,7 +14,7 @@ requestBody: token: type: string example: eyJ0eXAiOiJKV1Qi... - description: One-time use JWT token that is used to verify the user. + description: One-time use JWT token that is used to verify the user, as provided in the email sent by the request endpoint. password: type: string example: password From e5a41f43b10749ee2016c861a513ff1678b9220c Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Mon, 9 Dec 2024 16:02:07 +0100 Subject: [PATCH 090/119] Fix code samples/descriptions --- api-spec/paths/schema/apply/schemaApply.yaml | 153 +++++++++++++++++++ api-spec/paths/schema/diff/schemaDiff.yaml | 7 +- 2 files changed, 159 insertions(+), 1 deletion(-) diff --git a/api-spec/paths/schema/apply/schemaApply.yaml b/api-spec/paths/schema/apply/schemaApply.yaml index a9b20568..05af7355 100644 --- a/api-spec/paths/schema/apply/schemaApply.yaml +++ b/api-spec/paths/schema/apply/schemaApply.yaml @@ -31,6 +31,159 @@ x-codeSamples: - label: Directus SDK lang: JavaScript source: | + import { createDirectus, rest, schemaApply } from '@directus/sdk'; + + const client = createDirectus('https://directus.example.com').with(rest()); + + const result = await client.request( + schemaApply({ + hash: '7d4499bc1e09bab3558b46cc09cd83fea2c05144', + diff: { + collections: [ + { + collection: 'articles', + diff: [ + { + kind: 'N', + rhs: { + collection: 'articles', + meta: { + accountability: 'all', + archive_app_filter: true, + archive_field: null, + archive_value: null, + collapse: 'open', + collection: 'articles', + color: null, + display_template: null, + group: null, + hidden: false, + icon: null, + item_duplication_fields: null, + note: null, + singleton: false, + sort: null, + sort_field: null, + translations: null, + unarchive_value: null, + }, + schema: { + name: 'articles', + }, + }, + }, + ], + }, + ], + fields: [ + { + collection: 'articles', + field: 'id', + diff: [ + { + kind: 'N', + rhs: { + collection: 'articles', + field: 'id', + type: 'integer', + meta: { + collection: 'articles', + conditions: null, + display: null, + display_options: null, + field: 'id', + group: null, + hidden: true, + interface: 'input', + note: null, + options: null, + readonly: true, + required: false, + sort: null, + special: null, + translations: null, + validation: null, + validation_message: null, + width: 'full', + }, + schema: { + name: 'id', + table: 'articles', + data_type: 'integer', + default_value: null, + max_length: null, + numeric_precision: null, + numeric_scale: null, + is_nullable: false, + is_unique: false, + is_primary_key: true, + is_generated: false, + generation_expression: null, + has_auto_increment: true, + foreign_key_table: null, + foreign_key_column: null, + }, + }, + }, + ], + }, + { + collection: 'articles', + field: 'title', + diff: [ + { + kind: 'N', + rhs: { + collection: 'articles', + field: 'title', + type: 'string', + meta: { + collection: 'articles', + conditions: null, + display: null, + display_options: null, + field: 'title', + group: null, + hidden: false, + interface: 'input', + note: null, + options: null, + readonly: false, + required: false, + sort: null, + special: null, + translations: null, + validation: null, + validation_message: null, + width: 'full', + }, + schema: { + name: 'title', + table: 'articles', + data_type: 'varchar', + default_value: null, + max_length: 255, + numeric_precision: null, + numeric_scale: null, + is_nullable: true, + is_unique: false, + is_primary_key: false, + is_generated: false, + generation_expression: null, + has_auto_increment: false, + foreign_key_table: null, + foreign_key_column: null, + }, + }, + }, + ], + }, + ], + relations: [], + }, + }) + ); - label: GraphQL lang: GraphQL source: | + // Not supported in GraphQL diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index e5422481..ba669d3f 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -1,5 +1,10 @@ summary: Retrieve Schema Difference -description: Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. Alternatively, upload a JSON or YAML schema file. Relies on a `multipart/form-data` encoded request like regular file uploads. This endpoint does not allow different Directus versions and database vendors by default. This is to avoid any unintentional diffs from being generated. You can opt in to bypass these checks by passing the `force` query parameter. +description: | + Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. + + Alternatively, upload a JSON or YAML schema file. + + Does not allow different Directus versions and database vendors by default. You can opt in to bypass these checks by passing the `force` query parameter. operationId: schemaDiff parameters: - name: force From 2db0b7e5942ca6fae09ed81a3d20173d17103910 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Mon, 9 Dec 2024 16:30:20 +0100 Subject: [PATCH 091/119] Fix server spec --- api-spec/paths/server/health/serverHealth.yaml | 9 +++++++-- api-spec/paths/server/info/serverInfo.yaml | 2 +- api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api-spec/paths/server/health/serverHealth.yaml b/api-spec/paths/server/health/serverHealth.yaml index 315df60a..abfba648 100644 --- a/api-spec/paths/server/health/serverHealth.yaml +++ b/api-spec/paths/server/health/serverHealth.yaml @@ -1,5 +1,10 @@ summary: Health -description: 'The /server/health endpoint shows you a general health status for the server and all connected (third party) services, such as Redis or S3. The output is based on the "Health Check Response for HTTP APIs" draft spec: Health Check Response Format for HTTP APIs Draft Specification. This endpoint can be used to ensure a healthy system when running in a horizontally scaled setup, like Kubernetes, Google Cloud Platform or AWS Elastic Beanstalk. By default, the endpoint only returns a status of ok, warn or error. By authenticating as an admin, it will return more in-depth information about the current health status of the system.' +description: | + Shows you a general health status for the server and all connected (third party) services. + + By default, the endpoint only returns a status of ok, warn or error. + + By authenticating as an admin, it will return more in-depth information about the current health status of the system. operationId: serverHealth responses: '200': @@ -39,7 +44,7 @@ x-codeSamples: - label: GraphQL lang: GraphQL source: | - POST /graphql/system + GET /graphql/system type Query { server_health: JSON diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml index 06ab135c..60c5a9e1 100644 --- a/api-spec/paths/server/info/serverInfo.yaml +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -39,7 +39,7 @@ x-codeSamples: - label: GraphQL lang: GraphQL source: | - POST /graphql/system + GET /graphql/system type Query { server_info: server_info diff --git a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml index b1d8f16d..f0748edf 100644 --- a/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml +++ b/api-spec/paths/server/specs/graphql/readGraphqlSdl.yaml @@ -23,7 +23,7 @@ x-codeSamples: - label: GraphQL lang: GraphQL source: | - POST /graphql/system + GET /graphql/system type Query { server_specs_graphql(scope: graphql_sdl_scope): String From 843462136fe362c28e5c3622ef72474da01224e2 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 15:16:50 +0100 Subject: [PATCH 092/119] Mark params as required --- api-spec/paths/folders/updateFolders.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/folders/updateFolders.yaml b/api-spec/paths/folders/updateFolders.yaml index 359a2812..60f43419 100644 --- a/api-spec/paths/folders/updateFolders.yaml +++ b/api-spec/paths/folders/updateFolders.yaml @@ -1,5 +1,8 @@ summary: Update Multiple Folders -description: Update multiple folders at the same time. +description: | + Update multiple folders at the same time. + + Any files in these folders will be moved to the root folder. security: [] tags: - Folders @@ -17,6 +20,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: type: object @@ -30,7 +36,7 @@ requestBody: description: Unique identifier of the parent folder. This allows for nested folders. required: - - name + - name keys: type: array items: From c5cce768f1e0f2ce83b9c950272fef8aef1cb2d8 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 15:21:49 +0100 Subject: [PATCH 093/119] Add description --- api-spec/paths/relations/getRelations.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api-spec/paths/relations/getRelations.yaml b/api-spec/paths/relations/getRelations.yaml index 8b8a6edc..bb7c559a 100644 --- a/api-spec/paths/relations/getRelations.yaml +++ b/api-spec/paths/relations/getRelations.yaml @@ -1,5 +1,8 @@ summary: List Relations -description: List all relations that exist in Directus. +description: | + List all relations that exist in Directus. + + The data returned in this endpoint will be filtered based on the user's permissions. For example, relations that apply to a collection that the current user doesn't have access to are stripped out. operationId: getRelations parameters: - $ref: ../../components/parameters.yaml#/Fields From 0e3e78a80e3ba150f58f9fe127b451dd4ec72dc6 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 15:32:07 +0100 Subject: [PATCH 094/119] Update required fields --- api-spec/paths/files/updateFiles.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api-spec/paths/files/updateFiles.yaml b/api-spec/paths/files/updateFiles.yaml index 5fba6b39..c72a6600 100644 --- a/api-spec/paths/files/updateFiles.yaml +++ b/api-spec/paths/files/updateFiles.yaml @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: type: object From 0e0e1b2257845ab4abe4ca471be91ee7665be6e1 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 15:57:17 +0100 Subject: [PATCH 095/119] Fix operation params --- api-spec/paths/operations/_id/getOperation.yaml | 7 +++++++ api-spec/paths/operations/getOperations.yaml | 9 +++++++++ api-spec/paths/operations/updateOperations.yaml | 3 +++ 3 files changed, 19 insertions(+) diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml index 669d4df3..bc9db438 100644 --- a/api-spec/paths/operations/_id/getOperation.yaml +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -3,6 +3,13 @@ description: Retrieve a single operation by primary key. operationId: getOperation parameters: - $ref: ../../../components/parameters.yaml#/UUId + - $ref: ../../../components/parameters.yaml#/Fields + - $ref: ../../../components/parameters.yaml#/Limit + - $ref: ../../../components/parameters.yaml#/Meta + - $ref: ../../../components/parameters.yaml#/Offset + - $ref: ../../../components/parameters.yaml#/Sort + - $ref: ../../../components/parameters.yaml#/Filter + - $ref: ../../../components/parameters.yaml#/Search responses: '200': description: Successful request diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml index 3d461b5f..4dc93136 100644 --- a/api-spec/paths/operations/getOperations.yaml +++ b/api-spec/paths/operations/getOperations.yaml @@ -1,6 +1,15 @@ summary: List Operations description: List all operations that exist in Directus. operationId: getOperations +parameters: + - $ref: ../../components/parameters.yaml#/Fields + - $ref: ../../components/parameters.yaml#/Limit + - $ref: ../../components/parameters.yaml#/Offset + - $ref: ../../components/parameters.yaml#/Meta + - $ref: ../../components/parameters.yaml#/Sort + - $ref: ../../components/parameters.yaml#/Filter + - $ref: ../../components/parameters.yaml#/Search + - $ref: ../../components/parameters.yaml#/Page responses: '200': description: Successful request diff --git a/api-spec/paths/operations/updateOperations.yaml b/api-spec/paths/operations/updateOperations.yaml index 02422054..49713c5d 100644 --- a/api-spec/paths/operations/updateOperations.yaml +++ b/api-spec/paths/operations/updateOperations.yaml @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: anyOf: From bb8e7e53ace29b55baf8a09e3368ff589dca28f4 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 16:29:06 +0100 Subject: [PATCH 096/119] Fix content version params --- .../paths/versions/_id/promote/promoteContentVersion.yaml | 4 ++-- api-spec/paths/versions/_id/save/saveContentVersion.yaml | 6 ------ api-spec/paths/versions/updateContentVersions.yaml | 3 +++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml index f7b52845..4161626b 100644 --- a/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml +++ b/api-spec/paths/versions/_id/promote/promoteContentVersion.yaml @@ -22,8 +22,8 @@ responses: content: application/json: schema: - type: object - properties: {} + type: string + description: The primary key of the promoted item. '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml index 5fd21bf0..fb07f69d 100644 --- a/api-spec/paths/versions/_id/save/saveContentVersion.yaml +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -3,12 +3,6 @@ description: Save item changes to an existing Content Version. operationId: saveContentVersion parameters: - $ref: ../../../../components/parameters.yaml#/UUId -requestBody: - content: - application/json: - schema: - anyOf: - - $ref: ../../../../components/schemas/items.yaml responses: '200': description: Successful request, Returns the item object with the new state after save. diff --git a/api-spec/paths/versions/updateContentVersions.yaml b/api-spec/paths/versions/updateContentVersions.yaml index 1d27d3ec..228efd68 100644 --- a/api-spec/paths/versions/updateContentVersions.yaml +++ b/api-spec/paths/versions/updateContentVersions.yaml @@ -14,6 +14,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: anyOf: From 6bbbf32dfd0bb8ddba50f121537bf33fd3341dee Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Tue, 10 Dec 2024 18:47:47 +0100 Subject: [PATCH 097/119] Fix user params --- api-spec/paths/users/createUsers.yaml | 8 +++----- .../users/invite/accept/acceptInvite.yaml | 12 ++++-------- api-spec/paths/users/invite/invite.yaml | 19 ++++--------------- .../users/me/tfa/disable/meTfaDisable.yaml | 6 ------ .../users/me/tfa/enable/meTfaEnable.yaml | 6 ------ .../tfa/generate/generateTwoFactorSecret.yaml | 4 ++++ .../paths/users/register/registerUser.yaml | 14 ++++++++++++-- 7 files changed, 27 insertions(+), 42 deletions(-) diff --git a/api-spec/paths/users/createUsers.yaml b/api-spec/paths/users/createUsers.yaml index 4da440d2..a01432bf 100644 --- a/api-spec/paths/users/createUsers.yaml +++ b/api-spec/paths/users/createUsers.yaml @@ -1,5 +1,5 @@ -summary: Create Multiple User -description: Create multiple new user. +summary: Create Multiple Users +description: Create multiple new users. operationId: createUsers parameters: - $ref: ../../components/parameters.yaml#/Fields @@ -11,13 +11,11 @@ parameters: - $ref: ../../components/parameters.yaml#/Search - $ref: ../../components/parameters.yaml#/Page requestBody: + description: "`email` and `password` are required." content: application/json: schema: type: object - required: - - email - - password properties: data: type: array diff --git a/api-spec/paths/users/invite/accept/acceptInvite.yaml b/api-spec/paths/users/invite/accept/acceptInvite.yaml index 0b30ff53..206b7f7e 100644 --- a/api-spec/paths/users/invite/accept/acceptInvite.yaml +++ b/api-spec/paths/users/invite/accept/acceptInvite.yaml @@ -7,6 +7,9 @@ requestBody: application/json: schema: type: object + required: + - token + - password properties: token: type: string @@ -18,15 +21,8 @@ requestBody: format: password example: d1r3ctu5 responses: - '200': + '204': description: Successful request - content: - application/json: - schema: - type: object - properties: - data: - $ref: ../../../../components/schemas/users.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/invite/invite.yaml b/api-spec/paths/users/invite/invite.yaml index af4d6077..051018b7 100644 --- a/api-spec/paths/users/invite/invite.yaml +++ b/api-spec/paths/users/invite/invite.yaml @@ -1,5 +1,5 @@ -summary: Invite User(s) -description: Invites one or more users to this project. It creates a user with an +summary: Invite User +description: Invites a user 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 @@ -13,16 +13,11 @@ requestBody: - role properties: email: - oneOf: - - type: string - description: Email addres of the to-be-invited user. - - type: array - description: Array of email addresses of the to-be-invited users. + type: string + description: Email address of the to-be-invited user. role: description: Role of the new user type: string - oneOf: - - $ref: ../../../components/schemas/roles.yaml invite_url: description: 'Provide a custom invite url which the link in the email will lead to. The invite token will be passed as a parameter. Note: You need to configure the USER_INVITE_URL_ALLOW_LIST environment variable to enable this feature.' type: string @@ -30,12 +25,6 @@ requestBody: responses: '204': description: Successful request - content: - application/json: - schema: - type: object - properties: - data: {} '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml index 9c8027d0..f0e56ca8 100644 --- a/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml +++ b/api-spec/paths/users/me/tfa/disable/meTfaDisable.yaml @@ -15,12 +15,6 @@ requestBody: responses: '204': description: Successful request - content: - application/json: - schema: - type: object - properties: - data: {} '401': $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml index 37a765c6..94f28eeb 100644 --- a/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml +++ b/api-spec/paths/users/me/tfa/enable/meTfaEnable.yaml @@ -19,12 +19,6 @@ requestBody: responses: '204': description: Successful request - content: - application/json: - schema: - type: object - properties: - data: {} '401': $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml index 987f5c4a..373c3f62 100644 --- a/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml +++ b/api-spec/paths/users/me/tfa/generate/generateTwoFactorSecret.yaml @@ -8,6 +8,10 @@ requestBody: type: string required: - password + properties: + password: + description: The user's password. + type: string responses: '200': description: Successful request diff --git a/api-spec/paths/users/register/registerUser.yaml b/api-spec/paths/users/register/registerUser.yaml index ad0e880a..8cce1243 100644 --- a/api-spec/paths/users/register/registerUser.yaml +++ b/api-spec/paths/users/register/registerUser.yaml @@ -12,9 +12,19 @@ requestBody: required: - email - password - anyOf: - - $ref: ../../../components/schemas/users.yaml properties: + email: + type: string + description: 'Email for the new user.' + password: + type: string + description: 'Password for the new user.' + first_name: + type: string + description: 'First name for the new user.' + last_name: + type: string + description: 'Last name for the new user.' verification_url: type: string description: 'Provide a custom verification url which the link in the email will lead to. The verification token will be passed as a parameter. Note: You need to configure the USER_REGISTER_URL_ALLOW_LIST environment variable to enable this feature.' From 4bf9f967b053fd6e12024ab6eb5f59da3a79c74a Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 12:00:30 +0100 Subject: [PATCH 098/119] Rename action --- .../paths/extensions/_bundle/_name/updateExtensionBundle.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml index a39c70e2..7f379b1e 100644 --- a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -1,5 +1,5 @@ -summary: Update an Extension -description: Update an existing extension. +summary: Update an Extension Bundle +description: Update an existing extension bundle. operationId: updateExtensionBundle parameters: - in: path From 74e7f02a36fa908b9d643696cef0e5acbc609a88 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 12:10:20 +0100 Subject: [PATCH 099/119] Update descriptions --- api-spec/index.yaml | 3 +-- api-spec/paths/activity/_id/getActivity.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 1ca71f1e..d51ae4f0 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -256,7 +256,7 @@ tags: description: Webhooks. x-collection: directus_webhooks - name: Settings - description: Settings control the way the platform works and acts. + description: Settings are key-value pairs that are stored in the database, and control different aspects of the project. Only administrators have access to manage Settings. x-collection: directus_settings - name: Permissions description: Permissions control who has access to what and when. @@ -273,4 +273,3 @@ tags: - name: Roles description: Roles are groups of users that share permissions. x-collection: directus_roles - diff --git a/api-spec/paths/activity/_id/getActivity.yaml b/api-spec/paths/activity/_id/getActivity.yaml index 13309de1..39f1b309 100644 --- a/api-spec/paths/activity/_id/getActivity.yaml +++ b/api-spec/paths/activity/_id/getActivity.yaml @@ -1,6 +1,5 @@ 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. +description: Retrieves the details of an existing activity action. operationId: getActivity parameters: - $ref: ../../../components/parameters.yaml#/Id From 4fd7d6ac3c12360d897a35265a30b670adbf11aa Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 13:25:10 +0100 Subject: [PATCH 100/119] Fix permission params --- api-spec/index.yaml | 2 +- .../paths/permissions/_id/getPermission.yaml | 4 +-- .../permissions/_id/updatePermission.yaml | 4 +-- .../paths/permissions/deletePermissions.yaml | 4 +-- .../_collection/_id/getItemPermissions.yaml | 26 +++++++++++++- .../permissions/me/getUserPermissions.yaml | 34 +++++++++++++++++-- .../paths/permissions/updatePermissions.yaml | 5 ++- 7 files changed, 68 insertions(+), 11 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index d51ae4f0..d0156f54 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -259,7 +259,7 @@ tags: description: Settings are key-value pairs that are stored in the database, and control different aspects of the project. Only administrators have access to manage Settings. x-collection: directus_settings - name: Permissions - description: Permissions control who has access to what and when. + description: Permissions are assigned to Policies, and control data access throughout the platform. [Learn more about permissions](/auth/access-control). 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. diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index 43afaf56..c8fcd077 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -1,5 +1,5 @@ -summary: Retrieve a Permission -description: Retrieve a single permissions object by unique identifier. +summary: Retrieve a Permission Rule +description: Retrieve a single permission rules object by unique identifier. operationId: getPermission parameters: - $ref: ../../../components/parameters.yaml#/Id diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml index 3af82021..33105649 100644 --- a/api-spec/paths/permissions/_id/updatePermission.yaml +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -1,5 +1,5 @@ -summary: Update a Permission -description: Update an existing permission +summary: Update a Permission Rule +description: Update an existing permission rule operationId: updatePermission parameters: - $ref: ../../../components/parameters.yaml#/Id diff --git a/api-spec/paths/permissions/deletePermissions.yaml b/api-spec/paths/permissions/deletePermissions.yaml index 10a205ea..33e70dcc 100644 --- a/api-spec/paths/permissions/deletePermissions.yaml +++ b/api-spec/paths/permissions/deletePermissions.yaml @@ -1,5 +1,5 @@ -summary: Delete Multiple Permissions -description: Delete multiple existing permissions. +summary: Delete Multiple Permission Ruless +description: Delete multiple existing permission rules. operationId: deletePermissions requestBody: description: An array of permissions primary keys. diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index b0f2545a..a48ca20b 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -1,5 +1,8 @@ summary: Check Permissions for a Specific Item -description: Check the current user's permissions on a specific item. +description: | + Check the current user's permissions on a specific item. + + For a singleton where update access is given, the presets and fields properties from the corresponding update permission are additionally returned: operationId: readItemPermissions parameters: - $ref: ../../../../../components/parameters.yaml#/Collection @@ -7,6 +10,27 @@ parameters: responses: '200': description: Successful request + content: + application/json: + examples: + collection: + data: + update: + access: boolean + delete: + access: boolean + share: + access: boolean + singleton: + data: + update: + access: boolean + presets: permission_presets + fields: permission_fields + delete: + access: boolean + share: + access: boolean '401': $ref: ../../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/me/getUserPermissions.yaml b/api-spec/paths/permissions/me/getUserPermissions.yaml index d2891d08..ec3e5e31 100644 --- a/api-spec/paths/permissions/me/getUserPermissions.yaml +++ b/api-spec/paths/permissions/me/getUserPermissions.yaml @@ -1,9 +1,39 @@ summary: Get Current User Permissions -description: Check the current user's permissions across all collections. +description: | + Check the current user's permissions across all collections. + + The response is an object that contains one entry for every collection with at least one permission. Each collection has entries corresponding to the actions the user is able to perform on the collection. + + The `access` property indicates the level of access the user has for an action for a collection. `"none"` means the user has no access, `"partial"` means the user has access to some items, but may not have access to all items, and `"full"` means the user has access to all items. operationId: getUserPermissions responses: '200': - description: Successful request + description: The request was successful. + content: + application/json: + examples: + example: + data: + "": + create: + access: "none | partial | full" + fields: permission_fields + presets: permission_presets + read: + access: "none | partial | full" + full_access: boolean + presets: permission_presets + update: + access: "none | partial | full" + full_access: boolean + fields: permission_fields + presets: permission_presets + delete: + access: "none | partial | full" + full_access: boolean + share: + access: "none | partial | full" + full_access: boolean '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index 456ae5cf..c2c416a1 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -1,4 +1,4 @@ -summary: Update Multiple Permissions +summary: Update Multiple Permission Rules description: Update multiple permissions at the same time. security: [] tags: @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: $ref: ../../components/schemas/permissions.yaml From c958d4ab93ad8139ae827e7d7a20271f4d462bd0 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 13:26:47 +0100 Subject: [PATCH 101/119] Fix missing info --- .../permissions/me/_collection/_id/getItemPermissions.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index a48ca20b..22a305d7 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -2,7 +2,9 @@ summary: Check Permissions for a Specific Item description: | Check the current user's permissions on a specific item. - For a singleton where update access is given, the presets and fields properties from the corresponding update permission are additionally returned: + For a singleton where update access is given, the presets and fields properties from the corresponding update permission are additionally returned. + + The response structure is maintained in any case, even if the collection or item does not exist. To check for the existence of an item, use the Get Items endpoint instead. operationId: readItemPermissions parameters: - $ref: ../../../../../components/parameters.yaml#/Collection From 94aaf0f4802a15993ce9307e4841cca2e8aa6532 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 13:28:42 +0100 Subject: [PATCH 102/119] Remove capitalisation --- .../permissions/me/_collection/_id/getItemPermissions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index 22a305d7..6166baf5 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -4,7 +4,7 @@ description: | For a singleton where update access is given, the presets and fields properties from the corresponding update permission are additionally returned. - The response structure is maintained in any case, even if the collection or item does not exist. To check for the existence of an item, use the Get Items endpoint instead. + The response structure is maintained in any case, even if the collection or item does not exist. To check for the existence of an item, use the get items endpoint instead. operationId: readItemPermissions parameters: - $ref: ../../../../../components/parameters.yaml#/Collection From d3f1cd719965808de77efbf9ba729024e9a91c69 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Wed, 11 Dec 2024 13:48:24 +0100 Subject: [PATCH 103/119] Improve collection spec --- api-spec/paths/collections/_id/updateCollection.yaml | 5 ++++- api-spec/paths/collections/createCollection.yaml | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/collections/_id/updateCollection.yaml b/api-spec/paths/collections/_id/updateCollection.yaml index a14d52b5..aeb35876 100644 --- a/api-spec/paths/collections/_id/updateCollection.yaml +++ b/api-spec/paths/collections/_id/updateCollection.yaml @@ -1,5 +1,8 @@ summary: Update a Collection -description: Update the metadata for an existing collection. +description: | + Update the metadata for an existing collection. + + You can only update the `meta` values of the collection object. Updating the collection name is not supported at this time. operationId: updateCollection parameters: - name: id diff --git a/api-spec/paths/collections/createCollection.yaml b/api-spec/paths/collections/createCollection.yaml index 1b0c38bd..45cc543c 100644 --- a/api-spec/paths/collections/createCollection.yaml +++ b/api-spec/paths/collections/createCollection.yaml @@ -1,5 +1,10 @@ summary: Create a Collection -description: Create a new collection in Directus. +description: | + Create a new collection in Directus. + + The `collection` and `schema` properties are required. To create a collection folder that doesn't have an underlying table, you can set `schema` to `null`. + + You are able to provide an array of `fields` to be created during the creation of the collection. See the fields object for more information on what properties are available in a field. operationId: createCollection parameters: - $ref: ../../components/parameters.yaml#/Meta From 698763a8798126b0706c0d1bfab3a6c5dc3e5654 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 14:43:39 +0100 Subject: [PATCH 104/119] Fix flow endpoints --- api-spec/paths/flows/getFlows.yaml | 10 +++++++++- api-spec/paths/flows/updateFlows.yaml | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/api-spec/paths/flows/getFlows.yaml b/api-spec/paths/flows/getFlows.yaml index f37f3bc8..b6845f98 100644 --- a/api-spec/paths/flows/getFlows.yaml +++ b/api-spec/paths/flows/getFlows.yaml @@ -1,6 +1,14 @@ summary: List Flows -description: Get all flows. +description: List all flows that exist in Directus. operationId: getFlows +parameters: + - $ref: ../../components/parameters.yaml#/Fields + - $ref: ../../components/parameters.yaml#/Limit + - $ref: ../../components/parameters.yaml#/Offset + - $ref: ../../components/parameters.yaml#/Sort + - $ref: ../../components/parameters.yaml#/Filter + - $ref: ../../components/parameters.yaml#/Search + - $ref: ../../components/parameters.yaml#/Meta responses: '200': description: Successful request diff --git a/api-spec/paths/flows/updateFlows.yaml b/api-spec/paths/flows/updateFlows.yaml index 7df2591f..93a3d8ff 100644 --- a/api-spec/paths/flows/updateFlows.yaml +++ b/api-spec/paths/flows/updateFlows.yaml @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: anyOf: From 63c0ca046b7bf7875dc668cf5b44aae614f5f2c2 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 14:47:21 +0100 Subject: [PATCH 105/119] Add missing required params --- api-spec/paths/presets/updatePresets.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api-spec/paths/presets/updatePresets.yaml b/api-spec/paths/presets/updatePresets.yaml index e9cf8a89..ad358058 100644 --- a/api-spec/paths/presets/updatePresets.yaml +++ b/api-spec/paths/presets/updatePresets.yaml @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - keys + - data properties: keys: type: array From bf19634ec37897d792eaf14b7f36a16c8efc21f7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 15:05:26 +0100 Subject: [PATCH 106/119] Fix role params --- api-spec/index.yaml | 2 +- api-spec/paths/roles/getRoles.yaml | 2 +- api-spec/paths/roles/updateRoles.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index d0156f54..c68cebf0 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -271,5 +271,5 @@ tags: 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. + description: Roles are the primary organizational structure for users within the platform. x-collection: directus_roles diff --git a/api-spec/paths/roles/getRoles.yaml b/api-spec/paths/roles/getRoles.yaml index 3337546b..7ecef6b5 100644 --- a/api-spec/paths/roles/getRoles.yaml +++ b/api-spec/paths/roles/getRoles.yaml @@ -1,5 +1,5 @@ summary: List Roles -description: List the roles. +description: List all roles that exist in Directus. operationId: getRoles parameters: - $ref: ../../components/parameters.yaml#/Fields diff --git a/api-spec/paths/roles/updateRoles.yaml b/api-spec/paths/roles/updateRoles.yaml index d1473595..55e3b748 100644 --- a/api-spec/paths/roles/updateRoles.yaml +++ b/api-spec/paths/roles/updateRoles.yaml @@ -17,6 +17,9 @@ requestBody: application/json: schema: type: object + required: + - keys + - data properties: keys: type: array From ec8f4a3d786db8cbb1fdf359615da14f49a481a7 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 15:44:00 +0100 Subject: [PATCH 107/119] items, dashboards --- api-spec/index.yaml | 94 ++++++++++--------- .../paths/dashboards/_id/deleteDashboard.yaml | 3 +- .../paths/dashboards/updateDashboards.yaml | 3 + .../items/_collection/_id/deleteItem.yaml | 1 + .../items/_collection/_id/updateItem.yaml | 1 + .../_collection/singleton/getSingleton.yaml | 6 +- .../singleton/updateSingleton.yaml | 5 +- .../paths/items/_collection/updateItems.yaml | 3 + 8 files changed, 67 insertions(+), 49 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index c68cebf0..4ce3acd2 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -202,16 +202,62 @@ components: $ref: components/schemas/_index.yaml security: [] tags: + - 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 - 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: 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: Dashboards + description: Dashboards within the Insights module organize different Panels into an at-a-glance view. They can be used to group data based on department, objective, business process or anything you choose. + - 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: Fields + description: Fields are individual pieces of content within an item. They are mapped to columns in the database. + x-collection: directus_fields + - name: Files + description: Every file managed by the platform is uploaded to the configured storage adapter, and its associated metadata is tracked within the `directus_files` system collection. Any requested file transformations are handled on the fly, and are only saved to storage. + x-collection: directus_files + - name: Folders + description: Folders can be used to organize files within the platform. Folders are virtual, and aren't mirrored within the storage adapter. + x-collection: directus_folders + - name: Flows + description: Flows enable custom, event-driven data processing and task automation. + x-collection: directus_flows + - name: Items + description: Items are individual pieces of data in your database. They can be anything, from articles, to IoT status checks. + - name: Operations + description: Operations are the building blocks within Data Flows. + x-collection: directus_operations + - name: Permissions + description: Permissions are assigned to Policies, and control data access throughout the platform. [Learn more about permissions](/auth/access-control). + x-collection: directus_permissions + - 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: 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: 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: Roles + description: Roles are the primary organizational structure for users within the platform. + x-collection: directus_roles - name: Schema description: Retrieve and update the schema of an instance. x-authentication: admin x-schemas: - Schema - Diff + - name: Settings + description: Settings are key-value pairs that are stored in the database, and control different aspects of the project. Only administrators have access to manage Settings. + x-collection: directus_settings - 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 @@ -222,54 +268,12 @@ tags: - Folders - Users - Roles - - name: Folders - description: Folders can be used to organize files within the platform. Folders are virtual, and aren't mirrored within the storage adapter. - 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: Every file managed by the platform is uploaded to the configured storage adapter, and its associated metadata is tracked within the `directus_files` system collection. Any requested file transformations are handled on the fly, and are only saved to storage. - 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: Directus Users are the individual accounts that let you authenticate into the API and App. Each user can belong to a Role. 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: 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 + - 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: Webhooks description: Webhooks. x-collection: directus_webhooks - - name: Settings - description: Settings are key-value pairs that are stored in the database, and control different aspects of the project. Only administrators have access to manage Settings. - x-collection: directus_settings - - name: Permissions - description: Permissions are assigned to Policies, and control data access throughout the platform. [Learn more about permissions](/auth/access-control). - 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 the primary organizational structure for users within the platform. - x-collection: directus_roles diff --git a/api-spec/paths/dashboards/_id/deleteDashboard.yaml b/api-spec/paths/dashboards/_id/deleteDashboard.yaml index 09216223..43ed59ca 100644 --- a/api-spec/paths/dashboards/_id/deleteDashboard.yaml +++ b/api-spec/paths/dashboards/_id/deleteDashboard.yaml @@ -1,11 +1,12 @@ -summary: Delete an Dashboard +summary: Delete a Dashboard description: Delete an existing dashboard. operationId: deleteDashboard parameters: - name: id in: path description: Unique identifier of the dashboard. + required: true schema: type: string responses: diff --git a/api-spec/paths/dashboards/updateDashboards.yaml b/api-spec/paths/dashboards/updateDashboards.yaml index ebcf38f2..3d38da9b 100644 --- a/api-spec/paths/dashboards/updateDashboards.yaml +++ b/api-spec/paths/dashboards/updateDashboards.yaml @@ -15,6 +15,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: $ref: ../../components/schemas/dashboards.yaml diff --git a/api-spec/paths/items/_collection/_id/deleteItem.yaml b/api-spec/paths/items/_collection/_id/deleteItem.yaml index b450dfe2..e5e0887f 100644 --- a/api-spec/paths/items/_collection/_id/deleteItem.yaml +++ b/api-spec/paths/items/_collection/_id/deleteItem.yaml @@ -4,6 +4,7 @@ operationId: deleteItem parameters: - name: id in: path + required: true description: Unique identifier of the item. schema: type: string diff --git a/api-spec/paths/items/_collection/_id/updateItem.yaml b/api-spec/paths/items/_collection/_id/updateItem.yaml index c526faf7..868f21ca 100644 --- a/api-spec/paths/items/_collection/_id/updateItem.yaml +++ b/api-spec/paths/items/_collection/_id/updateItem.yaml @@ -5,6 +5,7 @@ parameters: - name: id in: path description: Unique identifier of the item. + required: true schema: type: string - $ref: ../../../../components/parameters.yaml#/Collection diff --git a/api-spec/paths/items/_collection/singleton/getSingleton.yaml b/api-spec/paths/items/_collection/singleton/getSingleton.yaml index 5d4c24a1..b21c6c34 100644 --- a/api-spec/paths/items/_collection/singleton/getSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/getSingleton.yaml @@ -1,6 +1,8 @@ +summary: Retrieve a Singleton +description: | + Retrieves a singleton of a given collection. -summary: Retrieve an Singleton -description: Retrieves a singleton of a given collection. + The REST and GraphQL requests for singletons are the same as those used to Get Items but in contrast the response consists of a plain item object (the singleton) instead of an array of items. operationId: getSingleton parameters: - $ref: ../../../../components/parameters.yaml#/Collection diff --git a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml index 4b975c89..8993ee64 100644 --- a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml @@ -1,5 +1,8 @@ summary: Update Singleton -description: Update a singleton item. +description: | + Update a singleton item. + + The REST and GraphQL requests for singletons are the same as those used to Update Multiple Items but in contrast the request should consist of the plain item object. operationId: updateSingleton parameters: - $ref: ../../../../components/parameters.yaml#/Collection diff --git a/api-spec/paths/items/_collection/updateItems.yaml b/api-spec/paths/items/_collection/updateItems.yaml index 1331d43f..c47becbc 100644 --- a/api-spec/paths/items/_collection/updateItems.yaml +++ b/api-spec/paths/items/_collection/updateItems.yaml @@ -16,6 +16,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: $ref: ../../../components/schemas/items.yaml From 16ac40ac6d858f9b30040aeea303289dcbdcd430 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 16:06:57 +0100 Subject: [PATCH 108/119] Update notifications --- api-spec/index.yaml | 4 ++++ api-spec/paths/notifications/_id/deleteNotification.yaml | 1 + api-spec/paths/notifications/updateNotifications.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 4ce3acd2..80f0959a 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -231,9 +231,13 @@ tags: x-collection: directus_flows - name: Items description: Items are individual pieces of data in your database. They can be anything, from articles, to IoT status checks. + x-collection: directus_items - name: Operations description: Operations are the building blocks within Data Flows. x-collection: directus_operations + - name: notifications + description: Notifications allow you to send/receive messages to/from other users of the platform. + x-collection: directus_notifications - name: Permissions description: Permissions are assigned to Policies, and control data access throughout the platform. [Learn more about permissions](/auth/access-control). x-collection: directus_permissions diff --git a/api-spec/paths/notifications/_id/deleteNotification.yaml b/api-spec/paths/notifications/_id/deleteNotification.yaml index a9b88856..24dc92f0 100644 --- a/api-spec/paths/notifications/_id/deleteNotification.yaml +++ b/api-spec/paths/notifications/_id/deleteNotification.yaml @@ -5,6 +5,7 @@ operationId: deleteNotification parameters: - name: id in: path + required: true description: Unique identifier of the notification. schema: type: string diff --git a/api-spec/paths/notifications/updateNotifications.yaml b/api-spec/paths/notifications/updateNotifications.yaml index d63180f7..03c5e2c2 100644 --- a/api-spec/paths/notifications/updateNotifications.yaml +++ b/api-spec/paths/notifications/updateNotifications.yaml @@ -15,6 +15,9 @@ requestBody: application/json: schema: type: object + required: + - data + - keys properties: data: $ref: ../../components/schemas/notifications.yaml From 0ca73a31273b15923f354ec6b78e3b70a97ac8d6 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 16:22:02 +0100 Subject: [PATCH 109/119] Fix panel spec --- api-spec/paths/operations/createOperations.yaml | 2 +- api-spec/paths/panels/_id/deletePanel.yaml | 1 + api-spec/paths/panels/_id/updatePanel.yaml | 2 +- api-spec/paths/panels/updatePanels.yaml | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml index dab3d08d..595ec6a4 100644 --- a/api-spec/paths/operations/createOperations.yaml +++ b/api-spec/paths/operations/createOperations.yaml @@ -40,7 +40,7 @@ responses: $ref: ../../components/responses.yaml#/NotFoundError security: [] tags: -- Items +- Operations x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/panels/_id/deletePanel.yaml b/api-spec/paths/panels/_id/deletePanel.yaml index 842ccfef..83af36a0 100644 --- a/api-spec/paths/panels/_id/deletePanel.yaml +++ b/api-spec/paths/panels/_id/deletePanel.yaml @@ -6,6 +6,7 @@ parameters: - name: id in: path description: Unique identifier of the panel. + required: true schema: type: string responses: diff --git a/api-spec/paths/panels/_id/updatePanel.yaml b/api-spec/paths/panels/_id/updatePanel.yaml index 83d701fe..bb3437fe 100644 --- a/api-spec/paths/panels/_id/updatePanel.yaml +++ b/api-spec/paths/panels/_id/updatePanel.yaml @@ -32,7 +32,7 @@ responses: $ref: ../../../components/responses.yaml#/NotFoundError security: [] tags: -- panels +- Panels x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/panels/updatePanels.yaml b/api-spec/paths/panels/updatePanels.yaml index 80f1e46f..67aa5408 100644 --- a/api-spec/paths/panels/updatePanels.yaml +++ b/api-spec/paths/panels/updatePanels.yaml @@ -15,6 +15,9 @@ requestBody: application/json: schema: type: object + required: + - keys + - data properties: data: $ref: ../../components/schemas/panels.yaml From 217f0a04aa27b52b3e152e940556ab89bae0ba2d Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 16:38:51 +0100 Subject: [PATCH 110/119] Policy reference fixes --- api-spec/index.yaml | 8 +++++++- api-spec/paths/policies/_id/deletePolicy.yaml | 3 ++- api-spec/paths/policies/_id/getPolicy.yaml | 2 +- api-spec/paths/policies/deletePolicies.yaml | 12 ++++-------- api-spec/paths/policies/updatePolicies.yaml | 3 +++ 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 80f0959a..bd4d0458 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -235,12 +235,18 @@ tags: - name: Operations description: Operations are the building blocks within Data Flows. x-collection: directus_operations - - name: notifications + - name: Notifications description: Notifications allow you to send/receive messages to/from other users of the platform. x-collection: directus_notifications + - name: Panels + description: Panels are modular units of data visualization that exist within the Insights module. Each panel exists within a Dashboard and can be positioned and resized as needed. + x-collection: directus_panels - name: Permissions description: Permissions are assigned to Policies, and control data access throughout the platform. [Learn more about permissions](/auth/access-control). x-collection: directus_permissions + - name: Policies + description: Policies define a specific set of access permissions, and are a composable unit that can be assigned to both roles and users. + x-collection: directus_policies - 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 diff --git a/api-spec/paths/policies/_id/deletePolicy.yaml b/api-spec/paths/policies/_id/deletePolicy.yaml index 378b63ee..9e4ff026 100644 --- a/api-spec/paths/policies/_id/deletePolicy.yaml +++ b/api-spec/paths/policies/_id/deletePolicy.yaml @@ -1,11 +1,12 @@ -summary: Delete an policy +summary: Delete a policy description: Delete an existing policy. operationId: deletePolicy parameters: - name: id in: path description: Unique identifier of the policy. + required: true schema: type: string responses: diff --git a/api-spec/paths/policies/_id/getPolicy.yaml b/api-spec/paths/policies/_id/getPolicy.yaml index 1c934cf3..4f4c14ca 100644 --- a/api-spec/paths/policies/_id/getPolicy.yaml +++ b/api-spec/paths/policies/_id/getPolicy.yaml @@ -26,7 +26,7 @@ responses: $ref: ../../../components/responses.yaml#/NotFoundError security: [] tags: -- Policys +- Policies x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/policies/deletePolicies.yaml b/api-spec/paths/policies/deletePolicies.yaml index 6d34598c..a3209101 100644 --- a/api-spec/paths/policies/deletePolicies.yaml +++ b/api-spec/paths/policies/deletePolicies.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple policies description: Delete multiple existing policies. operationId: deletePolicies requestBody: + description: An array of policy primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/policies.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/policies/updatePolicies.yaml b/api-spec/paths/policies/updatePolicies.yaml index 9abd5f79..65c5d1f1 100644 --- a/api-spec/paths/policies/updatePolicies.yaml +++ b/api-spec/paths/policies/updatePolicies.yaml @@ -14,6 +14,9 @@ requestBody: application/json: schema: type: object + required: + - keys + - data properties: data: $ref: ../../components/schemas/policies.yaml From fcf70b9910ca0e68974c97fea5932992f6e305dd Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 16:59:48 +0100 Subject: [PATCH 111/119] Fix delete params --- .../paths/activity/comment/deleteComments.yaml | 12 ++++-------- api-spec/paths/dashboards/deleteDashboards.yaml | 12 ++++-------- api-spec/paths/files/deleteFiles.yaml | 8 ++++++++ api-spec/paths/items/_collection/deleteItems.yaml | 14 ++++++++------ .../paths/notifications/deleteNotifications.yaml | 12 ++++-------- api-spec/paths/panels/deletePanels.yaml | 12 ++++-------- .../paths/translations/deleteTranslations.yaml | 12 ++++-------- 7 files changed, 36 insertions(+), 46 deletions(-) diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/activity/comment/deleteComments.yaml index 73c0aad9..75482046 100644 --- a/api-spec/paths/activity/comment/deleteComments.yaml +++ b/api-spec/paths/activity/comment/deleteComments.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple Comments description: Delete multiple existing Comments. operationId: deleteComments requestBody: + description: An array of comment primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../../components/schemas/comments.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/dashboards/deleteDashboards.yaml b/api-spec/paths/dashboards/deleteDashboards.yaml index f6cbee13..bb86d021 100644 --- a/api-spec/paths/dashboards/deleteDashboards.yaml +++ b/api-spec/paths/dashboards/deleteDashboards.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple Dashboards description: Delete multiple existing dashboards. operationId: deleteDashboards requestBody: + description: An array of dashboard primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/dashboards.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/files/deleteFiles.yaml b/api-spec/paths/files/deleteFiles.yaml index 05b8cb84..a9ae9319 100644 --- a/api-spec/paths/files/deleteFiles.yaml +++ b/api-spec/paths/files/deleteFiles.yaml @@ -4,6 +4,14 @@ security: [] tags: - Files operationId: deleteFiles +requestBody: + description: An array of file primary keys. + content: + application/json: + schema: + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/items/_collection/deleteItems.yaml b/api-spec/paths/items/_collection/deleteItems.yaml index 2aefd7be..1bc4d79a 100644 --- a/api-spec/paths/items/_collection/deleteItems.yaml +++ b/api-spec/paths/items/_collection/deleteItems.yaml @@ -14,14 +14,16 @@ requestBody: content: application/json: schema: - type: object - properties: - data: - $ref: ../../../components/schemas/items.yaml - keys: - type: array + anyOf: + - type: array + description: Primary keys of items to be deleted. items: type: string + - type: object + description: Object containing either `keys` or `query` to selected what items to update. + data: + keys: + items: responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/notifications/deleteNotifications.yaml b/api-spec/paths/notifications/deleteNotifications.yaml index 5e083c47..0dedb59e 100644 --- a/api-spec/paths/notifications/deleteNotifications.yaml +++ b/api-spec/paths/notifications/deleteNotifications.yaml @@ -11,17 +11,13 @@ parameters: - $ref: ../../components/parameters.yaml#/Filter - $ref: ../../components/parameters.yaml#/Search requestBody: + description: An array of notification primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/notifications.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/panels/deletePanels.yaml b/api-spec/paths/panels/deletePanels.yaml index 0cd8d682..56da57c8 100644 --- a/api-spec/paths/panels/deletePanels.yaml +++ b/api-spec/paths/panels/deletePanels.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple panels description: Delete multiple existing panels. operationId: deletePanels requestBody: + description: An array of panel primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/panels.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/translations/deleteTranslations.yaml b/api-spec/paths/translations/deleteTranslations.yaml index 9bdbabb9..0b556858 100644 --- a/api-spec/paths/translations/deleteTranslations.yaml +++ b/api-spec/paths/translations/deleteTranslations.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple Translations description: Delete multiple existing translations. operationId: deleteTranslations requestBody: + description: An array of translation primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/translations.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. From f300924bd341c94c5aa1af71a86961a69e84c179 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 17:15:24 +0100 Subject: [PATCH 112/119] Fix shares params --- api-spec/index.yaml | 3 ++ api-spec/paths/shares/_id/deleteShare.yaml | 1 + .../shares/_share/getPublicShareInfo.yaml | 40 +++++++++++++++++++ api-spec/paths/shares/_share/index.yaml | 2 + api-spec/paths/shares/deleteShares.yaml | 12 ++---- api-spec/paths/shares/updateShares.yaml | 3 ++ 6 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 api-spec/paths/shares/_share/getPublicShareInfo.yaml create mode 100644 api-spec/paths/shares/_share/index.yaml diff --git a/api-spec/index.yaml b/api-spec/index.yaml index bd4d0458..393856cd 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -265,6 +265,9 @@ tags: x-schemas: - Schema - Diff + - name: Shares + description: Shares are a way to publicly share an otherwise private item. + x-collection: directus_shares - name: Settings description: Settings are key-value pairs that are stored in the database, and control different aspects of the project. Only administrators have access to manage Settings. x-collection: directus_settings diff --git a/api-spec/paths/shares/_id/deleteShare.yaml b/api-spec/paths/shares/_id/deleteShare.yaml index 9bb5095f..ae25b413 100644 --- a/api-spec/paths/shares/_id/deleteShare.yaml +++ b/api-spec/paths/shares/_id/deleteShare.yaml @@ -5,6 +5,7 @@ operationId: deleteShare parameters: - name: id in: path + required: true description: Unique identifier of the share. schema: type: string diff --git a/api-spec/paths/shares/_share/getPublicShareInfo.yaml b/api-spec/paths/shares/_share/getPublicShareInfo.yaml new file mode 100644 index 00000000..aa71f75c --- /dev/null +++ b/api-spec/paths/shares/_share/getPublicShareInfo.yaml @@ -0,0 +1,40 @@ +summary: Send a Share by Email +description: Allows unauthenticated users to retrieve information about the share. +operationId: getPublicShareInfo +parameters: +- name: share + in: path + description: Unique identifier of the share. + schema: + type: string + required: true +responses: + '200': + description: Successful request + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../../../components/schemas/shares.yaml + '401': + $ref: ../../../components/responses.yaml#/UnauthorizedError + '404': + $ref: ../../../components/responses.yaml#/NotFoundError +security: [] +tags: +- Shares +x-codeSamples: + - label: Directus SDK + lang: JavaScript + source: | + import { createDirectus, rest, readShareInfo } from '@directus/sdk'; + + const client = createDirectus('directus_project_url').with(rest()); + + const result = await client.request(readShareInfo(share_id)); + - label: GraphQL + lang: GraphQL + source: | + // Not currently available in GraphQL diff --git a/api-spec/paths/shares/_share/index.yaml b/api-spec/paths/shares/_share/index.yaml new file mode 100644 index 00000000..9a6260cc --- /dev/null +++ b/api-spec/paths/shares/_share/index.yaml @@ -0,0 +1,2 @@ +get: + $ref: getPublicShareInfo.yaml diff --git a/api-spec/paths/shares/deleteShares.yaml b/api-spec/paths/shares/deleteShares.yaml index 360ac86b..a3c5d443 100644 --- a/api-spec/paths/shares/deleteShares.yaml +++ b/api-spec/paths/shares/deleteShares.yaml @@ -3,17 +3,13 @@ summary: Delete Multiple shares description: Delete multiple existing shares. operationId: deleteShares requestBody: + description: An array of share primary keys. content: application/json: schema: - type: object - properties: - data: - $ref: ../../components/schemas/shares.yaml - keys: - type: array - items: - type: string + type: array + items: + type: string responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/shares/updateShares.yaml b/api-spec/paths/shares/updateShares.yaml index 474387be..6272f77b 100644 --- a/api-spec/paths/shares/updateShares.yaml +++ b/api-spec/paths/shares/updateShares.yaml @@ -15,6 +15,9 @@ requestBody: application/json: schema: type: object + required: + - keys + - data properties: data: $ref: ../../components/schemas/shares.yaml From 9085628391dc3cc1985b5bc42cd067821815d2cf Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 17:18:00 +0100 Subject: [PATCH 113/119] Fix translations --- api-spec/index.yaml | 3 +++ api-spec/paths/translations/_id/deleteTranslation.yaml | 1 + 2 files changed, 4 insertions(+) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 393856cd..7232dcf7 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -273,6 +273,9 @@ tags: x-collection: directus_settings - 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: Translations + description: Custom translations in Directus. + x-collection: directus_translations - name: Utilities description: Directus comes with various utility endpoints you can use to simplify your development flow. x-authentication: user diff --git a/api-spec/paths/translations/_id/deleteTranslation.yaml b/api-spec/paths/translations/_id/deleteTranslation.yaml index f3fe74ac..8e71a731 100644 --- a/api-spec/paths/translations/_id/deleteTranslation.yaml +++ b/api-spec/paths/translations/_id/deleteTranslation.yaml @@ -6,6 +6,7 @@ parameters: - name: id in: path description: Unique identifier of the Translation. + required: true schema: type: string responses: From 96e243eed3d48210dd2d687c90d9383f7832663f Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 17:20:08 +0100 Subject: [PATCH 114/119] Remove models --- api-spec/index.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index 7232dcf7..dc34b006 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -290,6 +290,3 @@ tags: - 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: Webhooks - description: Webhooks. - x-collection: directus_webhooks From af18a5128e68e6d2da23e1a316b5b6ba81601066 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Thu, 12 Dec 2024 17:51:33 +0100 Subject: [PATCH 115/119] Add missing descriptions, consolidate --- api-spec/components/schemas/collections.yaml | 23 +++++--- api-spec/components/schemas/extensions.yaml | 37 +++++++++--- api-spec/components/schemas/fields.yaml | 11 ++++ api-spec/components/schemas/folders.yaml | 9 ++- api-spec/components/schemas/settings.yaml | 59 +++++++++++-------- .../permissions/me/getUserPermissions.yaml | 2 +- 6 files changed, 102 insertions(+), 39 deletions(-) diff --git a/api-spec/components/schemas/collections.yaml b/api-spec/components/schemas/collections.yaml index 3890f2ed..88a856e7 100644 --- a/api-spec/components/schemas/collections.yaml +++ b/api-spec/components/schemas/collections.yaml @@ -1,29 +1,35 @@ type: object properties: collection: - description: The collection key. + description: Name of the collection. This matches the table name in the database. example: customers type: string icon: nullable: true + description: Icon displayed in the Data Studio when working with this collection. type: string note: nullable: true + description: Short description displayed in the Data Studio. type: string display_template: nullable: true + description: How items in this collection should be displayed when viewed relationally in the Data Studio. type: string hidden: nullable: false + description: Whether or not this collection is hidden in the Data Studio. type: boolean singleton: nullable: false + description: Whether or not this collection is treated as a singleton. type: boolean translations: description: How this collection's name is displayed in the different languages in the Data Studio. type: array nullable: true archive_field: + description: What field in the collection holds the archived state. nullable: true type: string archive_app_filter: @@ -31,37 +37,40 @@ properties: type: boolean archive_value: nullable: true + description: What value the archive field should be set to when archiving an item. type: string unarchive_value: nullable: true + description: What value the archive field should be set to when unarchiving an item. type: string sort_field: nullable: true + description: What field holds the sort value on the collection. The Data Studio uses this to allow drag-and-drop manual sorting. type: string accountability: nullable: true - type: string - color: - nullable: true + description: What data is tracked. One of `all`, `activity`. type: string item_duplication_fields: nullable: true + description: What fields are duplicated during "Save as copy" action of an item in this collection. type: array sort: nullable: true + description: What sort order of the collection relative to other collections of the same level. type: integer group: nullable: true + description: The name of the parent collection. type: string oneOf: - $ref: collections.yaml collapse: nullable: false - type: string - preview_url: - nullable: true + description: What is the default behavior of this collection or "folder" collection when it has nested collections. One of `open`, `closed`, `locked`. type: string versioning: nullable: false + description: Whether or not Content Versioning is enabled for this collection. type: boolean x-collection: directus_collections diff --git a/api-spec/components/schemas/extensions.yaml b/api-spec/components/schemas/extensions.yaml index 0d1b06a1..cc1c8df9 100644 --- a/api-spec/components/schemas/extensions.yaml +++ b/api-spec/components/schemas/extensions.yaml @@ -6,17 +6,40 @@ properties: type: boolean id: nullable: false + description: Unique identifier of the extension. 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: my-bundle type: string nullable: true -x-collection: directus_extensions + type: + description: Type of the extension. One of `'interface'`, `'display'`, `'layout'`, `'module'`, `'panel'`, `'hook'`, `'endpoint'`, `'operation'`, `'bundle'. + type: string + local: + description: Whether the extension exists in the local extensions folder or is loaded from `node_modules`. + type: boolean + version: + description: The currently loaded version of the plugin as defined by its `package.json`. + type: string + partial: + description: | + Whether or not a bundles entries can be individually disabled. This is applicable to bundle type extensions only. + + ``` + { + "name": "my-bundle-operation", + "bundle": "directus-extension-my-bundle", + "schema": { + "type": "operation", + "local": true, + "version": "1.0.0" + }, + "meta": { + "enabled": true + } + } + ``` + type: boolean +x`-collection: directus_extensions diff --git a/api-spec/components/schemas/fields.yaml b/api-spec/components/schemas/fields.yaml index 68c62678..3adae52f 100644 --- a/api-spec/components/schemas/fields.yaml +++ b/api-spec/components/schemas/fields.yaml @@ -13,38 +13,49 @@ properties: type: string special: nullable: true + description: Any special transform flags that apply to this field. type: array items: type: string interface: + description: The interface used for this field. nullable: true type: string options: type: object + description: The interface options configured for this field. The structure is based on the interface used. nullable: true display: nullable: true + description: The display used for this field. type: string display_options: type: string + description: The configured options for the used display. nullable: true readonly: nullable: false + description: If the field is considered readonly in the Data Studio. type: boolean hidden: nullable: false + description: If the field is hidden from the edit page in the Data Studio. type: boolean sort: nullable: true + description: Where this field is shown on the edit page in the Data Studio. type: integer width: nullable: true + description: How wide the interface is rendered on the edit page in the Data Studio. One of `half`, `half-left`, `half-right`, `half-space`, `full`, `fill`. type: string translations: nullable: true + description: How this field's name is displayed in the different languages in the Data Studio. type: array note: nullable: true + description: Short description displayed in the Data Studio. type: string # conditions: # nullable: true diff --git a/api-spec/components/schemas/folders.yaml b/api-spec/components/schemas/folders.yaml index 0f25e4aa..e04ff71b 100644 --- a/api-spec/components/schemas/folders.yaml +++ b/api-spec/components/schemas/folders.yaml @@ -11,7 +11,14 @@ properties: type: string parent: description: Unique identifier of the parent folder. This allows for nested folders. - example: null + example: | + { + "data": { + "id": "fc02d733-95b8-4e27-bd4b-08a32cbe4e66", + "name": "Test", + "parent": null + } + } type: string oneOf: - $ref: folders.yaml diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index 31eee938..4df48ca8 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -144,11 +144,9 @@ properties: type: array nullable: true project_descriptor: + description: Descriptor of the project, shown in the Data Studio. nullable: true type: string - default_language: - nullable: false - type: string custom_aspect_ratios: description: Custom aspect ratios in the image editor. type: array @@ -184,7 +182,41 @@ properties: type: object nullable: true report_error_url: - description: Link to the error report page. This is a template URL that has access to the following object + description: | + Link to the error report page. This is a template URL that has access to the following object + + ``` + { + error: { + name?: string; + message?: string; + }; + route: { + fullPath: string; + hash: string; + name: string; + path: string; + query: string; + }; + navigator: { + language: string; + userAgent: string; + }; + user: { + id?: string | number; + first_name?: string; + last_name?: string; + title?: string; + description?: string; + location?: string; + status?: string; + }; + role: { + id?: string; + name?: string; + }; + } + ``` nullable: true type: string report_bug_url: @@ -195,23 +227,4 @@ properties: description: Link to the feature request page. 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 - type: string - format: uuid - oneOf: - - $ref: roles.yaml - public_registration_email_filter: - type: string - nullable: true - description: $t:fields.directus_settings.public_registration_email_filter_note x-collection: directus_settings diff --git a/api-spec/paths/permissions/me/getUserPermissions.yaml b/api-spec/paths/permissions/me/getUserPermissions.yaml index ec3e5e31..34083040 100644 --- a/api-spec/paths/permissions/me/getUserPermissions.yaml +++ b/api-spec/paths/permissions/me/getUserPermissions.yaml @@ -8,7 +8,7 @@ description: | operationId: getUserPermissions responses: '200': - description: The request was successful. + description: The request was content: application/json: examples: From 3f048097ec308a0157275935eb7a8813eb77d557 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 13 Dec 2024 09:27:58 +0100 Subject: [PATCH 116/119] Add revisions text --- api-spec/paths/revisions/getRevisions.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api-spec/paths/revisions/getRevisions.yaml b/api-spec/paths/revisions/getRevisions.yaml index d379d009..5c4e2ed3 100644 --- a/api-spec/paths/revisions/getRevisions.yaml +++ b/api-spec/paths/revisions/getRevisions.yaml @@ -1,5 +1,8 @@ summary: List Revisions -description: List the revisions. +description: | + List the revisions. + + The data returned in this endpoint will be filtered based on the user's permissions. For example, revisions that apply to a collection that the current user doesn't have access to are stripped out. operationId: getRevisions parameters: - $ref: ../../components/parameters.yaml#/Fields From 55b5ce5470102764bab89f16e466830341ec3888 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 13 Dec 2024 12:23:10 +0100 Subject: [PATCH 117/119] Fix big with schema duplication --- api-spec/components/schemas/_index.yaml | 62 ++++++++++--------- api-spec/components/schemas/activity.yaml | 6 +- api-spec/components/schemas/collections.yaml | 2 +- api-spec/components/schemas/comments.yaml | 4 +- api-spec/components/schemas/dashboards.yaml | 4 +- api-spec/components/schemas/fields.yaml | 2 +- api-spec/components/schemas/files.yaml | 6 +- api-spec/components/schemas/flows.yaml | 6 +- api-spec/components/schemas/folders.yaml | 2 +- .../components/schemas/notifications.yaml | 4 +- api-spec/components/schemas/operations.yaml | 8 +-- api-spec/components/schemas/panels.yaml | 4 +- api-spec/components/schemas/permissions.yaml | 2 +- api-spec/components/schemas/policies.yaml | 6 +- api-spec/components/schemas/presets.yaml | 6 +- api-spec/components/schemas/revisions.yaml | 6 +- api-spec/components/schemas/roles.yaml | 8 +-- api-spec/components/schemas/schema.yaml | 6 +- api-spec/components/schemas/settings.yaml | 8 +-- api-spec/components/schemas/shares.yaml | 6 +- api-spec/components/schemas/users.yaml | 6 +- api-spec/components/schemas/versions.yaml | 8 +-- api-spec/paths/activity/_id/getActivity.yaml | 2 +- .../activity/comment/_id/getComment.yaml | 2 +- .../activity/comment/_id/updateComment.yaml | 6 +- .../activity/comment/createComments.yaml | 4 +- .../paths/activity/comment/getComments.yaml | 2 +- .../activity/comment/updateComments.yaml | 4 +- api-spec/paths/activity/getActivities.yaml | 2 +- .../paths/collections/_id/getCollection.yaml | 2 +- .../collections/_id/updateCollection.yaml | 2 +- .../paths/collections/createCollection.yaml | 2 +- .../paths/collections/getCollections.yaml | 2 +- .../paths/dashboards/_id/getDashboard.yaml | 2 +- .../paths/dashboards/_id/updateDashboard.yaml | 4 +- .../paths/dashboards/createDashboards.yaml | 4 +- api-spec/paths/dashboards/getDashboards.yaml | 2 +- .../paths/dashboards/updateDashboards.yaml | 4 +- .../_bundle/_name/updateExtensionBundle.yaml | 2 +- .../extensions/_name/updateExtensions.yaml | 2 +- api-spec/paths/extensions/listExtensions.yaml | 2 +- .../_collection/_id/getCollectionField.yaml | 2 +- .../fields/_collection/_id/updateField.yaml | 2 +- .../paths/fields/_collection/createField.yaml | 2 +- .../_collection/getCollectionFields.yaml | 2 +- api-spec/paths/fields/getFields.yaml | 2 +- api-spec/paths/files/_id/getFile.yaml | 2 +- api-spec/paths/files/_id/updateFile.yaml | 4 +- api-spec/paths/files/getFiles.yaml | 2 +- api-spec/paths/files/import/importFile.yaml | 5 +- api-spec/paths/files/updateFiles.yaml | 2 +- api-spec/paths/files/uploadFile.yaml | 4 +- api-spec/paths/flows/_id/getFlow.yaml | 2 +- api-spec/paths/flows/_id/updateFlow.yaml | 4 +- api-spec/paths/flows/createFlows.yaml | 4 +- api-spec/paths/flows/getFlows.yaml | 2 +- api-spec/paths/flows/updateFlows.yaml | 4 +- api-spec/paths/folders/_id/getFolder.yaml | 2 +- api-spec/paths/folders/_id/updateFolder.yaml | 2 +- api-spec/paths/folders/createFolders.yaml | 4 +- api-spec/paths/folders/getFolders.yaml | 2 +- api-spec/paths/folders/updateFolders.yaml | 2 +- .../_collection/_id/getCollectionItem.yaml | 2 +- .../items/_collection/_id/updateItem.yaml | 4 +- .../paths/items/_collection/createItems.yaml | 4 +- .../items/_collection/getCollectionItems.yaml | 2 +- .../_collection/singleton/getSingleton.yaml | 2 +- .../singleton/updateSingleton.yaml | 4 +- .../paths/items/_collection/updateItems.yaml | 4 +- .../notifications/_id/getNotification.yaml | 2 +- .../notifications/_id/updateNotification.yaml | 4 +- .../notifications/createNotifications.yaml | 4 +- .../paths/notifications/getNotifications.yaml | 2 +- .../notifications/updateNotifications.yaml | 4 +- .../paths/operations/_id/getOperation.yaml | 2 +- .../paths/operations/_id/updateOperation.yaml | 4 +- .../paths/operations/createOperations.yaml | 4 +- api-spec/paths/operations/getOperations.yaml | 2 +- .../paths/operations/updateOperations.yaml | 6 +- api-spec/paths/panels/_id/getPanel.yaml | 2 +- api-spec/paths/panels/_id/updatePanel.yaml | 4 +- api-spec/paths/panels/createPanels.yaml | 4 +- api-spec/paths/panels/getPanels.yaml | 2 +- api-spec/paths/panels/updatePanels.yaml | 4 +- .../paths/permissions/_id/getPermission.yaml | 2 +- .../permissions/_id/updatePermission.yaml | 2 +- .../paths/permissions/createPermissions.yaml | 4 +- .../paths/permissions/getPermissions.yaml | 2 +- .../paths/permissions/updatePermissions.yaml | 4 +- api-spec/paths/policies/_id/getPolicy.yaml | 2 +- api-spec/paths/policies/_id/updatePolicy.yaml | 4 +- api-spec/paths/policies/createPolicies.yaml | 4 +- api-spec/paths/policies/getPolicies.yaml | 2 +- api-spec/paths/policies/updatePolicies.yaml | 4 +- api-spec/paths/presets/_id/getPreset.yaml | 2 +- api-spec/paths/presets/_id/updatePreset.yaml | 2 +- api-spec/paths/presets/createPresets.yaml | 4 +- api-spec/paths/presets/getPresets.yaml | 2 +- api-spec/paths/presets/updatePresets.yaml | 2 +- .../_collection/getRelationByCollection.yaml | 2 +- api-spec/paths/relations/_id/getRelation.yaml | 2 +- .../paths/relations/_id/updateRelation.yaml | 2 +- api-spec/paths/relations/createRelation.yaml | 2 +- api-spec/paths/relations/getRelations.yaml | 2 +- api-spec/paths/revisions/_id/getRevision.yaml | 2 +- api-spec/paths/revisions/getRevisions.yaml | 4 +- api-spec/paths/roles/_id/getRole.yaml | 2 +- api-spec/paths/roles/_id/updateRole.yaml | 2 +- api-spec/paths/roles/createRoles.yaml | 4 +- api-spec/paths/roles/getRoles.yaml | 2 +- api-spec/paths/roles/updateRoles.yaml | 2 +- api-spec/paths/schema/apply/schemaApply.yaml | 2 +- api-spec/paths/schema/diff/schemaDiff.yaml | 6 +- .../paths/schema/snapshot/schemaSnapshot.yaml | 2 +- api-spec/paths/server/info/serverInfo.yaml | 2 +- api-spec/paths/settings/getSettings.yaml | 2 +- api-spec/paths/settings/updateSettings.yaml | 4 +- api-spec/paths/shares/_id/getShare.yaml | 2 +- api-spec/paths/shares/_id/updateShare.yaml | 4 +- .../shares/_share/getPublicShareInfo.yaml | 2 +- api-spec/paths/shares/createShares.yaml | 4 +- api-spec/paths/shares/getShares.yaml | 2 +- .../paths/shares/info/_id/getShareInfo.yaml | 2 +- api-spec/paths/shares/updateShares.yaml | 4 +- .../translations/_id/getTranslation.yaml | 3 +- .../translations/_id/updateTranslation.yaml | 4 +- .../translations/createTranslations.yaml | 4 +- .../paths/translations/getTranslations.yaml | 2 +- .../translations/updateTranslations.yaml | 4 +- api-spec/paths/users/_id/getUser.yaml | 2 +- api-spec/paths/users/_id/updateUser.yaml | 2 +- api-spec/paths/users/createUsers.yaml | 4 +- api-spec/paths/users/getUsers.yaml | 2 +- api-spec/paths/users/me/getMe.yaml | 2 +- api-spec/paths/users/me/updateMe.yaml | 2 +- api-spec/paths/users/updateUsers.yaml | 4 +- .../utils/export/_collection/export.yaml | 4 +- .../paths/versions/_id/getContentVersion.yaml | 2 +- .../versions/_id/save/saveContentVersion.yaml | 2 +- .../versions/_id/updateContentVersion.yaml | 4 +- .../paths/versions/createContentVersions.yaml | 4 +- .../paths/versions/getContentVersions.yaml | 2 +- .../paths/versions/updateContentVersions.yaml | 4 +- 143 files changed, 258 insertions(+), 260 deletions(-) diff --git a/api-spec/components/schemas/_index.yaml b/api-spec/components/schemas/_index.yaml index 3bddc003..5d4624a0 100644 --- a/api-spec/components/schemas/_index.yaml +++ b/api-spec/components/schemas/_index.yaml @@ -1,54 +1,56 @@ -Diff: - $ref: diff.yaml -Query: - $ref: query.yaml -Schema: - $ref: schema.yaml x-metadata: $ref: x-metadata.yaml -items: - $ref: items.yaml Activity: - $ref: activity.yaml + $ref: Activity.yaml Collections: - $ref: collections.yaml + $ref: Collections.yaml +Comments: + $ref: Comments.yaml +Dashboards: + $ref: Dashboards.yaml +Diff: + $ref: Diff.yaml Extensions: - $ref: extensions.yaml + $ref: Extensions.yaml Fields: - $ref: fields.yaml + $ref: Fields.yaml Files: - $ref: files.yaml + $ref: Files.yaml Flows: - $ref: flows.yaml + $ref: Flows.yaml Folders: - $ref: folders.yaml + $ref: Folders.yaml Items: - $ref: items.yaml + $ref: Items.yaml Notifications: - $ref: notifications.yaml + $ref: Notifications.yaml Operations: - $ref: operations.yaml + $ref: Operations.yaml Panels: - $ref: panels.yaml + $ref: Panels.yaml Permissions: - $ref: permissions.yaml + $ref: Permissions.yaml Policies: - $ref: policies.yaml + $ref: Policies.yaml Presets: - $ref: presets.yaml + $ref: Presets.yaml +Query: + $ref: Query.yaml Relations: - $ref: relations.yaml + $ref: Relations.yaml Revisions: - $ref: revisions.yaml + $ref: Revisions.yaml Roles: - $ref: roles.yaml + $ref: Roles.yaml +Schema: + $ref: Schema.yaml Settings: - $ref: settings.yaml + $ref: Settings.yaml Shares: - $ref: shares.yaml + $ref: Shares.yaml Translations: - $ref: translations.yaml + $ref: Translations.yaml Users: - $ref: users.yaml + $ref: Users.yaml Versions: - $ref: versions.yaml + $ref: Versions.yaml diff --git a/api-spec/components/schemas/activity.yaml b/api-spec/components/schemas/activity.yaml index a43e6db8..d3d0fce3 100644 --- a/api-spec/components/schemas/activity.yaml +++ b/api-spec/components/schemas/activity.yaml @@ -17,7 +17,7 @@ properties: description: The user who performed this action. Many-to-one to users. type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml nullable: true timestamp: description: When the action happened. @@ -38,7 +38,7 @@ properties: description: Collection identifier in which the item resides. oneOf: - type: string - - $ref: collections.yaml + - $ref: Collections.yaml item: description: Unique identifier for the item the action applied to. This is always a string, even for integer primary keys. example: '328' @@ -58,5 +58,5 @@ properties: type: array items: oneOf: - - $ref: revisions.yaml + - $ref: Revisions.yaml x-collection: directus_activity diff --git a/api-spec/components/schemas/collections.yaml b/api-spec/components/schemas/collections.yaml index 88a856e7..7a963fa7 100644 --- a/api-spec/components/schemas/collections.yaml +++ b/api-spec/components/schemas/collections.yaml @@ -64,7 +64,7 @@ properties: description: The name of the parent collection. type: string oneOf: - - $ref: collections.yaml + - $ref: Collections.yaml collapse: nullable: false description: What is the default behavior of this collection or "folder" collection when it has nested collections. One of `open`, `closed`, `locked`. diff --git a/api-spec/components/schemas/comments.yaml b/api-spec/components/schemas/comments.yaml index d34fbc8a..c2824fd4 100644 --- a/api-spec/components/schemas/comments.yaml +++ b/api-spec/components/schemas/comments.yaml @@ -32,11 +32,11 @@ properties: example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml user_updated: description: The user who last updated the comment. Many-to-one to users. example: 12e62fd0-29c7-4fd3-b3d3-c7a39933e8af type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml x-collection: directus_comments diff --git a/api-spec/components/schemas/dashboards.yaml b/api-spec/components/schemas/dashboards.yaml index ec8cdfc6..77eaea32 100644 --- a/api-spec/components/schemas/dashboards.yaml +++ b/api-spec/components/schemas/dashboards.yaml @@ -28,7 +28,7 @@ properties: type: string format: relation oneOf: - - $ref: users.yaml + - $ref: Users.yaml color: description: Accent color for the dashboard. example: #6644FF @@ -39,5 +39,5 @@ properties: example: 22640672-eef0-4ee9-ab04-591f3afb2883 type: string oneOf: - - $ref: panels.yaml + - $ref: Panels.yaml x-collection: directus_shares diff --git a/api-spec/components/schemas/fields.yaml b/api-spec/components/schemas/fields.yaml index 3adae52f..0c90e950 100644 --- a/api-spec/components/schemas/fields.yaml +++ b/api-spec/components/schemas/fields.yaml @@ -66,7 +66,7 @@ properties: nullable: true type: integer oneOf: - - $ref: fields.yaml + - $ref: Fields.yaml # validation: # nullable: true validation_message: diff --git a/api-spec/components/schemas/files.yaml b/api-spec/components/schemas/files.yaml index de1f4edc..164a79e7 100644 --- a/api-spec/components/schemas/files.yaml +++ b/api-spec/components/schemas/files.yaml @@ -30,14 +30,14 @@ properties: example: null type: string oneOf: - - $ref: folders.yaml + - $ref: Folders.yaml nullable: true uploaded_by: description: Who uploaded the file. example: 63716273-0f29-4648-8a2a-2af2948f6f78 oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml created_on: description: When the file was created. example: 2019-12-03T00:10:15+00:00 @@ -47,7 +47,7 @@ properties: type: string format: uuid oneOf: - - $ref: users.yaml + - $ref: Users.yaml nullable: true modified_on: nullable: false diff --git a/api-spec/components/schemas/flows.yaml b/api-spec/components/schemas/flows.yaml index ad4ee51b..58c90f57 100644 --- a/api-spec/components/schemas/flows.yaml +++ b/api-spec/components/schemas/flows.yaml @@ -49,7 +49,7 @@ properties: oneOf: - type: string - format: uuid - - $ref: operations.yaml + - $ref: Operations.yaml date_created: description: Timestamp in ISO8601 when the flow was created. type: string @@ -61,7 +61,7 @@ properties: example: 63716273-0f29-4648-8a2a-2af2948f6f78 oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml operations: nullable: true type: array @@ -69,5 +69,5 @@ properties: oneOf: - type: string format: uuid - - $ref: operations.yaml + - $ref: Operations.yaml x-collection: directus_flows diff --git a/api-spec/components/schemas/folders.yaml b/api-spec/components/schemas/folders.yaml index e04ff71b..008cbbf4 100644 --- a/api-spec/components/schemas/folders.yaml +++ b/api-spec/components/schemas/folders.yaml @@ -21,6 +21,6 @@ properties: } type: string oneOf: - - $ref: folders.yaml + - $ref: Folders.yaml nullable: true x-collection: directus_folders diff --git a/api-spec/components/schemas/notifications.yaml b/api-spec/components/schemas/notifications.yaml index 27db4870..3ed106cc 100644 --- a/api-spec/components/schemas/notifications.yaml +++ b/api-spec/components/schemas/notifications.yaml @@ -18,13 +18,13 @@ properties: example: 3EE34828-B43C-4FB2-A721-5151579B08EA oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml sender: description: User that sent the notification, if any. example: 497a495e-5529-4e46-8feb-2f35e9b85601 oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml subject: description: Subject line of the message. example: inbox diff --git a/api-spec/components/schemas/operations.yaml b/api-spec/components/schemas/operations.yaml index 50704019..e919e877 100644 --- a/api-spec/components/schemas/operations.yaml +++ b/api-spec/components/schemas/operations.yaml @@ -35,19 +35,19 @@ properties: example: 63716273-0f29-4648-8a2a-2af2948f6f78 oneOf: - type: string - - $ref: operations.yaml + - $ref: Operations.yaml 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: operations.yaml + - $ref: Operations.yaml flow: nullable: false type: string format: uuid oneOf: - - $ref: flows.yaml + - $ref: Flows.yaml date_created: description: Timestamp in ISO8601 when the operation was created. type: string @@ -59,5 +59,5 @@ properties: example: 63716273-0f29-4648-8a2a-2af2948f6f78 oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml x-collection: directus_operations diff --git a/api-spec/components/schemas/panels.yaml b/api-spec/components/schemas/panels.yaml index 0bbbbe24..212a292c 100644 --- a/api-spec/components/schemas/panels.yaml +++ b/api-spec/components/schemas/panels.yaml @@ -10,7 +10,7 @@ properties: example: a79bd1b2-beb2-49fc-8a26-0b3eec0e269 oneOf: - type: string - - $ref: dashboards.yaml + - $ref: Dashboards.yaml name: description: Name of the panel. example: 30-day sales @@ -66,5 +66,5 @@ properties: example: fd066644-c8e5-499d-947b-fe6c6e1a1473 oneOf: - type: string - - $ref: users.yaml + - $ref: Users.yaml x-collection: directus_panels diff --git a/api-spec/components/schemas/permissions.yaml b/api-spec/components/schemas/permissions.yaml index 3184b934..24af7f29 100644 --- a/api-spec/components/schemas/permissions.yaml +++ b/api-spec/components/schemas/permissions.yaml @@ -41,5 +41,5 @@ properties: format: uuid type: string oneOf: - - $ref: policies.yaml + - $ref: Policies.yaml x-collection: directus_permissions diff --git a/api-spec/components/schemas/policies.yaml b/api-spec/components/schemas/policies.yaml index 18bb5494..25c32892 100644 --- a/api-spec/components/schemas/policies.yaml +++ b/api-spec/components/schemas/policies.yaml @@ -40,19 +40,19 @@ properties: oneOf: - type: array - format: many-to-many - - $ref: users.yaml + - $ref: Users.yaml roles: description: The roles this policy is assigned to. It expects and returns data from the directus_access collection. Many-to-many to roles via access. example: ["8b4474c0-288d-4bb8-b62e-8330646bb6aa"] oneOf: - type: array - format: many-to-many - - $ref: roles.yaml + - $ref: Roles.yaml permissions: description: The permissions assigned to this policy. One-to-many to permissions. example: ["5c74c86f-cab0-4b14-a3c4-cd4f2363e826"] oneOf: - type: array - format: one-to-many - - $ref: permissions.yaml + - $ref: Permissions.yaml x-collection: directus_policies diff --git a/api-spec/components/schemas/presets.yaml b/api-spec/components/schemas/presets.yaml index 86562862..361bb42c 100644 --- a/api-spec/components/schemas/presets.yaml +++ b/api-spec/components/schemas/presets.yaml @@ -14,20 +14,20 @@ properties: nullable: true type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml 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 type: string oneOf: - - $ref: roles.yaml + - $ref: Roles.yaml collection: description: What collection this collection preset is used for. example: articles oneOf: - type: string - - $ref: collections.yaml + - $ref: Collections.yaml search: description: Search query. type: string diff --git a/api-spec/components/schemas/revisions.yaml b/api-spec/components/schemas/revisions.yaml index 9b608f30..87f89158 100644 --- a/api-spec/components/schemas/revisions.yaml +++ b/api-spec/components/schemas/revisions.yaml @@ -9,13 +9,13 @@ properties: example: 2 type: integer oneOf: - - $ref: activity.yaml + - $ref: Activity.yaml collection: description: Collection of the updated item. example: articles type: string oneOf: - - $ref: collections.yaml + - $ref: Collections.yaml item: description: Primary key of updated item. example: '168' @@ -45,5 +45,5 @@ properties: example: draft type: string oneOf: - - $ref: versions.yaml + - $ref: Versions.yaml x-collection: directus_revisions diff --git a/api-spec/components/schemas/roles.yaml b/api-spec/components/schemas/roles.yaml index 4bea542a..fced4b49 100644 --- a/api-spec/components/schemas/roles.yaml +++ b/api-spec/components/schemas/roles.yaml @@ -24,7 +24,7 @@ properties: type: string format: uuid oneOf: - - $ref: roles.yaml + - $ref: Roles.yaml children: nullable: true description: Nested child roles that inherit this roles permissions. One-to-many to roles. One-to-many to roles. @@ -32,7 +32,7 @@ properties: format: uuid items: oneOf: - - $ref: roles.yaml + - $ref: Roles.yaml policies: nullable: true description: The policies in this role. Many-to-many to roles. @@ -40,7 +40,7 @@ properties: format: uuid items: oneOf: - - $ref: roles.yaml + - $ref: Roles.yaml users: nullable: true description: The users in this role. One-to-many to users. @@ -48,5 +48,5 @@ properties: format: uuid items: oneOf: - - $ref: users.yaml + - $ref: Users.yaml x-collection: directus_roles diff --git a/api-spec/components/schemas/schema.yaml b/api-spec/components/schemas/schema.yaml index c91eb2bf..ab97da45 100644 --- a/api-spec/components/schemas/schema.yaml +++ b/api-spec/components/schemas/schema.yaml @@ -10,12 +10,12 @@ properties: collections: type: array items: - $ref: collections.yaml + $ref: Collections.yaml fields: type: array items: - $ref: fields.yaml + $ref: Fields.yaml relations: type: array items: - $ref: relations.yaml \ No newline at end of file + $ref: Relations.yaml diff --git a/api-spec/components/schemas/settings.yaml b/api-spec/components/schemas/settings.yaml index 4df48ca8..4923c5b2 100644 --- a/api-spec/components/schemas/settings.yaml +++ b/api-spec/components/schemas/settings.yaml @@ -25,21 +25,21 @@ properties: example: null nullable: true oneOf: - - $ref: files.yaml + - $ref: Files.yaml public_foreground: description: The foreground of the project. Many-to-one to files. type: string example: null nullable: true oneOf: - - $ref: files.yaml + - $ref: Files.yaml public_background: description: The background of the project. Many-to-one to files. type: object example: null nullable: true oneOf: - - $ref: files.yaml + - $ref: Files.yaml public_note: description: Note rendered on the public pages of the app. type: string @@ -156,7 +156,7 @@ properties: description: Favicon for the Data Studio. Many-to-one to files. type: string oneOf: - - $ref: files.yaml + - $ref: Files.yaml default_appearance: description: One of auto, light, dark. nullable: false diff --git a/api-spec/components/schemas/shares.yaml b/api-spec/components/schemas/shares.yaml index ab77b552..5880f9de 100644 --- a/api-spec/components/schemas/shares.yaml +++ b/api-spec/components/schemas/shares.yaml @@ -14,7 +14,7 @@ properties: example: articles type: string oneOf: - - $ref: collections.yaml + - $ref: Collections.yaml item: description: Primary key of the item that's shared. example: '1' @@ -25,7 +25,7 @@ properties: type: string format: uuid oneOf: - - $ref: shares.yaml + - $ref: Shares.yaml password: description: Optional password that's required to view this shared item. example: '**********' @@ -37,7 +37,7 @@ properties: type: string format: uuid oneOf: - - $ref: users.yaml + - $ref: Users.yaml date_created: description: When the share was created. example: 2023-01-25T19:16:49.009Z diff --git a/api-spec/components/schemas/users.yaml b/api-spec/components/schemas/users.yaml index 849ad127..b90defc4 100644 --- a/api-spec/components/schemas/users.yaml +++ b/api-spec/components/schemas/users.yaml @@ -48,7 +48,7 @@ properties: example: null type: string oneOf: - - $ref: files.yaml + - $ref: Files.yaml nullable: true language: description: The user's language used in Directus. Language the Data Studio is rendered in. See our Crowdin page for all available languages and translations. @@ -74,7 +74,7 @@ properties: example: 2f24211d-d928-469a-aea3-3c8f53d4e426 type: string oneOf: - - $ref: roles.yaml + - $ref: Roles.yaml token: description: Static token for the user. type: string @@ -85,7 +85,7 @@ properties: example: 2f24211d-d928-469a-aea3-3c8f53d4e426 type: string oneOf: - - $ref: policies.yaml + - $ref: Policies.yaml last_access: description: When this user used the API last. example: '2020-05-31T14:32:37Z' diff --git a/api-spec/components/schemas/versions.yaml b/api-spec/components/schemas/versions.yaml index b6f547a7..d1ec3f70 100644 --- a/api-spec/components/schemas/versions.yaml +++ b/api-spec/components/schemas/versions.yaml @@ -17,13 +17,13 @@ properties: example: articles type: string oneOf: - - $ref: collections.yaml + - $ref: Collections.yaml item: description: The item the Content Version is created on. Many-to-one to items. example: '168' type: string oneOf: - - $ref: items.yaml + - $ref: Items.yaml hash: nullable: true type: string @@ -44,13 +44,13 @@ properties: example: 63716273-0f29-4648-8a2a-2af2948f6f78 type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml user_updated: description: User that updated the Content Version. Many-to-one to users. example: 63716273-0f29-4648-8a2a-2af2948f6f78 type: string oneOf: - - $ref: users.yaml + - $ref: Users.yaml delta: description: The current changes compared to the main version of the item. type: object diff --git a/api-spec/paths/activity/_id/getActivity.yaml b/api-spec/paths/activity/_id/getActivity.yaml index 39f1b309..c8711fc8 100644 --- a/api-spec/paths/activity/_id/getActivity.yaml +++ b/api-spec/paths/activity/_id/getActivity.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/activity.yaml + $ref: ../../../components/schemas/Activity.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/activity/comment/_id/getComment.yaml b/api-spec/paths/activity/comment/_id/getComment.yaml index 4cd85288..35552fd2 100644 --- a/api-spec/paths/activity/comment/_id/getComment.yaml +++ b/api-spec/paths/activity/comment/_id/getComment.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/comments.yaml + $ref: ../../../../components/schemas/Comments.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/activity/comment/_id/updateComment.yaml index c7a2ba7d..e33ec1ec 100644 --- a/api-spec/paths/activity/comment/_id/updateComment.yaml +++ b/api-spec/paths/activity/comment/_id/updateComment.yaml @@ -9,7 +9,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../../components/schemas/comments.yaml + - $ref: ../../../../components/schemas/Comments.yaml responses: '200': content: @@ -18,7 +18,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/activity.yaml + $ref: ../../../../components/schemas/Activity.yaml description: Successful request '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError @@ -44,5 +44,3 @@ x-codeSamples: type Mutation { update_comments_item(id: ID!, data: update_directus_comments_input): directus_comments } - - diff --git a/api-spec/paths/activity/comment/createComments.yaml b/api-spec/paths/activity/comment/createComments.yaml index e31e20ab..88d93bc5 100644 --- a/api-spec/paths/activity/comment/createComments.yaml +++ b/api-spec/paths/activity/comment/createComments.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/comments.yaml + $ref: ../../../components/schemas/Comments.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/comments.yaml + $ref: ../../../components/schemas/Comments.yaml meta: $ref: ../../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/activity/comment/getComments.yaml b/api-spec/paths/activity/comment/getComments.yaml index ad7a6137..9c784976 100644 --- a/api-spec/paths/activity/comment/getComments.yaml +++ b/api-spec/paths/activity/comment/getComments.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/comments.yaml + $ref: ../../../components/schemas/Comments.yaml meta: $ref: ../../../components/schemas/x-metadata.yaml description: Successful request diff --git a/api-spec/paths/activity/comment/updateComments.yaml b/api-spec/paths/activity/comment/updateComments.yaml index 3698d139..fe4b67fc 100644 --- a/api-spec/paths/activity/comment/updateComments.yaml +++ b/api-spec/paths/activity/comment/updateComments.yaml @@ -17,7 +17,7 @@ requestBody: type: object properties: data: - $ref: ../../../components/schemas/comments.yaml + $ref: ../../../components/schemas/Comments.yaml keys: type: array items: @@ -33,7 +33,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/comments.yaml + $ref: ../../../components/schemas/Comments.yaml meta: $ref: ../../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/activity/getActivities.yaml b/api-spec/paths/activity/getActivities.yaml index 72e25d4c..a2d14370 100644 --- a/api-spec/paths/activity/getActivities.yaml +++ b/api-spec/paths/activity/getActivities.yaml @@ -19,7 +19,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/activity.yaml + $ref: ../../components/schemas/Activity.yaml meta: $ref: ../../components/schemas/x-metadata.yaml description: Successful request diff --git a/api-spec/paths/collections/_id/getCollection.yaml b/api-spec/paths/collections/_id/getCollection.yaml index 672ad45a..d151e57e 100644 --- a/api-spec/paths/collections/_id/getCollection.yaml +++ b/api-spec/paths/collections/_id/getCollection.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/collections.yaml + $ref: ../../../components/schemas/Collections.yaml description: Successful request '401': $ref: ../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/collections/_id/updateCollection.yaml b/api-spec/paths/collections/_id/updateCollection.yaml index aeb35876..9c0c4872 100644 --- a/api-spec/paths/collections/_id/updateCollection.yaml +++ b/api-spec/paths/collections/_id/updateCollection.yaml @@ -98,7 +98,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/collections.yaml + $ref: ../../../components/schemas/Collections.yaml description: Successful request '401': $ref: ../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/collections/createCollection.yaml b/api-spec/paths/collections/createCollection.yaml index 45cc543c..83474ac9 100644 --- a/api-spec/paths/collections/createCollection.yaml +++ b/api-spec/paths/collections/createCollection.yaml @@ -97,7 +97,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/collections.yaml + $ref: ../../components/schemas/Collections.yaml description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/collections/getCollections.yaml b/api-spec/paths/collections/getCollections.yaml index f0406e5f..b6f2e123 100644 --- a/api-spec/paths/collections/getCollections.yaml +++ b/api-spec/paths/collections/getCollections.yaml @@ -15,7 +15,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/collections.yaml + $ref: ../../components/schemas/Collections.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/_id/getDashboard.yaml b/api-spec/paths/dashboards/_id/getDashboard.yaml index ab894f68..17ff516b 100644 --- a/api-spec/paths/dashboards/_id/getDashboard.yaml +++ b/api-spec/paths/dashboards/_id/getDashboard.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/dashboards.yaml + $ref: ../../../components/schemas/Dashboards.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/_id/updateDashboard.yaml b/api-spec/paths/dashboards/_id/updateDashboard.yaml index d4e7a2bd..27040fd1 100644 --- a/api-spec/paths/dashboards/_id/updateDashboard.yaml +++ b/api-spec/paths/dashboards/_id/updateDashboard.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/dashboards.yaml + - $ref: ../../../components/schemas/Dashboards.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/dashboards.yaml + $ref: ../../../components/schemas/Dashboards.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/dashboards/createDashboards.yaml b/api-spec/paths/dashboards/createDashboards.yaml index 8be6d1aa..a0e6c778 100644 --- a/api-spec/paths/dashboards/createDashboards.yaml +++ b/api-spec/paths/dashboards/createDashboards.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/Dashboards.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/Dashboards.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/dashboards/getDashboards.yaml b/api-spec/paths/dashboards/getDashboards.yaml index e921a761..2eb8c443 100644 --- a/api-spec/paths/dashboards/getDashboards.yaml +++ b/api-spec/paths/dashboards/getDashboards.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/Dashboards.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/dashboards/updateDashboards.yaml b/api-spec/paths/dashboards/updateDashboards.yaml index 3d38da9b..60c6dbe8 100644 --- a/api-spec/paths/dashboards/updateDashboards.yaml +++ b/api-spec/paths/dashboards/updateDashboards.yaml @@ -20,7 +20,7 @@ requestBody: - keys properties: data: - $ref: ../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/Dashboards.yaml keys: type: array items: @@ -36,7 +36,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/dashboards.yaml + $ref: ../../components/schemas/Dashboards.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml index 7f379b1e..aeec9ec3 100644 --- a/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml +++ b/api-spec/paths/extensions/_bundle/_name/updateExtensionBundle.yaml @@ -35,7 +35,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/extensions.yaml + $ref: ../../../../components/schemas/Extensions.yaml description: Successful request '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/extensions/_name/updateExtensions.yaml b/api-spec/paths/extensions/_name/updateExtensions.yaml index 89638529..c1541bc4 100644 --- a/api-spec/paths/extensions/_name/updateExtensions.yaml +++ b/api-spec/paths/extensions/_name/updateExtensions.yaml @@ -30,7 +30,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/extensions.yaml + $ref: ../../../components/schemas/Extensions.yaml description: Successful request '401': $ref: ../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/extensions/listExtensions.yaml b/api-spec/paths/extensions/listExtensions.yaml index 92f8be0e..39ec67a0 100644 --- a/api-spec/paths/extensions/listExtensions.yaml +++ b/api-spec/paths/extensions/listExtensions.yaml @@ -11,7 +11,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/extensions.yaml + $ref: ../../components/schemas/Extensions.yaml description: Successful request '401': $ref: ../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/fields/_collection/_id/getCollectionField.yaml b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml index ed1d7bf1..b7214861 100644 --- a/api-spec/paths/fields/_collection/_id/getCollectionField.yaml +++ b/api-spec/paths/fields/_collection/_id/getCollectionField.yaml @@ -10,7 +10,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/fields.yaml + $ref: ../../../../components/schemas/Fields.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/fields/_collection/_id/updateField.yaml b/api-spec/paths/fields/_collection/_id/updateField.yaml index 203605b5..6cdf2ab6 100644 --- a/api-spec/paths/fields/_collection/_id/updateField.yaml +++ b/api-spec/paths/fields/_collection/_id/updateField.yaml @@ -186,7 +186,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/fields.yaml + $ref: ../../../../components/schemas/Fields.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/fields/_collection/createField.yaml b/api-spec/paths/fields/_collection/createField.yaml index 481daf66..11e3bf66 100644 --- a/api-spec/paths/fields/_collection/createField.yaml +++ b/api-spec/paths/fields/_collection/createField.yaml @@ -190,7 +190,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/fields.yaml + $ref: ../../../components/schemas/Fields.yaml description: Successful request '401': $ref: ../../../components/responses.yaml#/UnauthorizedError diff --git a/api-spec/paths/fields/_collection/getCollectionFields.yaml b/api-spec/paths/fields/_collection/getCollectionFields.yaml index 1356a525..997b9e9d 100644 --- a/api-spec/paths/fields/_collection/getCollectionFields.yaml +++ b/api-spec/paths/fields/_collection/getCollectionFields.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/fields.yaml + $ref: ../../../components/schemas/Fields.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/fields/getFields.yaml b/api-spec/paths/fields/getFields.yaml index 4000325a..dcf49f2b 100644 --- a/api-spec/paths/fields/getFields.yaml +++ b/api-spec/paths/fields/getFields.yaml @@ -15,7 +15,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/fields.yaml + $ref: ../../components/schemas/Fields.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/files/_id/getFile.yaml b/api-spec/paths/files/_id/getFile.yaml index bd8610b4..876cf991 100644 --- a/api-spec/paths/files/_id/getFile.yaml +++ b/api-spec/paths/files/_id/getFile.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/files.yaml + $ref: ../../../components/schemas/Files.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: diff --git a/api-spec/paths/files/_id/updateFile.yaml b/api-spec/paths/files/_id/updateFile.yaml index a5c693c3..3a45e3a8 100644 --- a/api-spec/paths/files/_id/updateFile.yaml +++ b/api-spec/paths/files/_id/updateFile.yaml @@ -22,7 +22,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/items.yaml + - $ref: ../../../components/schemas/Items.yaml responses: '200': description: Successful request @@ -32,7 +32,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/files.yaml + $ref: ../../../components/schemas/Files.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: diff --git a/api-spec/paths/files/getFiles.yaml b/api-spec/paths/files/getFiles.yaml index 29466e77..e12a45b6 100644 --- a/api-spec/paths/files/getFiles.yaml +++ b/api-spec/paths/files/getFiles.yaml @@ -23,7 +23,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/files.yaml + $ref: ../../components/schemas/Files.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/files/import/importFile.yaml b/api-spec/paths/files/import/importFile.yaml index b749dd4b..8292e448 100644 --- a/api-spec/paths/files/import/importFile.yaml +++ b/api-spec/paths/files/import/importFile.yaml @@ -13,7 +13,7 @@ requestBody: type: string description: The URL to download the file from. anyOf: - - $ref: ../../components/schemas/files.yaml + - $ref: ../../components/schemas/Files.yaml responses: '200': description: Successful request @@ -23,7 +23,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/files.yaml + $ref: ../../components/schemas/Files.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError security: [] @@ -48,4 +48,3 @@ x-codeSamples: type Mutation { import_file(url: String!, data: create_directus_files_input!): directus_files } - diff --git a/api-spec/paths/files/updateFiles.yaml b/api-spec/paths/files/updateFiles.yaml index c72a6600..7fe31929 100644 --- a/api-spec/paths/files/updateFiles.yaml +++ b/api-spec/paths/files/updateFiles.yaml @@ -41,7 +41,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/files.yaml + $ref: ../../components/schemas/Files.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/files/uploadFile.yaml b/api-spec/paths/files/uploadFile.yaml index e9b5ec4f..90436515 100644 --- a/api-spec/paths/files/uploadFile.yaml +++ b/api-spec/paths/files/uploadFile.yaml @@ -6,7 +6,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../components/schemas/files.yaml + - $ref: ../../components/schemas/Files.yaml responses: '200': description: Successful request @@ -16,7 +16,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/files.yaml + $ref: ../../components/schemas/Files.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError security: [] diff --git a/api-spec/paths/flows/_id/getFlow.yaml b/api-spec/paths/flows/_id/getFlow.yaml index bd62f3b1..88c75fff 100644 --- a/api-spec/paths/flows/_id/getFlow.yaml +++ b/api-spec/paths/flows/_id/getFlow.yaml @@ -10,7 +10,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/flows.yaml + $ref: ../../../components/schemas/Flows.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/_id/updateFlow.yaml b/api-spec/paths/flows/_id/updateFlow.yaml index 5d7ab8b9..e87fa3a5 100644 --- a/api-spec/paths/flows/_id/updateFlow.yaml +++ b/api-spec/paths/flows/_id/updateFlow.yaml @@ -10,7 +10,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/flows.yaml + - $ref: ../../../components/schemas/Flows.yaml responses: '200': description: Successful request @@ -20,7 +20,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/flows.yaml + $ref: ../../../components/schemas/Flows.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/flows/createFlows.yaml b/api-spec/paths/flows/createFlows.yaml index e2df483c..a38b931a 100644 --- a/api-spec/paths/flows/createFlows.yaml +++ b/api-spec/paths/flows/createFlows.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/flows.yaml + $ref: ../../components/schemas/Flows.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/flows.yaml + $ref: ../../components/schemas/Flows.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/flows/getFlows.yaml b/api-spec/paths/flows/getFlows.yaml index b6845f98..67b2f964 100644 --- a/api-spec/paths/flows/getFlows.yaml +++ b/api-spec/paths/flows/getFlows.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/flows.yaml + $ref: ../../components/schemas/Flows.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/flows/updateFlows.yaml b/api-spec/paths/flows/updateFlows.yaml index 93a3d8ff..c3eb9d8a 100644 --- a/api-spec/paths/flows/updateFlows.yaml +++ b/api-spec/paths/flows/updateFlows.yaml @@ -23,7 +23,7 @@ requestBody: properties: data: anyOf: - - $ref: ../../components/schemas/flows.yaml + - $ref: ../../components/schemas/Flows.yaml keys: type: array items: @@ -39,7 +39,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/flows.yaml + $ref: ../../components/schemas/Flows.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/folders/_id/getFolder.yaml b/api-spec/paths/folders/_id/getFolder.yaml index a293bc4e..55c35c97 100644 --- a/api-spec/paths/folders/_id/getFolder.yaml +++ b/api-spec/paths/folders/_id/getFolder.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/folders.yaml + $ref: ../../../components/schemas/Folders.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/folders/_id/updateFolder.yaml b/api-spec/paths/folders/_id/updateFolder.yaml index 02464475..c771a896 100644 --- a/api-spec/paths/folders/_id/updateFolder.yaml +++ b/api-spec/paths/folders/_id/updateFolder.yaml @@ -28,7 +28,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/folders.yaml + $ref: ../../../components/schemas/Folders.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/folders/createFolders.yaml b/api-spec/paths/folders/createFolders.yaml index 2874bf52..553534d3 100644 --- a/api-spec/paths/folders/createFolders.yaml +++ b/api-spec/paths/folders/createFolders.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/folders.yaml + $ref: ../../components/schemas/Folders.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/folders.yaml + $ref: ../../components/schemas/Folders.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/folders/getFolders.yaml b/api-spec/paths/folders/getFolders.yaml index 21a3a2c6..61a7f5ed 100644 --- a/api-spec/paths/folders/getFolders.yaml +++ b/api-spec/paths/folders/getFolders.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/folders.yaml + $ref: ../../components/schemas/Folders.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/folders/updateFolders.yaml b/api-spec/paths/folders/updateFolders.yaml index 60f43419..70658639 100644 --- a/api-spec/paths/folders/updateFolders.yaml +++ b/api-spec/paths/folders/updateFolders.yaml @@ -52,7 +52,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/folders.yaml + $ref: ../../components/schemas/Folders.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml index 902fe4a1..81839ef0 100644 --- a/api-spec/paths/items/_collection/_id/getCollectionItem.yaml +++ b/api-spec/paths/items/_collection/_id/getCollectionItem.yaml @@ -16,7 +16,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/items.yaml + $ref: ../../../../components/schemas/Items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/_id/updateItem.yaml b/api-spec/paths/items/_collection/_id/updateItem.yaml index 868f21ca..5a1bc5ca 100644 --- a/api-spec/paths/items/_collection/_id/updateItem.yaml +++ b/api-spec/paths/items/_collection/_id/updateItem.yaml @@ -16,7 +16,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../../components/schemas/items.yaml + - $ref: ../../../../components/schemas/Items.yaml responses: '200': description: Successful request @@ -26,7 +26,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/items.yaml + $ref: ../../../../components/schemas/Items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/createItems.yaml b/api-spec/paths/items/_collection/createItems.yaml index 61295909..2fc4f6bc 100644 --- a/api-spec/paths/items/_collection/createItems.yaml +++ b/api-spec/paths/items/_collection/createItems.yaml @@ -20,7 +20,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/items.yaml + $ref: ../../../components/schemas/Items.yaml responses: '200': description: Successful request @@ -32,7 +32,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/items.yaml + $ref: ../../../components/schemas/Items.yaml meta: $ref: ../../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/items/_collection/getCollectionItems.yaml b/api-spec/paths/items/_collection/getCollectionItems.yaml index 78a167c6..c9adce0b 100644 --- a/api-spec/paths/items/_collection/getCollectionItems.yaml +++ b/api-spec/paths/items/_collection/getCollectionItems.yaml @@ -26,7 +26,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/items.yaml + $ref: ../../../components/schemas/Items.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/singleton/getSingleton.yaml b/api-spec/paths/items/_collection/singleton/getSingleton.yaml index b21c6c34..2c0f888b 100644 --- a/api-spec/paths/items/_collection/singleton/getSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/getSingleton.yaml @@ -18,7 +18,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/items.yaml + $ref: ../../../../components/schemas/Items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml index 8993ee64..9a20f03e 100644 --- a/api-spec/paths/items/_collection/singleton/updateSingleton.yaml +++ b/api-spec/paths/items/_collection/singleton/updateSingleton.yaml @@ -13,7 +13,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../../components/schemas/items.yaml + - $ref: ../../../../components/schemas/Items.yaml responses: '200': description: Successful request @@ -23,7 +23,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/items.yaml + $ref: ../../../../components/schemas/Items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/items/_collection/updateItems.yaml b/api-spec/paths/items/_collection/updateItems.yaml index c47becbc..c40980fc 100644 --- a/api-spec/paths/items/_collection/updateItems.yaml +++ b/api-spec/paths/items/_collection/updateItems.yaml @@ -21,7 +21,7 @@ requestBody: - keys properties: data: - $ref: ../../../components/schemas/items.yaml + $ref: ../../../components/schemas/Items.yaml keys: type: array items: @@ -37,7 +37,7 @@ responses: data: type: array items: - $ref: ../../../components/schemas/items.yaml + $ref: ../../../components/schemas/Items.yaml meta: $ref: ../../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/notifications/_id/getNotification.yaml b/api-spec/paths/notifications/_id/getNotification.yaml index 62fb4250..3a7848d3 100644 --- a/api-spec/paths/notifications/_id/getNotification.yaml +++ b/api-spec/paths/notifications/_id/getNotification.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/notifications.yaml + $ref: ../../../components/schemas/Notifications.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/notifications/_id/updateNotification.yaml b/api-spec/paths/notifications/_id/updateNotification.yaml index 0db001a8..9e27f96d 100644 --- a/api-spec/paths/notifications/_id/updateNotification.yaml +++ b/api-spec/paths/notifications/_id/updateNotification.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/notifications.yaml + - $ref: ../../../components/schemas/Notifications.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/notifications.yaml + $ref: ../../../components/schemas/Notifications.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/notifications/createNotifications.yaml b/api-spec/paths/notifications/createNotifications.yaml index ab7cd386..353c064d 100644 --- a/api-spec/paths/notifications/createNotifications.yaml +++ b/api-spec/paths/notifications/createNotifications.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/notifications.yaml + $ref: ../../components/schemas/Notifications.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/notifications.yaml + $ref: ../../components/schemas/Notifications.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/notifications/getNotifications.yaml b/api-spec/paths/notifications/getNotifications.yaml index 874254e0..c23c3b43 100644 --- a/api-spec/paths/notifications/getNotifications.yaml +++ b/api-spec/paths/notifications/getNotifications.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/notifications.yaml + $ref: ../../components/schemas/Notifications.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/notifications/updateNotifications.yaml b/api-spec/paths/notifications/updateNotifications.yaml index 03c5e2c2..440c2c72 100644 --- a/api-spec/paths/notifications/updateNotifications.yaml +++ b/api-spec/paths/notifications/updateNotifications.yaml @@ -20,7 +20,7 @@ requestBody: - keys properties: data: - $ref: ../../components/schemas/notifications.yaml + $ref: ../../components/schemas/Notifications.yaml keys: type: array items: @@ -36,7 +36,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/notifications.yaml + $ref: ../../components/schemas/Notifications.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/operations/_id/getOperation.yaml b/api-spec/paths/operations/_id/getOperation.yaml index bc9db438..2e3d3c6c 100644 --- a/api-spec/paths/operations/_id/getOperation.yaml +++ b/api-spec/paths/operations/_id/getOperation.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/operations.yaml + $ref: ../../../components/schemas/Operations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/operations/_id/updateOperation.yaml b/api-spec/paths/operations/_id/updateOperation.yaml index 39934081..82bfd2e0 100644 --- a/api-spec/paths/operations/_id/updateOperation.yaml +++ b/api-spec/paths/operations/_id/updateOperation.yaml @@ -10,7 +10,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/operations.yaml + - $ref: ../../../components/schemas/Operations.yaml responses: '200': description: Successful request @@ -20,7 +20,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/operations.yaml + $ref: ../../../components/schemas/Operations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/operations/createOperations.yaml b/api-spec/paths/operations/createOperations.yaml index 595ec6a4..f3ed5ac4 100644 --- a/api-spec/paths/operations/createOperations.yaml +++ b/api-spec/paths/operations/createOperations.yaml @@ -19,7 +19,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/operations.yaml + $ref: ../../components/schemas/Operations.yaml responses: '200': description: Successful request @@ -31,7 +31,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/operations.yaml + $ref: ../../components/schemas/Operations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/operations/getOperations.yaml b/api-spec/paths/operations/getOperations.yaml index 4dc93136..e62efe84 100644 --- a/api-spec/paths/operations/getOperations.yaml +++ b/api-spec/paths/operations/getOperations.yaml @@ -21,7 +21,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/operations.yaml + $ref: ../../components/schemas/Operations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/operations/updateOperations.yaml b/api-spec/paths/operations/updateOperations.yaml index 49713c5d..3f215762 100644 --- a/api-spec/paths/operations/updateOperations.yaml +++ b/api-spec/paths/operations/updateOperations.yaml @@ -17,13 +17,13 @@ requestBody: application/json: schema: type: object - required: + required: - data - keys properties: data: anyOf: - - $ref: ../../components/schemas/operations.yaml + - $ref: ../../components/schemas/Operations.yaml keys: type: array items: @@ -39,7 +39,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/operations.yaml + $ref: ../../components/schemas/Operations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/panels/_id/getPanel.yaml b/api-spec/paths/panels/_id/getPanel.yaml index be184f32..8e1b0276 100644 --- a/api-spec/paths/panels/_id/getPanel.yaml +++ b/api-spec/paths/panels/_id/getPanel.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/panels.yaml + $ref: ../../../components/schemas/Panels.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/panels/_id/updatePanel.yaml b/api-spec/paths/panels/_id/updatePanel.yaml index bb3437fe..4ccce0dd 100644 --- a/api-spec/paths/panels/_id/updatePanel.yaml +++ b/api-spec/paths/panels/_id/updatePanel.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/panels.yaml + - $ref: ../../../components/schemas/Panels.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/panels.yaml + $ref: ../../../components/schemas/Panels.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/panels/createPanels.yaml b/api-spec/paths/panels/createPanels.yaml index 383af6e9..3408758b 100644 --- a/api-spec/paths/panels/createPanels.yaml +++ b/api-spec/paths/panels/createPanels.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/panels.yaml + $ref: ../../components/schemas/Panels.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/panels.yaml + $ref: ../../components/schemas/Panels.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/panels/getPanels.yaml b/api-spec/paths/panels/getPanels.yaml index 933b7eb7..aa09ab31 100644 --- a/api-spec/paths/panels/getPanels.yaml +++ b/api-spec/paths/panels/getPanels.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/panels.yaml + $ref: ../../components/schemas/Panels.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/panels/updatePanels.yaml b/api-spec/paths/panels/updatePanels.yaml index 67aa5408..92902ab2 100644 --- a/api-spec/paths/panels/updatePanels.yaml +++ b/api-spec/paths/panels/updatePanels.yaml @@ -20,7 +20,7 @@ requestBody: - data properties: data: - $ref: ../../components/schemas/panels.yaml + $ref: ../../components/schemas/Panels.yaml keys: type: array items: @@ -36,7 +36,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/panels.yaml + $ref: ../../components/schemas/Panels.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/permissions/_id/getPermission.yaml b/api-spec/paths/permissions/_id/getPermission.yaml index c8fcd077..32553f32 100644 --- a/api-spec/paths/permissions/_id/getPermission.yaml +++ b/api-spec/paths/permissions/_id/getPermission.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/permissions.yaml + $ref: ../../../components/schemas/Permissions.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/_id/updatePermission.yaml b/api-spec/paths/permissions/_id/updatePermission.yaml index 33105649..ed1e0ce2 100644 --- a/api-spec/paths/permissions/_id/updatePermission.yaml +++ b/api-spec/paths/permissions/_id/updatePermission.yaml @@ -83,7 +83,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/permissions.yaml + $ref: ../../../components/schemas/Permissions.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/permissions/createPermissions.yaml b/api-spec/paths/permissions/createPermissions.yaml index 7f60e970..cd6709f7 100644 --- a/api-spec/paths/permissions/createPermissions.yaml +++ b/api-spec/paths/permissions/createPermissions.yaml @@ -22,7 +22,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/permissions.yaml + $ref: ../../components/schemas/Permissions.yaml responses: '200': description: Successful request @@ -34,7 +34,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/permissions.yaml + $ref: ../../components/schemas/Permissions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/permissions/getPermissions.yaml b/api-spec/paths/permissions/getPermissions.yaml index a7ff734d..ea4e02d9 100644 --- a/api-spec/paths/permissions/getPermissions.yaml +++ b/api-spec/paths/permissions/getPermissions.yaml @@ -21,7 +21,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/permissions.yaml + $ref: ../../components/schemas/Permissions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/permissions/updatePermissions.yaml b/api-spec/paths/permissions/updatePermissions.yaml index c2c416a1..64b4e641 100644 --- a/api-spec/paths/permissions/updatePermissions.yaml +++ b/api-spec/paths/permissions/updatePermissions.yaml @@ -22,7 +22,7 @@ requestBody: - keys properties: data: - $ref: ../../components/schemas/permissions.yaml + $ref: ../../components/schemas/Permissions.yaml keys: type: array items: @@ -38,7 +38,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/permissions.yaml + $ref: ../../components/schemas/Permissions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/policies/_id/getPolicy.yaml b/api-spec/paths/policies/_id/getPolicy.yaml index 4f4c14ca..9d3be769 100644 --- a/api-spec/paths/policies/_id/getPolicy.yaml +++ b/api-spec/paths/policies/_id/getPolicy.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/policies.yaml + $ref: ../../../components/schemas/Policies.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/policies/_id/updatePolicy.yaml b/api-spec/paths/policies/_id/updatePolicy.yaml index c6ec62ba..60a46f3f 100644 --- a/api-spec/paths/policies/_id/updatePolicy.yaml +++ b/api-spec/paths/policies/_id/updatePolicy.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/policies.yaml + - $ref: ../../../components/schemas/Policies.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/policies.yaml + $ref: ../../../components/schemas/Policies.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/policies/createPolicies.yaml b/api-spec/paths/policies/createPolicies.yaml index 84ca9567..069c1e0f 100644 --- a/api-spec/paths/policies/createPolicies.yaml +++ b/api-spec/paths/policies/createPolicies.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/policies.yaml + $ref: ../../components/schemas/Policies.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/policies.yaml + $ref: ../../components/schemas/Policies.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/policies/getPolicies.yaml b/api-spec/paths/policies/getPolicies.yaml index ba1b9d6a..64a3c512 100644 --- a/api-spec/paths/policies/getPolicies.yaml +++ b/api-spec/paths/policies/getPolicies.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/policies.yaml + $ref: ../../components/schemas/Policies.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/policies/updatePolicies.yaml b/api-spec/paths/policies/updatePolicies.yaml index 65c5d1f1..52e3c20e 100644 --- a/api-spec/paths/policies/updatePolicies.yaml +++ b/api-spec/paths/policies/updatePolicies.yaml @@ -19,7 +19,7 @@ requestBody: - data properties: data: - $ref: ../../components/schemas/policies.yaml + $ref: ../../components/schemas/Policies.yaml keys: type: array items: @@ -35,7 +35,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/policies.yaml + $ref: ../../components/schemas/Policies.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/presets/_id/getPreset.yaml b/api-spec/paths/presets/_id/getPreset.yaml index 507ce5d8..758c6a2b 100644 --- a/api-spec/paths/presets/_id/getPreset.yaml +++ b/api-spec/paths/presets/_id/getPreset.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/presets.yaml + $ref: ../../../components/schemas/Presets.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: diff --git a/api-spec/paths/presets/_id/updatePreset.yaml b/api-spec/paths/presets/_id/updatePreset.yaml index 7ede3f5b..551d4995 100644 --- a/api-spec/paths/presets/_id/updatePreset.yaml +++ b/api-spec/paths/presets/_id/updatePreset.yaml @@ -72,7 +72,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/presets.yaml + $ref: ../../../components/schemas/Presets.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError x-codeSamples: diff --git a/api-spec/paths/presets/createPresets.yaml b/api-spec/paths/presets/createPresets.yaml index 468b38a7..a6bbfacc 100644 --- a/api-spec/paths/presets/createPresets.yaml +++ b/api-spec/paths/presets/createPresets.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/presets.yaml + $ref: ../../components/schemas/Presets.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/presets.yaml + $ref: ../../components/schemas/Presets.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/presets/getPresets.yaml b/api-spec/paths/presets/getPresets.yaml index 0994a7a2..c884d502 100644 --- a/api-spec/paths/presets/getPresets.yaml +++ b/api-spec/paths/presets/getPresets.yaml @@ -24,7 +24,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/presets.yaml + $ref: ../../components/schemas/Presets.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/presets/updatePresets.yaml b/api-spec/paths/presets/updatePresets.yaml index ad358058..d6780373 100644 --- a/api-spec/paths/presets/updatePresets.yaml +++ b/api-spec/paths/presets/updatePresets.yaml @@ -89,7 +89,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/presets.yaml + $ref: ../../components/schemas/Presets.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/relations/_collection/getRelationByCollection.yaml b/api-spec/paths/relations/_collection/getRelationByCollection.yaml index fbf783e8..8e5c1d67 100644 --- a/api-spec/paths/relations/_collection/getRelationByCollection.yaml +++ b/api-spec/paths/relations/_collection/getRelationByCollection.yaml @@ -12,7 +12,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/relations.yaml + $ref: ../../components/schemas/Relations.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/relations/_id/getRelation.yaml b/api-spec/paths/relations/_id/getRelation.yaml index c24544d5..597a5903 100644 --- a/api-spec/paths/relations/_id/getRelation.yaml +++ b/api-spec/paths/relations/_id/getRelation.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/relations.yaml + $ref: ../../../components/schemas/Relations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/relations/_id/updateRelation.yaml b/api-spec/paths/relations/_id/updateRelation.yaml index 486da128..d1d7ed8c 100644 --- a/api-spec/paths/relations/_id/updateRelation.yaml +++ b/api-spec/paths/relations/_id/updateRelation.yaml @@ -38,7 +38,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/relations.yaml + $ref: ../../../components/schemas/Relations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/relations/createRelation.yaml b/api-spec/paths/relations/createRelation.yaml index 998da23d..efd34957 100644 --- a/api-spec/paths/relations/createRelation.yaml +++ b/api-spec/paths/relations/createRelation.yaml @@ -40,7 +40,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/relations.yaml + $ref: ../../components/schemas/Relations.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/relations/getRelations.yaml b/api-spec/paths/relations/getRelations.yaml index bb7c559a..c777003d 100644 --- a/api-spec/paths/relations/getRelations.yaml +++ b/api-spec/paths/relations/getRelations.yaml @@ -24,7 +24,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/relations.yaml + $ref: ../../components/schemas/Relations.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/revisions/_id/getRevision.yaml b/api-spec/paths/revisions/_id/getRevision.yaml index 8a015c85..c2bff6ae 100644 --- a/api-spec/paths/revisions/_id/getRevision.yaml +++ b/api-spec/paths/revisions/_id/getRevision.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/revisions.yaml + $ref: ../../../components/schemas/Revisions.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/revisions/getRevisions.yaml b/api-spec/paths/revisions/getRevisions.yaml index 5c4e2ed3..c6893b41 100644 --- a/api-spec/paths/revisions/getRevisions.yaml +++ b/api-spec/paths/revisions/getRevisions.yaml @@ -1,5 +1,5 @@ summary: List Revisions -description: | +description: | List the revisions. The data returned in this endpoint will be filtered based on the user's permissions. For example, revisions that apply to a collection that the current user doesn't have access to are stripped out. @@ -24,7 +24,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/revisions.yaml + $ref: ../../components/schemas/Revisions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/roles/_id/getRole.yaml b/api-spec/paths/roles/_id/getRole.yaml index 0c3737a4..249dd8fe 100644 --- a/api-spec/paths/roles/_id/getRole.yaml +++ b/api-spec/paths/roles/_id/getRole.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/roles.yaml + $ref: ../../../components/schemas/Roles.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/roles/_id/updateRole.yaml b/api-spec/paths/roles/_id/updateRole.yaml index dd8040b6..ee9bf9e6 100644 --- a/api-spec/paths/roles/_id/updateRole.yaml +++ b/api-spec/paths/roles/_id/updateRole.yaml @@ -41,7 +41,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/roles.yaml + $ref: ../../../components/schemas/Roles.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/roles/createRoles.yaml b/api-spec/paths/roles/createRoles.yaml index c839e4f7..aff31d2f 100644 --- a/api-spec/paths/roles/createRoles.yaml +++ b/api-spec/paths/roles/createRoles.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/roles.yaml + $ref: ../../components/schemas/Roles.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/roles.yaml + $ref: ../../components/schemas/Roles.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/roles/getRoles.yaml b/api-spec/paths/roles/getRoles.yaml index 7ecef6b5..913a8515 100644 --- a/api-spec/paths/roles/getRoles.yaml +++ b/api-spec/paths/roles/getRoles.yaml @@ -21,7 +21,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/roles.yaml + $ref: ../../components/schemas/Roles.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/roles/updateRoles.yaml b/api-spec/paths/roles/updateRoles.yaml index 55e3b748..d3406a60 100644 --- a/api-spec/paths/roles/updateRoles.yaml +++ b/api-spec/paths/roles/updateRoles.yaml @@ -61,7 +61,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/roles.yaml + $ref: ../../components/schemas/Roles.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/schema/apply/schemaApply.yaml b/api-spec/paths/schema/apply/schemaApply.yaml index 05af7355..e5e0b601 100644 --- a/api-spec/paths/schema/apply/schemaApply.yaml +++ b/api-spec/paths/schema/apply/schemaApply.yaml @@ -11,7 +11,7 @@ requestBody: type: object properties: data: - $ref: ../../../components/schemas/diff.yaml + $ref: ../../../components/schemas/Diff.yaml multipart/form-data: schema: type: object diff --git a/api-spec/paths/schema/diff/schemaDiff.yaml b/api-spec/paths/schema/diff/schemaDiff.yaml index ba669d3f..2fdf2dd8 100644 --- a/api-spec/paths/schema/diff/schemaDiff.yaml +++ b/api-spec/paths/schema/diff/schemaDiff.yaml @@ -1,6 +1,6 @@ summary: Retrieve Schema Difference description: | - Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. + Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users. Alternatively, upload a JSON or YAML schema file. @@ -21,7 +21,7 @@ requestBody: type: object properties: data: - $ref: ../../../components/schemas/schema.yaml + $ref: ../../../components/schemas/Schema.yaml multipart/form-data: schema: type: object @@ -38,7 +38,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/diff.yaml + $ref: ../../../components/schemas/Diff.yaml '204': description: No schema difference. '403': diff --git a/api-spec/paths/schema/snapshot/schemaSnapshot.yaml b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml index c01fda73..73615ad6 100644 --- a/api-spec/paths/schema/snapshot/schemaSnapshot.yaml +++ b/api-spec/paths/schema/snapshot/schemaSnapshot.yaml @@ -13,7 +13,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/schema.yaml + $ref: ../../../components/schemas/Schema.yaml text/yaml: schema: type: string diff --git a/api-spec/paths/server/info/serverInfo.yaml b/api-spec/paths/server/info/serverInfo.yaml index 60c5a9e1..95e793f4 100644 --- a/api-spec/paths/server/info/serverInfo.yaml +++ b/api-spec/paths/server/info/serverInfo.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/settings.yaml + $ref: ../../../components/schemas/Settings.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/settings/getSettings.yaml b/api-spec/paths/settings/getSettings.yaml index 964e1950..9f4dd59c 100644 --- a/api-spec/paths/settings/getSettings.yaml +++ b/api-spec/paths/settings/getSettings.yaml @@ -15,7 +15,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/settings.yaml + $ref: ../../components/schemas/Settings.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/settings/updateSettings.yaml b/api-spec/paths/settings/updateSettings.yaml index 8f7e8039..e4d06e76 100644 --- a/api-spec/paths/settings/updateSettings.yaml +++ b/api-spec/paths/settings/updateSettings.yaml @@ -9,7 +9,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../components/schemas/settings.yaml + - $ref: ../../components/schemas/Settings.yaml responses: '200': description: Successful request @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../components/schemas/settings.yaml + $ref: ../../components/schemas/Settings.yaml '401': $ref: ../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/_id/getShare.yaml b/api-spec/paths/shares/_id/getShare.yaml index d4e47f72..6dff150a 100644 --- a/api-spec/paths/shares/_id/getShare.yaml +++ b/api-spec/paths/shares/_id/getShare.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/shares.yaml + $ref: ../../../components/schemas/Shares.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/_id/updateShare.yaml b/api-spec/paths/shares/_id/updateShare.yaml index cb8e072c..09523713 100644 --- a/api-spec/paths/shares/_id/updateShare.yaml +++ b/api-spec/paths/shares/_id/updateShare.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/shares.yaml + - $ref: ../../../components/schemas/Shares.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/shares.yaml + $ref: ../../../components/schemas/Shares.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/_share/getPublicShareInfo.yaml b/api-spec/paths/shares/_share/getPublicShareInfo.yaml index aa71f75c..c6553b29 100644 --- a/api-spec/paths/shares/_share/getPublicShareInfo.yaml +++ b/api-spec/paths/shares/_share/getPublicShareInfo.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/shares.yaml + $ref: ../../../components/schemas/Shares.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/createShares.yaml b/api-spec/paths/shares/createShares.yaml index b55f2bc1..f7cd60da 100644 --- a/api-spec/paths/shares/createShares.yaml +++ b/api-spec/paths/shares/createShares.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/shares.yaml + $ref: ../../components/schemas/Shares.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/shares.yaml + $ref: ../../components/schemas/Shares.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/shares/getShares.yaml b/api-spec/paths/shares/getShares.yaml index aec2fd17..0a630def 100644 --- a/api-spec/paths/shares/getShares.yaml +++ b/api-spec/paths/shares/getShares.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/shares.yaml + $ref: ../../components/schemas/Shares.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/shares/info/_id/getShareInfo.yaml b/api-spec/paths/shares/info/_id/getShareInfo.yaml index 01f0c9d1..44775cf6 100644 --- a/api-spec/paths/shares/info/_id/getShareInfo.yaml +++ b/api-spec/paths/shares/info/_id/getShareInfo.yaml @@ -17,7 +17,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/shares.yaml + $ref: ../../../../components/schemas/Shares.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/shares/updateShares.yaml b/api-spec/paths/shares/updateShares.yaml index 6272f77b..1b394108 100644 --- a/api-spec/paths/shares/updateShares.yaml +++ b/api-spec/paths/shares/updateShares.yaml @@ -20,7 +20,7 @@ requestBody: - data properties: data: - $ref: ../../components/schemas/shares.yaml + $ref: ../../components/schemas/Shares.yaml keys: type: array items: @@ -36,7 +36,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/shares.yaml + $ref: ../../components/schemas/Shares.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/translations/_id/getTranslation.yaml b/api-spec/paths/translations/_id/getTranslation.yaml index 1aeb4be5..a5eee523 100644 --- a/api-spec/paths/translations/_id/getTranslation.yaml +++ b/api-spec/paths/translations/_id/getTranslation.yaml @@ -19,7 +19,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/translations.yaml + $ref: ../../../components/schemas/Translations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': @@ -40,4 +40,3 @@ x-codeSamples: lang: GraphQL source: | // Not currently available in GraphQL - diff --git a/api-spec/paths/translations/_id/updateTranslation.yaml b/api-spec/paths/translations/_id/updateTranslation.yaml index 3f6725a0..5e662496 100644 --- a/api-spec/paths/translations/_id/updateTranslation.yaml +++ b/api-spec/paths/translations/_id/updateTranslation.yaml @@ -15,7 +15,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/translations.yaml + - $ref: ../../../components/schemas/Translations.yaml responses: '200': description: Successful request @@ -25,7 +25,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/translations.yaml + $ref: ../../../components/schemas/Translations.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/translations/createTranslations.yaml b/api-spec/paths/translations/createTranslations.yaml index 151bbd1d..3b5f9cb9 100644 --- a/api-spec/paths/translations/createTranslations.yaml +++ b/api-spec/paths/translations/createTranslations.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/translations.yaml + $ref: ../../components/schemas/Translations.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/translations.yaml + $ref: ../../components/schemas/Translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/translations/getTranslations.yaml b/api-spec/paths/translations/getTranslations.yaml index 884cf5a6..b9ac631c 100644 --- a/api-spec/paths/translations/getTranslations.yaml +++ b/api-spec/paths/translations/getTranslations.yaml @@ -22,7 +22,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/translations.yaml + $ref: ../../components/schemas/Translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/translations/updateTranslations.yaml b/api-spec/paths/translations/updateTranslations.yaml index 00c5b4e3..6ede47d8 100644 --- a/api-spec/paths/translations/updateTranslations.yaml +++ b/api-spec/paths/translations/updateTranslations.yaml @@ -17,7 +17,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/translations.yaml + $ref: ../../components/schemas/Translations.yaml keys: type: array items: @@ -33,7 +33,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/translations.yaml + $ref: ../../components/schemas/Translations.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/users/_id/getUser.yaml b/api-spec/paths/users/_id/getUser.yaml index 6b4568ac..f184a6b0 100644 --- a/api-spec/paths/users/_id/getUser.yaml +++ b/api-spec/paths/users/_id/getUser.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/users.yaml + $ref: ../../../components/schemas/Users.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/_id/updateUser.yaml b/api-spec/paths/users/_id/updateUser.yaml index 7beeaa68..16602f95 100644 --- a/api-spec/paths/users/_id/updateUser.yaml +++ b/api-spec/paths/users/_id/updateUser.yaml @@ -9,7 +9,7 @@ requestBody: content: application/json: schema: - $ref: ../../../components/schemas/users.yaml + $ref: ../../../components/schemas/Users.yaml responses: '200': content: diff --git a/api-spec/paths/users/createUsers.yaml b/api-spec/paths/users/createUsers.yaml index a01432bf..028dc5da 100644 --- a/api-spec/paths/users/createUsers.yaml +++ b/api-spec/paths/users/createUsers.yaml @@ -20,7 +20,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/users.yaml + $ref: ../../components/schemas/Users.yaml responses: '200': description: Successful request @@ -32,7 +32,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/users.yaml + $ref: ../../components/schemas/Users.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/users/getUsers.yaml b/api-spec/paths/users/getUsers.yaml index 0a5b0073..993dbc1b 100644 --- a/api-spec/paths/users/getUsers.yaml +++ b/api-spec/paths/users/getUsers.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/users.yaml + $ref: ../../components/schemas/Users.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/users/me/getMe.yaml b/api-spec/paths/users/me/getMe.yaml index 8bd3a52e..c6c6bff1 100644 --- a/api-spec/paths/users/me/getMe.yaml +++ b/api-spec/paths/users/me/getMe.yaml @@ -13,7 +13,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/users.yaml + $ref: ../../../components/schemas/Users.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/me/updateMe.yaml b/api-spec/paths/users/me/updateMe.yaml index fdc767e4..0a943f2a 100644 --- a/api-spec/paths/users/me/updateMe.yaml +++ b/api-spec/paths/users/me/updateMe.yaml @@ -13,7 +13,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/users.yaml + $ref: ../../../components/schemas/Users.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/users/updateUsers.yaml b/api-spec/paths/users/updateUsers.yaml index 76bf3d2c..5bbca484 100644 --- a/api-spec/paths/users/updateUsers.yaml +++ b/api-spec/paths/users/updateUsers.yaml @@ -19,7 +19,7 @@ requestBody: type: object properties: data: - $ref: ../../components/schemas/users.yaml + $ref: ../../components/schemas/Users.yaml keys: type: array items: @@ -35,7 +35,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/users.yaml + $ref: ../../components/schemas/Users.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/utils/export/_collection/export.yaml b/api-spec/paths/utils/export/_collection/export.yaml index 09296989..753bc1e2 100644 --- a/api-spec/paths/utils/export/_collection/export.yaml +++ b/api-spec/paths/utils/export/_collection/export.yaml @@ -21,9 +21,9 @@ requestBody: - xml - json query: - $ref: ../../../../components/schemas/query.yaml + $ref: ../../../../components/schemas/Query.yaml file: - $ref: ../../../../components/schemas/files.yaml + $ref: ../../../../components/schemas/Files.yaml required: - format - query diff --git a/api-spec/paths/versions/_id/getContentVersion.yaml b/api-spec/paths/versions/_id/getContentVersion.yaml index 39114142..d2028283 100644 --- a/api-spec/paths/versions/_id/getContentVersion.yaml +++ b/api-spec/paths/versions/_id/getContentVersion.yaml @@ -14,7 +14,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/versions.yaml + $ref: ../../../components/schemas/Versions.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/_id/save/saveContentVersion.yaml b/api-spec/paths/versions/_id/save/saveContentVersion.yaml index fb07f69d..f3ca8d75 100644 --- a/api-spec/paths/versions/_id/save/saveContentVersion.yaml +++ b/api-spec/paths/versions/_id/save/saveContentVersion.yaml @@ -12,7 +12,7 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/items.yaml + $ref: ../../../../components/schemas/Items.yaml '401': $ref: ../../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/_id/updateContentVersion.yaml b/api-spec/paths/versions/_id/updateContentVersion.yaml index 9a27b6e4..814aef9e 100644 --- a/api-spec/paths/versions/_id/updateContentVersion.yaml +++ b/api-spec/paths/versions/_id/updateContentVersion.yaml @@ -10,7 +10,7 @@ requestBody: application/json: schema: anyOf: - - $ref: ../../../components/schemas/versions.yaml + - $ref: ../../../components/schemas/Versions.yaml responses: '200': description: Successful request @@ -20,7 +20,7 @@ responses: type: object properties: data: - $ref: ../../../components/schemas/versions.yaml + $ref: ../../../components/schemas/Versions.yaml '401': $ref: ../../../components/responses.yaml#/UnauthorizedError '404': diff --git a/api-spec/paths/versions/createContentVersions.yaml b/api-spec/paths/versions/createContentVersions.yaml index 39bc7185..c224205c 100644 --- a/api-spec/paths/versions/createContentVersions.yaml +++ b/api-spec/paths/versions/createContentVersions.yaml @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../components/schemas/versions.yaml + $ref: ../../components/schemas/Versions.yaml responses: '200': description: Successful request @@ -30,7 +30,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/versions.yaml + $ref: ../../components/schemas/Versions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/versions/getContentVersions.yaml b/api-spec/paths/versions/getContentVersions.yaml index d0db6ca0..3facbc13 100644 --- a/api-spec/paths/versions/getContentVersions.yaml +++ b/api-spec/paths/versions/getContentVersions.yaml @@ -20,7 +20,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/versions.yaml + $ref: ../../components/schemas/Versions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': diff --git a/api-spec/paths/versions/updateContentVersions.yaml b/api-spec/paths/versions/updateContentVersions.yaml index 228efd68..85f8bed7 100644 --- a/api-spec/paths/versions/updateContentVersions.yaml +++ b/api-spec/paths/versions/updateContentVersions.yaml @@ -20,7 +20,7 @@ requestBody: properties: data: anyOf: - - $ref: ../../components/schemas/versions.yaml + - $ref: ../../components/schemas/Versions.yaml keys: type: array items: @@ -36,7 +36,7 @@ responses: data: type: array items: - $ref: ../../components/schemas/versions.yaml + $ref: ../../components/schemas/Versions.yaml meta: $ref: ../../components/schemas/x-metadata.yaml '401': From cd7278b41218bc01dde485b1a6805e31e10bc6c0 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 13 Dec 2024 12:38:42 +0100 Subject: [PATCH 118/119] Integrate comments --- api-spec/index.yaml | 11 +++++--- .../_id/deleteComment.yaml | 8 +++--- .../comment => comments}/_id/getComment.yaml | 14 +++++----- .../comment => comments}/_id/index.yaml | 0 .../_id/updateComment.yaml | 14 +++++----- .../comment => comments}/createComments.yaml | 26 +++++++++---------- .../comment => comments}/deleteComments.yaml | 6 ++--- .../comment => comments}/getComments.yaml | 24 ++++++++--------- .../{activity/comment => comments}/index.yaml | 0 .../comment => comments}/updateComments.yaml | 26 +++++++++---------- 10 files changed, 66 insertions(+), 63 deletions(-) rename api-spec/paths/{activity/comment => comments}/_id/deleteComment.yaml (77%) rename api-spec/paths/{activity/comment => comments}/_id/getComment.yaml (66%) rename api-spec/paths/{activity/comment => comments}/_id/index.yaml (100%) rename api-spec/paths/{activity/comment => comments}/_id/updateComment.yaml (71%) rename api-spec/paths/{activity/comment => comments}/createComments.yaml (60%) rename api-spec/paths/{activity/comment => comments}/deleteComments.yaml (86%) rename api-spec/paths/{activity/comment => comments}/getComments.yaml (54%) rename api-spec/paths/{activity/comment => comments}/index.yaml (100%) rename api-spec/paths/{activity/comment => comments}/updateComments.yaml (62%) diff --git a/api-spec/index.yaml b/api-spec/index.yaml index dc34b006..b059573e 100644 --- a/api-spec/index.yaml +++ b/api-spec/index.yaml @@ -15,10 +15,6 @@ paths: $ref: paths/activity/index.yaml "/activity/{id}": $ref: paths/activity/_id/index.yaml - "/activity/comment": - $ref: paths/activity/comment/index.yaml - "/activity/comment/{id}": - $ref: paths/activity/comment/_id/index.yaml "/assets/{id}": $ref: paths/assets/_id/index.yaml "/auth/login": @@ -39,6 +35,10 @@ paths: $ref: paths/collections/index.yaml "/collections/{id}": $ref: paths/collections/_id/index.yaml + "/comments": + $ref: paths/comments/index.yaml + "/comments/{id}": + $ref: paths/comments/_id/index.yaml "/dashboards": $ref: paths/dashboards/index.yaml "/dashboards/{id}": @@ -212,6 +212,9 @@ tags: - 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: Comments + description: Comments are a collaboration tool and can be left on items from the sidebar. + x-collection: directus_comments - name: Dashboards description: Dashboards within the Insights module organize different Panels into an at-a-glance view. They can be used to group data based on department, objective, business process or anything you choose. - name: Extensions diff --git a/api-spec/paths/activity/comment/_id/deleteComment.yaml b/api-spec/paths/comments/_id/deleteComment.yaml similarity index 77% rename from api-spec/paths/activity/comment/_id/deleteComment.yaml rename to api-spec/paths/comments/_id/deleteComment.yaml index ed66550b..827c4097 100644 --- a/api-spec/paths/activity/comment/_id/deleteComment.yaml +++ b/api-spec/paths/comments/_id/deleteComment.yaml @@ -2,17 +2,17 @@ summary: Delete a Comment description: Delete an existing comment. Deleted comments can not be retrieved. operationId: deleteComment parameters: -- $ref: ../../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Id responses: '204': description: The resource was deleted successfully. '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/_id/getComment.yaml b/api-spec/paths/comments/_id/getComment.yaml similarity index 66% rename from api-spec/paths/activity/comment/_id/getComment.yaml rename to api-spec/paths/comments/_id/getComment.yaml index 35552fd2..c2b02f24 100644 --- a/api-spec/paths/activity/comment/_id/getComment.yaml +++ b/api-spec/paths/comments/_id/getComment.yaml @@ -2,9 +2,9 @@ summary: Get Comment by ID description: Returns a single comment by primary key. operationId: getComment parameters: -- $ref: ../../../../components/parameters.yaml#/Id -- $ref: ../../../../components/parameters.yaml#/Fields -- $ref: ../../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Fields +- $ref: ../../../components/parameters.yaml#/Meta responses: '200': description: Successful request @@ -14,14 +14,14 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/Comments.yaml + $ref: ../../../components/schemas/Comments.yaml '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/_id/index.yaml b/api-spec/paths/comments/_id/index.yaml similarity index 100% rename from api-spec/paths/activity/comment/_id/index.yaml rename to api-spec/paths/comments/_id/index.yaml diff --git a/api-spec/paths/activity/comment/_id/updateComment.yaml b/api-spec/paths/comments/_id/updateComment.yaml similarity index 71% rename from api-spec/paths/activity/comment/_id/updateComment.yaml rename to api-spec/paths/comments/_id/updateComment.yaml index e33ec1ec..7dddc0ff 100644 --- a/api-spec/paths/activity/comment/_id/updateComment.yaml +++ b/api-spec/paths/comments/_id/updateComment.yaml @@ -2,14 +2,14 @@ summary: Update a Comment description: Update the content of an existing comment. operationId: updateComment parameters: -- $ref: ../../../../components/parameters.yaml#/Id -- $ref: ../../../../components/parameters.yaml#/Meta +- $ref: ../../../components/parameters.yaml#/Id +- $ref: ../../../components/parameters.yaml#/Meta requestBody: content: application/json: schema: anyOf: - - $ref: ../../../../components/schemas/Comments.yaml + - $ref: ../../../components/schemas/Comments.yaml responses: '200': content: @@ -18,15 +18,15 @@ responses: type: object properties: data: - $ref: ../../../../components/schemas/Activity.yaml + $ref: ../../../components/schemas/Activity.yaml description: Successful request '401': - $ref: ../../../../components/responses.yaml#/UnauthorizedError + $ref: ../../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../../components/responses.yaml#/NotFoundError + $ref: ../../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/createComments.yaml b/api-spec/paths/comments/createComments.yaml similarity index 60% rename from api-spec/paths/activity/comment/createComments.yaml rename to api-spec/paths/comments/createComments.yaml index 88d93bc5..ab7b75c5 100644 --- a/api-spec/paths/activity/comment/createComments.yaml +++ b/api-spec/paths/comments/createComments.yaml @@ -2,13 +2,13 @@ summary: Create Multiple comments description: Create multiple new comments. operationId: createComments parameters: -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Limit -- $ref: ../../../components/parameters.yaml#/Meta -- $ref: ../../../components/parameters.yaml#/Offset -- $ref: ../../../components/parameters.yaml#/Sort -- $ref: ../../../components/parameters.yaml#/Filter -- $ref: ../../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search requestBody: content: application/json: @@ -18,7 +18,7 @@ requestBody: data: type: array items: - $ref: ../../../components/schemas/Comments.yaml + $ref: ../../components/schemas/Comments.yaml responses: '200': description: Successful request @@ -30,16 +30,16 @@ responses: data: type: array items: - $ref: ../../../components/schemas/Comments.yaml + $ref: ../../components/schemas/Comments.yaml meta: - $ref: ../../../components/schemas/x-metadata.yaml + $ref: ../../components/schemas/x-metadata.yaml '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/deleteComments.yaml b/api-spec/paths/comments/deleteComments.yaml similarity index 86% rename from api-spec/paths/activity/comment/deleteComments.yaml rename to api-spec/paths/comments/deleteComments.yaml index 75482046..be4769a7 100644 --- a/api-spec/paths/activity/comment/deleteComments.yaml +++ b/api-spec/paths/comments/deleteComments.yaml @@ -14,12 +14,12 @@ responses: '204': description: The resource was deleted successfully. '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/getComments.yaml b/api-spec/paths/comments/getComments.yaml similarity index 54% rename from api-spec/paths/activity/comment/getComments.yaml rename to api-spec/paths/comments/getComments.yaml index 9c784976..fb76b414 100644 --- a/api-spec/paths/activity/comment/getComments.yaml +++ b/api-spec/paths/comments/getComments.yaml @@ -3,13 +3,13 @@ summary: Get Comments description: Returns a list of comments. operationId: getComments parameters: -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Limit -- $ref: ../../../components/parameters.yaml#/Meta -- $ref: ../../../components/parameters.yaml#/Offset -- $ref: ../../../components/parameters.yaml#/Sort -- $ref: ../../../components/parameters.yaml#/Filter -- $ref: ../../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search responses: '200': content: @@ -20,17 +20,17 @@ responses: data: type: array items: - $ref: ../../../components/schemas/Comments.yaml + $ref: ../../components/schemas/Comments.yaml meta: - $ref: ../../../components/schemas/x-metadata.yaml + $ref: ../../components/schemas/x-metadata.yaml description: Successful request '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript diff --git a/api-spec/paths/activity/comment/index.yaml b/api-spec/paths/comments/index.yaml similarity index 100% rename from api-spec/paths/activity/comment/index.yaml rename to api-spec/paths/comments/index.yaml diff --git a/api-spec/paths/activity/comment/updateComments.yaml b/api-spec/paths/comments/updateComments.yaml similarity index 62% rename from api-spec/paths/activity/comment/updateComments.yaml rename to api-spec/paths/comments/updateComments.yaml index fe4b67fc..1e5c66a1 100644 --- a/api-spec/paths/activity/comment/updateComments.yaml +++ b/api-spec/paths/comments/updateComments.yaml @@ -3,13 +3,13 @@ summary: Update Multiple comments description: Update multiple existing comments. operationId: updateComments parameters: -- $ref: ../../../components/parameters.yaml#/Fields -- $ref: ../../../components/parameters.yaml#/Limit -- $ref: ../../../components/parameters.yaml#/Meta -- $ref: ../../../components/parameters.yaml#/Offset -- $ref: ../../../components/parameters.yaml#/Sort -- $ref: ../../../components/parameters.yaml#/Filter -- $ref: ../../../components/parameters.yaml#/Search +- $ref: ../../components/parameters.yaml#/Fields +- $ref: ../../components/parameters.yaml#/Limit +- $ref: ../../components/parameters.yaml#/Meta +- $ref: ../../components/parameters.yaml#/Offset +- $ref: ../../components/parameters.yaml#/Sort +- $ref: ../../components/parameters.yaml#/Filter +- $ref: ../../components/parameters.yaml#/Search requestBody: content: application/json: @@ -17,7 +17,7 @@ requestBody: type: object properties: data: - $ref: ../../../components/schemas/Comments.yaml + $ref: ../../components/schemas/Comments.yaml keys: type: array items: @@ -33,16 +33,16 @@ responses: data: type: array items: - $ref: ../../../components/schemas/Comments.yaml + $ref: ../../components/schemas/Comments.yaml meta: - $ref: ../../../components/schemas/x-metadata.yaml + $ref: ../../components/schemas/x-metadata.yaml '401': - $ref: ../../../components/responses.yaml#/UnauthorizedError + $ref: ../../components/responses.yaml#/UnauthorizedError '404': - $ref: ../../../components/responses.yaml#/NotFoundError + $ref: ../../components/responses.yaml#/NotFoundError security: [] tags: -- Activity +- Comments x-codeSamples: - label: Directus SDK lang: JavaScript From 8370b98b48bef25607572f424864cca643c0cda4 Mon Sep 17 00:00:00 2001 From: Carmen Huidobro Date: Fri, 13 Dec 2024 12:52:41 +0100 Subject: [PATCH 119/119] Fix linting errors --- api-spec/components/schemas/extensions.yaml | 2 +- api-spec/paths/items/_collection/deleteItems.yaml | 6 +++++- .../permissions/me/_collection/_id/getItemPermissions.yaml | 4 ++-- api-spec/paths/permissions/me/getUserPermissions.yaml | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/api-spec/components/schemas/extensions.yaml b/api-spec/components/schemas/extensions.yaml index cc1c8df9..2a24a5ec 100644 --- a/api-spec/components/schemas/extensions.yaml +++ b/api-spec/components/schemas/extensions.yaml @@ -42,4 +42,4 @@ properties: } ``` type: boolean -x`-collection: directus_extensions +x-collection: directus_extensions diff --git a/api-spec/paths/items/_collection/deleteItems.yaml b/api-spec/paths/items/_collection/deleteItems.yaml index 1bc4d79a..9462ec49 100644 --- a/api-spec/paths/items/_collection/deleteItems.yaml +++ b/api-spec/paths/items/_collection/deleteItems.yaml @@ -21,9 +21,13 @@ requestBody: type: string - type: object description: Object containing either `keys` or `query` to selected what items to update. - data: + properties: keys: + type: array + items: + type: string items: + type: object responses: '204': description: The resource was deleted successfully. diff --git a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml index 6166baf5..7987513d 100644 --- a/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml +++ b/api-spec/paths/permissions/me/_collection/_id/getItemPermissions.yaml @@ -16,7 +16,7 @@ responses: application/json: examples: collection: - data: + value: update: access: boolean delete: @@ -24,7 +24,7 @@ responses: share: access: boolean singleton: - data: + value: update: access: boolean presets: permission_presets diff --git a/api-spec/paths/permissions/me/getUserPermissions.yaml b/api-spec/paths/permissions/me/getUserPermissions.yaml index 34083040..67b7bafa 100644 --- a/api-spec/paths/permissions/me/getUserPermissions.yaml +++ b/api-spec/paths/permissions/me/getUserPermissions.yaml @@ -8,12 +8,12 @@ description: | operationId: getUserPermissions responses: '200': - description: The request was + description: The request was successful. content: application/json: examples: example: - data: + value: "": create: access: "none | partial | full"