Skip to content

Commit

Permalink
Updating Readme to have info about querying.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonvfx committed Jun 1, 2015
1 parent a529877 commit d315e0a
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,46 @@ User `Authorization` header:
( I don't suggest using this unless you have an internal Shotgun sever. )
```
Basic-user <base64 user_name:user_password>
```
```

## Query String

- page (int): Page of results to return.
- limit (int): Number of results per page to return
- fields (comma seperated listed of string): The fields/columns to return.
- q (string): The query to execute. Syntax below.


## Query Syntax

There are 3 formats for the query but they all have the same basic structures for the filters themselves. Each filter is defined by an array of 3 values.

```
[<name>, <relation>, <values>]
```

- Name and relation are both string.
- Values can be either a value (string, int, bool, etc) or an array of values.

### Format 1

```
q=and([<name>, <relation>, <values>],...)
q=or([<name>, <relation>, <values>],...)
```

### Format 2

```
q={"logical_operator":"and", "conditions":[[<name>, <relation>, <values>],...]}
```

### Format 3

**This format is currently has a bug.**

This format the logical_operator is always assumed to be "and".

```
q=[[<name>, <relation>, <values>],...]
```

0 comments on commit d315e0a

Please sign in to comment.