coralproject / ask-docs

Official Ask Documentation for The Coral Project
https://docs.coralproject.net/ask/
Other
11 stars 14 forks source link

More documentation for the filter by. #45

Closed gabelula closed 8 years ago

gabelula commented 8 years ago

@impronunciable Can you confirm that this is what we want from this endpoint?

@aiboyles Can you check if this is understandable about parameters and response?

aiboyles commented 8 years ago

Could there be more parameters provided in the example call? I'd prefer to have EVERY parameter shown in the example call, so people can see how they're used. For instance:

GET
https://localhost:8080/api/form_submissions/123?skip=y&limit=5&orderby=date&filterby=^(?!test_the_flag)

I also think, looking at the amount of parameters for this and potentially the amount of parameters for other endpoints, that it might make sense to put this into a table where we can list 1) Whether or not the parameter is required, and 2) Possible values for the parameter.

Something like this:

| Parameters  | Required? | Value            | Description     |
|:------------|:----------|:----------------|:----------------|
| form_id     |Y          |Number         |Form id for which we want to see the submissions     |
| skip        |Y          |Number         |Skip the first _n_ submissions      |
| limit       |N          |Number         |Limit to _n_ submission returns      |
| orderby     |N          |`asc` or `dsc` |Order by ascending date (`asc`) or descending date (`dsc`)   |
| filterby    |N          | Regex string (example: `^(?!test_the_flag)`) |Filter by a specific flag using regular expressions. If you want to match all the submissions that do not have a specific flag, use `^(?!test_the_flag)`  |
aiboyles commented 8 years ago

lgtm. I'll make the formatting changes on my end.