Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB 2.0: The Dashboard's "createdAt" and "updatedAt" has to be defines as "date-time" [area/api] #12970

Closed
bednar opened this issue Mar 28, 2019 · 0 comments
Assignees
Labels

Comments

@bednar
Copy link
Contributor

bednar commented Mar 28, 2019

The Dashboard is defined as:

Dashboard:
      type: object
      allOf:
        - $ref: "#/components/schemas/CreateDashboardRequest"
        - type: object
          properties:
            links:
              type: object
              example:
                self: "/api/v2/dashboards/1"
                cells: "/api/v2/dashboards/1/cells"
                owners: "/api/v2/dashboards/1/owners"
                members: "/api/v2/dashboards/1/members"
                logs: "/api/v2/dashboards/1/logs"
              properties:
                self:
                  $ref: "#/components/schemas/Link"
                cells:
                  $ref: "#/components/schemas/Link"
                members:
                  $ref: "#/components/schemas/Link"
                owners:
                  $ref: "#/components/schemas/Link"
                logs:
                  $ref: "#/components/schemas/Link"
            id:
              readOnly: true
              type: string
            meta:
              type: object
              properties:
                createdAt:
                  type: string
                  format: date
                updatedAt:
                  type: string
                  format: date
            cells:
                $ref: "#/components/schemas/Cells"
            labels:
                $ref: "#/components/schemas/Labels"

but createAt and updatedAt has to be defined as date-time because a response is something like 0001-01-01T00:00:00Z.

-> GET 
-> http://127.0.0.1:9999/api/v2/protos

<- 200 
<- OK
<- {
	"protos": [{
		"links": {
			"dashboards": "/api/v2/protos/0000000000000001/dashboards"
		},
		"id": "0000000000000001",
		"name": "system",
		"dashboards": [{
			"dashboard": {
				"name": "System",
				"description": "A collection of useful visualizations for monitoring your System",
				"cells": [{
					"id": "034b00f7d5bc5000",
					"x": 0,
					"y": 0,
					"w": 12,
					"h": 1
				}, {
					"id": "034b0289893c5000",
					"x": 0,
					"y": 1,
					"w": 3,
					"h": 1
				}, {
					"id": "034b044f25fc5000",
					"x": 3,
					"y": 1,
					"w": 2,
					"h": 1
				}, {
					"id": "034b0467b3bc5000",
					"x": 5,
					"y": 1,
					"w": 2,
					"h": 1
				}, {
					"id": "034b0545df3c5000",
					"x": 7,
					"y": 1,
					"w": 2,
					"h": 1
				}, {
					"id": "034b062b47fc5000",
					"x": 0,
					"y": 2,
					"w": 3,
					"h": 3
				}, {
					"id": "034b06485dbc5000",
					"x": 3,
					"y": 2,
					"w": 3,
					"h": 3
				}, {
					"id": "034b06d6b4bc5000",
					"x": 6,
					"y": 2,
					"w": 3,
					"h": 3
				}, {
					"id": "034b0745edbc5000",
					"x": 9,
					"y": 1,
					"w": 3,
					"h": 4
				}, {
					"id": "034b0823adbc5000",
					"x": 0,
					"y": 5,
					"w": 3,
					"h": 3
				}, {
					"id": "034b084189bc5000",
					"x": 3,
					"y": 5,
					"w": 3,
					"h": 3
				}, {
					"id": "034b08e07abc5000",
					"x": 6,
					"y": 5,
					"w": 3,
					"h": 3
				}, {
					"id": "034b0916cc3c5000",
					"x": 9,
					"y": 5,
					"w": 3,
					"h": 3
				}],
				"meta": {
					"createdAt": "0001-01-01T00:00:00Z",
					"updatedAt": "0001-01-01T00:00:00Z"
				}
			
				...
			}
		}]
	}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants