mirror of
https://github.com/directus/directus.git
synced 2026-01-24 03:17:56 -05:00
updates api specs
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Directus SDK
|
||||
title: Directus API
|
||||
description: Template for generating any kind of SDK.
|
||||
contact:
|
||||
email: contact@directus.io
|
||||
license:
|
||||
name: GPL-3.0
|
||||
url: "https://www.gnu.org/licenses/gpl-3.0.de.html"
|
||||
version: 1.0.0
|
||||
version: 9.0.0
|
||||
externalDocs:
|
||||
description: Directus Docs
|
||||
url: "https://docs.directus.io"
|
||||
servers:
|
||||
- url: "http://localhost:41201/"
|
||||
- url: "https://demo.directus.io/"
|
||||
- url: "/"
|
||||
tags:
|
||||
@@ -21,8 +22,8 @@ tags:
|
||||
description: Image typed files can be dynamically resized and transformed to fit any need.
|
||||
- name: Authentication
|
||||
description: All events that happen within Directus are tracked and stored in the activities collection. This gives you full accountability over everything that happens.
|
||||
- name: Collection presets
|
||||
description: Collection 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.
|
||||
- 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.
|
||||
- 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.
|
||||
- name: Extensions
|
||||
@@ -71,7 +72,7 @@ paths:
|
||||
$ref: "./paths/activity/activity-comment.yaml"
|
||||
|
||||
# Assets
|
||||
/assets/{key}:
|
||||
/assets/{id}:
|
||||
$ref: "./paths/assets/assets.yaml"
|
||||
|
||||
# Authentication
|
||||
@@ -172,16 +173,6 @@ paths:
|
||||
/roles/{id}:
|
||||
$ref: "./paths/roles/role.yaml"
|
||||
|
||||
# SCIM
|
||||
/scim/v2/Users:
|
||||
$ref: "./paths/scim/users.yaml"
|
||||
/scim/v2/Users/{id}:
|
||||
$ref: "./paths/scim/user.yaml"
|
||||
/scim/v2/Groups:
|
||||
$ref: "./paths/scim/groups.yaml"
|
||||
/scim/v2/Groups/{id}:
|
||||
$ref: "./paths/scim/group.yaml"
|
||||
|
||||
# Server
|
||||
/server/info:
|
||||
$ref: "./paths/server/info.yaml"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
description: Index of the file.
|
||||
description: Index
|
||||
name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
type: integer
|
||||
|
||||
@@ -21,8 +21,8 @@ post:
|
||||
example: password
|
||||
mode:
|
||||
type: string
|
||||
enum: [jwt, cookie]
|
||||
default: jwt
|
||||
enum: ["json", cookie]
|
||||
default: "json"
|
||||
description: Choose between retrieving the token as a string, or setting it as a cookie.
|
||||
otp:
|
||||
type: string
|
||||
@@ -44,3 +44,6 @@ post:
|
||||
expires:
|
||||
type: integer
|
||||
example: 900
|
||||
refresh_token:
|
||||
type: string
|
||||
example: yuOJkjdPXMd...
|
||||
|
||||
@@ -3,6 +3,17 @@ post:
|
||||
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
|
||||
"200":
|
||||
description: Request successful
|
||||
|
||||
@@ -14,10 +14,6 @@ post:
|
||||
type: string
|
||||
example: admin@example.com
|
||||
description: Email address of the user you're requesting a reset for.
|
||||
reset_url:
|
||||
type: string
|
||||
example: https://mydomain.com/passwordreset
|
||||
description: Provide a custom reset url which the link in the Email will lead to. The reset token will be passed as a parameter.
|
||||
responses:
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
|
||||
@@ -31,5 +31,8 @@ post:
|
||||
expires:
|
||||
type: integer
|
||||
example: 900
|
||||
refresh_token:
|
||||
type: string
|
||||
example: Gy-caJMpmGTA...
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
|
||||
@@ -53,9 +53,10 @@ post:
|
||||
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
|
||||
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.
|
||||
search_query:
|
||||
example: null
|
||||
search:
|
||||
type: string
|
||||
description: What the user searched for in search/filter in the header bar.
|
||||
filters:
|
||||
@@ -63,6 +64,9 @@ post:
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
example: aHKLAakdVghzD
|
||||
field:
|
||||
type: string
|
||||
example: rating
|
||||
@@ -72,18 +76,15 @@ post:
|
||||
value:
|
||||
type: integer
|
||||
example: 4.5
|
||||
view_type:
|
||||
layout:
|
||||
type: string
|
||||
description: Name of the view type that is used. Defaults to tabular.
|
||||
view_query:
|
||||
description: Name of the view type that is used.
|
||||
layout_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:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
get:
|
||||
description: Retrieve a single SCIM Group by unique identifier.
|
||||
operationId: getSCIMGroup
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
patch:
|
||||
description: Update an existing SCIM Group
|
||||
operationId: updateSCIMGroup
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: Successful request
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
delete:
|
||||
description: Delete an existing SCIM Group
|
||||
operationId: deleteSCIMGroup
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/Id"
|
||||
@@ -1,59 +0,0 @@
|
||||
get:
|
||||
description: List the SCIM Groups.
|
||||
operationId: getSCIMGroups
|
||||
parameters:
|
||||
- description: The 1-based index of the first result in the current set of list results.
|
||||
in: query
|
||||
name: startIndex
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
- description: Specifies the desired maximum number of query results per page.
|
||||
in: query
|
||||
name: count
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
- description:
|
||||
Filter by `id`, `userName`, `emails.value` and `externalId` attributes
|
||||
are supported. Only the `eq` operator is supported. Uses format `?filter=id eq
|
||||
15`
|
||||
in: query
|
||||
name: filter
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
post:
|
||||
description: Create a new SCIM Group.
|
||||
operationId: createSCIMGroup
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
@@ -1,76 +0,0 @@
|
||||
get:
|
||||
description: Retrieve a single SCIM user by unique identifier.
|
||||
operationId: getSCIMUser
|
||||
parameters:
|
||||
- description:
|
||||
The `external_id` saved in `directus_users`. Corresponds to the `id`
|
||||
in the SCIM Users endpoint result.
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
patch:
|
||||
description: Update an existing SCIM User
|
||||
operationId: updateSCIMUser
|
||||
parameters:
|
||||
- description:
|
||||
The `external_id` saved in `directus_users`. Corresponds to the `id`
|
||||
in the SCIM Users endpoint result.
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: Successful request
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
delete:
|
||||
description: Delete an existing SCIM User
|
||||
operationId: deleteSCIMUser
|
||||
parameters:
|
||||
- description:
|
||||
The `external_id` saved in `directus_users`. Corresponds to the `id`
|
||||
in the SCIM Users endpoint result.
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
@@ -1,59 +0,0 @@
|
||||
get:
|
||||
description: List the SCIM users
|
||||
operationId: getSCIMUsers
|
||||
parameters:
|
||||
- description: The 1-based index of the first result in the current set of list results.
|
||||
in: query
|
||||
name: startIndex
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
- description: Specifies the desired maximum number of query results per page.
|
||||
in: query
|
||||
name: count
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
- description:
|
||||
Filter by `id`, `userName`, `emails.value` and `externalId` attributes
|
||||
are supported. Only the `eq` operator is supported. Uses format `?filter=id eq
|
||||
15`
|
||||
in: query
|
||||
name: filter
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
post:
|
||||
description: Create a new SCIM User.
|
||||
operationId: createSCIMUser
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: Successful request
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
tags:
|
||||
- SCIM
|
||||
Reference in New Issue
Block a user