Skip to content

Commit 7462a85

Browse files
committed
Enhance notes about date format
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 1cfd1ce commit 7462a85

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

docs/API.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The REST API provides access for authenticated users to their data inside the De
55

66
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`.
77
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
8+
- All request parameters are required, unless otherwise specified
89

910
## Naming
1011

@@ -20,7 +21,7 @@ The REST API provides access for authenticated users to their data inside the De
2021

2122
### 400 Bad request
2223

23-
In case the request is invalid, e.g. because a parameter is missing, a 400 error will be returned:
24+
In case the request is invalid, e.g. because a parameter is missing or an invalid value has been transmitted, a 400 error will be returned:
2425

2526
```json
2627
{
@@ -40,6 +41,12 @@ In any case a user doesn't have access to a requested entity, a 403 error will b
4041
}
4142
```
4243

44+
## Formats
45+
46+
### Date
47+
48+
Datetime values in request data need to be provided in ISO-8601. Example: 2020-01-20T09:52:43+00:00
49+
4350
## Headers
4451

4552
### If-Modified-Since
@@ -51,7 +58,7 @@ The supported date formats are:
5158
* (obsolete) RFC 850: `Sunday, 03-Aug-19 10:34:12 GMT`
5259
* (obsolete) ANSI C asctime(): `Sun Aug 3 10:34:12 2019`
5360

54-
It is highly recommended to only use the IMF-fixdate format.
61+
It is highly recommended to only use the IMF-fixdate format. Note that according to [RFC2616](https://tools.ietf.org/html/rfc2616#section-3.3) all HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.
5562

5663
Example curl request:
5764

@@ -197,6 +204,10 @@ Returns an array of board items
197204
}
198205
```
199206

207+
##### 403 Forbidden
208+
209+
A 403 response might be returned if the users ability to create new boards has been disabled by the administrator. For checking this before, see the `canCreateBoards` value in the [Nextcloud capabilties](./API-Nextcloud.md).
210+
200211
### GET /boards/{boardId} - Get board details
201212

202213
#### Request parameters

0 commit comments

Comments
 (0)