GeoKrety Server API
GeoKrety is an on-line tracking service targeted at Geocachers. Each registered object, called a GeoKret (plural: GeoKrety), has a unique tracking code, allowing its movements between locations such as Geocaches to be tracked and registered on the service.
https://geokrety.org is an open source project started in 2007. It is developped and maintained by a group of volunters.
Here you’ll find the online documentation for the API behind the project.
If you find any bug please open issues on the project GitHub tracker https://github.com/GeoKrety/geokrety-api/issues.
Caution
This is not yet the production service. See https://geokrety.org/api.php for the current service API.
Authentication ¶
Note
JWT Authentication
has to be replaced by OAUth2 for accounting, and more grannular security.
The API uses JWT Authentication to authenticate users to the server.
For authenticating, you need to be a registered user.
Once you have registered yourself as an user, you can send a request
to get the access_token
. Then use it in an
Authorization
header while sending a request in the following
manner: Authorization: JWT <access_token>
JWT Authentication ¶
Authenticate and generate tokenPOST/auth/session
Example URI
Authenticate and generate token
Headers
Content-Type: application/json
Body
{
"username": "someone",
"password": "strong password"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "Name of the user"
},
"password": {
"type": "string",
"description": "Password of the user"
}
},
"required": [
"username",
"password"
]
}
200
Successful authentication
Headers
Content-Type: application/json
Body
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGl0eSI6MjY0MjIsImlhdCI6MTUwMzg1NTcxNywibmJmIjoxNTAzODU1NzE3LCJleHAiOjE1MDM5NDIxMTd9.laV71Wi14Zd50MEZN5D15naGEmBYtaYV"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "JWT token"
}
},
"required": [
"access_token"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety ¶
Resources related to GeoKrety in the API.
GeoKrety endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ [1] | ✓ [1] | ✗ | ✗ | ✗ |
Authenticated | ✓ [1,2] | ✓ [1,2] | ✓ [1] | ✓ [1] | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only public informations
-
- Only self-owned informations
GeoKrety attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
tracking-code |
Tracking code (private key) | string | - | yes | - [1] |
name |
Geokrety name | string | yes | - | yes |
description |
Geokrety mission | string | - | - | yes |
missing |
True if GeoKret is marked as missing | boolean | - | yes | yes |
distance |
Total distance traveled | integer | - | yes | yes |
caches-count |
Total visited caches | integer | - | yes | yes |
pictures-count |
Total GeoKret pictures | integer | - | yes | yes |
average-rating |
Average note for this Geokret | float | - | yes | yes |
created-on-date-time |
Creation on date time | date | - | yes | yes |
updated-on-date-time |
Updated on date time | date | - | yes | yes |
-
- Only self-owned GeoKret, or already grabbed/seen moves
GeoKrety Relations:
Parameter | Type | Description | Readonly |
---|---|---|---|
owner |
users | User which created the GeoKret | yes |
last-position |
move | Last visited cache log | yes |
last-log |
move | Last posted log | yes |
holder |
users | User which currently hold the GeoKret | yes |
avatar |
pictures | GeoKret picture avatar | - |
type |
geokrety-types | GeoKret Type | - |
rates |
geokrety-rating | All rates for this GeoKret | - |
GeoKrety Details ¶
Get GeoKretGET/v1/geokrety/{geokret_id}
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Get GeoKret
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update GeoKretPATCH/v1/geokrety/{geokret_id}
Update a single GeoKret by id
.
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Update GeoKret
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission"
},
"relationships": {
"type": {
"data": {
"type": "geokrety-type",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokrety-type"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
}
}
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete GeoKretDELETE/v1/geokrety/{geokret_id}
Caution
This will delete all GeoKret activity, including logs, comments and pictures.
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Delete GeoKret
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Collection ¶
Create a GeoKretPOST/v1/geokrety
Example URI
Create a GeoKret
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Body
{
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission"
},
"relationships": {
"owner": {
"data": {
"type": "user",
"id": "1"
},
"type": {
"data": {
"type": "geokrety-type",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"owner": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"type": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokrety-type"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"data",
"type"
]
}
}
}
},
"required": [
"attributes",
"relationships"
]
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List all GeoKretyGET/v1/geokrety{?sort,filter}
Retrieve paginated list of GeoKrety.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
List GeoKrety
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
List User owned GeoKrety ¶
List User owned GeoKretyGET/v1/users/{user_id}/geokrety-owned{?sort,filter}
Retrieve paginated list of GeoKrety.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
List GeoKrety owned by User
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List User inventory ¶
List User inventoryGET/v1/users/{user_id}/geokrety-inventory{?sort,filter}
Retrieve paginated list of GeoKrety.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
List GeoKrety in User's inventory
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List user watched GeoKrety ¶
List user watched GeoKretyGET/v1/users/{user_id}/geokrety-watched{?sort,filter}
Retrieve paginated list of GeoKrety.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
List GeoKrety in User's watch list
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List GeoKrety by type ¶
List GeoKrety by typeGET/v1/geokrety-types/{type_id}/geokrety{?sort,filter}
Retrieve paginated list of GeoKrety.
Example URI
- type_id
string
(required) Example: 1ID of the type
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
List
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get moved GeoKret ¶
Get moved GeoKretGET/v1/moves/{move_id}/geokret
Example URI
- move_id
string
(required) Example: 1ID of the move.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get rated GeoKret ¶
Get rated GeoKretGET/v1/geokrety-ratings/{rate_id}/geokret
Example URI
- rate_id
string
(required) Example: 1ID of the rate.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get subscribed GeoKret ¶
Get subscribed GeoKretGET/v1/geokrety-subscriptions/{subscription_id}/geokret
Example URI
- subscription_id
string
(required) Example: 1ID of the GeoKret Subscription.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get GeoKret for an owner-code ¶
Get GeoKret for an owner-codeGET/v1/owner-codes/{owner_code_id}/geokret
Example URI
- owner_code_id
string
(required) Example: 1ID of the Owner Code.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety",
"id": "1",
"attributes": {
"name": "GeoKret name",
"description": "Geokrety mission",
"tracking-code": "XFS125",
"missing": false,
"distance": 12,
"caches-count": 8,
"pictures-count": 82,
"average-rating": 4,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/geokrety/1/relationships/type",
"related": "/geokrety/1/type"
}
},
"owner": {
"links": {
"self": "/geokrety/1/relationships/owner",
"related": "/geokrety/1/owner"
}
},
"last-position": {
"links": {
"self": "/geokrety/1/relationships/last-position",
"related": "/geokrety/1/last-position"
}
},
"last-log": {
"links": {
"self": "/geokrety/1/relationships/last-log",
"related": "/geokrety/1/last-log"
}
},
"holder": {
"links": {
"self": "/geokrety/1/relationships/holder",
"related": "/geokrety/1/holder"
}
},
"avatar": {
"links": {
"self": "/geokrety/1/relationships/avatar",
"related": "/geokrety/1/avatar"
}
},
"moves": {
"links": {
"self": "/geokrety/1/relationships/moves",
"related": "/geokrety/1/moves"
}
}
},
"links": {
"self": "/geokrety/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tracking-code": {
"type": "string"
},
"missing": {
"type": "boolean"
},
"distance": {
"type": "number"
},
"caches-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"average-rating": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"owner": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-position": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"last-log": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"holder": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"avatar": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"owner",
"last-position",
"last-log",
"holder",
"avatar",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Rating ¶
Resources related to GeoKrety Rating in the API.
GeoKrety Rating endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✗ | ✗ | ✗ | ✗ | ✗ |
Authenticated | ✗ | ✓ [1] | ✓ | ✓ [1] | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only self-owned informations
GeoKrety Rating attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
rate |
GeoKret rate | integer | yes | - | yes |
GeoKrety Rating Relations:
Parameter | Type | Description | Required |
---|---|---|---|
author |
users | User which rated the GeoKret | - |
geokret |
geokrety | GeoKret which was rated | yes |
GeoKrety Rating ¶
Get GeoKret RatingGET/v1/geokrety-ratings/{geokret_rating_id}
Example URI
- geokret_rating_id
string
(required) Example: 1ID of the Rate.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update GeoKret RatingPATCH/v1/geokrety-ratings/{geokret_rating_id}
Update a single GeoKret Rate by id
.
Example URI
- geokret_rating_id
string
(required) Example: 1ID of the Rate.
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete GeoKret RatingDELETE/v1/geokrety-ratings/{geokret_rating_id}
Delete a single GeoKret Rate.
Example URI
- geokret_rating_id
string
(required) Example: 1ID of the Rate.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKret Rating Collection ¶
Rate a GeoKretPOST/v1/geokrety-ratings
Example URI
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Body
{
"attributes": {
"rate": 5
},
"relationships": {
"geokret": {
"data": {
"type": "geokret",
"id": "1"
}
},
"author": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokret"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
},
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"geokret"
]
}
}
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List all geokrety-ratingsGET/v1/geokrety-ratings{?sort,filter}
Retrieve paginated list of geokrety-ratings.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
Rate a GeoKret ¶
Rate a GeoKretPOST/v1/geokrety/{geokret_id}/rate
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Body
{
"attributes": {
"rate": 5
},
"relationships": {
"geokret": {
"data": {
"type": "geokret",
"id": "1"
}
},
"author": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokret"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
},
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"geokret"
]
}
}
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"rate": {
"type": "number"
}
},
"required": [
"rate"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List User Rates ¶
List User RatesGET/v1/users/{user_id}/geokrety-rates{?sort,filter}
Retrieve paginated list of GeoKrety Rates.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List GeoKret Rates ¶
List GeoKret RatesGET/v1/geokrety/{geokret_id}/rates{?sort,filter}
Retrieve paginated list of GeoKret Rates.
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-rating",
"id": "1",
"attributes": {
"rate": 5
},
"relationships": {
"author": {
"links": {
"self": "/geokrety-ratings/1/relationships/author",
"related": "/geokrety-ratings/1/author"
}
},
"geokret": {
"links": {
"self": "/geokrety-ratings/1/relationships/geokret",
"related": "/geokrety-ratings/1/geokret"
}
}
},
"links": {
"self": "/geokrety-ratings/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-ratings"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Subscriptions ¶
Resources related to GeoKrety Subscriptions in the API.
TODO: Maybe this should be splitted in others collections
GeoKrety Subscriptions endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✓ | ✗ | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✗ | ✓ |
-
- Only self-owned informations
GeoKrety Subscriptions attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|
GeoKrety Subscriptions Relations:
Parameter | Type | Description | Required |
---|---|---|---|
user |
users | User which is subscribed | - |
geokret |
geokrety | GeoKret which was subscribed | yes |
Geokrety Subscriptions Details ¶
Get Geokrety SubscriptionsGET/v1/geokrety-subscriptions/{geokrety_subscriptions_id}
Example URI
- geokrety_subscriptions_id
string
(required) Example: 1ID of the geokrety-subscriptions.
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"geokret": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/geokret",
"related": "/geokrety-subscriptions/1/geokret"
}
},
"user": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/user",
"related": "/geokrety-subscriptions/1/user"
}
}
},
"links": {
"self": "/geokrety-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {}
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokret",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Delete Geokrety SubscriptionsDELETE/v1/geokrety-subscriptions/{geokrety_subscriptions_id}
Delete a single Geokrety Subscriptions.
Example URI
- geokrety_subscriptions_id
string
(required) Example: 1ID of the geokrety-subscriptions.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Subscriptions Collection ¶
Watch a GeoKretPOST/v1/geokrety-subscriptions
Note
If no user specified, currently connected user will be used.
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"geokrety": {
"data": {
"type": "geokrety",
"id": "1"
}
},
"user": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {}
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokrety"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
},
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
}
},
"required": [
"geokrety"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"geokret": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/geokret",
"related": "/geokrety-subscriptions/1/geokret"
}
},
"user": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/user",
"related": "/geokrety-subscriptions/1/user"
}
}
},
"links": {
"self": "/geokrety-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {}
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokret",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All GeoKrety SubscriptionsGET/v1/geokrety-subscriptions{?sort,filter}
Retrieve paginated list of GeoKrety Subscriptions.
Note
This is reserved to Administrators.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: subscribed-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"geokret": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/geokret",
"related": "/geokrety-subscriptions/1/geokret"
}
},
"user": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/user",
"related": "/geokrety-subscriptions/1/user"
}
}
},
"links": {
"self": "/geokrety-subscriptions/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Watch a GeoKret ¶
Watch a GeoKretPOST/v1/geokrety/1/{geokret_id}/watch
Note
If no user specified, currently connected user will be used.
Example URI
- geokret_id
string
(required) Example: 1ID of the geokrety.
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"user": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {}
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
}
}
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-subscription",
"id": "1",
"attributes": {},
"relationships": {
"geokret": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/geokret",
"related": "/geokrety-subscriptions/1/geokret"
}
},
"user": {
"links": {
"self": "/geokrety-subscriptions/1/relationships/user",
"related": "/geokrety-subscriptions/1/user"
}
}
},
"links": {
"self": "/geokrety-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {}
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokret",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
GeoKrety Types ¶
Resources related to GeoKrety in the API.
GeoKrety Types endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✗ | ✗ | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
GeoKrety Types attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
name |
Geokrety type name | string | yes | - | yes |
GeoKrety Types:
Currently known types.
Type | Description |
---|---|
0 |
Traditional |
1 |
A book/CD/DVD |
2 |
A Human |
3 |
A coin |
4 |
KretyPost |
GeoKrety Types Relations:
Parameter | Type | Description |
---|---|---|
geokrety |
geokrety | GeoKrety which are of the type |
GeoKrety Type Details ¶
Get GeoKrety TypeGET/v1/geokrety-types/{geokrety_types_id}
Example URI
- geokrety_types_id
string
(required) Example: 1ID of the GeoKrety Types.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/geokrety-types/1/relationships/geokrety",
"related": "/geokrety-types/1/geokrety"
}
}
},
"links": {
"self": "/geokrety-types/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Collection ¶
List all GeoKrety TypeGET/v1/geokrety-types{?sort,filter}
Retrieve paginated list of GeoKrety Type.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/geokrety-types/1/relationships/geokrety",
"related": "/geokrety-types/1/geokrety"
}
}
},
"links": {
"self": "/geokrety-types/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
GeoKrety Type Details ¶
Get GeoKrety TypeGET/v1/geokrety/{geokrety_id}/geokrety-types
Example URI
- geokrety_id
string
(required) Example: 1ID of the GeoKrety.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/geokrety-types/1/relationships/geokrety",
"related": "/geokrety-types/1/geokrety"
}
}
},
"links": {
"self": "/geokrety-types/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/geokrety-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Moves ¶
Resources related to moves in the API.
Moves endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✓ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✓ | ✓ [1,2] | ✓ [1,2] |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only self-owned informations
-
- Only on Owned GeoKrety
Moves attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
tracking-code |
GeoKret tracking code used to authenticate the move | integer | yes [1,3] | - | - |
waypoint |
Code of the position waypoint | string | yes [1] | - | yes |
latitude |
Postion when GeoKret was dropped/visited | double | yes [1] | - | yes |
longitude |
Postion when GeoKret was dropped/visited | double | yes [1] | - | yes |
comment |
User comment when moving GeoKret | string | recommended | - | yes |
username |
Override displayed username. (Anonymous only) | string | yes [2] | - | yes |
application |
Application name used to post this move | string | recommended | - | yes |
application-version |
Application version used to post this move | string | recommended | - | yes |
altitude |
Altitude of the position (m) | integer | - | yes | yes |
country |
Country of the position | string | - | yes | yes |
distance |
Distance with last position (km) | integer | - | yes | yes |
comments-count |
Comments count on this move | integer | - | yes | yes |
pictures-count |
Total Move pictures | integer | - | yes | yes |
created-on-date-time |
Creation on date time | date | - | yes | yes |
updated-on-date-time |
Updated on date time | date | - | yes | yes |
-
- Only for certain move types (See bellow)
-
- Only when unauthenticated
-
- Write only!
Moves Relations:
Parameter | Type | Description | Link mode | Required |
---|---|---|---|---|
type |
move-type | Type of the move | - | yes |
author |
users | User which created the move | Automatic from connected user | |
geokret |
geokret | GeoKret which was moved | Automatic from tracking-code | |
comments |
moves-comments | Comments for this move | - |
Geokrety Moves Details ¶
Get Geokrety MoveGET/v1/moves/{move_id}
Example URI
- move_id
string
(required) Example: 1ID of the move.
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"distance": {
"type": "number"
},
"comments-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"geokrety",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update Geokrety MovePATCH/v1/moves/{move_id}
Example URI
- move_id
string
(required) Example: 1ID of the move.
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
}
}
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
User himself or Administrators
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"distance": {
"type": "number"
},
"comments-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"geokrety",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Constraints may be:
-
A move at the same date time already exists
-
Move is in the future
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete Geokrety MoveDELETE/v1/moves/{move_id}
Delete a single Geokrety Moves.
Example URI
- move_id
string
(required) Example: 1ID of the move.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Moves Collection ¶
GeoKrety Move DetailsPOST/v1/moves
Note
If no user specified, currently connected user will be used.
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1"
},
"relationships": {
"user": {
"data": {
"type": "user",
"id": "1"
}
},
"geokret": {
"data": {
"type": "geokret",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokret"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"geokret"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"distance": {
"type": "number"
},
"comments-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"geokrety",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All GeoKrety MovesGET/v1/moves{?sort,filter}
Retrieve paginated list of GeoKrety Moves.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List GeoKret Moves ¶
List GeoKret MovesGET/v1/geokrety/{geokrety_id}/moves{?sort,filter}
Retrieve paginated list of GeoKrety Moves.
Example URI
- geokrety_id
integer
(required) Example: 1ID of the GeoKret
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List Users Moves ¶
List Users MovesGET/v1/users/{user_id}/geokrety-moved{?sort,filter}
Retrieve paginated list of GeoKrety Moves.
Example URI
- user_id
integer
(required) Example: 1ID of the User
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List Moves by Move Type ¶
List Moves by Move TypeGET/v1/moves-types/{move_type_id}/moves{?sort,filter}
Retrieve paginated list of GeoKrety Moves.
Example URI
- move_type_id
integer
(required) Example: 1ID of the Move Type
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get Move-Comment Move ¶
Get Move-Comment MoveGET/v1/moves-comments/{move_comment_id}
Example URI
- move_comment_id
integer
(required) Example: 1ID of the Move Comment
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"distance": {
"type": "number"
},
"comments-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"geokrety",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get Picture Move ¶
Get Picture MoveGET/v1/pictures/{picture_id}
Example URI
- picture_id
string
(required) Example: 1ID of the picture.
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move",
"id": "1",
"attributes": {
"tracking-code": "XFS125",
"waypoint": "OC12345",
"latitude": 48.86471,
"longitude": 2.34901,
"comment": "Dropped this GeoKret in a very nice place.",
"username": "someone",
"application": "geokrety-api",
"application-version": "2.0 beta 1",
"altitude": 123,
"country": "fr",
"distance": 35,
"comments-count": 2,
"pictures-count": 5,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"type": {
"links": {
"self": "/moves/1/relationships/type",
"related": "/moves/1/type"
}
},
"geokrety": {
"links": {
"self": "/moves/1/relationships/geokrety",
"related": "/moves/1/geokrety"
}
},
"author": {
"links": {
"self": "/moves/1/relationships/author",
"related": "/moves/1/author"
}
}
},
"links": {
"self": "/moves/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"tracking-code": {
"type": "string"
},
"waypoint": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"comment": {
"type": "string"
},
"username": {
"type": "string"
},
"application": {
"type": "string"
},
"application-version": {
"type": "string"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"distance": {
"type": "number"
},
"comments-count": {
"type": "number"
},
"pictures-count": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
}
},
"relationships": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"type",
"geokrety",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Moves Comments ¶
Resources related to Moves Comments in the API.
Moves Comments endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✓ | ✓ [1] | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only self-owned informations
Moves Comments attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
comment |
User comment on the move | string | yes | - | yes |
type |
Type of comment (See bellow) | integer | yes | - | yes |
created-on-date-time |
Creation on date time | date | - | yes | yes |
updated-on-date-time |
Updated on date time | date | - | yes | yes |
Moves Comments Types:
Type | Description |
---|---|
0 |
Comment |
1 |
Missing |
Moves Comments Relations:
Parameter | Type | Description | Required |
---|---|---|---|
move |
move | Commented move | yes |
author |
users | User which commented | - |
Moves Comments Details ¶
Get Move CommentGET/v1/moves-comments/{geokret_id}
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0,
1
]
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"type"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"move": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"move",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update Geokrety Move CommentPATCH/v1/moves-comments/{geokret_id}
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0,
1
]
}
},
"required": [
"comment",
"type"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
User himself or Administrators
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0,
1
]
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"type"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"move": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"move",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete Geokrety Move CommentDELETE/v1/moves-comments/{geokret_id}
Delete a single Geokrety Move Comment.
Example URI
- geokret_id
string
(required) Example: 1ID of the GeoKret.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Moves Comments Collection ¶
GeoKrety Moves CommentsPOST/v1/moves-comments
Note
If no user specified, currently connected user will be used.
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0
},
"relationships": {
"move": {
"data": {
"type": "move",
"id": "1"
}
},
"user": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0,
1
]
}
},
"required": [
"comment",
"type"
]
},
"relationships": {
"type": "object",
"properties": {
"move": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"move"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
},
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
}
},
"required": [
"move"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0,
1
]
},
"created-on-date-time": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"type"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"move": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"author",
"move",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All Moves CommentsGET/v1/moves-comments{?sort,filter}
Retrieve paginated list of Moves Comments.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get Move Comments ¶
Get Move CommentsGET/v1/moves/{move_id}/comments{?sort,filter}
Retrieve paginated list of Moves Comments.
Example URI
- move_id
integer
(required) Example: 1ID of the Move
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get User Comments ¶
Get User CommentsGET/v1/users/{user_id}/comments{?sort,filter}
Retrieve paginated list of Moves Comments.
Example URI
- user_id
integer
(required) Example: 1ID of the Move
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move-comment",
"id": "1",
"attributes": {
"comment": "Thanks for the travel",
"type": 0,
"created-on-date-time": "2007-10-25T12:10:22",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"author": {
"links": {
"self": "/moves-comments/1/relationships/author",
"related": "/moves-comments/1/author"
}
},
"move": {
"links": {
"self": "/moves-comments/1/relationships/move",
"related": "/moves-comments/1/move"
}
},
"geokret": {
"links": {
"self": "/moves-comments/1/relationships/geokret",
"related": "/moves-comments/1/geokret"
}
}
},
"links": {
"self": "/moves-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Moves Types ¶
Resources related to GeoKrety in the API.
Moves Types endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✗ | ✗ | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
Moves Types attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
name |
Moves Type name | string | yes | - | yes |
require-waypoint |
Moves of this type require a waypoint | boolean | yes | - | yes |
require-tracking-code |
Moves of this type require a tracking-code | boolean | yes | - | yes |
Moves Types:
Currently known Moves Types:
Type | Description | Require waypoint | Require Tracking-Code |
---|---|---|---|
0 |
Dropped to | yes | yes |
1 |
Grabbed from | - | yes |
2 |
A comment | - | - |
3 |
Seen in | yes | yes |
4 |
Archived | - | yes |
5 |
Visiting | yes | yes |
Moves Types Relations:
Parameter | Type | Description |
---|---|---|
move |
moves | Moves which are of the type |
Moves Type Details ¶
Get Moves TypeGET/v1/moves-types/{moves_types_id}
Example URI
- moves_types_id
string
(required) Example: 1ID of the Moves Types.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/moves-types/1/relationships/geokrety",
"related": "/moves-types/1/geokrety"
}
},
"moves": {
"links": {
"self": "/moves-types/1/relationships/moves",
"related": "/moves-types/1/moves"
}
}
},
"links": {
"self": "/moves-types/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"moves": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety",
"moves"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Collection ¶
List all Moves TypeGET/v1/moves-types{?sort,filter}
Retrieve paginated list of Moves Type.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/moves-types/1/relationships/geokrety",
"related": "/moves-types/1/geokrety"
}
},
"moves": {
"links": {
"self": "/moves-types/1/relationships/moves",
"related": "/moves-types/1/moves"
}
}
},
"links": {
"self": "/moves-types/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
List Moves of this type ¶
List Moves of this typeGET/v1/moves-types/moves{?sort,filter}
Retrieve paginated list of Moves Type.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "geokrety-type",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/moves-types/1/relationships/geokrety",
"related": "/moves-types/1/geokrety"
}
},
"moves": {
"links": {
"self": "/moves-types/1/relationships/moves",
"related": "/moves-types/1/moves"
}
}
},
"links": {
"self": "/moves-types/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/moves-types"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News ¶
Resources related to news.
News endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✗ | ✗ | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
News attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
title |
Title of the news | string | yes | - | yes |
content |
The full text of the news | string | yes | - | yes |
username |
Override the username who posted the news | string | - | - | yes |
comments-count |
How many comment are attached to the news | integer | - | yes | yes |
created-on-date-time |
News creation date | date | - | yes | yes |
last-comment-date-time |
Date of the last comment | date | - | yes | yes |
News Relations:
Parameter | Type | Description |
---|---|---|
author |
users | News author |
news-comments |
news-comment | Posted news comment list |
News Details ¶
Get newsGET/v1/news/{news_id}
Example URI
- news_id
string
(required) Example: 1ID of the news.
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"username": {
"type": [
"string",
"null"
]
},
"created-on-date-time": {
"type": "string"
},
"comments-count": {
"type": "number"
},
"last-comment-date-time": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"content",
"created-on-date-time",
"comments-count"
]
},
"relationships": {
"type": "object",
"properties": {
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news-comments",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update NewsPATCH/v1/news/{news_id}
Update a single news by id
.
Example URI
- news_id
string
(required) Example: 1ID of the news.
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone"
},
"relationships": {
"author": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"username": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"content"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
}
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"username": {
"type": [
"string",
"null"
]
},
"created-on-date-time": {
"type": "string"
},
"comments-count": {
"type": "number"
},
"last-comment-date-time": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"content",
"created-on-date-time",
"comments-count"
]
},
"relationships": {
"type": "object",
"properties": {
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news-comments",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete NewsDELETE/v1/news/{news_id}
Delete a single News.
Example URI
- news_id
string
(required) Example: 1ID of the news.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News Collection ¶
Create a NewsPOST/v1/news
Example URI
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Body
{
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone"
},
"relationships": {
"author": {
"data": {
"type": "user",
"id": "1"
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"username": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"content"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
}
}
}
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"username": {
"type": [
"string",
"null"
]
},
"created-on-date-time": {
"type": "string"
},
"comments-count": {
"type": "number"
},
"last-comment-date-time": {
"type": [
"string",
"null"
]
}
},
"required": [
"title",
"content",
"created-on-date-time",
"comments-count"
]
},
"relationships": {
"type": "object",
"properties": {
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news-comments",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List all newsGET/v1/news{?sort,filter}
Retrieve paginated list of news.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
List User published News ¶
List User published NewsGET/v1/users/{user_id}/news{?sort,filter}
Retrieve paginated list of news.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List User subscribed News ¶
List User subscribed NewsGET/v1/users/{user_id}/subscribed-news{?sort,filter}
Retrieve paginated list of news.
Example URI
- user_id
string
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get News-Comment News ¶
Get News-Comment NewsGET/v1/news-comments/{news_comment_id}/news
Example URI
- news_comment_id
string
(required) Example: 1ID of the news comment
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news",
"id": "1",
"attributes": {
"title": "First News",
"content": "3,2,1,0 START! :) Have Fun!",
"username": "someone",
"created-on-date-time": "2007-10-26T18:31:20",
"comments-count": 0,
"last-comment-date-time": "Hello, world!"
},
"relationships": {
"news-comments": {
"links": {
"self": "/news/1/relationships/news-comments",
"related": "/news/1/news-comments"
}
},
"author": {
"links": {
"self": "/news/1/relationships/author",
"related": "/news/1/author"
}
}
},
"links": {
"self": "/news/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News Comments ¶
Resources related to news comments in the API.
News Comment endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✓ | ✓ [1,2] | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only self-owned informations
-
- Except relationships
News Comment attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
comment |
The full text of the comment | string | yes | - | yes |
icon |
Comment icon id | integer | - | - | yes |
created-on-date-time |
News creation date | date | - | yes | yes |
News Comment Relations:
Parameter | Type | Description |
---|---|---|
author |
users | News Comment author |
news |
news | Commented news |
News Comments Details ¶
News Comments DetailsGET/v1/news-comments/{newscomment_id}
Get a single microlocation.
Example URI
- newscomment_id
integer
(required) Example: 1ID of the news in the form of an integer
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"icon": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"icon"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update News CommentsPATCH/v1/news-comments/{newscomment_id}
Update a single news by id
.
id
(string) - ID of the record to update (required)
Example URI
- newscomment_id
integer
(required) Example: 1ID of the news in the form of an integer
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0
},
"relationships": {
"author": {
"data": {
"type": "user",
"id": "1"
}
},
"news": {
"data": {
"type": "news",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"icon": {
"type": "number"
}
},
"required": [
"comment",
"icon"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
},
"news": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"news"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
}
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"icon": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"icon"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete News CommentsDELETE/v1/news-comments/{newscomment_id}
Delete a single News.
Example URI
- newscomment_id
integer
(required) Example: 1ID of the news in the form of an integer
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News Comments Collection ¶
Create a News CommentPOST/v1/news-comments
Example URI
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0
},
"relationships": {
"author": {
"data": {
"type": "user",
"id": "1"
}
},
"news": {
"data": {
"type": "news",
"id": "1"
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"icon": {
"type": "number"
}
},
"required": [
"comment",
"icon"
]
},
"relationships": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
},
"news": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"news"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"news"
]
}
}
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"icon": {
"type": "number"
},
"created-on-date-time": {
"type": "string"
}
},
"required": [
"comment",
"icon"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"author": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"author"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All News CommentsGET/v1/news-comments{?sort,filter}
Retrieve paginated list of News Comments.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
List News Comments published by User ¶
List News Comments published by UserGET/v1/users/{user_id}/news-comments{?sort,filter}
Retrieve news list.
Example URI
- user_id
integer
(required) Example: 1ID of the user id in the form of an integer
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List News News-Comments ¶
List News News-CommentsGET/v1/news/{news_id}/news-comments{?sort,filter}
Retrieve news list.
Example URI
- news_id
integer
(required) Example: 1ID of the news
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: created-on-date- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news-comment",
"id": "1",
"attributes": {
"comment": "Hey hey hey great news!",
"icon": 0,
"created-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-comments/1/relationships/news",
"related": "/news-comments/1/news"
}
},
"author": {
"links": {
"self": "/news-comments/1/relationships/author",
"related": "/news-comments/1/author"
}
}
},
"links": {
"self": "/news-comments/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-comments"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News Subscriptions ¶
Resources related to news subscription in the API. This permit users to get notified on new new-comments.
TODO: Maybe this should be splitted in others collections
News Subscriptions endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✗ | ✗ | ✗ | ✗ | ✗ |
Authenticated | ✓ [1] | ✓ [1] | ✓ [1] | ✗ | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✗ | ✓ |
-
- Only self-owned informations
News Subscriptions attributes:
Note
Setting subscribed
to False
will internally delete the associated row.
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
subscribed |
User subscription status | boolean | yes | - | - |
subscribed-on-date-time |
Subscription on date time | date | - | yes | - |
News Subscriptions Relations:
Parameter | Type | Description |
---|---|---|
user |
users | User which is subscribed |
news |
news | News subscribed |
News Subscriptions Details ¶
News Subscriptions DetailsGET/v1/news-subscriptions/{newssubscription_id}
Get a single microlocation.
Example URI
- newssubscription_id
integer
(required) Example: 1ID of the news subscription
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true,
"subscribed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-subscriptions/1/relationships/news",
"related": "/news-subscriptions/1/news"
}
},
"user": {
"links": {
"self": "/news-subscriptions/1/relationships/user",
"related": "/news-subscriptions/1/user"
}
}
},
"links": {
"self": "/news-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
},
"subscribed-on-date-time": {
"type": "string"
}
},
"required": [
"subscribed"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Delete News SubscriptionsDELETE/v1/news-subscriptions/{newssubscription_id}
Delete a single News Subscriptions.
Example URI
- newssubscription_id
integer
(required) Example: 1ID of the news subscription
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
News Subscriptions Collection ¶
Subscribe to a NewsPOST/v1/news-subscriptions
Note
If no user specified, currently connected user will be used.
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true
},
"relationships": {
"user": {
"data": {
"type": "user",
"id": "1"
}
},
"news": {
"data": {
"type": "news",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
}
},
"required": [
"subscribed"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
},
"news": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"news"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"news"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true,
"subscribed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-subscriptions/1/relationships/news",
"related": "/news-subscriptions/1/news"
}
},
"user": {
"links": {
"self": "/news-subscriptions/1/relationships/user",
"related": "/news-subscriptions/1/user"
}
}
},
"links": {
"self": "/news-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
},
"subscribed-on-date-time": {
"type": "string"
}
},
"required": [
"subscribed"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All News SubscriptionsGET/v1/news-subscriptions{?sort,filter}
Retrieve paginated list of News News Subscriptions.
This is reserved to Administrators.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: subscribed-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true,
"subscribed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-subscriptions/1/relationships/news",
"related": "/news-subscriptions/1/news"
}
},
"user": {
"links": {
"self": "/news-subscriptions/1/relationships/user",
"related": "/news-subscriptions/1/user"
}
}
},
"links": {
"self": "/news-subscriptions/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Subscribe to a News ¶
Subscribe to a NewsPOST/v1/news/{news_id}/subscribe
Note
If no user specified, currently connected user will be used.
Example URI
- news_id
string
(required) Example: 1ID of the news.
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true
},
"relationships": {
"user": {
"data": {
"type": "user",
"id": "1"
}
},
"news": {
"data": {
"type": "news",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
}
},
"required": [
"subscribed"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
},
"news": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"news"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"news"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "news-subscription",
"id": "1",
"attributes": {
"subscribed": true,
"subscribed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"news": {
"links": {
"self": "/news-subscriptions/1/relationships/news",
"related": "/news-subscriptions/1/news"
}
},
"user": {
"links": {
"self": "/news-subscriptions/1/relationships/user",
"related": "/news-subscriptions/1/user"
}
}
},
"links": {
"self": "/news-subscriptions/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/news-subscriptions"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"subscribed": {
"type": "boolean"
},
"subscribed-on-date-time": {
"type": "string"
}
},
"required": [
"subscribed"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"user"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
UnSubscribe from a News ¶
UnSubscribe from a NewsDELETE/v1/news/{news_id}/unsubscribe
Note
If no user specified, currently connected user will be used.
Example URI
- news_id
string
(required) Example: 1ID of the news.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Owner Codes ¶
Resources related to Owner Codes in the API.
TODO: need to define endpoint for adoption
Owner Codes endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✗ | ✗ | ✗ | ✗ | ✗ |
Authenticated | ✓ [1] | ✓ [1] | ✓ [1] | ✗ | ✓ [1,2] |
Administrators | ✓ | ✓ | ✓ | ✗ | ✓ [2] |
-
- Only self-owned GeoKrety
-
- Only if GeoKret isn’t adopted yet
Owner Codes attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
code |
GeoKret adoption secret code | string | yes | - | - |
generated-on-date-time |
Generated on date time | date | - | yes | - |
claimed-on-date-time |
Claimed on date time | date | - | yes | - |
Owner Codes Relations:
Parameter | Type | Description | Required |
---|---|---|---|
user |
users | User who adopted the Geokret | - |
geokret |
geokrety | GeoKret which is to adoption | yes |
Owner Codes Details ¶
Get Owner CodeGET/v1/owner-codes/{owner_code_id}
Example URI
- owner_code_id
string
(required) Example: 1ID of the Owner Code.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE",
"generated-on-date-time": "2007-10-25T12:10:22",
"claimed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/owner-codes/1/relationships/user",
"related": "/owner-codes/1/user"
}
},
"geokret": {
"links": {
"self": "/owner-codes/1/relationships/geokret",
"related": "/owner-codes/1/geokret"
}
}
},
"links": {
"self": "/owner-codes/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/owner-codes"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"generated-on-date-time": {
"type": "string"
},
"claimed-on-date-time": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Delete Owner CodeDELETE/v1/owner-codes/{owner_code_id}
Delete a single Owner Code.
Example URI
- owner_code_id
string
(required) Example: 1ID of the Owner Code.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Owner Codes Collection ¶
Owner CodePOST/v1/owner-codes
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE"
},
"relationships": {
"geokret": {
"data": {
"type": "geokret",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokret"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"geokret"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE",
"generated-on-date-time": "2007-10-25T12:10:22",
"claimed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/owner-codes/1/relationships/user",
"related": "/owner-codes/1/user"
}
},
"geokret": {
"links": {
"self": "/owner-codes/1/relationships/geokret",
"related": "/owner-codes/1/geokret"
}
}
},
"links": {
"self": "/owner-codes/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/owner-codes"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"generated-on-date-time": {
"type": "string"
},
"claimed-on-date-time": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All Owner CodesGET/v1/owner-codes{?sort,filter}
Retrieve paginated list of Owner Codes.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: generated-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE",
"generated-on-date-time": "2007-10-25T12:10:22",
"claimed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/owner-codes/1/relationships/user",
"related": "/owner-codes/1/user"
}
},
"geokret": {
"links": {
"self": "/owner-codes/1/relationships/geokret",
"related": "/owner-codes/1/geokret"
}
}
},
"links": {
"self": "/owner-codes/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/owner-codes"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Owner Codes Details ¶
Get Owner Code by GeoKretGET/v1/geokrety/{geokrety_id}/owner-code
Example URI
- geokrety_id
string
(required) Example: 1ID of the GeoKret.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE",
"generated-on-date-time": "2007-10-25T12:10:22",
"claimed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/owner-codes/1/relationships/user",
"related": "/owner-codes/1/user"
}
},
"geokret": {
"links": {
"self": "/owner-codes/1/relationships/geokret",
"related": "/owner-codes/1/geokret"
}
}
},
"links": {
"self": "/owner-codes/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/owner-codes"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"generated-on-date-time": {
"type": "string"
},
"claimed-on-date-time": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Adopt a GeoKret ¶
Adopt a GeoKretPOST/v1/geokrety/1/adopt
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE"
},
"relationships": {
"geokret": {
"data": {
"type": "geokret",
"id": "1"
}
}
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"geokret": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"geokret"
]
},
"id": {
"type": "string"
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
},
"required": [
"geokret"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "move-comment",
"id": "1",
"attributes": {
"code": "SECRETCODE",
"generated-on-date-time": "2007-10-25T12:10:22",
"claimed-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/owner-codes/1/relationships/user",
"related": "/owner-codes/1/user"
}
},
"geokret": {
"links": {
"self": "/owner-codes/1/relationships/geokret",
"related": "/owner-codes/1/geokret"
}
}
},
"links": {
"self": "/owner-codes/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/owner-codes"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"generated-on-date-time": {
"type": "string"
},
"claimed-on-date-time": {
"type": "string"
}
},
"required": [
"code"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Pictures ¶
Resources related to pictures in the API. Pitcures can be associated with Users, GeoKrety, Move comments.
TODO: This is just a draft, need to design something like https://cloud.google.com/storage/docs/json_api/v1/how-tos/simple-upload
Pictures endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✓ [2] | ✓ [1] | ✓ [1] |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only user posted pictures
-
- Only self avatar, owned GeoKrety avatar, owned move comments
Pictures attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
type |
Type of picture (see bellow) | boolean | yes | - | yes |
comment |
User subscription status | string | yes | - | yes |
filename |
User subscription status | string | - | yes | yes |
file-url |
User subscription status | string | - | yes | yes |
created-on-date-time |
Subscription on date time | date | - | yes | yes |
Type of picture:
Value | Description |
---|---|
0 |
GeoKrety avatar |
1 |
Move pictures |
2 |
User avatar |
Pictures Relations:
Parameter | Type | Description |
---|---|---|
owner |
users | User which uploaded the file |
user |
users | User’s avatar |
geokret |
geokrety | GeoKret’s avatar |
move |
moves | Move’s pictures |
StatPics Templates ¶
Resources related to GeoKrety in the API.
StatPics endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✓ | ✓ | ✗ | ✗ | ✗ |
Authenticated | ✓ | ✓ | ✗ | ✗ | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
StatPics attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
name |
StatPic template name | string | - | - | yes |
url |
StatPic url | string | - | yes | yes |
StatPics:
Currently known StatPic templates.
Type | Description |
---|---|
0 |
Minimal |
1 |
Design |
2 |
Real mole |
3 |
Grass |
4 |
With hand |
5 |
Yellow |
6 |
See |
7 |
Cloudy |
8 |
Flowers |
StatPics Relations:
Parameter | Type | Description |
---|---|---|
user |
users | User which choosen this template |
StatPic Details ¶
Get StatPicGET/v1/statpics-templates/{statpic_template_id}
Example URI
- statpic_template_id
string
(required) Example: 1ID of the StatPics.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/statpics-templates/1/relationships/users",
"related": "/statpics-templates/1/users"
}
}
},
"links": {
"self": "/statpics-templates/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/statpics-templates"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update StatPicPATCH/v1/statpics-templates/{statpic_template_id}
Update a single StatPic by id
.
Example URI
- statpic_template_id
string
(required) Example: 1ID of the StatPics.
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/statpics-templates/1/relationships/users",
"related": "/statpics-templates/1/users"
}
}
},
"links": {
"self": "/statpics-templates/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/statpics-templates"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete StatPicDELETE/v1/statpics-templates/{statpic_template_id}
Caution
This will reset users using this template to some other statpic. The last template cannot be deleted.
Example URI
- statpic_template_id
string
(required) Example: 1ID of the StatPics.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
GeoKrety Collection ¶
Create a StatPicPOST/v1/statpics-templates
Example URI
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Body
{
"attributes": {
"name": "Traditional"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
}
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/statpics-templates/1/relationships/users",
"related": "/statpics-templates/1/users"
}
}
},
"links": {
"self": "/statpics-templates/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/statpics-templates"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List all StatPicGET/v1/statpics-templates{?sort,filter}
Retrieve paginated list of StatPic.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/statpics-templates/1/relationships/users",
"related": "/statpics-templates/1/users"
}
}
},
"links": {
"self": "/statpics-templates/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/statpics-templates"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
Get User StatPic ¶
Get User StatPicGET/v1/users/{user_id}/statpic
Example URI
- user_id
string
(required) Example: 1ID of the StatPics.
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": {
"type": "statpic-template",
"id": "1",
"attributes": {
"name": "Traditional"
},
"relationships": {
"geokrety": {
"links": {
"self": "/statpics-templates/1/relationships/users",
"related": "/statpics-templates/1/users"
}
}
},
"links": {
"self": "/statpics-templates/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/statpics-templates"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"relationships": {
"type": "object",
"properties": {
"geokrety": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"geokrety"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Users ¶
Resources related to users in the API.
User endpoints permissions:
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✗ | ✓ [1] | ✓ | ✗ | ✗ |
Authenticated | ✓ [1] | ✓ [1,2] | ✗ | ✓ [2] | ✗ |
Administrators | ✓ | ✓ | ✓ | ✓ | ✓ |
-
- Only public informations
-
- Only self-owned informations
User attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
name |
User name | string | yes | - | yes |
email |
User email | string | yes | - | |
password |
User password | string | only on create | - | Cannot be read |
language |
User primary spoken language | string | - | - | yes |
country |
User home country | string | - | yes | yes |
latitude |
User home latitude | float | - | - | |
longitude |
User home longitude | float | - | - | |
daily-mails |
User want to receive daily mail digest | boolean | - | - | |
observation-radius |
Observation area in kilometers | integer | - | - | |
hour |
Send mail at this hour | integer | - | yes | |
statpic-url |
User’s StatPic image url | string | - | yes | yes |
avatar-url |
User’s Avatar image url | string | - | yes | yes |
secid |
User secret id for legacy API | string | - | - | |
joined-date-time |
News creation date | date | - | yes | yes |
last-update-date-time |
Date of last account update | date | - | yes | |
last-mail-date-time |
Date of last sent mail (daily mail) | date | - | yes | |
last-login-date-time |
Date of last login | date | - | yes |
User Relations:
Parameter | Type | Description |
---|---|---|
news |
news | Posted news list |
news-comments |
news-comment | Posted news comment list |
statpic-template |
statpics-templates | Prefered statpic template |
avatar |
pictures | User avatar |
User Details ¶
Get userGET/v1/users/{id}
Example URI
- id
integer
(required) Example: 1ID of the user
Anonymous or Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"language": {
"type": "string"
},
"country": {
"type": "string"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
}
},
"required": [
"name",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"daily-mails": true,
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"country": "fr",
"hour": 7,
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00",
"last-update-date-time": "2017-01-26T19:46:44+00:00",
"last-mail-date-time": "2017-03-29T07:52:02",
"last-login-date-time": "2017-03-14T22:04:05",
"secid": "abc123"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users/1"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"daily-mails": {
"type": "boolean"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"country": {
"type": "string"
},
"hour": {
"type": "number"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
},
"last-update-date-time": {
"type": "string"
},
"last-mail-date-time": {
"type": [
"string",
"null"
]
},
"last-login-date-time": {
"type": [
"string",
"null"
]
},
"secid": {
"type": "string"
}
},
"required": [
"name",
"email",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Update userPATCH/v1/users/{id}
Example URI
- id
integer
(required) Example: 1ID of the user
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone else",
"email": "user@ema.il",
"password": "strong password",
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"secid": "abc123"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"secid": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
User himself or Administrators
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"daily-mails": true,
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"country": "fr",
"hour": 7,
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00",
"last-update-date-time": "2017-01-26T19:46:44+00:00",
"last-mail-date-time": "2017-03-29T07:52:02",
"last-login-date-time": "2017-03-14T22:04:05",
"secid": "abc123"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"daily-mails": {
"type": "boolean"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"country": {
"type": "string"
},
"hour": {
"type": "number"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
},
"last-update-date-time": {
"type": "string"
},
"last-mail-date-time": {
"type": [
"string",
"null"
]
},
"last-login-date-time": {
"type": [
"string",
"null"
]
},
"secid": {
"type": "string"
}
},
"required": [
"name",
"email",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Username already taken
Headers
Content-Type: application/vnd.api+json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
Delete userDELETE/v1/users/{id}
Caution
This will delete all user activity, including logs, comments and pictures.
Example URI
- id
integer
(required) Example: 1ID of the user
Authenticated - Administrators
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Users Collection ¶
Create UserPOST/v1/users
Create a user account.
Example URI
Unauthenticated
Headers
Accept: application/vnd.api+json
Body
{
"data": {
"type": "user",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"password": "strong password",
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"secid": "abc123"
}
}
}
Schema
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"secid": {
"type": "string"
}
}
}
},
"required": [
"type"
]
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"daily-mails": true,
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"country": "fr",
"hour": 7,
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00",
"last-update-date-time": "2017-01-26T19:46:44+00:00",
"last-mail-date-time": "2017-03-29T07:52:02",
"last-login-date-time": "2017-03-14T22:04:05",
"secid": "abc123"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"daily-mails": {
"type": "boolean"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"country": {
"type": "string"
},
"hour": {
"type": "number"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
},
"last-update-date-time": {
"type": "string"
},
"last-mail-date-time": {
"type": [
"string",
"null"
]
},
"last-login-date-time": {
"type": [
"string",
"null"
]
},
"secid": {
"type": "string"
}
},
"required": [
"name",
"email",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List All UsersGET/v1/users{?sort,filter}
Retrieve users list.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
List Users Subscribed to a News ¶
List Users Subscribed to a NewsGET/v1/news/subscribed-users{?sort,filter}
Retrieve users list.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List Users watching a GeoKret ¶
List Users watching a GeoKretGET/v1/geokrety/{geokret_id}/watching-users{?sort,filter}
Retrieve paginated list of Users.
Example URI
- geokret_id
integer
(required) Example: 1ID of the GeoKret
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List Users rating a GeoKret ¶
List Users rating a GeoKretGET/v1/geokrety/{geokret_id}/rating-users{?sort,filter}
Retrieve paginated list of Users.
Example URI
- geokret_id
integer
(required) Example: 1ID of the GeoKret
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
List Users who moved a GeoKret ¶
List Users who moved a GeoKretGET/v1/geokrety/{geokret_id}/moved-by-users{?sort,filter}
Retrieve paginated list of Users.
Example URI
- geokret_id
integer
(required) Example: 1ID of the GeoKret
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: name- filter
string
(optional)
Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get GeoKrety Owner ¶
Get GeoKrety OwnerGET/v1/geokrety/{geokret_id}/owner
Get the owner of a GeoKret.
Example URI
- geokret_id
integer
(required) Example: 1ID of the GeoKret
Anonymous or Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"language": {
"type": "string"
},
"country": {
"type": "string"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
}
},
"required": [
"name",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"daily-mails": true,
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"country": "fr",
"hour": 7,
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00",
"last-update-date-time": "2017-01-26T19:46:44+00:00",
"last-mail-date-time": "2017-03-29T07:52:02",
"last-login-date-time": "2017-03-14T22:04:05",
"secid": "abc123"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"daily-mails": {
"type": "boolean"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"country": {
"type": "string"
},
"hour": {
"type": "number"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
},
"last-update-date-time": {
"type": "string"
},
"last-mail-date-time": {
"type": [
"string",
"null"
]
},
"last-login-date-time": {
"type": [
"string",
"null"
]
},
"secid": {
"type": "string"
}
},
"required": [
"name",
"email",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Get GeoKrety Holder ¶
Get GeoKrety HolderGET/v1/geokrety/{geokret_id}/holder
Get the user who currently hold the GeoKret.
Example URI
- geokret_id
integer
(required) Example: 1ID of the GeoKret
Anonymous or Authenticated
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"language": "fr",
"country": "fr",
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"language": {
"type": "string"
},
"country": {
"type": "string"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
}
},
"required": [
"name",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Authenticated - Self or Administrators
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"name": "someone",
"email": "user@ema.il",
"daily-mails": true,
"language": "fr",
"latitude": 48.86471,
"longitude": 2.34901,
"observation-radius": 7,
"country": "fr",
"hour": 7,
"statpic-url": "https://static.geokrety.org/statpics/1.png",
"avatar-url": "https://static.geokrety.org/avatars/1.png",
"join-date-time": "2017-01-26T19:46:44+00:00",
"last-update-date-time": "2017-01-26T19:46:44+00:00",
"last-mail-date-time": "2017-03-29T07:52:02",
"last-login-date-time": "2017-03-14T22:04:05",
"secid": "abc123"
},
"relationships": {
"news": {
"links": {
"self": "/users/1/relationships/news",
"related": "/users/1/news"
}
},
"news-comments": {
"links": {
"self": "/users/1/relationships/news-comments",
"related": "/users/1/news-comments"
}
},
"statpic-template": {
"links": {
"self": "/users/1/relationships/statpic-template",
"related": "/users/1/statpic-template"
}
},
"geokrety-owned": {
"links": {
"self": "/users/1/relationships/geokrety-owned",
"related": "/users/1/geokrety-owned"
}
},
"geokrety-inventory": {
"links": {
"self": "/users/1/relationships/geokrety-inventory",
"related": "/users/1/geokrety-inventory"
}
},
"geokrety-watched": {
"links": {
"self": "/users/1/relationships/geokrety-watched",
"related": "/users/1/geokrety-watched"
}
},
"geokrety-rates": {
"links": {
"self": "/users/1/relationships/geokrety-rates",
"related": "/users/1/geokrety-rates"
}
},
"geokrety-moved": {
"links": {
"self": "/users/1/relationships/geokrety-moved",
"related": "/users/1/geokrety-moved"
}
}
},
"links": {
"self": "/users/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/users"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"daily-mails": {
"type": "boolean"
},
"language": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"observation-radius": {
"type": "number"
},
"country": {
"type": "string"
},
"hour": {
"type": "number"
},
"statpic-url": {
"type": "string"
},
"avatar-url": {
"type": "string"
},
"join-date-time": {
"type": "string"
},
"last-update-date-time": {
"type": "string"
},
"last-mail-date-time": {
"type": [
"string",
"null"
]
},
"last-login-date-time": {
"type": [
"string",
"null"
]
},
"secid": {
"type": "string"
}
},
"required": [
"name",
"email",
"join-date-time"
]
},
"relationships": {
"type": "object",
"properties": {
"news": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"news-comments": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"statpic-template": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-owned": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-inventory": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-watched": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-rates": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokrety-moved": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"news",
"news-comments",
"statpic-template",
"geokrety-owned",
"geokrety-inventory",
"geokrety-watched",
"geokrety-rates",
"geokrety-moved"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Waypoints ¶
Resources related to Waypoints in the API.
Filled when synchronizing with other networks.
Waypoints endpoints permissions:
TODO: Users will need to lookup by waypoint, when filling ruchy.php
Privilege level | List | View | Create | Update | Delete |
---|---|---|---|---|---|
Anonymous | ✗ | ✗ | ✗ | ✗ | ✗ |
Authenticated | ✗ | ✗ | ✗ | ✗ | ✗ |
Administrators | ✓ | ✓ | ✓ | ✗ | ✓ |
Waypoints attributes:
Parameter | Description | Type | Required | Readonly | Public |
---|---|---|---|---|---|
latitude |
Waypoint position | double | yes | - | - |
longitude |
Waypoint position | double | yes | - | - |
altitude |
Altitude of the position (m) | integer | - | yes | - |
country |
Country of the position | string | - | yes | - |
name |
Cache name | string | yes | - | - |
owner |
Cache owner name | string | yes | - | - |
type |
Cache type | string | yes | - | - |
country-name |
Country full name | string | yes | - | - |
link |
Link to the cache | string | yes | - | - |
status |
Cache current status | integer | yes | - | - |
updated-on-date-time |
Updated on date time | date | - | yes | - |
Waypoints Details ¶
Get WaypointGET/v1/waypoints/{waypoint}
Example URI
- waypoint
string
(required) Example: 1ID of the Waypoint.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "waypoint",
"id": "1",
"attributes": {
"latitude": 48.86471,
"longitude": 2.34901,
"name": "Cache name",
"owner": "Cache owner name",
"type": "Cache name",
"country-name": "Cache name",
"link": "Link to the cache",
"status": 0,
"altitude": 123,
"country": "fr",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/waypoints/1/relationships/user",
"related": "/waypoints/1/user"
}
},
"geokret": {
"links": {
"self": "/waypoints/1/relationships/geokret",
"related": "/waypoints/1/geokret"
}
}
},
"links": {
"self": "/waypoints/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/waypoints"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"name": {
"type": "string"
},
"owner": {
"type": "string"
},
"type": {
"type": "string"
},
"country-name": {
"type": "string"
},
"link": {
"type": "string"
},
"status": {
"type": "number"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"latitude",
"longitude",
"name",
"owner",
"type",
"country-name",
"link",
"status"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Delete WaypointDELETE/v1/waypoints/{waypoint}
Delete a single Waypoint.
Example URI
- waypoint
string
(required) Example: 1ID of the Waypoint.
Headers
Authorization: JWT <Auth Key>
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"message": "Object successfully deleted"
},
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"meta",
"jsonapi"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
404
Headers
Content-Type: application/json
Body
{
"description": "This ressource does not exists",
"error": "Object Not Found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
Waypoints Collection ¶
WaypointPOST/v1/waypoints
Example URI
Headers
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "waypoint",
"id": "1",
"attributes": {
"latitude": 48.86471,
"longitude": 2.34901,
"name": "Cache name",
"owner": "Cache owner name",
"type": "Cache name",
"country-name": "Cache name",
"link": "Link to the cache",
"status": 0
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"name": {
"type": "string"
},
"owner": {
"type": "string"
},
"type": {
"type": "string"
},
"country-name": {
"type": "string"
},
"link": {
"type": "string"
},
"status": {
"type": "number"
}
},
"required": [
"latitude",
"longitude",
"name",
"owner",
"type",
"country-name",
"link",
"status"
]
}
},
"required": [
"type",
"id"
]
}
},
"required": [
"data"
]
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "waypoint",
"id": "1",
"attributes": {
"latitude": 48.86471,
"longitude": 2.34901,
"name": "Cache name",
"owner": "Cache owner name",
"type": "Cache name",
"country-name": "Cache name",
"link": "Link to the cache",
"status": 0,
"altitude": 123,
"country": "fr",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/waypoints/1/relationships/user",
"related": "/waypoints/1/user"
}
},
"geokret": {
"links": {
"self": "/waypoints/1/relationships/geokret",
"related": "/waypoints/1/geokret"
}
}
},
"links": {
"self": "/waypoints/1"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/waypoints"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"name": {
"type": "string"
},
"owner": {
"type": "string"
},
"type": {
"type": "string"
},
"country-name": {
"type": "string"
},
"link": {
"type": "string"
},
"status": {
"type": "number"
},
"altitude": {
"type": "number"
},
"country": {
"type": "string"
},
"updated-on-date-time": {
"type": "string"
}
},
"required": [
"latitude",
"longitude",
"name",
"owner",
"type",
"country-name",
"link",
"status"
]
},
"relationships": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
},
"geokret": {
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
},
"related": {
"type": "string"
}
},
"required": [
"self",
"related"
]
}
}
}
},
"required": [
"user",
"geokret"
]
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
},
"required": [
"self"
]
}
},
"required": [
"type",
"id",
"attributes",
"relationships",
"links"
]
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
422
Headers
Content-Type: application/json
Body
{
"errors": [
{
"status": 422,
"source": {
"pointer": "/data/attributes/some_attribute",
"detail": "Detailled reason of failure",
"title": "Unprocessable Entity"
}
}
],
"jsonapi": {
"version": "1.0"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
},
"required": [
"errors",
"jsonapi"
]
}
List All WaypointsGET/v1/waypoints{?sort,filter}
Retrieve paginated list of Waypoints.
Example URI
- page[size]
integer
(optional) Example: 10- page[number]
integer
(optional) Example: 2- sort
string
(optional) Example: updated-on-date-time- filter
string
(optional)
Headers
Accept: application/vnd.api+json
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"count": 1
},
"data": [
{
"type": "waypoint",
"id": "1",
"attributes": {
"latitude": 48.86471,
"longitude": 2.34901,
"name": "Cache name",
"owner": "Cache owner name",
"type": "Cache name",
"country-name": "Cache name",
"link": "Link to the cache",
"status": 0,
"altitude": 123,
"country": "fr",
"updated-on-date-time": "2007-10-26T18:31:20"
},
"relationships": {
"user": {
"links": {
"self": "/waypoints/1/relationships/user",
"related": "/waypoints/1/user"
}
},
"geokret": {
"links": {
"self": "/waypoints/1/relationships/geokret",
"related": "/waypoints/1/geokret"
}
}
},
"links": {
"self": "/waypoints/1"
}
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "/waypoints"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "number"
}
},
"required": [
"count"
]
},
"data": {
"type": "array"
},
"jsonapi": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"links": {
"type": "object",
"properties": {
"self": {
"type": "string"
}
}
}
},
"required": [
"meta",
"data",
"jsonapi",
"links"
]
}
401
Headers
Content-Type: application/json
Body
{
"description": "Authentication required",
"error": "Bad Request",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}
403
Headers
Content-Type: application/json
Body
{
"description": "You don't have access to this ressource",
"error": "Access Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"error": {
"type": "string"
},
"status_code": {
"type": "number"
}
},
"required": [
"description",
"error",
"status_code"
]
}