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

website: Document Vagrant Cloud search API #10020

Merged
merged 2 commits into from
Jul 16, 2018

Conversation

justincampbell
Copy link
Contributor

No description provided.

Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a couple of questions/changes but overall looks good 🎉 🌮

* `provider` - (Optional) Filter results to boxes supporting for a specific provider.
* `sort` - (Optional, default: `"downloads"`) The field to sort results on. Can be one of `"downloads"`, `"created"`, or `"updated"`.
* `order` - (Optional, default: `"desc"`) The order to return the sorted field in. Can be `"desc"` os `"asc"`.
* `limit` - (Optional, default: `10`) The number of results to return (max of TODO).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max of TODO should be fixed to whatever the max is


* `q` - (Optional) The search query. Results will match the `username`, `name`, or `short_description` fields for a box. If omitted, the top boxes based on `sort` and `order` will be returned (defaults to "downloads desc").
* `provider` - (Optional) Filter results to boxes supporting for a specific provider.
* `sort` - (Optional, default: `"downloads"`) The field to sort results on. Can be one of `"downloads"`, `"created"`, or `"updated"`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a better question for the corresponding website PR, but what gets returned when you provide a sort key that isn't supported? Is there a new HTTP response code that needs to be documented here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think right now it just ignores it, but I will check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated now! Will return 400.


```json
{
"boxes": [

This comment was marked as resolved.

@justincampbell justincampbell force-pushed the website-vagrant-cloud-api-search branch from 63c2839 to 3e0477c Compare July 13, 2018 20:28
@briancain
Copy link
Member

Looking good, I think we're just missing the new HTTP 400 status code documented with the rest of the response codes.

@justincampbell
Copy link
Contributor Author

@briancain Switched this to be a 422 instead, see linked PR

Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 ☁️

@justincampbell justincampbell merged commit e56e85c into master Jul 16, 2018
@justincampbell justincampbell deleted the website-vagrant-cloud-api-search branch July 16, 2018 20:46
@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants