{"swagger":"2.0","info":{"title":"The RankDB API","description":"API for controlling RankDB","version":"1.0"},"consumes":["application/json","application/msgpack"],"produces":["application/json","application/msgpack"],"paths":{"/":{"get":{"tags":["health"],"summary":"Root","description":"Ping server\n\nRequired security scopes:\n * `api:manage`","operationId":"health#root","produces":["application/json","application/vnd.goa.error"],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/api/swagger/{filepath}":{"get":{"summary":"Download swagger","operationId":"static#/api/swagger/*filepath","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"type":"string"}],"responses":{"200":{"description":"File downloaded","schema":{"type":"file"}},"404":{"description":"File not found","schema":{"$ref":"#/definitions/error"}}}}},"/backup/{backup_id}":{"get":{"tags":["backup"],"summary":"Return backup progress","description":"Return backup progress\n\nRequired security scopes:\n * `api:manage`","operationId":"backup#status","produces":["application/vnd.goa.error","application/vnd.rankdb.backup_status+json"],"parameters":[{"name":"backup_id","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbBackup_status"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]},"delete":{"tags":["backup"],"summary":"cancel Backup","description":"cancel backup\n\nRequired security scopes:\n * `api:manage`","operationId":"backup#delete","produces":["application/vnd.goa.error"],"parameters":[{"name":"backup_id","in":"path","required":true,"type":"string"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/doc/{filepath}":{"get":{"summary":"Swagger UX static files","operationId":"static#/doc/*filepath","parameters":[{"name":"filepath","in":"path","description":"Relative file path","required":true,"type":"string"}],"responses":{"200":{"description":"File downloaded","schema":{"type":"file"}},"404":{"description":"File not found","schema":{"$ref":"#/definitions/error"}}}}},"/health":{"get":{"tags":["health"],"summary":"Return system information","description":"Return system information\n\nRequired security scopes:\n * `api:manage`","operationId":"health#health","produces":["application/vnd.goa.error","application/vnd.rankdb.sysinfo+json"],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbSysinfo"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/jwt":{"post":{"tags":["jwt"],"summary":"JWT key generator","description":"JWT key generator.\nIf left disabled in config, Unauthorized is returned\n\nRequired security scopes:\n * `api:manage`","operationId":"jwt#jwt","produces":["application/vnd.goa.error","text/plain"],"parameters":[{"name":"expire","in":"query","description":"Expire token in this many minutes. Default is 24 hours.","required":false,"type":"integer","default":1440,"minimum":1},{"name":"only_elements","in":"query","description":"Create key with list restrictions.\nUse commas to separate multiple elements","required":false,"type":"string"},{"name":"only_lists","in":"query","description":"Create key with list restrictions.\nUse commas to separate multiple lists","required":false,"type":"string"},{"name":"scope","in":"query","description":"Create key with scope","required":true,"type":"string","default":"api:read"}],"responses":{"200":{"description":"OK","headers":{"Authorization":{"description":"Generated JWT. Can be used as bearer.","type":"string"}}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists":{"get":{"tags":["lists"],"summary":"Get Multiple Lists","description":"Get multiple lists.\nLists are sorted lexicographically. See https://golang.org/pkg/strings/#Compare\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#get_all","produces":["application/vnd.goa.error","application/vnd.rankdb.listsresult+json"],"parameters":[{"name":"after_id","in":"query","description":"Start with element following this ID. Empty will return from start.","required":false,"type":"string","default":""},{"name":"before_id","in":"query","description":"Return elements preceding this ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum Number of results","required":false,"type":"integer","default":25,"maximum":1000,"minimum":1}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbListsresult"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]},"post":{"tags":["lists"],"summary":"Create New List","description":"Create New List.\nIf the list already exists \"Conflict\" will be returned.\nThe provided populated data may be provided unsorted, but should not contain duplicate element IDs.\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#create","produces":["application/vnd.goa.error","application/vnd.rankdb.ranklist+json"],"parameters":[{"name":"replace","in":"query","description":"Replace list if exists.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/RankList"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbRanklistFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"409":{"description":"Conflict","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists/{list_id}":{"get":{"tags":["lists"],"summary":"Return Single List","description":"Return Single List.\nNote that top and bottom element will be omitted on empty lists.\n\nRequired security scopes:\n * `api:read`","operationId":"lists#get","produces":["application/vnd.goa.error","application/vnd.rankdb.ranklist+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"top_bottom","in":"query","description":"Include top_element and bottom_element in result.","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbRanklistFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]},"delete":{"tags":["lists"],"summary":"Delete List","description":"Delete List.\nAlso returns success if list was not found.\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#delete","produces":["application/vnd.goa.error"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists/{list_id}/clone":{"put":{"tags":["lists"],"summary":"Clone list","description":"Creates a clone of the list to a new list with the supplied metadata.\nThe URL list is the source and the payload must contain the new list ID.\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#clone","produces":["application/vnd.goa.error","application/vnd.rankdb.ranklist+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/RankList"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbRanklistFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Returned if the original list cannot be found","schema":{"$ref":"#/definitions/error"}},"409":{"description":"Returned if the new list already exists.","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists/{list_id}/elements":{"put":{"tags":["elements"],"summary":"Update Multiple Elements","description":"Update Multiple Elements in list.If element does not exist, it is created in list.\nThe returned \"not_found\" field will never be preset.\n\nRequired security scopes:\n * `api:update`","operationId":"elements#put-multi","produces":["application/vnd.goa.error","application/vnd.rankdb.multielement+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"results","in":"query","description":"Return results of the operation. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/PutMultiElementsPayload"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbMultielement"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:update"]}]},"post":{"tags":["elements"],"summary":"Create Element in list","description":"Create Element in list\n\nRequired security scopes:\n * `api:update`","operationId":"elements#create","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"range","in":"query","description":"Return this number of elements above and below the current element in `neighbors` field.","required":false,"type":"integer","default":5,"maximum":100,"minimum":0},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/Element"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}},"409":{"description":"Conflict","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:update"]}]},"delete":{"tags":["elements"],"summary":"Delete Multiple Elements in list","description":"Delete Multiple Elements in list.If an element does not exist, success is returned.\n\n\nRequired security scopes:\n * `api:delete`","operationId":"elements#delete-multi","produces":["application/vnd.goa.error"],"parameters":[{"name":"element_ids","in":"query","description":"IDs of elements","required":false,"type":"array","items":{"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},"collectionFormat":"multi","maxItems":10000,"minItems":1},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:delete"]}]}},"/lists/{list_id}/elements/find":{"post":{"tags":["elements"],"summary":"Get Multiple Elements","description":"Get Multiple Elements in list.\nWill return 404 if list cannot be found, OK even if no elements are found.\n\nRequired security scopes:\n * `api:read`","operationId":"elements#get-multi","produces":["application/vnd.goa.error","application/vnd.rankdb.multielement+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/MultiElement"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbMultielement"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]}},"/lists/{list_id}/elements/{element_id}":{"get":{"tags":["elements"],"summary":"Get Element in list","description":"Get Element in list\n\nRequired security scopes:\n * `api:read`","operationId":"elements#get","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json"],"parameters":[{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"range","in":"query","description":"Return this number of elements above and below the current element in `neighbors` field.","required":false,"type":"integer","default":5,"maximum":100,"minimum":0}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]},"put":{"tags":["elements"],"summary":"Update Element in list","description":"Update element in list\nIf element does not exist, it is created in list.\nElement ID in payload an url must match.\n\nRequired security scopes:\n * `api:update`","operationId":"elements#put","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json"],"parameters":[{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"range","in":"query","description":"Return this number of elements above and below the current element in `neighbors` field.","required":false,"type":"integer","default":5,"maximum":100,"minimum":0},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/Element"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementFull-Update"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:update"]}]},"delete":{"tags":["elements"],"summary":"Delete Element in list","description":"Delete element in list. If element is not found the operation is considered a success\n\nRequired security scopes:\n * `api:delete`","operationId":"elements#delete","produces":["application/vnd.goa.error"],"parameters":[{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:delete"]}]}},"/lists/{list_id}/elements/{element_id}/around":{"post":{"tags":["elements"],"summary":"Get relation of one element to multiple specific elements.","description":"Get relation of one element to multiple specific elements.\nThe element will have local_from_top and local_from_bottom populated.Elements that are not found are ignored.\n\n\nRequired security scopes:\n * `api:read`","operationId":"elements#get-around","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json"],"parameters":[{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"range","in":"query","description":"Return this number of elements above and below the current element in `neighbors` field.","required":false,"type":"integer","default":5,"maximum":100,"minimum":0},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/MultiElement"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]}},"/lists/{list_id}/percentile":{"get":{"tags":["lists"],"summary":"Get element at percentile","description":"Get element at percentile.\nEither `from_top` or `from_bottom` must be supplied\n\nRequired security scopes:\n * `api:read`","operationId":"lists#get-percentile","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json"],"parameters":[{"name":"from_top","in":"query","description":"Return median percentile element.\nIf the percentile is between two elements, the element with the highest score is returned.\nValue must be parseable as a float point number and must be between 0.0 and 100.0","required":false,"type":"string","default":"50.0"},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"range","in":"query","description":"Return this number of elements above and below the current element in `neighbors` field.","required":false,"type":"integer","default":5,"maximum":100,"minimum":0}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]}},"/lists/{list_id}/range":{"get":{"tags":["lists"],"summary":"Get rank range of the list","description":"Get rank range of the list.\nEither `from_top` or `from_bottom` must be supplied\n\nRequired security scopes:\n * `api:read`","operationId":"lists#get-range","produces":["application/vnd.goa.error","application/vnd.rankdb.element+json; type=collection"],"parameters":[{"name":"from_bottom","in":"query","description":"First result will be at this rank from the bottom of the list.","required":false,"type":"integer","minimum":0},{"name":"from_top","in":"query","description":"First result will be at this rank from the top of the list.","required":false,"type":"integer","minimum":0},{"name":"limit","in":"query","description":"Number of results to return","required":false,"type":"integer","default":25,"maximum":1000,"minimum":1},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbElementCollection"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]}},"/lists/{list_id}/reindex":{"put":{"tags":["lists"],"summary":"Reindex list","description":"Recreates ID index on entire list\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#reindex","produces":["application/vnd.goa.error","application/vnd.rankdb.ranklist+json"],"parameters":[{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbRanklistFull"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists/{list_id}/repair":{"put":{"tags":["lists"],"summary":"Repair list","description":"Repairs the list, by recreating all segments and indexes.\nAll access to the list is blocked while operation runs.\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#repair","produces":["application/vnd.goa.error","application/vnd.rankdb.listopresult+json"],"parameters":[{"name":"clear","in":"query","description":"Clear list if unable to repair","required":false,"type":"boolean","default":false},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbListopresult"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/lists/{list_id}/verify":{"put":{"tags":["lists"],"summary":"Verify list","description":"Verify the list and its elements and optionally repair it.\nAll write access to the list is blocked while operation runs.\n\nRequired security scopes:\n * `api:manage`","operationId":"lists#verify","produces":["application/vnd.goa.error","application/vnd.rankdb.listopresult+json"],"parameters":[{"name":"clear","in":"query","description":"Clear list if unable to repair","required":false,"type":"boolean","default":false},{"name":"list_id","in":"path","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","required":true,"type":"string","maxLength":100,"minLength":2,"pattern":"^[a-zA-Z0-9-_.]+$"},{"name":"repair","in":"query","description":"Attempt to repair list","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbListopresult"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/xlist/backup":{"put":{"tags":["multilist"],"summary":"Backup lists","description":"Backup lists.\nIf no lists, nor any search is specified all lists are backed up.A callback is provided to check progress.\n\nRequired security scopes:\n * `api:manage`","operationId":"multilist#backup","produces":["application/octet-stream","application/vnd.goa.error","application/vnd.rankdb.callback+json"],"parameters":[{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/MultiListBackup"}}],"responses":{"200":{"description":"Returned when backup type is \"download\". The raw backup content is returned"},"201":{"description":"Returned when the operation is started in the background","schema":{"$ref":"#/definitions/RankdbCallback"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/xlist/elements":{"put":{"tags":["multilist"],"summary":"Update Elements in multiple listsResults are always returned.","description":"Update multiple elements in lists\n\nRequired security scopes:\n * `api:update`","operationId":"multilist#put","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"errors_only","in":"query","description":"Returns errors only. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"results","in":"query","description":"Return results of the operation. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/ListPayloadQL"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:update"]}]},"post":{"tags":["multilist"],"summary":"Create elements in multiple lists","description":"Create elements in lists\n\nRequired security scopes:\n * `api:update`","operationId":"multilist#create","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"errors_only","in":"query","description":"Returns errors only. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"results","in":"query","description":"Return results of the operation. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/ListPayloadQL"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:update"]}]}},"/xlist/elements/{element_id}":{"get":{"tags":["multilist"],"summary":"Get Element in multiple lists","description":"Get Element in multiple lists\n\nRequired security scopes:\n * `api:read`","operationId":"multilist#get","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"all_in_sets","in":"query","description":"Include all lists in these sets","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"lists","in":"query","description":"Include lists that match exact list names","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"match_metadata","in":"query","description":"Include lists that match all values in metadata.\nPayload must be valid json with string-\u003estring values.\nExample: {\"country\":\"dk\",\"game\":\"match4\"}","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:read"]}]},"delete":{"tags":["multilist"],"summary":"Delete Element in multiple lists","description":"Delete element in multiple lists.\nIf element is not found the operation is considered a success\n\nRequired security scopes:\n * `api:delete`","operationId":"multilist#delete","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"all_in_sets","in":"query","description":"Include all lists in these sets","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"element_id","in":"path","description":"ID of element","required":true,"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$"},{"name":"errors_only","in":"query","description":"Returns errors only. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"lists","in":"query","description":"Include lists that match exact list names","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"match_metadata","in":"query","description":"Include lists that match all values in metadata.\nPayload must be valid json with string-\u003estring values.\nExample: {\"country\":\"dk\",\"game\":\"match4\"}","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:delete"]}]}},"/xlist/reindex":{"put":{"tags":["multilist"],"summary":"Reindex lists","description":"Reindex lists.\nIf no lists, nor any search is specified all lists are reindexed.\n\nRequired security scopes:\n * `api:manage`","operationId":"multilist#reindex","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"errors_only","in":"query","description":"Returns errors only. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/ListQL"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/xlist/restore":{"post":{"tags":["multilist"],"summary":"Restore lists","description":"Restore lists. Body must contain binary data with backup data, unless 'src' is specified.\n\nRequired security scopes:\n * `api:manage`","operationId":"multilist#restore","produces":["application/vnd.goa.error","application/vnd.rankdb.restoreresult+json"],"parameters":[{"name":"keep","in":"query","description":"Keep existing lists. Only restore missing lists","required":false,"type":"boolean","default":false},{"name":"list_id_prefix","in":"query","description":"Optional alternative list id prefix.\nIf not provided the original list id/segment ids will be used and any existing list will be overwritten.","required":false,"type":"string"},{"name":"list_id_suffix","in":"query","description":"Optional alternative list id suffix.\nIf not provided the original list id/segment ids will be used and any existing list will be overwritten.","required":false,"type":"string"},{"name":"src","in":"query","description":"The body will not contain any data. Instead load data from provided URL.\nThe call will return when the backup has finished.\nIf the source is s3, the source should be defined as s3://bucket/path/file.bin. Replace bucket and path+file","required":false,"type":"string","default":""},{"name":"src_file","in":"query","description":"The body will not contain any data. Instead load data from file from this path.\nThe call will return when the backup has finished.","required":false,"type":"string","default":""}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbRestoreresult"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}},"/xlist/verify":{"put":{"tags":["multilist"],"summary":"Verify lists","description":"Verify lists.\nIf no lists, nor any search is specified all lists are checked.\n\nRequired security scopes:\n * `api:manage`","operationId":"multilist#verify","produces":["application/vnd.goa.error","application/vnd.rankdb.resultlist+json"],"parameters":[{"name":"clear","in":"query","description":"Clear list if unable to repair","required":false,"type":"boolean","default":false},{"name":"elements","in":"query","description":"Verify elements as well","required":false,"type":"boolean","default":false},{"name":"errors_only","in":"query","description":"Returns errors only. If disabled, operations will be faster and require less memory.","required":false,"type":"boolean","default":false},{"name":"repair","in":"query","description":"Repair lists with problems automatically.","required":false,"type":"boolean","default":false},{"name":"payload","in":"body","required":true,"schema":{"$ref":"#/definitions/ListQL"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/RankdbResultlist"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/error"}}},"security":[{"jwt":["api:manage"]}]}}},"definitions":{"BackupDestination":{"title":"BackupDestination","type":"object","properties":{"path":{"type":"string","description":"Specifies the destination path.\nIf type is server, this should be ip+port of the other server, eg. 10.0.0.1:8080.\nIf the type is s3, the source should be specified as s3://bucket/path/file.bin. Replace bucket and path+file","example":"./backup.bin"},"server_list_id_prefix":{"type":"string","description":"Optional alternative list id prefix for server-to-server transfers.\nIf not provided the original list id/segment ids will be used and any existing list will be overwritten.","example":"Molestiae aspernatur mollitia commodi id deserunt."},"server_list_id_suffix":{"type":"string","description":"Optional alternative list id suffix for server-to-server transfers.\nIf not provided the original list id/segment ids will be used and any existing list will be overwritten.","example":"Reiciendis voluptate ea id aperiam nulla."},"type":{"type":"string","description":"Specifies the destination type of the backup. Can be 'file' 'download', 's3' or 'server'","example":"file"}},"example":{"path":"./backup.bin","server_list_id_prefix":"Molestiae aspernatur mollitia commodi id deserunt.","server_list_id_suffix":"Reiciendis voluptate ea id aperiam nulla.","type":"file"},"required":["type"]},"Element":{"title":"Element","type":"object","properties":{"id":{"type":"integer","description":"ID of element","example":100,"minimum":0},"payload":{"type":"object","description":"Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.","example":{"country":"dk","name":"Mark Anthony"},"additionalProperties":true},"score":{"type":"integer","description":"Score of the element. Higher score gives higher placement.","example":100,"minimum":0},"tie_breaker":{"type":"integer","description":"Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.","example":2000,"minimum":0,"maximum":4294967295}},"example":{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000},"required":["id","score"]},"ListPayloadQL":{"title":"ListPayloadQL","type":"object","properties":{"all_in_sets":{"type":"array","items":{"type":"string","example":"Voluptas dolorum fugiat quibusdam perferendis qui ducimus."},"description":"Include all lists in these sets","example":["storage-set","backup-set"]},"lists":{"type":"array","items":{"type":"string","example":"Cum odit minima debitis beatae quidem quis."},"description":"Include lists that match exact list names","example":["highscore-dk-all","highscore-uk-all"]},"match_metadata":{"type":"object","description":"Include lists that match all values in metadata","example":{"country":"dk"},"additionalProperties":true},"payload":{"type":"array","items":{"$ref":"#/definitions/Element"},"description":"Payloads for create/update functions.\nWill be ignored on deletes.","example":[{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000}]}},"example":{"all_in_sets":["storage-set","backup-set"],"lists":["highscore-dk-all","highscore-uk-all"],"match_metadata":{"country":"dk"},"payload":[{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000}]}},"ListQL":{"title":"ListQL","type":"object","properties":{"all_in_sets":{"type":"array","items":{"type":"string","example":"Dolores sint modi voluptas totam sequi nihil."},"description":"Include all lists in these sets","example":["storage-set","backup-set"]},"lists":{"type":"array","items":{"type":"string","example":"Est quo ea sapiente autem."},"description":"Include lists that match exact list names","example":["highscore-dk-all","highscore-uk-all"]},"match_metadata":{"type":"object","description":"Include lists that match all values in metadata","example":{"country":"dk"},"additionalProperties":true}},"example":{"all_in_sets":["storage-set","backup-set"],"lists":["highscore-dk-all","highscore-uk-all"],"match_metadata":{"country":"dk"}}},"MultiElement":{"title":"MultiElement","type":"object","properties":{"element_ids":{"type":"array","items":{"type":"integer","description":"Element ID","example":100,"minimum":0},"description":"IDs of elements","example":[120,340,550]}},"example":{"element_ids":[120,340,550]},"required":["element_ids"]},"MultiListBackup":{"title":"MultiListBackup","type":"object","properties":{"destination":{"$ref":"#/definitions/BackupDestination"},"lists":{"$ref":"#/definitions/ListQL"}},"example":{"destination":{"path":"./backup.bin","server_list_id_prefix":"Molestiae aspernatur mollitia commodi id deserunt.","server_list_id_suffix":"Reiciendis voluptate ea id aperiam nulla.","type":"file"},"lists":{"all_in_sets":["storage-set","backup-set"],"lists":["highscore-dk-all","highscore-uk-all"],"match_metadata":{"country":"dk"}}},"required":["destination","lists"]},"PutMultiElementsPayload":{"title":"PutMultiElementsPayload","type":"array","items":{"$ref":"#/definitions/Element"},"example":[{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000},{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000},{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000}]},"RankList":{"title":"RankList","type":"object","properties":{"id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"load_index":{"type":"boolean","description":"Load Index on server startup","default":false,"example":false},"merge_size":{"type":"integer","description":"Merge adjacent Segments with less than this number of entries","default":500,"example":500,"minimum":10,"maximum":100000},"metadata":{"type":"object","description":"Custom metadata. String to String hash.","example":{"country":"dk","game":"2"},"additionalProperties":true},"populate":{"type":"array","items":{"$ref":"#/definitions/Element"},"description":"Populate list with specified elements","example":[{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000},{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000}]},"set":{"type":"string","description":"Set used for storage","example":"storage-set","minLength":2,"maxLength":100},"split_size":{"type":"integer","description":"Split Segments larger than this number of entries","default":2000,"example":2000,"minimum":10,"maximum":100000}},"example":{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"populate":[{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000},{"id":100,"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000}],"set":"storage-set","split_size":2000},"required":["id","set"]},"RankdbBackup_status":{"title":"Mediatype identifier: application/vnd.rankdb.backup_status+json; view=default","type":"object","properties":{"cancelled":{"type":"boolean","description":"Will be true if backup was cancelled","example":false},"custom":{"type":"object","description":"Custom information provided by backup","example":{"Officiis rerum qui dolor atque ut.":"Quam sunt reprehenderit quasi ipsa doloribus maiores."},"additionalProperties":true},"done":{"type":"boolean","description":"Will be true when the backup has finished processing","example":false},"errors":{"type":"object","description":"Failed operations, indexed by list IDs","example":{"highscore-dk-all":"not found"},"additionalProperties":true},"finished":{"type":"string","description":"Time backup was finished","example":"2000-09-09T16:20:50Z","format":"date-time"},"lists":{"type":"integer","description":"Number of lists to be backed up","example":8409293731941956787,"format":"int64"},"lists_done":{"type":"integer","description":"Number of lists backed up now","example":6395906341434804547,"format":"int64"},"size":{"type":"integer","description":"Size of stored data","example":6170196923559175622,"format":"int64"},"started":{"type":"string","description":"Time backup was started","example":"1993-04-08T06:51:59Z","format":"date-time"},"storage":{"type":"string","description":"Storage used for backup","example":"Adipisci officiis architecto quisquam quia."},"uri":{"type":"string","description":"URI of backed up content. Used for restore.","example":"Neque nostrum quisquam nulla deleniti."}},"description":"Backup Information (default view)","example":{"cancelled":false,"custom":{"Officiis rerum qui dolor atque ut.":"Quam sunt reprehenderit quasi ipsa doloribus maiores."},"done":false,"errors":{"highscore-dk-all":"not found"},"finished":"2000-09-09T16:20:50Z","lists":8409293731941956787,"lists_done":6395906341434804547,"size":6170196923559175622,"started":"1993-04-08T06:51:59Z","storage":"Adipisci officiis architecto quisquam quia.","uri":"Neque nostrum quisquam nulla deleniti."},"required":["done","cancelled","lists","storage","size","uri","started","lists_done"]},"RankdbCallback":{"title":"Mediatype identifier: application/vnd.rankdb.callback+json; view=default","type":"object","properties":{"callback_url":{"type":"string","example":"Omnis quae itaque commodi."},"id":{"type":"string","example":"Perspiciatis dolore laudantium ut alias quos."}},"description":"Backup Information (default view)","example":{"callback_url":"Omnis quae itaque commodi.","id":"Perspiciatis dolore laudantium ut alias quos."},"required":["id","callback_url"]},"RankdbElement":{"title":"Mediatype identifier: application/vnd.rankdb.element+json; view=default","type":"object","properties":{"from_bottom":{"type":"integer","description":"Element rank in list from bottom.\n Bottom element has value 0.","example":4000,"format":"int64"},"from_top":{"type":"integer","description":"Element rank in list from top.\n Top element has value 0.","example":50,"format":"int64"},"id":{"type":"integer","description":"ID of element","example":100,"minimum":0},"list_id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"payload":{"type":"object","description":"Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.","example":{"country":"dk","name":"Mark Anthony"},"additionalProperties":true},"score":{"type":"integer","description":"Score of the element. Higher score gives higher placement.","example":100,"minimum":0},"tie_breaker":{"type":"integer","description":"Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.","example":2000,"minimum":0,"maximum":4294967295},"updated_at":{"type":"string","description":"Date of last update","example":"1996-11-22T14:02:34Z","format":"date-time"}},"description":"List Element (default view)","example":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},"required":["id","from_top","from_bottom","score","list_id","payload","updated_at","tie_breaker"]},"RankdbElementCollection":{"title":"Mediatype identifier: application/vnd.rankdb.element+json; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/RankdbElement"},"description":"RankdbElementCollection is the media type for an array of RankdbElement (default view)","example":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}]},"RankdbElementFull":{"title":"Mediatype identifier: application/vnd.rankdb.element+json; view=full","type":"object","properties":{"from_bottom":{"type":"integer","description":"Element rank in list from bottom.\n Bottom element has value 0.","example":4000,"format":"int64"},"from_top":{"type":"integer","description":"Element rank in list from top.\n Top element has value 0.","example":50,"format":"int64"},"id":{"type":"integer","description":"ID of element","example":100,"minimum":0},"list_id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"local_from_bottom":{"type":"integer","description":"Local element rank in list from bottom when requesting sub-list.\n Bottom element has value 0.","example":4000,"format":"int64"},"local_from_top":{"type":"integer","description":"Local element rank in list from top when requesting sub-list.\n Top element has value 0.","example":50,"format":"int64"},"neighbors":{"type":"object","properties":{"above":{"$ref":"#/definitions/RankdbElementCollection"},"below":{"$ref":"#/definitions/RankdbElementCollection"}},"description":"Neighbors to current element","example":{"above":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}],"below":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}]}},"payload":{"type":"object","description":"Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.","example":{"country":"dk","name":"Mark Anthony"},"additionalProperties":true},"score":{"type":"integer","description":"Score of the element. Higher score gives higher placement.","example":100,"minimum":0},"tie_breaker":{"type":"integer","description":"Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.","example":2000,"minimum":0,"maximum":4294967295},"updated_at":{"type":"string","description":"Date of last update","example":"2011-03-06T07:38:11Z","format":"date-time"}},"description":"List Element (full view)","example":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","local_from_bottom":4000,"local_from_top":50,"neighbors":{"above":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}],"below":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}]},"payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"2011-03-06T07:38:11Z"},"required":["id","from_top","from_bottom","score","list_id","payload","updated_at","tie_breaker"]},"RankdbElementFull-Update":{"title":"Mediatype identifier: application/vnd.rankdb.element+json; view=full-update","type":"object","properties":{"from_bottom":{"type":"integer","description":"Element rank in list from bottom.\n Bottom element has value 0.","example":4000,"format":"int64"},"from_top":{"type":"integer","description":"Element rank in list from top.\n Top element has value 0.","example":50,"format":"int64"},"id":{"type":"integer","description":"ID of element","example":100,"minimum":0},"list_id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"local_from_bottom":{"type":"integer","description":"Local element rank in list from bottom when requesting sub-list.\n Bottom element has value 0.","example":4000,"format":"int64"},"local_from_top":{"type":"integer","description":"Local element rank in list from top when requesting sub-list.\n Top element has value 0.","example":50,"format":"int64"},"neighbors":{"type":"object","properties":{"above":{"$ref":"#/definitions/RankdbElementCollection"},"below":{"$ref":"#/definitions/RankdbElementCollection"}},"description":"Neighbors to current element","example":{"above":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}],"below":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}]}},"payload":{"type":"object","description":"Custom payload. Stored untouched. On updates null means do not update. `{}` is the empty value.","example":{"country":"dk","name":"Mark Anthony"},"additionalProperties":true},"previous_rank":{"$ref":"#/definitions/RankdbElement"},"score":{"type":"integer","description":"Score of the element. Higher score gives higher placement.","example":100,"minimum":0},"tie_breaker":{"type":"integer","description":"Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.","example":2000,"minimum":0,"maximum":4294967295},"updated_at":{"type":"string","description":"Date of last update","example":"2011-03-06T07:38:11Z","format":"date-time"}},"description":"List Element (full-update view)","example":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","local_from_bottom":4000,"local_from_top":50,"neighbors":{"above":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}],"below":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}]},"payload":{"country":"dk","name":"Mark Anthony"},"previous_rank":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},"score":100,"tie_breaker":2000,"updated_at":"2011-03-06T07:38:11Z"},"required":["id","from_top","from_bottom","score","list_id","payload","updated_at","tie_breaker"]},"RankdbListopresult":{"title":"Mediatype identifier: application/vnd.rankdb.listopresult+json; view=default","type":"object","properties":{"error":{"type":"string","description":"Error, if any encountered","example":"not found"},"list":{"$ref":"#/definitions/RankdbRanklist"}},"description":"Result of a list operation. Will contain either an error or a list. (default view)","example":{"error":"not found","list":{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000}}},"RankdbListsresult":{"title":"Mediatype identifier: application/vnd.rankdb.listsresult+json; view=default","type":"object","properties":{"lists":{"$ref":"#/definitions/RankdbRanklistCollection"},"lists_after":{"type":"integer","description":"The number of lists after the last element","example":4923220431896422881,"format":"int64"},"lists_before":{"type":"integer","description":"The number of lists before the first element","example":2009714069180827336,"format":"int64"}},"description":"RankdbListsresult media type (default view)","example":{"lists":[{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000},{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000},{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000}],"lists_after":4923220431896422881,"lists_before":2009714069180827336},"required":["lists_before","lists_after","lists"]},"RankdbMultielement":{"title":"Mediatype identifier: application/vnd.rankdb.multielement+json; view=default","type":"object","properties":{"found":{"$ref":"#/definitions/RankdbElementCollection"},"not_found":{"type":"array","items":{"type":"integer","example":5935540881490916765,"format":"int64"},"description":"Elements that wasn't found in the list. Unordered.","example":[5935540881490916765,5935540881490916765]}},"description":"RankdbMultielement media type (default view)","example":{"found":[{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}],"not_found":[5935540881490916765,5935540881490916765]},"required":["found"]},"RankdbRanklist":{"title":"Mediatype identifier: application/vnd.rankdb.ranklist+json; view=default","type":"object","properties":{"id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"load_index":{"type":"boolean","description":"Load Index on server startup","default":false,"example":false},"merge_size":{"type":"integer","description":"Merge adjacent Segments with less than this number of entries","default":500,"example":500,"minimum":10,"maximum":100000},"metadata":{"type":"object","description":"Custom metadata. String to String hash.","example":{"country":"dk","game":"2"},"additionalProperties":true},"set":{"type":"string","description":"Set used for storage","example":"storage-set","minLength":2,"maxLength":100},"split_size":{"type":"integer","description":"Split Segments larger than this number of entries","default":2000,"example":2000,"minimum":10,"maximum":100000}},"description":"Rank List (default view)","example":{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000},"required":["id","set","metadata","split_size","merge_size","load_index"]},"RankdbRanklistCollection":{"title":"Mediatype identifier: application/vnd.rankdb.ranklist+json; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/RankdbRanklist"},"description":"RankdbRanklistCollection is the media type for an array of RankdbRanklist (default view)","example":[{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000},{"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"set":"storage-set","split_size":2000}]},"RankdbRanklistFull":{"title":"Mediatype identifier: application/vnd.rankdb.ranklist+json; view=full","type":"object","properties":{"avg_segment_elements":{"type":"number","description":"Average number of elements per segment","example":1005.5,"format":"double"},"bottom_element":{"$ref":"#/definitions/RankdbElement"},"cache_hits":{"type":"integer","description":"Cache hits while segments have been loaded.","example":643,"format":"int64"},"cache_misses":{"type":"integer","description":"Cache misses while segments have been loaded.","example":123,"format":"int64"},"cache_percent":{"type":"number","description":"Cache hit percentage while segments have been loaded.","example":64.56,"format":"double"},"elements":{"type":"integer","description":"Number of elements in list","example":15000,"format":"int64"},"id":{"type":"string","description":"The ID of the list to apply the operation on.\nCan be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`","example":"highscore-list","pattern":"^[a-zA-Z0-9-_.]+$","minLength":2,"maxLength":100},"load_index":{"type":"boolean","description":"Load Index on server startup","default":false,"example":false},"merge_size":{"type":"integer","description":"Merge adjacent Segments with less than this number of entries","default":500,"example":500,"minimum":10,"maximum":100000},"metadata":{"type":"object","description":"Custom metadata. String to String hash.","example":{"country":"dk","game":"2"},"additionalProperties":true},"segments":{"type":"integer","description":"Number of segment in list","example":15,"format":"int64"},"set":{"type":"string","description":"Set used for storage","example":"storage-set","minLength":2,"maxLength":100},"split_size":{"type":"integer","description":"Split Segments larger than this number of entries","default":2000,"example":2000,"minimum":10,"maximum":100000},"top_element":{"$ref":"#/definitions/RankdbElement"}},"description":"Rank List (full view)","example":{"avg_segment_elements":1005.5,"bottom_element":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"},"cache_hits":643,"cache_misses":123,"cache_percent":64.56,"elements":15000,"id":"highscore-list","load_index":false,"merge_size":500,"metadata":{"country":"dk","game":"2"},"segments":15,"set":"storage-set","split_size":2000,"top_element":{"from_bottom":4000,"from_top":50,"id":100,"list_id":"highscore-list","payload":{"country":"dk","name":"Mark Anthony"},"score":100,"tie_breaker":2000,"updated_at":"1996-11-22T14:02:34Z"}},"required":["id","set","metadata","segments","elements","avg_segment_elements","split_size","merge_size","load_index","cache_hits","cache_misses","cache_percent"]},"RankdbRestoreresult":{"title":"Mediatype identifier: application/vnd.rankdb.restoreresult+json; view=default","type":"object","properties":{"errors":{"type":"object","description":"Failed operations, indexed by list IDs","example":{"highscore-dk-all":"not found"},"additionalProperties":true},"restored":{"type":"integer","description":"Successful restore operations, indexed by list IDs","example":20,"format":"int64"},"skipped":{"type":"integer","description":"Skipped lists, indexed by list IDs","example":1,"format":"int64"}},"description":"RankdbRestoreresult media type (default view)","example":{"errors":{"highscore-dk-all":"not found"},"restored":20,"skipped":1},"required":["restored","skipped","errors"]},"RankdbResultlist":{"title":"Mediatype identifier: application/vnd.rankdb.resultlist+json; view=default","type":"object","properties":{"errors":{"type":"object","description":"Failed operations, indexed by list IDs","example":{"highscore-dk-all":"not found"},"additionalProperties":true},"success":{"type":"object","description":"Successful operations, indexed by list IDs","example":{"highscore-uk-all":{}},"additionalProperties":true}},"description":"RankdbResultlist media type (default view)","example":{"errors":{"highscore-dk-all":"not found"},"success":{"highscore-uk-all":{}}}},"RankdbSysinfo":{"title":"Mediatype identifier: application/vnd.rankdb.sysinfo+json; view=default","type":"object","properties":{"element_cache":{"type":"object","description":"Element Cache Information","example":{"current_entries":5000,"max_size":10000},"additionalProperties":true},"lazy_saver":{"type":"object","description":"Lazy saver cache information.","example":{"current_entries":5000,"max_size":10000},"additionalProperties":true},"memory":{"type":"object","description":"Memory Information","example":{"Alloc":621480,"Lookups":5,"Mallocs":5940,"Sys":4262136,"TotalAlloc":621480},"additionalProperties":true}},"description":"System Info. The model is sparse and may contain other information. (default view)","example":{"element_cache":{"current_entries":5000,"max_size":10000},"lazy_saver":{"current_entries":5000,"max_size":10000},"memory":{"Alloc":621480,"Lookups":5,"Mallocs":5940,"Sys":4262136,"TotalAlloc":621480}}},"error":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"code":{"type":"string","description":"an application-specific error code, expressed as a string value.","example":"invalid_value"},"detail":{"type":"string","description":"a human-readable explanation specific to this occurrence of the problem.","example":"Value of ID must be an integer"},"id":{"type":"string","description":"a unique identifier for this particular occurrence of the problem.","example":"3F1FKVRR"},"meta":{"type":"object","description":"a meta object containing non-standard meta-information about the error.","example":{"timestamp":1458609066},"additionalProperties":true},"status":{"type":"string","description":"the HTTP status code applicable to this problem, expressed as a string value.","example":"400"}},"description":"Error response media type (default view)","example":{"code":"invalid_value","detail":"Value of ID must be an integer","id":"3F1FKVRR","meta":{"timestamp":1458609066},"status":"400"}}},"responses":{"NoContent":{"description":"No Content"}},"securityDefinitions":{"jwt":{"type":"apiKey","description":"\n\n**Security Scopes**:\n * `api:delete`: API Delete Access.\n * `api:manage`: API Manager Access.\n * `api:read`: API Read Access\n * `api:update`: API Update Access.","name":"Authorization","in":"header"}}}