Skip to content

Add complete standalone curl example #39

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ All of the endpoints require you to authenticate. You will have to find your own
<td><code>dev_hash</code></td>
<td>string</td>
<td>
Calculate with <code>timestamp</code> and <code>api_secret</code>
Calculate the hexadecimal digest with <code>timestamp</code> and <code>api_secret</code>
<br>
Formula: <code>md5(concatenate(&lt;timestamp&gt;, &lt;api_secret&gt;))</code>
</td>
Expand All @@ -57,6 +57,19 @@ Successful request will response with `2xx` status code together with response b
#### Failure
Failure request will response with an error status code together with an error message.

Example:

```
$ timestamp=$(date +%s)
$ api_key=EXAMPLE26ab0db90d72e28ad0ba1e22ee51
$ api_secret=EXAMPLEb026324c6904b2a9cb4b88d6d61c
$ curl "https://platform.api.onesky.io/1/project-groups?api_key=$api_key&timestamp=$timestamp&dev_hash=$(echo -n "$timestamp$api_secret" | md5)"
{
"meta": {"status":200,"record_count":1,"page_count":1,"next_page":null,"prev_page":null,"first_page":null,"last_page":null},
"data": [{"id":"34","name":"Test"}]
}
```

Example:
```
status 400 bad request
Expand Down