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 "orgID" parameter shouldn't be required for "GET /telegrafs" [area/api] #13578

Closed
bednar opened this issue Apr 23, 2019 · 0 comments · Fixed by #13628
Closed
Labels

Comments

@bednar
Copy link
Contributor

bednar commented Apr 23, 2019

The GET /telegrafs is defined as:

  /telegrafs:
    get:
      tags:
        - Telegrafs
      parameters:
          - $ref: '#/components/parameters/TraceSpan'
          - in: query
            name: orgID
            description: specifies the organization of the resource
            required: true
            schema:
              type: string
      responses:
        '200':
          description: a list of telegraf configs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Telegrafs"
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Telegrafs
      summary: Create a telegraf config
      parameters:
          - $ref: '#/components/parameters/TraceSpan'
      requestBody:
        description: telegraf config to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TelegrafRequest"
      responses:
        '201':
          description: Telegraf config created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Telegraf"
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

but the orgID parameter is not required:

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

<- 200 
<- OK
<- {
	"configurations": [{
		"id": "03be5b95aaae8000",
		"organizationID": "03be595f25ae8000",
		"name": "tc1556010300038-IT",
		"description": "test-config",
		"agent": {
			"collectionInterval": 1000
		},
		"plugins": [{
			"name": "cpu",
			"type": "input",
			"comment": "",
			"config": {}
		}, {
			"name": "influxdb_v2",
			"type": "output",
			"comment": "Output to Influx 2.0",
			"config": {
				"urls": ["http://127.0.0.1:9999"],
				"token": "$INFLUX_TOKEN",
				"organization": "my-org",
				"bucket": "my-bucket"
			}
		}],
		"labels": [],
		"links": {
			"self": "/api/v2/telegrafs/03be5b95aaae8000",
			"labels": "/api/v2/telegrafs/03be5b95aaae8000/labels",
			"members": "/api/v2/telegrafs/03be5b95aaae8000/members",
			"owners": "/api/v2/telegrafs/03be5b95aaae8000/owners"
		}
	}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant