Files
Phraseanet/API_documentation/v3/schemas.yaml
jygaulier e79f2cb4f2 add:
- multiple pagination methods
- "include" parameter in /search route :
-- facets : facets are no more returned by default
-- results.stories.children : to populate the children of stories
- "story_children_limit" parameter in /search route
  will limit the number of children populated by story
- "count" (for results) and "children_count" (for stories in results) is the number of items in the current page
- "total" (for results) and "children_total" (for stories in results) is the total number of items

todo: swagger doc (but impossible to describe related/excluded parameters (like pagination methods in /search)
2020-09-22 21:30:19 +02:00

225 lines
5.1 KiB
YAML

RecordPatch_metadata:
type: object
properties:
field_name:
type: string
meta_struct_id:
$ref: '#/ID'
action:
type: string
enum:
- set
- add
- delete
- replace
value:
# todo : change to string, int, number, array
type: string
RecordPatch_status:
type: object
required:
- bit
- state
properties:
bit:
type: integer
minimum: 4
maximum: 31
state:
type: boolean
RecordPatch:
description: 'Metadata, status, collection, etc to be set for a record'
type: object
properties:
metadatas:
type: array
items:
$ref: '#/RecordPatch_metadata'
status:
type: array
items:
$ref: '#/RecordPatch_status'
ApiResponse_meta:
type: object
properties:
api_version:
type: string
request:
type: string
response_time:
type: string
format: date-time
http_code:
type: integer
format: int32
error_type:
type: string
error_message:
type: string
ApiResponse_record:
type: object
properties:
meta:
$ref: '#/ApiResponse_meta'
response:
$ref: '#/Record'
# -------------------- search ---------------
ApiResponse_search:
type: object
properties:
meta:
$ref: '#/ApiResponse_meta'
response:
$ref: '#/ApiResponse_search_response'
ApiResponse_search_response:
type: object
properties:
offset:
type: integer
description: 'The pagination offset as passed in request'
limit:
type: integer
description: 'The pagination limit as passed in request'
page_result_count:
type: integer
description: 'The number of results in this page [0...limit]'
total_result_count:
type: integer
description: 'The total number of results request'
results:
type: object
properties:
stories:
type: array
items:
$ref: '#/Record'
records:
type: array
items:
$ref: '#/Record'
ID:
type: integer
Permalink:
type: object
properties:
created_on:
type: string
format: date-time
id:
$ref: '#/ID'
is_activated:
type: boolean
label:
type: string
updated_on:
type: string
format: date-time
page_url:
type: string
download_url:
type: string
url:
type: string
Subdef:
type: object
properties:
name:
type: string
permalink:
$ref: '#/Permalink'
height:
type: integer
width:
type: integer
filesize:
type: integer
devices:
type: array
items:
type: string
enum:
- screen
- printer ?
player_type:
type: string
enum:
- IMAGE
mime_type:
type: string
substituted:
type: boolean
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
url:
type: string
url_ttl:
type: integer
TechnicalInformation:
type: object
properties:
name:
type: string
value:
type: string
Record:
type: object
properties:
databox_id:
$ref: '#/ID'
record_id:
$ref: '#/ID'
mime_type:
type: string
title:
type: string
original_name:
type: string
updated_on:
type: string
format: date-time
created_on:
type: string
format: date-time
collection_id:
$ref: '#/ID'
base_id:
$ref: '#/ID'
sha256:
type: string
thumbnail:
$ref: '#/Subdef'
technical_informations:
type: array
items:
$ref: '#/TechnicalInformation'
phrasea_type:
type: string
enum:
- image
- video
uuid:
type: string
RecordUri:
type: string
example:
'/api/v3/records/1/48'
RecordsUriArray:
type: array
items:
$ref: '#/RecordUri'
ApiResponse_RecordsUriArray:
type: object
properties:
meta:
$ref: '#/ApiResponse_meta'
response:
$ref: '#/RecordsUriArray'