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

LabelsApi: orgID parameter has to be pass as second argument #57

Merged
merged 2 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 1.1.0 [unreleased]

### Bugs
1. [#57](https://github.com/influxdata/influxdb-client-java/pull/57): LabelsApi: orgID parameter has to be pass as second argument

## 1.0.0 [2019-08-30]

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public List<Label> findLabelsByOrg(@Nonnull final Organization organization) {
@Override
public List<Label> findLabelsByOrgId(@Nullable final String orgID) {

Call<LabelsResponse> sourcesCall = service.getLabels(orgID, null);
Call<LabelsResponse> sourcesCall = service.getLabels(null, orgID);

LabelsResponse labels = execute(sourcesCall);
LOG.log(Level.FINEST, "findLabels found: {0}", labels);
Expand Down
1 change: 1 addition & 0 deletions client/src/test/java/com/influxdb/client/ITLabelsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void findLabels() {
@Test
void findLabelsByOrganization() {

labelsApi.createLabel(generateName("Cool Resource"), new HashMap<>(), organization.getId());
Organization organization = influxDBClient.getOrganizationsApi().createOrganization(generateName("org"));

List<Label> labels = labelsApi.findLabelsByOrg(organization);
Expand Down