diff --git a/http/bucket_service.go b/http/bucket_service.go index 6cb0b59db5..7b5bdf4653 100644 --- a/http/bucket_service.go +++ b/http/bucket_service.go @@ -390,14 +390,6 @@ func decodeGetBucketsRequest(ctx context.Context, r *http.Request) (*getBucketsR req.filter.Organization = &org } - if bucketID := qp.Get("id"); bucketID != "" { - id, err := platform.IDFromString(bucketID) - if err != nil { - return nil, err - } - req.filter.ID = id - } - if name := qp.Get("name"); name != "" { req.filter.Name = &name } diff --git a/http/swagger.yml b/http/swagger.yml index cd60ff7105..ef4b8055c3 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -2396,8 +2396,17 @@ paths: parameters: - in: query name: org - description: specifies the organization of the resource - required: true + description: specifies the organization name of the resource + schema: + type: string + - in: query + name: orgID + description: specifies the organization id of the resource + schema: + type: string + - in: query + name: name + description: only returns buckets with the specified name schema: type: string responses: diff --git a/testing/bucket_service.go b/testing/bucket_service.go index 8e79dfe62c..2de5bbc0b3 100644 --- a/testing/bucket_service.go +++ b/testing/bucket_service.go @@ -626,42 +626,6 @@ func FindBuckets( }, }, }, - { - name: "find bucket by id", - fields: BucketFields{ - Organizations: []*platform.Organization{ - { - Name: "theorg", - ID: MustIDBase16(orgOneID), - }, - }, - Buckets: []*platform.Bucket{ - { - ID: MustIDBase16(bucketOneID), - OrganizationID: MustIDBase16(orgOneID), - Name: "abc", - }, - { - ID: MustIDBase16(bucketTwoID), - OrganizationID: MustIDBase16(orgOneID), - Name: "xyz", - }, - }, - }, - args: args{ - ID: MustIDBase16(bucketTwoID), - }, - wants: wants{ - buckets: []*platform.Bucket{ - { - ID: MustIDBase16(bucketTwoID), - OrganizationID: MustIDBase16(orgOneID), - Organization: "theorg", - Name: "xyz", - }, - }, - }, - }, { name: "find bucket by name", fields: BucketFields{