-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
442383f
commit ab801c7
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
post: | ||
$ref: createDashboard.yaml |