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 Task schema definition doesn't contains the labels link [area/api] #12591

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

Comments

@bednar
Copy link
Contributor

bednar commented Mar 13, 2019

The Task schema has defined links with self, members, owners, runs and logs property:

Task:
      type: object
      properties:
        id:
          readOnly: true
          type: string
        orgID:
          description: The ID of the organization that owns this Task.
          type: string
        org:
          description: The name of the organization that owns this Task.
          type: string
        name:
          description: A description of the task.
          type: string
        status:
          description: The current status of the task. When updated to 'inactive', cancels all queued jobs of this task.
          default: active
          type: string
          enum:
            - active
            - inactive
        labels:
          $ref: "#/components/schemas/Labels"
        authorizationID:
          description: The ID of the authorization used when this task communicates with the query engine.
          type: string
        flux:
          description: The Flux script to run for this task.
          type: string
        every:
          description: A simple task repetition schedule; parsed from Flux.
          type: string
        cron:
          description: A task repetition schedule in the form '* * * * * *'; parsed from Flux.
          type: string
        offset:
          description: Duration to delay after the schedule, before executing the task; parsed from flux.
          type: string
        latestCompleted:
          description: Timestamp of latest scheduled, completed run, RFC3339.
          type: string
          format: date-time
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        links:
          type: object
          readOnly: true
          example:
            self: "/api/v2/tasks/1"
            owners: "/api/v2/tasks/1/owners"
            members: "/api/v2/tasks/1/members"
            runs: "/api/v2/tasks/1/runs"
            logs: "/api/v2/tasks/1/logs"
          properties:
            self:
              type: string
              format: uri
            owners:
              type: string
              format: uri
            members:
              type: string
              format: uri
            runs:
              type: string
              format: uri
            logs:
              type: string
              format: uri
      required: [id, name, orgID, flux]

but the response also contains labels property:

-> POST 
-> http://127.0.0.1:9999/api/v2/tasks
-> {
	"orgID": "03897f800f362000",
	"name": "it task1552469966011-IT",
	"status": "active",
	"flux": "option task \u003d {name: \"it task1552469966011-IT\", cron: \"0 2 * * *\"} \n from(bucket:\"my-bucket\") |\u003e range(start: 0) |\u003e last()"
}

<- 201 
<- Created
<- {
	"links": {
		"labels": "/api/v2/tasks/03899a483515c000/labels",
		"logs": "/api/v2/tasks/03899a483515c000/logs",
		"members": "/api/v2/tasks/03899a483515c000/members",
		"owners": "/api/v2/tasks/03899a483515c000/owners",
		"runs": "/api/v2/tasks/03899a483515c000/runs",
		"self": "/api/v2/tasks/03899a483515c000"
	},
	"labels": [],
	"id": "03899a483515c000",
	"orgID": "03897f800f362000",
	"org": "my-org",
	"authorizationID": "03899a481eb62000",
	"name": "it task1552469966011-IT",
	"status": "active",
	"flux": "option task = {name: \"it task1552469966011-IT\", cron: \"0 2 * * *\"} \n from(bucket:\"my-bucket\") |\u003e range(start: 0) |\u003e last()",
	"cron": "0 2 * * *"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants