|
swagger: '2.0' |
|
|
|
info: |
|
version: 1.1.0 |
|
title: Simple API |
|
description: | |
|
A simple API to learn how to write OpenAPI Specification. |
|
This file uses almost every single aspect of the [Open API Specification](https://openapis.org/). |
|
This API will use JSON. |
|
JSON looks like this: |
|
|
|
```JSON |
|
{ |
|
"key": "value", |
|
"anotherKey": "anotherValue" |
|
} |
|
``` |
|
termsOfService: http://simple.api/terms-of-service |
|
contact: |
|
name: John Doe |
|
url: http://simple.api/contact |
|
email: [email protected] |
|
license: |
|
name: Apache-2.0 |
|
url: http://www.apache.org/licenses/LICENSE-2.0 |
|
|
|
externalDocs: |
|
description: | |
|
**Complete** documentation describing how to use this API |
|
url: http://doc.simple.api/ |
|
|
|
tags: |
|
- name: Persons |
|
description: Everything you need to handle `users` and `friends` |
|
externalDocs: |
|
description: People category documentation |
|
url: http://doc.simple.api/people |
|
- name: Items |
|
description: Everything you need to handle items collected by users |
|
externalDocs: |
|
description: Items category documentation |
|
url: http://doc.simple.api/items |
|
- name: Media |
|
description: Everything you need to handle images |
|
externalDocs: |
|
description: Media category documentation |
|
url: http://doc.simple.api/media |
|
- name: JSLess |
|
description: Specific operations for JS less consumers |
|
externalDocs: |
|
description: JS Less Consumers documentation |
|
url: http://doc.simple.api/jsless |
|
|
|
schemes: |
|
- https |
|
host: simple.api |
|
basePath: /openapi101 |
|
|
|
consumes: |
|
- application/json |
|
- application/x-yaml |
|
produces: |
|
- application/json |
|
- application/x-yaml |
|
|
|
securityDefinitions: |
|
OauthSecurity: |
|
description: New Oauth security system. Do not use MediaSecurity or LegacySecurity. |
|
type: oauth2 |
|
flow: accessCode |
|
authorizationUrl: 'https://oauth.simple.api/authorization' |
|
tokenUrl: 'https://oauth.simple.api/token' |
|
scopes: |
|
admin: Admin scope |
|
user: User scope |
|
MediaSecurity: |
|
description: Specific media security for backward compatibility. Use OauthSecurity instead. |
|
type: apiKey |
|
in: query |
|
name: media-api-key |
|
LegacySecurity: |
|
description: Legacy security system for backward compatibility. Use OauthSecurity instead. |
|
type: basic |
|
|
|
security: |
|
- OauthSecurity: |
|
- user |
|
- LegacySecurity: [] |
|
|
|
paths: |
|
/persons: |
|
parameters: |
|
- $ref: '#/parameters/userAgent' |
|
get: |
|
summary: Gets some persons |
|
description: Returns a list containing all persons. The list supports paging. |
|
operationId: searchUsers |
|
tags: |
|
- Persons |
|
parameters: |
|
- $ref: '#/parameters/pageSize' |
|
- $ref: '#/parameters/pageNumber' |
|
- $ref: '#/parameters/includeNonVerifiedUsers' |
|
- $ref: '#/parameters/sortPersons' |
|
responses: |
|
'200': |
|
description: A list of Person |
|
schema: |
|
$ref: '#/definitions/Persons' |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
post: |
|
summary: Creates a person |
|
description: Adds a new person to the persons list. |
|
operationId: createUser |
|
tags: |
|
- Persons |
|
security: |
|
- OauthSecurity: |
|
- admin |
|
- LegacySecurity: [] |
|
parameters: |
|
- name: person |
|
in: body |
|
required: true |
|
description: The person to create. |
|
schema: |
|
$ref: '#/definitions/Person' |
|
responses: |
|
'204': |
|
description: Person succesfully created. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'400': |
|
description: Person couldn't have been created. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
/js-less-consumer-persons: |
|
parameters: |
|
- $ref: '#/parameters/userAgent' |
|
post: |
|
summary: Creates a person |
|
description: For JS-less partners |
|
operationId: createUserJS |
|
deprecated: true |
|
tags: |
|
- JSLess |
|
- Persons |
|
security: |
|
- OauthSecurity: |
|
- admin |
|
- LegacySecurity: [] |
|
consumes: |
|
- application/x-www-form-urlencoded |
|
produces: |
|
- text/html |
|
parameters: |
|
- name: username |
|
in: formData |
|
required: true |
|
pattern: '[a-z0-9]{8,64}' |
|
minLength: 8 |
|
maxLength: 64 |
|
type: string |
|
- name: firstname |
|
in: formData |
|
type: string |
|
- name: lastname |
|
in: formData |
|
type: string |
|
- name: dateOfBirth |
|
in: formData |
|
type: string |
|
format: date |
|
responses: |
|
'204': |
|
description: Person succesfully created. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'400': |
|
description: Person couldn't have been created. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'500': |
|
description: An error occured. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
'/persons/{username}': |
|
parameters: |
|
- $ref: '#/parameters/username' |
|
- $ref: '#/parameters/userAgent' |
|
get: |
|
summary: Gets a person |
|
description: Returns a single person for its username. |
|
operationId: readPerson |
|
tags: |
|
- Persons |
|
responses: |
|
'200': |
|
description: A Person |
|
schema: |
|
$ref: '#/definitions/Person' |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'404': |
|
$ref: '#/responses/PersonDoesNotExistResponse' |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
delete: |
|
summary: Deletes a person |
|
description: Delete a single person identified via its username |
|
operationId: deletePerson |
|
tags: |
|
- Persons |
|
responses: |
|
'204': |
|
description: Person successfully deleted. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'404': |
|
$ref: '#/responses/PersonDoesNotExistResponse' |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
'/persons/{username}/friends': |
|
parameters: |
|
- $ref: '#/parameters/username' |
|
- $ref: '#/parameters/userAgent' |
|
get: |
|
summary: Gets a person's friends |
|
description: Returns a list containing all persons. The list supports paging. |
|
operationId: readPersonsFriends |
|
tags: |
|
- Persons |
|
parameters: |
|
- $ref: '#/parameters/pageSize' |
|
- $ref: '#/parameters/pageNumber' |
|
- $ref: '#/parameters/includeNonVerifiedUsers' |
|
- $ref: '#/parameters/sortPersons' |
|
responses: |
|
'200': |
|
description: A person's friends list |
|
schema: |
|
$ref: '#/definitions/PagedPersons' |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'404': |
|
$ref: '#/responses/PersonDoesNotExistResponse' |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
'/persons/{username}/collecting-items': |
|
parameters: |
|
- $ref: '#/parameters/username' |
|
- $ref: '#/parameters/userAgent' |
|
get: |
|
summary: Gets a person's collecting items list |
|
description: | |
|
Returns a list containing all items this person is looking for. |
|
The list supports paging. |
|
operationId: readPersonsCollectingItems |
|
tags: |
|
- Items |
|
parameters: |
|
- $ref: '#/parameters/pageSize' |
|
- $ref: '#/parameters/pageNumber' |
|
- $ref: '#/parameters/filterItemTypes' |
|
responses: |
|
'200': |
|
description: A collected items list |
|
schema: |
|
$ref: '#/definitions/PagedCollectingItems' |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
examples: |
|
application/json: |
|
{ |
|
"totalItems": 10, |
|
"totalPage": 4, |
|
"pageSize": 3, |
|
"currentPage": 2, |
|
"items": |
|
[ |
|
{ |
|
"itemType": "Vinyl", |
|
"maxPrice": 20, |
|
"imageId": "98096838-04eb-4bac-b32e-cd5b7196de71", |
|
"albumName": "Captain Future Original Soundtrack", |
|
"artist": "Yuji Ohno" |
|
}, |
|
{ |
|
"itemType": "VHS", |
|
"maxPrice": 10, |
|
"imageId": "b74469bc-e6a1-4a90-858a-88ef94079356", |
|
"movieTitle": "Star Crash", |
|
"director": "Luigi Cozzi" |
|
}, |
|
{ |
|
"itemType": "AudioCassette", |
|
"maxPrice": 10, |
|
"imageId": "b74469bc-e6a1-4a90-858a-88ef94079356", |
|
"albumName": "Star Wars", |
|
"artist": "John Williams" |
|
} |
|
] |
|
} |
|
'404': |
|
$ref: '#/responses/PersonDoesNotExistResponse' |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
/images: |
|
parameters: |
|
- $ref: '#/parameters/userAgent' |
|
post: |
|
summary: Uploads an image |
|
description: Upload an image, will return an image id. |
|
operationId: storeImage |
|
externalDocs: |
|
description: How to upload media |
|
url: http://doc.simple.api/media/upload |
|
tags: |
|
- Media |
|
security: |
|
- MediaSecurity: [] |
|
consumes: |
|
- multipart/form-data |
|
parameters: |
|
- name: image |
|
in: formData |
|
type: file |
|
responses: |
|
'200': |
|
description: Image's ID |
|
schema: |
|
properties: |
|
imageId: |
|
type: string |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
/images/{imageId}: |
|
parameters: |
|
- $ref: '#/parameters/userAgent' |
|
get: |
|
summary: Gets an image |
|
description: Return an image |
|
operationId: readImage |
|
tags: |
|
- Media |
|
parameters: |
|
- name: imageId |
|
in: path |
|
required: true |
|
type: string |
|
produces: |
|
- image/png |
|
- image/gif |
|
- image/jpeg |
|
- application/json |
|
- application/x-yaml |
|
responses: |
|
'200': |
|
description: The image |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'404': |
|
description: Image do not exists |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
'500': |
|
$ref: '#/responses/Standard500ErrorResponse' |
|
default: |
|
$ref: '#/responses/TotallyUnexpectedResponse' |
|
|
|
definitions: |
|
Person: |
|
title: Human |
|
description: A person which can be the user itself or one of his friend |
|
required: |
|
- username |
|
properties: |
|
firstName: |
|
description: first name |
|
type: string |
|
example: John |
|
lastName: |
|
description: last name |
|
type: string |
|
example: Doe |
|
username: |
|
description: Username used to connect to the service |
|
type: string |
|
pattern: '[a-z0-9]{8,64}' |
|
minLength: 8 |
|
maxLength: 64 |
|
example: john1doe6 |
|
dateOfBirth: |
|
description: Date of birth |
|
type: string |
|
format: date |
|
example: 1978-06-21 |
|
lastTimeOnline: |
|
description: The last time this person was connected to the service as a |
|
type: string |
|
format: date-time |
|
readOnly: true |
|
example: 2016-06-10T12:36:58.014Z |
|
avatarBase64PNG: |
|
description: An avatar PNG image as a base64 encoded string ready to use as an src in img html tag |
|
type: string |
|
format: byte |
|
default: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAC4jAAAuIwF4pT92AAABy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBJbWFnZVJlYWR5PC94bXA6Q3JlYXRvclRvb2w+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgqyI37xAAAU3UlEQVR4AeVbeXRc1Xn/zZt90UgajXbJ1mYtNraM95XF2AbbFINLg1sgBCg9JicnpDk9TciBAzQlFDds56T0QE45PTkQTNkhTmnslthhMWAweMObbGuzJdmythnNPtPfd9+MLEWyZFkj8keu/d685b577/f71vvdK0POwmsS+DMu2p8x7Yr0Px0AiUGCJ9fqftCzb4gzpm+oH70bIdJgADQNPCeJ5iPep0hPDAFD1ZrUIX5DAAh5JNpIgYtGEe/3I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bvrjtuZ/Y3jQ26Zk6KkwO6kFNxJKThK9jKgGqlwk3Ui1AStcAlzCjnJP7AiKH9UUnSVFBfjijVrcJzb8TQVAO1vwIol8+FycfMyxX140RszOt0wFs5jZ/wzuAtyY/jXQ57IjlG6xM4Th9SO0rb2drSeauPuMsl1A7duvAX/y70CZzs7lRTIaGyXLYZWtJ79to8sfZJwYb7RmFuLuImeQHdXqr3BJx2ABLK4+LL6ioXAlwRNQmCgHfX19aruyADozciCBf+OjVyUWd1IQOn1Rj0zBpBm7Blurg/SJZWVobAgD41NzeozF43izOm13GnaoTcjBtGRAdsS2oK+Q+yb6A0rpIEuWnO5VYI2BeawanwQT2Zw586Zw7uT+H80X6vv56/SkgAAAABJRU5ErkJggg== |
|
spokenLanguages: |
|
$ref: '#/definitions/SpokenLanguages' |
|
SpokenLanguages: |
|
title: Languages |
|
description: A hashmap of spoken languages |
|
additionalProperties: |
|
description: An additional spoken language |
|
type: string |
|
properties: |
|
defaultLanguage: |
|
description: Default spoken language |
|
type: string |
|
default: english |
|
example: |
|
defaultLanguage: french |
|
it: italian |
|
fr: french |
|
Persons: |
|
title: Humans |
|
description: A list of users or friends |
|
required: |
|
- items |
|
properties: |
|
items: |
|
description: Array containg the list |
|
type: array |
|
minItems: 10 |
|
maxItems: 100 |
|
uniqueItems: true |
|
items: |
|
$ref: '#/definitions/Person' |
|
example: |
|
- firstname: Robert |
|
lastname": Doe |
|
username": robdo |
|
dateOfBirth: 1970-01-28 |
|
lastTimeOnline: 2016-04-10T14:36:58.014Z |
|
- firstname: Jane |
|
lastname: Doe |
|
username: jdoe123 |
|
dateOfBirth: 1980-05-12 |
|
lastTimeOnline: 2016-05-12T19:23:59.014Z |
|
ErrorMessage: |
|
title: MultiDeviceErrorMessage |
|
description: An error message with a long and a short description |
|
required: |
|
- longMessage |
|
- shortMessage |
|
properties: |
|
longMessage: |
|
description: A long error description |
|
type: string |
|
shortMessage: |
|
description: A short error description |
|
type: string |
|
MultilingualErrorMessage: |
|
title: MultiLingualMultiDeviceErrorMessage |
|
description: An multilingual error message (hashmap) with a long and a short description |
|
additionalProperties: |
|
$ref: '#/definitions/ErrorMessage' |
|
properties: |
|
defaultLanguage: |
|
$ref: '#/definitions/ErrorMessage' |
|
example: |
|
defaultLanguage: |
|
longMessage: We're deeply sorry but an error occured |
|
shortMessage: Error |
|
fr: |
|
longMessage: Nous sommes désolé mais une erreur est survenu |
|
shortMessage: Erreur |
|
|
|
Error: |
|
title: MultiLingualMultiDeviceError |
|
description: Give full information about the problem |
|
required: |
|
- code |
|
- message |
|
properties: |
|
code: |
|
description: A human readable code (death to numeric error codes!) |
|
type: string |
|
enum: |
|
- DBERR |
|
- NTERR |
|
- UNERR |
|
example: UNERR |
|
message: |
|
$ref: '#/definitions/MultilingualErrorMessage' |
|
CollectingItem: |
|
discriminator: itemType |
|
required: |
|
- itemType |
|
properties: |
|
itemType: |
|
description: | |
|
An item can be of different type: |
|
|
|
type | definition |
|
-----|----------- |
|
Vinyl| #/definitions/Vinyl |
|
VHS | #/definitions/VHS |
|
AudioCassette | #/definitions/AudioCassette |
|
type: string |
|
enum: |
|
- AudioCassette |
|
- Vinyl |
|
- VHS |
|
imageId: |
|
type: string |
|
maxPrice: |
|
type: number |
|
format: double |
|
minimum: 0 |
|
maximum: 10000 |
|
exclusiveMinimum: true |
|
exclusiveMaximum: false |
|
Vinyl: |
|
allOf: |
|
- $ref: '#/definitions/CollectingItem' |
|
- required: |
|
- albumName |
|
- artist |
|
properties: |
|
albumName: |
|
type: string |
|
artist: |
|
type: string |
|
VHS: |
|
allOf: |
|
- $ref: '#/definitions/CollectingItem' |
|
- required: |
|
- movieTitle |
|
properties: |
|
movieTitle: |
|
type: string |
|
director: |
|
type: string |
|
AudioCassette: |
|
allOf: |
|
- $ref: '#/definitions/CollectingItem' |
|
- required: |
|
- albumName |
|
- artist |
|
properties: |
|
albumName: |
|
type: string |
|
artist: |
|
type: string |
|
Paging: |
|
required: |
|
- totalItems |
|
- totalPages |
|
- pageSize |
|
- currentPage |
|
properties: |
|
totalItems: |
|
type: integer |
|
totalPages: |
|
type: integer |
|
pageSize: |
|
type: integer |
|
currentPage: |
|
type: integer |
|
PagedPersons: |
|
allOf: |
|
- $ref: '#/definitions/Persons' |
|
- $ref: '#/definitions/Paging' |
|
PagedCollectingItems: |
|
allOf: |
|
- properties: |
|
items: |
|
type: array |
|
minItems: 10 |
|
maxItems: 100 |
|
uniqueItems: true |
|
items: |
|
$ref: '#/definitions/CollectingItem' |
|
- $ref: '#/definitions/Paging' |
|
responses: |
|
Standard500ErrorResponse: |
|
description: An unexpected error occured. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
schema: |
|
$ref: '#/definitions/Error' |
|
PersonDoesNotExistResponse: |
|
description: Person does not exist. |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
TotallyUnexpectedResponse: |
|
description: A totally unexpected response |
|
headers: |
|
X-Rate-Limit-Remaining: |
|
description: How many calls consumer can do |
|
type: integer |
|
X-Rate-Limit-Reset: |
|
description: When rate limit will be reset |
|
type: string |
|
format: date-time |
|
|
|
parameters: |
|
username: |
|
name: username |
|
in: path |
|
required: true |
|
description: The person's username |
|
type: string |
|
pageSize: |
|
name: pageSize |
|
in: query |
|
description: Number of persons returned |
|
type: integer |
|
format: int32 |
|
minimum: 0 |
|
exclusiveMinimum: true |
|
maximum: 100 |
|
exclusiveMaximum: false |
|
multipleOf: 10 |
|
default: 20 |
|
pageNumber: |
|
name: pageNumber |
|
in: query |
|
description: Page number |
|
type: integer |
|
default: 1 |
|
includeNonVerifiedUsers: |
|
name: includeNonVerifiedUsers |
|
in: query |
|
description: Result will not include non verified user by default if this parameter is not provided |
|
type: boolean |
|
default: false |
|
allowEmptyValue: true |
|
sortPersons: |
|
name: sort |
|
in: query |
|
description: Result will be sorted by lastTimeOnline descending and username ascending by default if this parameter is not provided |
|
type: array |
|
uniqueItems: true |
|
minItems: 1 |
|
maxItems: 3 |
|
collectionFormat: pipes |
|
items: |
|
type: string |
|
pattern: '[-+](username|lastTimeOnline|firstname|lastname)' |
|
default: |
|
- -lastTimeOnline |
|
- +username |
|
filterItemTypes: |
|
name: itemType |
|
in: query |
|
description: Filter collected items on their type |
|
type: array |
|
collectionFormat: multi |
|
uniqueItems: true |
|
items: |
|
type: string |
|
enum: |
|
- AudioCassette |
|
- Vinyl |
|
- VHS |
|
userAgent: |
|
name: User-Agent |
|
description: All API consumers MUST provide a user agent |
|
type: string |
|
in: header |
|
required: true |