ES
The API currently supports only JSON as an exchange format. Be sure to set both the C<Content-Type>
and C<Accept> headers for every request as C<application/json>.
All Date objects are returned i
All requests that result in an error return the appropriate 4xx or 5xx error code with a custom JSON
error object:
{
"code": "E0001",
"error": "API validation failed",
"status
eyJh...s5aM
>
< HTTP/1.1 200 OK
< Content-Length: 653
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 16:33:34 GMT
< Server: OWL/1.11
<
{
< Server: OWL/1.00
< Date: Mon, 15 May 2023 11:25:11 GMT
< Content-Type: application/json;charset=UTF-8
<
{
"comment": "Test user for internal testing only",
"email":
< Date: Fri, 12 May 2023 06:31:21 GMT
< Server: OWL/1.00
< Content-Type: application/json;charset=UTF-8
< Content-Length: 1228
<
{
"error": "",
"private_key": "---
< Date: Mon, 15 May 2023 14:48:22 GMT
< Content-Length: 292
< Content-Type: application/json;charset=UTF-8
<
[
{
"description": "OWL Administrators",
"groupname
2023 15:00:57 GMT
< Content-Length: 70
< Server: OWL/1.00
< Content-Type: application/json;charset=UTF-8
<
{
"description": "Test group",
"groupname": "FooBar",
"
eyJh...Bh7g
>
< HTTP/1.1 200 OK
< Content-Length: 77
< Content-Type: application/json;charset=UTF-8
< Date: Mon, 15 May 2023 14:50:45 GMT
< Server: OWL/1.00
<
{
API server,
then returns the access token
# curl -v -X POST \
-H "Accept: application/json" \
-d '{
"username": "test",
"password": "test",
"encrypted": false
https://localhost:8695/api/authorize
# curl -v -X POST \
-H "Accept: application/json" \
-F username=test -F password=test \
https://localhost:8695/api/authorize
> PO
orize HTTP/1.1
> Host: localhost:8695
> User-Agent: curl/7.68.0
> Accept: application/json
> Content-Length: 248
> Content-Type: multipart/form-data; boundary=-----6a21ca7cea8dc981
m-urlencoded
>
< HTTP/1.1 200 OK
< Content-Length: 30
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 10:18:22 GMT
< Server: OWL/1.11
<
{
ed
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 74
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 10:22:11 GMT
< Server: OWL/1.11
<
{
m-urlencoded
>
< HTTP/1.1 200 OK
< Content-Length: 30
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 10:40:17 GMT
< Server: OWL/1.11
<
{
eyJh...GBew
>
< HTTP/1.1 200 OK
< Content-Length: 30
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 11:27:09 GMT
< Server: OWL/1.11
<
{
yJh...s5aM
>
< HTTP/1.1 200 OK
< Content-Length: 1081
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 11:17:42 GMT
< Server: OWL/1.11
< Vary: Accept
oundary=...
>
< HTTP/1.1 200 OK
< Content-Length: 182
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 11:13:21 GMT
< Server: OWL/1.11
<
{
yJh...s5aM
>
< HTTP/1.1 200 OK
< Content-Length: 3188
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 08:05:01 GMT
< Server: OWL/1.11
< Vary: Accept
Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 241
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 07:31:08 GMT
< Server: OWL/1.11
<
{
Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 606
< Content-Type: application/json;charset=UTF-8
< Date: Wed, 14 Aug 2024 07:44:31 GMT
< Server: OWL/1.11
<
{