updates api specs

This commit is contained in:
Thulio Prado
2020-09-30 18:45:40 -03:00
parent 8c60dc41dd
commit 96fa38f12c
11 changed files with 40 additions and 280 deletions

View File

@@ -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...

View File

@@ -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

View File

@@ -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"

View File

@@ -31,5 +31,8 @@ post:
expires:
type: integer
example: 900
refresh_token:
type: string
example: Gy-caJMpmGTA...
"401":
$ref: "#/components/responses/UnauthorizedError"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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