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

Make /info/bidders endpoint consistent between Go and Java #1788

Closed
bretg opened this issue Apr 2, 2021 · 7 comments
Closed

Make /info/bidders endpoint consistent between Go and Java #1788

bretg opened this issue Apr 2, 2021 · 7 comments
Labels
feature request Intent to implement An issue describing a plan for a major feature. These are intended for community feedback PBS-Go

Comments

@bretg
Copy link
Contributor

bretg commented Apr 2, 2021

As discussed in PBS committee, there's currently a difference between PBS-Go and PBS-Java in the /info/bidders endpoint.

  • PBS-Go lists all bid adapters whether or not they're enabled
  • PBS-Java lists only enabled adapters

As both use cases are useful, the proposal is to add a query string parameter (?enabledonly=true/false). This value has no default and will return HTTP 400 if not provided with body "missing enabledonly flag"

The results of the /info/bidders/BIDDER endpoint should include all the fields currently in the PBS-Go output:

{
    "status": "ACTIVE",
    "usesHttps": true,
    "maintainer": {
        "email": "scope.sspp@adform.com"
    },
    "capabilities": {
        "app": {
            "mediaTypes": [
                "banner",
                "video"
            ]
        },
        "site": {
            "mediaTypes": [
                "banner",
                "video"
            ]
        }
    }
}
@SyntaxNode
Copy link
Contributor

SyntaxNode commented Apr 2, 2021

Sounds good to me. What should the behavior be if enabledonly parameter is not either true or false? Perhaps we should use the default, or another option is to return an error.

@SyntaxNode
Copy link
Contributor

Discussed with a few other folks. We currently prefer to validate enabledonly and return an error if it's not true or false, case insensitive.

@SyntaxNode SyntaxNode added the Intent to implement An issue describing a plan for a major feature. These are intended for community feedback label Apr 19, 2021
@bretg
Copy link
Contributor Author

bretg commented Aug 30, 2021

this was released with PBS-Java 1.71

@SyntaxNode
Copy link
Contributor

SyntaxNode commented Sep 8, 2021

I implemented this for PBS-Go, but noticed the specifications had since changed to return a 400 if the new enabledonly parameter is not provided. This is a breaking change which will affect folks at Xandr. To avoid problems for existing usages, I will have enabledonly default to false for PBS-Go.

@bretg
Copy link
Contributor Author

bretg commented Sep 8, 2021

This is ok @SyntaxNode , but the spec changing was due to your request from April 7th. :-)

@SyntaxNode
Copy link
Contributor

SyntaxNode commented Sep 8, 2021

Ah! I see. In that case I believe this is a misunderstanding. I didn't intend to make it required, but to validate the parameter only when its provided, such that:

/info/bidders -> all bidders (backwards compatibility)
/info/bidders?enabledonly=false -> all bidders
/info/bidders?enabledonly=true -> enabled only
/info/bidders?enabledonly= -> 400 error
/info/bidders?enabledonly=foo -> 400 error

@SyntaxNode
Copy link
Contributor

Implemented in PBS-Go 0.177.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Intent to implement An issue describing a plan for a major feature. These are intended for community feedback PBS-Go
Projects
None yet
Development

No branches or pull requests

2 participants