{"basePath":"/storage","definitions":{"calc.interval.counter":{"anyOf":[{"$ref":"#/definitions/container.interval.counter.expression"},{"$ref":"#/definitions/container.interval.counter.dataset"},{"$ref":"#/definitions/container.interval.counter.route"},{"$ref":"#/definitions/container.interval.counter.datetime"},{"$ref":"#/definitions/container.interval.counter.parameter"},{"$ref":"#/definitions/container.interval.counter.message"},{"$ref":"#/definitions/container.interval.counter.interval"},{"$ref":"#/definitions/container.interval.counter.active"},{"$ref":"#/definitions/container.interval.counter.geofence"},{"$ref":"#/definitions/container.interval.counter.variable"},{"$ref":"#/definitions/container.interval.counter.specified"},{"$ref":"#/definitions/container.interval.counter.calculator"},{"$ref":"#/definitions/container.interval.counter.accumulator"}],"x-key-property":"type"},"calc.interval.counters":{"description":"[Intervals counters](https://flespi.com/kb/analytics-reports-and-events-engine#interval-counters), define how to calculate messsages inside each interval.\n","items":{"$ref":"#/definitions/calc.interval.counter"},"maxItems":50,"type":"array"},"calc.interval.selector":{"anyOf":[{"$ref":"#/definitions/container.interval.selector.expression"},{"$ref":"#/definitions/container.interval.selector.datetime"},{"$ref":"#/definitions/container.interval.selector.geofence"},{"$ref":"#/definitions/container.interval.selector.calculator"},{"$ref":"#/definitions/container.interval.selector.inactive"}],"x-key-property":"type"},"calc.interval.selectors":{"description":"[Intervals selectors](https://flespi.com/kb/analytics-reports-and-events-engine#interval-selectors) are used to split device messages into intervals based on user-defined criteria.\nResulting intervals will have begin, end times, and duration. It is possible to have intervals that consist of one message only, i.e. with zero duration.\n\nEach interval selector type has its own internal logic in the configuration, determines the state of each analyzed message sequentially, and assigns each message one of the following:\n* ON — interval can continue\n* ON_NEW — interval should restart\n* OFF — interval should stop\n* UNKNOWN — unable to calculate\n\nSo, to detect one interval it is enough to have at least one message marked ON or ON_NEW.\n\nIf multiple interval selectors are specified, they will be merged with AND logic, i.e. only ranges where all specified interval selectors are active will be present in the final intervals\n","items":{"$ref":"#/definitions/calc.interval.selector"},"maxItems":3,"minItems":1,"type":"array"},"cdn":{"description":"CDN information","properties":{"blocked":{"$ref":"#/definitions/cdn.blocked"},"cid":{"$ref":"#/definitions/item.cid"},"created":{"$ref":"#/definitions/item.btime"},"id":{"$ref":"#/definitions/cdn.id"},"ip_whitelist":{"$ref":"#/definitions/cdn.ip_whitelist"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/cdn.name"},"size":{"$ref":"#/definitions/cdn.size"}},"type":"object"},"cdn.blocked":{"description":"Active block code for cdn. Zero code means cdn is not blocked for files uploading.","format":"uint32","type":"integer"},"cdn.file":{"properties":{"auto_ttl":{"$ref":"#/definitions/cdn.file.auto_ttl"},"cdn_id":{"$ref":"#/definitions/cdn.id"},"created":{"$ref":"#/definitions/cdn.file.created"},"expires":{"$ref":"#/definitions/cdn.file.expires"},"mime":{"$ref":"#/definitions/cdn.file.mime"},"name":{"$ref":"#/definitions/cdn.file.name"},"size":{"$ref":"#/definitions/cdn.file.size"},"uuid":{"$ref":"#/definitions/cdn.file.uuid"}},"title":"file meta-information","type":"object"},"cdn.file.auto_ttl":{"description":"Interval of automatic file expiration time prolongation when file is being accessed, zero if not used","format":"uint32","maximum":63072000,"type":"integer"},"cdn.file.created":{"description":"File upload time, UNIX timestamp","format":"uint32","type":"integer"},"cdn.file.expires":{"description":"UNIX timestamp when files expires and will be automatically deleted, zero if not used","format":"uint32","type":"integer","x-view-type":"datetime"},"cdn.file.mime":{"description":"File MIME type, as specified during upload","maxLength":128,"minLength":3,"type":"string"},"cdn.file.name":{"description":"File name specified during upload","maxLength":512,"type":"string"},"cdn.file.post":{"properties":{"auto_ttl":{"$ref":"#/definitions/cdn.file.auto_ttl"},"expires":{"$ref":"#/definitions/cdn.file.expires"}},"type":"object"},"cdn.file.size":{"description":"File binary size, in bytes","format":"uint32","type":"integer"},"cdn.file.uuid":{"description":"file UUID, unique per each file","maxLength":48,"minLength":48,"pattern":"^[0-9A-Fa-f]+$","type":"string"},"cdn.files.result":{"properties":{"result":{"items":{"$ref":"#/definitions/cdn.file"},"title":"array of files meta-information","type":"array"}},"type":"object"},"cdn.files.select":{"description":"attributes used to identify files for selection","properties":{"filter":{"description":"Additional filter specificators to select files. You can utilize powerful [flespi expressions](https://flespi.com/kb/expressions).\nReturned files contain attributes that satisfy to specified filters. Allowed filtration fields: created, expires, size, name, mime.\n","maxLength":1024,"minLength":5,"type":"string","x-view-type":"expression"},"uuid":{"$ref":"#/definitions/cdn.file.uuid"}},"type":"object"},"cdn.id":{"description":"cdn's unique ID","format":"uint32","minimum":1,"type":"integer"},"cdn.ip_whitelist":{"description":"Comma-separated list of IP address wildcard patterns allowed to access CDN files via public link, e.g. \"185.213.0.*\". Empty value means no restriction.","maxLength":256,"type":"string"},"cdn.name":{"description":"optional cdn name to easily access to certain cdns with {cdn-selector}","maxLength":255,"type":"string"},"cdn.post":{"properties":{"ip_whitelist":{"$ref":"#/definitions/cdn.ip_whitelist"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/cdn.name"}},"type":"object","x-view-order":["name","metadata","ip_whitelist"]},"cdn.put":{"properties":{"ip_whitelist":{"$ref":"#/definitions/cdn.ip_whitelist"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/cdn.name"}},"type":"object","x-view-order":["name","metadata","ip_whitelist"]},"cdn.size":{"description":"size of cdn files in KB","format":"uint32","type":"integer"},"cdns":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"cdns collection.","items":{"$ref":"#/definitions/cdn"},"type":"array"}},"type":"object"},"changelog.get":{"properties":{"count":{"default":10000000,"description":"limit number of posts to be returned","format":"uint32","maximum":10000000,"minimum":1,"type":"integer"},"fields":{"description":"CSV-formatted list of post fields to be returned","maxLength":4096,"type":"string"},"filter":{"description":"optional filter expression to return only matching posts","maxLength":1024,"type":"string","x-view-type":"expression"},"from":{"description":"start moment's UNIX timestamp, use 0 to ignore left bound","minimum":0,"type":"number","x-view-type":"datetime"},"reverse":{"default":false,"description":"use true to list posts from newest to oldest","type":"boolean"},"to":{"description":"end moment's UNIX timestamp, use 0 to ignore right bound","minimum":0,"type":"number","x-view-type":"datetime"}},"type":"object"},"changelog.post":{"properties":{"author":{"description":"display name of the post author on the forum","type":"string"},"name":{"description":"name of the changelog the post belongs to","type":"string"},"text":{"description":"post text in markdown format","format":"textarea","type":"string"},"timestamp":{"description":"post publication UNIX timestamp","type":"number","x-view-type":"datetime"},"title":{"description":"changelog topic title","type":"string"},"url":{"description":"direct link to the post on the forum","type":"string"}},"type":"object"},"changelog.posts":{"properties":{"result":{"description":"changelog posts sorted by publication time","items":{"$ref":"#/definitions/changelog.post"},"type":"array"}},"type":"object"},"container":{"description":"container information","properties":{"blocked":{"$ref":"#/definitions/container.blocked"},"cid":{"$ref":"#/definitions/item.cid"},"created":{"$ref":"#/definitions/item.btime"},"flags":{"$ref":"#/definitions/container.flags"},"id":{"$ref":"#/definitions/container.id"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/container.name"},"rotate":{"$ref":"#/definitions/container.rotate"},"size":{"$ref":"#/definitions/container.size"},"ttl":{"$ref":"#/definitions/container.ttl-nodefault"}},"type":"object"},"container.blocked":{"description":"Active block code for container. Non-zero code means container is blocked for new messages posting operations","format":"uint32","type":"integer"},"container.flags":{"description":"container flags, used for determining default duplicates strategy during messages registration and additional storage options","enum":[0,1,2,3,16,17,18,19],"format":"uint32","type":"integer","x-view-enum-labels":["replace message with new","skip new message","merge parameters","allow duplicates","replace message with new (enable automatic timeseries data generalization)","skip new message (enable automatic timeseries data generalization)","merge parameters (enable automatic timeseries data generalization)","allow duplicates (enable automatic timeseries data generalization)"]},"container.id":{"description":"container's unique ID","minimum":1,"type":"integer"},"container.interval":{"additionalProperties":true,"description":"selected interval data","properties":{"begin":{"$ref":"#/definitions/container.interval.begin"},"duration":{"$ref":"#/definitions/container.interval.duration"},"end":{"$ref":"#/definitions/container.interval.end"}},"type":"object"},"container.interval.begin":{"description":"interval begin time, UNIX timestamp","minimum":1,"type":"number","x-view-type":"datetime"},"container.interval.counter":{"anyOf":[{"$ref":"#/definitions/container.interval.counter.expression"},{"$ref":"#/definitions/container.interval.counter.dataset"},{"$ref":"#/definitions/container.interval.counter.route"},{"$ref":"#/definitions/container.interval.counter.datetime"},{"$ref":"#/definitions/container.interval.counter.parameter"},{"$ref":"#/definitions/container.interval.counter.message"},{"$ref":"#/definitions/container.interval.counter.interval"},{"$ref":"#/definitions/container.interval.counter.active"},{"$ref":"#/definitions/container.interval.counter.geofence"},{"$ref":"#/definitions/container.interval.counter.variable"},{"$ref":"#/definitions/container.interval.counter.specified"},{"$ref":"#/definitions/container.interval.counter.accumulator"}],"x-key-property":"type"},"container.interval.counter.accumulator":{"description":"Accumulate value of another counter across multiple intervals.\n\nUse to compute aggregate metrics like total mileage.\n","properties":{"counter":{"description":"Counter name which numerical value to accumulate.\n","maxLength":128,"minLength":1,"type":"string"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"reset_expression":{"description":"[Expression](https://flespi.com/kb/expressions) over interval counters that can be used to specify reset condition for accumulated value, e.g. when to start value accumulation again from scratch.\nNon-zero expression evaluation result means condition to be reset. For example you may specify: \"duration>3600\" to continiously accumulate value only for short intervals, that are less than 1 hour.\nprevious(\"counter_name\") function, if used in expression will return the value of counter_name counter from previously calculated and stored interval.\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"reset_interval":{"description":"Defines interval, upon which accumulated value will be automatically reset to zero","enum":["hour","day","week_monday","week_sunday","month","year"],"type":"string","x-view-enum-labels":["Hour","Day","Week (from Monday)","Week (from Sunday)","Month","Year"]},"type":{"const":"accumulator","default":"accumulator","description":"Accumulate value of another counter across multiple intervals.\n\nUse to compute aggregate metrics like total mileage.\n","readOnly":true,"type":"string"}},"required":["type","name","counter"],"title":"Accumulator","type":"object","x-view-order":["type","name","counter","reset_interval","reset_expression"],"x-view-shrink-field":"name"},"container.interval.counter.active":{"description":"Return true/false based on whether the interval is currently active/inactive.\n\nUse to detect unfinished (e.g. still is running) intervals.\n","properties":{"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"active","default":"active","description":"Return true/false based on whether the interval is currently active/inactive.\n\nUse to detect unfinished (e.g. still is running) intervals.\n","readOnly":true,"type":"string"}},"required":["type","name"],"title":"Active","type":"object","x-view-order":["type","name"],"x-view-shrink-field":"name"},"container.interval.counter.calculator":{"description":"Put intervals generated by another calculator into this calculator either as array(all or aggregated by some field) or object (first, last or aggregated).\nUse to intersect data from multiple calculators.","properties":{"allow_finish_after":{"description":"when true, may include intervals that started before our 'end' but finished later","type":"boolean"},"allow_start_before":{"description":"when true, may include intervals that started before our 'begin' but finished later","type":"boolean"},"calc_id":{"description":"Calculator ID which intervals to add","minimum":1,"type":"integer","x-flespi-acl":"gw/calcs","x-view-selector":"calcs"},"fields":{"description":"Specify which fields to copy from referenced calculator intervals.\nFor example to limit the size of counter JSON you may configure to include just 'id', 'begin' and 'duration' fields.\n","items":{"anyOf":[{"description":"Use field name from referenced calculator's interval as is","maxLength":64,"minLength":1,"pattern":"^[\\w:!%$.-]([\\w:!%$. -]*[\\w:!%$.-])?$","title":"Interval field","type":"string"},{"description":"Compute new field using expression over referenced calculator's interval fields and selected aggregate method\n\nIf expression is not specified the value of field from referenced interval JSON will be taken directly.\n","properties":{"aggregate":{"default":"first","description":"Aggregation method, valid only when counter method set to 'aggregate' or 'aggregate_by_field':\n - first - will be used the first calculated value\n - last - will be used the last calculated value\n - summary - will be used summation of all calculated values\n - minimum - will be used minimum calculated value (for numbers only)\n - maximum - will be used maximum calculated value (for numbers only)\n\n If 'aggregate_by_field' method is used aggregation method is not applicable to the first field, which is automatically used for grouping intervals\n","enum":["first","last","summary","minimum","maximum"],"type":"string"},"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating field value for the referenced interval.\n\nIf the expression value can not be calculated for the field it will generate null.\n\nIf expression is not specified for the field the value from referenced interval JSON will be taken directly.\n","format":"expression-complex","maxLength":256,"minLength":1,"type":"string","x-view-type":"expression"},"name":{"description":"field name, will be used as key in generated interval JSON","maxLength":64,"minLength":1,"pattern":"^[\\w:!%$.-]([\\w:!%$. -]*[\\w:!%$.-])?$","type":"string"}},"required":["name"],"title":"Computed field","type":"object","x-view-order":["name","expression","aggregate"],"x-view-shrink-field":"name"}]},"maxItems":24,"minItems":1,"type":"array"},"lookup_time_after":{"description":"specify how many seconds to look forward after interval end to search for intervals","maximum":864000,"minimum":0,"type":"integer"},"lookup_time_before":{"description":"specify how many seconds to look back before interval begin to search for intervals","maximum":864000,"minimum":0,"type":"integer"},"method":{"default":"each","description":"Method for selecting interval(s) from referenced calculator:\n - first - will be used the first suitable interval\n - last - will be used the last suitable interval\n - each - all suitable intervals values will be presented as array\n - aggregate - aggregate intervals into single, for this method you should specify fields\n - aggregate_by_field - group intervals based on the first field, and aggregate them into single value, the first field value will be used for grouping\n","enum":["first","last","each","aggregate","aggregate_by_field"],"type":"string"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"calc","default":"calc","description":"Put intervals generated by another calculator into this calculator either as array(all or aggregated by some field) or object (first, last or aggregated).\nUse to intersect data from multiple calculators.","readOnly":true,"type":"string"},"validate_interval":{"description":"Optional expression to validate intervals. If specified only those intervals from referenced calculator that conforms to the expression will be added.\nYou use flespi [expressions](https://flespi.com/kb/expressions) and reference interval counter fields as parameters inside it.\n","format":"expression-complex","maxLength":1024,"type":"string","x-view-type":"expression"}},"required":["type","name","calc_id"],"title":"Calculator","type":"object","x-view-order":["type","name","calc_id","method","validate_interval","allow_start_before","lookup_time_before","allow_finish_after","lookup_time_after","fields","aggregate"],"x-view-shrink-field":"name"},"container.interval.counter.dataset":{"description":"For each message generate a JSON object and return an array of generated points.\n\nUse to collect a set of specific data points for each interval, e.g. to plot them on a diagram.\n\nWhen there is a need to copy message parameters into the interval without any conversion or renaming it is suggested to use 'message' counter with method='each' instead.\nAlso take a look at counter of type='parameter' which can be also suitable instead of dataset.\n","properties":{"allow_unknown":{"description":"when true, if some field is not possible to calculate (e.g. parameter is missing) pass null instead","type":"boolean"},"fields":{"description":"values to be precalcuated for each message","items":{"properties":{"name":{"description":"field name, will be used as key in generated JSON for each message","maxLength":64,"minLength":1,"pattern":"^[\\w:!%$.-]([\\w:!%$. -]*[\\w:!%$.-])?$","type":"string"},"value":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating field value for the message referencing values of its parameters, e.g.: (param1+param2)/(param3-param4)\n","format":"expression-complex","maxLength":256,"minLength":1,"type":"string","x-view-type":"expression"}},"required":["name","value"],"title":"Field","type":"object"},"maxItems":20,"minItems":1,"type":"array"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"dataset","default":"dataset","description":"For each message generate a JSON object and return an array of generated points.\n\nUse to collect a set of specific data points for each interval, e.g. to plot them on a diagram.\n\nWhen there is a need to copy message parameters into the interval without any conversion or renaming it is suggested to use 'message' counter with method='each' instead.\nAlso take a look at counter of type='parameter' which can be also suitable instead of dataset.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name","fields"],"title":"Dataset","type":"object","x-view-order":["type","name","fields","allow_unknown","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.datetime":{"description":"Print the user-formatted begin or end time according to specified timezone into the interval.\n\nUse to add interval begin/end time as string in user's timezone.\n","properties":{"format":{"default":"%c","description":"Timestamp format, POSIX way, check strftime function for the format definition","maxLength":256,"minLength":2,"type":"string"},"interval":{"default":"begin","description":"Timestamp source","enum":["begin","end"],"type":"string","x-view-enum-labels":["Interval begin","Interval end"]},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"datetime","default":"datetime","description":"Print the user-formatted begin or end time according to specified timezone into the interval.\n\nUse to add interval begin/end time as string in user's timezone.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name"],"title":"Datetime","type":"object","x-view-order":["type","name","interval","format","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.expression":{"description":"Calculate a value based on device message parameter values.\nEvaluates an expression using device message parameters and add its first, last, average, minimum or maximum calculated value to the interval.\n\nThis is the most popular type of interval counter that is used to calculate almost everything which can be extracted from device messages within the selected interval.\nUse to compute various metrics within interval like mileage, engine hours, duration of some event and so on.\nAlso used to determine first/last value of specific message parameters within interval.\n","properties":{"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating counter value for the message referencing values of its parameters, e.g.: (param1+param2)/(param3-param4)\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"method":{"default":"first","description":"Method for combining each message's value on interval together:\n - first - will be used first calculated value\n - last - will be used last calculated value\n - minimum - will be used the minimum calculated value\n - maximum - will be used the maximum calculated value\n - summary - will be used summation of all calculated values\n - average - average value among calculated\n - difference - the difference between each next and current calculated values, in the counter summary of such differences will be stored\n - duration - summary of duration from the current message till the next, for each case when boolean expression evaluates to non-zero\n","enum":["first","last","average","minimum","maximum","summary","difference","duration"],"type":"string"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"expression","default":"expression","description":"Calculate a value based on device message parameter values.\nEvaluates an expression using device message parameters and add its first, last, average, minimum or maximum calculated value to the interval.\n\nThis is the most popular type of interval counter that is used to calculate almost everything which can be extracted from device messages within the selected interval.\nUse to compute various metrics within interval like mileage, engine hours, duration of some event and so on.\nAlso used to determine first/last value of specific message parameters within interval.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name","expression"],"title":"Expression","type":"object","x-view-order":["type","name","expression","method","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.geofence":{"description":"Store the name of the geofence that was triggered in the interval selector of type 'geofence'.\n\nUse only with interval selector of type 'geofence'. In all other cases it will report null.\n","properties":{"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"geofence","default":"geofence","description":"Store the name of the geofence that was triggered in the interval selector of type 'geofence'.\n\nUse only with interval selector of type 'geofence'. In all other cases it will report null.\n","readOnly":true,"type":"string"}},"required":["type","name"],"title":"Geofence","type":"object","x-view-order":["type","name"],"x-view-shrink-field":"name"},"container.interval.counter.interval":{"description":"Calculate result of expression that references already calculated interval parameters (that are defined as counter before this counter).\n\nUse to compute average/max/min values for the interval or perform any other combination of interval counter values into a new one.\n\nIn expression you access interval parameters by using the names of previously defined counters.\nThe availability of parameters in the interval message depends on the order of defined counters as it may reference only previously defined counter names.\n","properties":{"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating counter value for the interval referencing values of its counters, e.g.: (counter1+counter2)/duration\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"interval","default":"interval","description":"Calculate result of expression that references already calculated current interval parameters (that are defined as counters and located before this one in the counters array) or counter values from previously calculated interval (accessible with previous(\"counter_name\") function).\n\nUse to compute average/max/min values for the interval or perform any other combination of interval counter values into a new one.\n\nIn expression you access interval parameters by using the names of previously defined counters.\nThe availability of parameters in the interval message depends on the order of defined counters as it may reference only previously defined counter names.\n","readOnly":true,"type":"string"}},"required":["type","name","expression"],"title":"Interval","type":"object","x-view-order":["type","name","expression"],"x-view-shrink-field":"name"},"container.interval.counter.message":{"description":"Copy part or full message JSON into the interval according to specified method (first, last, each, aggregate, aggregate_by_field).\n\nUse to include raw, filtered or aggregated message data into the interval.\n\nAlso is used to copy into interval the values of first or last message parameters in simplfied form.\n\nAlso is used to find an extremum on the interval, for a example add to the interval a message when the speed was maximum.\n\nAlso is used to calculate aggregated value from messages by some field, for example to enumerate all encountered BLE beacons and add their last position.\n","properties":{"extremum":{"description":"Select message(s) according to selected extremum calculated from the specified expression","properties":{"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating extremum value for the message referencing values of its parameters, e.g.: (param1+param2)/(param3-param4)\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"type":{"default":"minimum","description":"Type of the extremum of calculated expression to select correct message(s)","enum":["minimum","maximum"],"type":"string"}},"required":["type","expression"],"type":"object","x-view-order":["type","expression"]},"fields":{"description":"Fields to copy from the message into JSON object under counter. If not specified all message fields will be copied.\n","items":{"anyOf":[{"description":"Use message parameter name as is","maxLength":256,"minLength":1,"pattern":"^[\\w:!%$.-]([\\w:!%$. -]*[\\w:!%$.-])?$","title":"Message field","type":"string"},{"description":"Compute new field using expression over message parameters and selected aggregate method\n\nIf expression is not specified the value of message parameter will be taken directly.\n","properties":{"aggregate":{"default":"first","description":"Aggregation method, valid only when counter method set to 'aggregate' or 'aggregate_by_field':\n - first - will be used the first calculated value\n - last - will be used the last calculated value\n - summary - will be used summation of all calculated values\n - minimum - will be used minimum calculated value (for numbers only)\n - maximum - will be used maximum calculated value (for numbers only)\n\n If 'aggregate_by_field' method is used aggregation method is not applicable to the first field, which is automatically used for grouping messages\n","enum":["first","last","summary","minimum","maximum"],"type":"string"},"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating field value for counter JSON output.\n\nIf the expression value can not be calculated for the field it will generate null.\n\nIf expression is not specified for the field the value from message parameter with the same name as field will be taken directly.\n","format":"expression-complex","maxLength":256,"minLength":1,"type":"string","x-view-type":"expression"},"name":{"description":"field name, will be used as key in the counter JSON output","maxLength":64,"minLength":1,"pattern":"^[\\w:!%$.-]([\\w:!%$. -]*[\\w:!%$.-])?$","type":"string"}},"required":["name"],"title":"Computed field","type":"object","x-view-order":["name","expression","aggregate"],"x-view-shrink-field":"name"}]},"maxItems":20,"minItems":1,"type":"array"},"method":{"default":"first","description":"Method for selecting message which will be copied into parameter's value:\n - first - will be used the first suitable message\n - last - will be used the last suitable message\n - each - all suitable messages values will be presented as array\n - aggregate - aggregate messages into single, for this method you should specify fields\n - aggregate_by_field - group messages based on the first field, and aggregate them into single value, the first field value will be used for grouping\n","enum":["first","last","each","aggregate","aggregate_by_field"],"type":"string"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"message","default":"message","description":"Copy part or full message JSON into the interval according to specified method (first, last, each, aggregate, aggregate_by_field).\n\nUse to include raw, filtered or aggregated message data into the interval.\n\nAlso is used to copy into interval the values of first or last message parameters in simplfied form.\n\nAlso is used to find an extremum on the interval, for a example add to the interval a message when the speed was maximum.\n\nAlso is used to calculate aggregated value from messages by some field, for example to enumerate all encountered BLE beacons and add their last position.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name"],"title":"Message","type":"object","x-view-order":["type","name","method","extremum","fields","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.name":{"description":"counter name, will be used as key in generated interval JSON","maxLength":64,"minLength":1,"pattern":"^[\\w_\\.\\-]+$","type":"string"},"container.interval.counter.parameter":{"description":"Add parameter value(-es) from the message into the interval (e.g. first, last, each or each distinct encountered).\n\nUse to include specific message parameters into the interval JSON.\n\nThis counter usually is used for simple cases like copy device.id or ident to the interval JSON.\nIt is also suitable for more complex cases when you need to enumerate all distinct parameter values encountered in messages - for example enumerate visited geofences detected by plugin, failed DTC codes or list all encountered BLE beacons.\n\n\nFor more complex cases, when you need to add multiple message parameters or somehow convert their value using expression take a look at 'expression' and 'message' interval counters instead.\n","properties":{"method":{"default":"first","description":"Method for generating counter value:\n - first - will be used parameter value from the first suitable message\n - last - will be used parameter value from the last suitable message\n - each - parameter value form all suitable messages will be presented as an array\n - distinct - distinct parameter values gathered from all suitable messages will be presented as array. If parameter value is an array by itself its unique elements will be extracted.\n","enum":["first","last","each","distinct"],"type":"string"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"parameter":{"description":"Original message parameter name which to add to the interval, if not specified counter name will be used.\n\nFor distinct method the counter will store in the interval JSON all unique values of this parameter encountered in messages.\nWhen the parameter value is JSON array all unique elements inside array will be enumerated.\nThis can be used for all cases like enumerating DTC codes from \"can.dtc\" parameter, visited geofences from \"plugin.geofence.name\" parameter and even includes all BLE beacons tracked with \"ble.beacons\" parameter.\n\nYou can not use anything except message parameter name in this field. If you want to convert parameter value using some expression or calculate a value based on multiple parameters consider using 'expression' or 'message' type of interval counter instead.\n","maxLength":128,"type":"string"},"type":{"const":"parameter","default":"parameter","description":"Add parameter value(-es) from the message into the interval (e.g. first, last, each or each distinct encountered).\n\nUse to include specific message parameters into the interval JSON.\n\nThis counter usually is used for simple cases like copy device.id or ident to the interval JSON.\nIt is also suitable for more complex cases when you need to enumerate all distinct parameter values encountered in messages - for example enumerate visited geofences detected by plugin, failed DTC codes or list all encountered BLE beacons.\n\n\nFor more complex cases, when you need to add multiple message parameters or somehow convert their value using expression take a look at 'expression' and 'message' interval counters instead.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name"],"title":"Parameter","type":"object","x-view-order":["type","name","parameter","method","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.route":{"description":"Dump position.latitude and position.longitude parameters for each message within the interval into [Google-encoded polyline algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) format.\n\nUse to generate a compressed representation of the trip’s route.\n","properties":{"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"route","default":"route","description":"Dump position.latitude and position.longitude parameters for each message within the interval into [Google-encoded polyline algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) format.\n\nUse to generate a compressed representation of the trip’s route.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name"],"title":"Route","type":"object","x-view-order":["type","name","validate_message"],"x-view-shrink-field":"name"},"container.interval.counter.specified":{"description":"Save info into the interval field under specified name and value.\n\nUse to tag calculators for easier filtering later on.\n","properties":{"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"specified","default":"specified","description":"Save info into the interval field under specified name and value.\n\nUse to tag calculators for easier filtering later on.\n","readOnly":true,"type":"string"},"value":{"anyOf":[{"maxLength":256,"minLength":1,"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"}]}},"required":["type","name","value"],"title":"Specified","type":"object","x-view-order":["type","name","value"],"x-view-shrink-field":"name"},"container.interval.counter.variable":{"description":"Calculate value according to expression and make it available for use in other counters’ expressions.\n\nUse to store and maintain state during counters calculation.\n\nAccess to claculated value by this counter is available in other counters through the use of variable(\"counter-name\") function.\nNo actual value will be stored in the interval JSON.\n","properties":{"expression":{"description":"[Expression](https://flespi.com/kb/expressions) for calculating variable value for the message referencing values of its parameters, e.g.: (param1+param2)/(param3-param4)\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"name":{"$ref":"#/definitions/container.interval.counter.name"},"type":{"const":"variable","default":"variable","description":"Calculate value according to expression and make it available for use in other counters’ expressions.\n\nUse to store and maintain state during counters calculation.\n\nAccess to claculated value by this counter is available in other counters through the use of variable(\"counter-name\") function.\nNo actual value will be stored in the interval JSON.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","name","expression"],"title":"Variable (virtual)","type":"object","x-view-order":["type","name","expression","method","validate_message"],"x-view-shrink-field":"name"},"container.interval.counters":{"description":"[Intervals counters](https://flespi.com/kb/analytics-reports-and-events-engine#interval-counters), define how to calculate messsages inside each interval.\n","items":{"$ref":"#/definitions/container.interval.counter"},"maxItems":50,"type":"array"},"container.interval.duration":{"description":"interval duration in seconds","type":"number"},"container.interval.end":{"description":"interval end time","minimum":1,"type":"number","x-view-type":"datetime"},"container.interval.geofence.coordinate":{"properties":{"lat":{"description":"Latitude in degrees, between -90 and +90 inclusive","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude in degrees, between -180 and +180 inclusive","maximum":180,"minimum":-180,"type":"number"}},"required":["lat","lon"],"title":"Coordinate","type":"object"},"container.interval.geofence.name":{"description":"geofence name, can be optionally ava in 'geofence' counter","maxLength":128,"type":"string"},"container.interval.selector":{"anyOf":[{"$ref":"#/definitions/container.interval.selector.expression"},{"$ref":"#/definitions/container.interval.selector.datetime"},{"$ref":"#/definitions/container.interval.selector.geofence"},{"$ref":"#/definitions/container.interval.selector.inactive"}],"x-key-property":"type"},"container.interval.selector.calculator":{"description":"Intervals are detected based on another calculator intervals.\nThis type of selector can be used only in calculators and not available in on-demand intervals calculation via REST API.\n","properties":{"calc_id":{"description":"Calculator ID which intervals will be used as a reference for this selector","minimum":1,"type":"integer","x-flespi-acl":"gw/calcs","x-view-selector":"calcs"},"invert":{"$ref":"#/definitions/container.interval.selector.invert"},"max_active":{"$ref":"#/definitions/container.interval.selector.max_active"},"max_inactive":{"$ref":"#/definitions/container.interval.selector.max_inactive"},"max_messages_time_diff":{"$ref":"#/definitions/container.interval.selector.max_messages_time_diff"},"min_active":{"$ref":"#/definitions/container.interval.selector.min_active"},"min_duration":{"$ref":"#/definitions/container.interval.selector.min_duration"},"type":{"const":"calc","default":"calc","description":"Intervals are detected based on another calculator intervals.\nThis type of selector can be used only in calculators and not available in on-demand intervals calculation via REST API.\n","readOnly":true,"type":"string"},"validate_interval":{"description":"Optional [expression](https://flespi.com/kb/expressions) to validate intervals that will be used for referencing this selector.","format":"expression-telematics","maxLength":1024,"type":"string"}},"required":["type","calc_id"],"title":"Calculator","type":"object","x-view-order":["type","calc_id","min_active","min_duration","max_inactive","max_messages_time_diff","max_active","invert","validate_interval"],"x-view-shrink-field":"name"},"container.interval.selector.datetime":{"description":"Interval selection with time & date change according to selected or default timezone. Can be used to split messages on intervals per each day or month.","properties":{"max_messages_time_diff":{"$ref":"#/definitions/container.interval.selector.max_messages_time_diff"},"merge_message_after":{"$ref":"#/definitions/container.interval.selector.merge_message_after"},"merge_message_before":{"$ref":"#/definitions/container.interval.selector.merge_message_before"},"name":{"$ref":"#/definitions/container.interval.selector.name"},"split":{"default":"day","description":"Defines criteria, upon which interval will be automatically splitted","enum":["hour","day","week_monday","week_sunday","month","year"],"type":"string","x-view-enum-labels":["Hour","Day","Week (from Monday)","Week (from Sunday)","Month","Year"]},"type":{"const":"datetime","default":"datetime","description":"Interval selection with time & date change according to selected or default timezone. Can be used to split messages on intervals per each day or month.","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type"],"title":"Date or Time","type":"object","x-view-order":["type","split","name","max_messages_time_diff","merge_message_before","merge_message_after","validate_message"],"x-view-shrink-field":"name"},"container.interval.selector.expression":{"description":"Interval selection via non-zero expression that references message properties","properties":{"expression":{"description":"[Expression](https://flespi.com/kb/expressions) that defines is given message belong to the interval or not.\nIn expression you may reference values of message parameters, e.g.: (param1+param2)>=1 | (param3-param4)!=0\n","format":"expression-complex","maxLength":1024,"minLength":1,"type":"string","x-view-type":"expression"},"invert":{"$ref":"#/definitions/container.interval.selector.invert"},"max_active":{"$ref":"#/definitions/container.interval.selector.max_active"},"max_inactive":{"$ref":"#/definitions/container.interval.selector.max_inactive"},"max_messages_time_diff":{"$ref":"#/definitions/container.interval.selector.max_messages_time_diff"},"merge_message_after":{"$ref":"#/definitions/container.interval.selector.merge_message_after"},"merge_message_before":{"$ref":"#/definitions/container.interval.selector.merge_message_before"},"merge_unknown":{"$ref":"#/definitions/container.interval.selector.merge_unknown"},"method":{"default":"boolean","description":"Defines the way how expression result will be evaluated for the interval.\n- boolean method expects non-zero value to activate/continue interval and zero to stop it\n- change method will setup new interval each time expression result is different from previous\n","enum":["boolean","change"],"type":"string"},"min_active":{"$ref":"#/definitions/container.interval.selector.min_active"},"min_duration":{"$ref":"#/definitions/container.interval.selector.min_duration"},"name":{"$ref":"#/definitions/container.interval.selector.name"},"type":{"const":"expression","default":"expression","description":"Interval selection via non-zero expression that references message properties","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type","expression"],"title":"Expression","type":"object","x-view-order":["type","expression","method","name","min_active","min_duration","max_inactive","max_messages_time_diff","max_active","merge_message_before","merge_message_after","merge_unknown","invert","validate_message"],"x-view-shrink-field":"name"},"container.interval.selector.geofence":{"description":"Create intervals based on the geofence inside/outside status.\n\nBy default it will return ON status for the message when it is inside of assigned or configured geofences. When geofence is changed it will return ON_NEW status.\n\nTo create intervals when device is outside of assigned or configured geofences use invert=true option which will return ON status for each message outside of assigned or configured geofences.\n\nFor more precise control of geofences status you may use interval selector of type expression and within expression test for geofence availability: \"geofence() != null\" or simple expression=\"geofence()\" (returns the name of assigned geofence of null) and method=\"change\".\n\nWhich geofences to use is determined by 'geofences' option.\nIf you leave it unspecified in the selector configuration, all geofences assigned to calculator will be used automatically.\nIf you will explicitly specify geofences in selector configuration only these geofences will be controlled.\n","properties":{"geofences":{"description":"Explicit configuration of geofences for entrance/exit detection.\n\nWhen geofences configuration provided explicitly with this parameter the selector will use only their configuration ignoring any geofence entity that is linked to the device or calculator.\n\nTo avoid any misinterpretation and unlock extra functionality we recommend to avoid explicit geofences configuration (leave 'geofences' unconfigured in the interval selector) and only use geofences that are linked to the device or calculator.\n","items":{"anyOf":[{"$ref":"#/definitions/geoset.circle"},{"$ref":"#/definitions/geoset.polygon"},{"$ref":"#/definitions/geoset.corridor"}],"x-key-property":"type"},"maxItems":64,"minItems":1,"type":"array"},"invert":{"$ref":"#/definitions/container.interval.selector.invert"},"max_active":{"$ref":"#/definitions/container.interval.selector.max_active"},"max_inactive":{"$ref":"#/definitions/container.interval.selector.max_inactive"},"max_messages_time_diff":{"$ref":"#/definitions/container.interval.selector.max_messages_time_diff"},"merge_message_after":{"$ref":"#/definitions/container.interval.selector.merge_message_after"},"merge_message_before":{"$ref":"#/definitions/container.interval.selector.merge_message_before"},"merge_unknown":{"$ref":"#/definitions/container.interval.selector.merge_unknown"},"min_active":{"$ref":"#/definitions/container.interval.selector.min_active"},"min_duration":{"$ref":"#/definitions/container.interval.selector.min_duration"},"name":{"$ref":"#/definitions/container.interval.selector.name"},"type":{"const":"geofence","default":"geofence","description":"Create intervals based on the geofence inside/outside status.\n\nBy default it will return ON status for the message when it is inside of assigned or configured geofences. When geofence is changed it will return ON_NEW status.\n\nTo create intervals when device is outside of assigned or configured geofences use invert=true option which will return ON status for each message outside of assigned or configured geofences.\n\nFor more precise control of geofences status you may use interval selector of type expression and within expression test for geofence availability: \"geofence() != null\" or simple expression=\"geofence()\" (returns the name of assigned geofence of null) and method=\"change\".\n\nWhich geofences to use is determined by 'geofences' option.\nIf you leave it unspecified in the selector configuration, all geofences assigned to calculator will be used automatically.\nIf you will explicitly specify geofences in selector configuration only these geofences will be controlled.\n","readOnly":true,"type":"string"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["type"],"title":"Geofences","type":"object","x-view-order":["type","geofences","name","min_active","min_duration","max_inactive","max_messages_time_diff","max_active","merge_message_before","merge_message_after","merge_unknown","invert","validate_message"],"x-view-shrink-field":"name"},"container.interval.selector.inactive":{"description":"Interval selection based on the inactivity of telemetry data reception.\nWith this selector it is both possible to detect delays of telemetry data from device in realtime and analyze historical intervals when such delays occurred.\n","properties":{"delay_threshold":{"description":"Minimum latency in telemetry data retrieval to start interval, in seconds.\nTelemetry latency for each message can be calculated as (server.timestamp - timestamp).\nInterval will automatically start the from latest message below specified threshold and finish on the last message below threshold.\n","format":"uint32","maximum":315360000,"minimum":60,"type":"number"},"name":{"$ref":"#/definitions/container.interval.selector.name"},"type":{"const":"inactive","default":"inactive","description":"Interval selection based on the inactivity of telemetry data reception.\nWith this selector it is both possible to detect delays of telemetry data from device in realtime and analyze historical intervals when such delays occurred.\n","readOnly":true,"type":"string"}},"required":["type","delay_threshold"],"title":"Inactive","type":"object","x-view-order":["type","name","delay_threshold"],"x-view-shrink-field":"name"},"container.interval.selector.invert":{"description":"when true, evaluation of interval state for the message should be inverted, e.g. ON will become OFF. For example if you have a geofence selector and want to detect when a device leaves this geofence (in contrast to detecting when a device gets into the geofence), you want to enable the \"invert\" property.","type":"boolean"},"container.interval.selector.max_active":{"description":"if non-zero (in seconds), during sequential interval detection when the duration of a currently detected interval exceeds the specified value in seconds, the new interval will be started.","format":"uint32","maximum":864000,"type":"integer"},"container.interval.selector.max_inactive":{"description":"if non-zero (in seconds), inactive parts of intervals with duration shorter than the specified number of seconds will count towards the current interval and will be merged with the preceding and following active parts. Also, this property can timeout an active interval for the assigned device.","format":"uint32","maximum":864000,"type":"integer"},"container.interval.selector.max_messages_time_diff":{"description":"if non-zero, specifies a maximum timestamps difference between the two consecutive messages to include into the same interval, in seconds","format":"uint32","maximum":864000,"type":"integer"},"container.interval.selector.merge_message_after":{"description":"when true, the interval will be automatically extended by one message after with OFF/UNKNOWN state.","type":"boolean"},"container.interval.selector.merge_message_before":{"description":"when true, the interval will be automatically extended by one message earlier with OFF/UNKNOWN state.","type":"boolean"},"container.interval.selector.merge_unknown":{"description":"when true, if we have an active interval and the current message state is unknown, it will be appended to the active interval. The unknown state can appear in an expression type selector when a message does not contain a parameter specified in the expression or in a geofence type selector when there are no coordinates in the message.","type":"boolean"},"container.interval.selector.min_active":{"description":"if non-zero (in seconds), all intervals with duration in seconds less than specified will be skipped.","format":"uint32","maximum":86400,"type":"integer"},"container.interval.selector.min_duration":{"description":"minimum final(merged) duration for the generated interval, in seconds","format":"uint32","maximum":86400,"type":"integer"},"container.interval.selector.name":{"description":"custom description for interval selector","maxLength":256,"type":"string"},"container.interval.selectors":{"description":"[Intervals selectors](https://flespi.com/kb/analytics-reports-and-events-engine#interval-selectors), specify the way to extract intervals from messages.\n","items":{"$ref":"#/definitions/container.interval.selector"},"maxItems":3,"minItems":1,"type":"array"},"container.interval.timezone":{"default":"UTC","description":"Default timezone used in all date/time related operations in selectors and counters, optional","enum":["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],"type":"string"},"container.interval.validate_interval":{"description":"[Expression](https://flespi.com/kb/expressions) for validating generated interval referencing values of its counters, e.g.: (counter1-counter2) > counter3.\nprevious(\"counter_name\") function, if used in expression will return the value of counter_name counter from previously calculated and stored interval.\n**Note: Do not use this field to filter intervals by duration (e.g., 'duration > X'). Instead, use the `min_active` and `min_duration` parameters in interval selectors.**\n","format":"expression-complex","maxLength":1024,"type":"string","x-view-type":"expression"},"container.interval.validate_message":{"description":"[Expression](https://flespi.com/kb/expressions) validating messages for selector/counter/calculator, e.g. value of 'position.valid == 1' will skip all messages where position.valid property is not defined or not 1(true)\n","format":"expression-complex","maxLength":1024,"type":"string","x-view-type":"expression"},"container.intervals.calculate":{"description":"intervals calculation configuration","properties":{"counters":{"$ref":"#/definitions/container.interval.counters"},"extend":{"$ref":"#/definitions/container.intervals.calculate.extend"},"from":{"$ref":"#/definitions/container.intervals.calculate.from"},"selectors":{"$ref":"#/definitions/container.interval.selectors"},"timezone":{"$ref":"#/definitions/container.interval.timezone"},"to":{"$ref":"#/definitions/container.intervals.calculate.to"},"validate_interval":{"$ref":"#/definitions/container.interval.validate_interval"},"validate_message":{"$ref":"#/definitions/container.interval.validate_message"}},"required":["selectors"],"title":"intervals configuration from REST parameters","type":"object","x-view-order":["from","to","extend","selectors","counters","timezone","validate_message","validate_interval"]},"container.intervals.calculate.extend":{"description":"if true, then interval will be extended up to one next message after 'to' and include it in its calculations, usually used together with merge_messages_after=true for interval selectors","type":"boolean"},"container.intervals.calculate.from":{"description":"UNIX timestamp of left time border for messages. Use 0 to ignore left bound.","minimum":0,"type":"number","x-view-type":"datetime"},"container.intervals.calculate.to":{"description":"UNIX timestamp of right time border for messages. Use 0 to ignore right bound.","minimum":0,"type":"number","x-view-type":"datetime"},"container.message":{"description":"Message data","properties":{"flags":{"$ref":"#/definitions/container.flags"},"key":{"description":"message key","minimum":0.000001,"type":"number"},"params":{"additionalProperties":true,"description":"Message data. Associated array of message parameters.\nParameter name is a key and parameter data is a value in associated array.\nParameter value may be presented by any of base types: string, number, boolean, null, JSON.\n","maxProperties":1000,"type":"object"},"timestamp":{"description":"Message timestamp, used for sorting duplicates for the same key or determining behaviour on message strategy. Used UNIX timestamp of request time if not specified.","minimum":0,"type":"number","x-view-type":"datetime"}},"required":["key","params"],"title":"container message","type":"object"},"container.message.filter":{"description":"Additional filter specificators to select messages that conform to this filtering expression only. You can utilize powerful [flespi expressions](https://flespi.com/kb/expressions) and reference container message parameters in it.\n","maxLength":1024,"type":"string","x-view-type":"expression"},"container.message.left_key":{"description":"left-most including messages key, use 0 to ignore left bound","minimum":0,"type":"number","x-view-type":"datetime"},"container.message.right_key":{"description":"right-most including messages key, use 0 to ignore left bound","minimum":0,"type":"number","x-view-type":"datetime"},"container.messages.array":{"additionalItems":true,"items":{"$ref":"#/definitions/container.message"},"maxItems":1000,"minItems":1,"title":"array of container messages","type":"array"},"container.messages.delete":{"properties":{"filter":{"$ref":"#/definitions/container.message.filter"},"left_key":{"$ref":"#/definitions/container.message.left_key"},"right_key":{"$ref":"#/definitions/container.message.right_key"}},"type":"object"},"container.messages.get":{"properties":{"fields":{"description":"CSV-formatted list of parameters to be returned in response message list in form \"param1,param2,param3.*\".\nIf message does not contain all specified fields, it will be skipped.\n","maxLength":4096,"type":"string"},"filter":{"$ref":"#/definitions/container.message.filter"},"generalize":{"description":"Generalization interval. Only keys that are multiple to specified generalization interval will be returned with recalculated parameter values according to\nspecified generalization method. It may be possible that first returned key will be less than specified left_key if left_key is not a multiple of generalization interval.\nAll numercial parameter values withing generalization interval will be calculated into one value according to specified method. For non-numerical parameters\nfirst encountered value will be returned.\n","format":"uint32","maximum":1000000,"minimum":10,"type":"integer"},"left_key":{"$ref":"#/definitions/container.message.left_key"},"max_count":{"default":10000000,"description":"maximum quantity of returned messages","format":"uint32","maximum":10000000,"minimum":1,"type":"integer"},"method":{"default":"average","description":"Generalization method. Applicable only when valid generalize parameter specified.\n","enum":["average","minimum","maximum","summary","difference"],"type":"string"},"reverse":{"default":false,"description":"time sorting parameter (true/false), use true to list messages from end to beginning","type":"boolean"},"right_key":{"$ref":"#/definitions/container.message.right_key"},"skip_key":{"default":false,"description":"If true, then remove 'key' attribute from returned messages collection. In case of generalization interval 'timestamp' parameter will contain valid generalization key value.\n","type":"boolean"}},"type":"object"},"container.name":{"description":"optional container name to easily access to certain containers with {container-selector}","maxLength":255,"type":"string"},"container.post":{"properties":{"flags":{"$ref":"#/definitions/container.flags"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/container.name"},"rotate":{"$ref":"#/definitions/container.rotate"},"ttl":{"$ref":"#/definitions/container.ttl-default"}},"type":"object","x-view-order":["name","flags","ttl","rotate","metadata"]},"container.put":{"properties":{"flags":{"$ref":"#/definitions/container.flags"},"metadata":{"$ref":"#/definitions/metadata"},"name":{"$ref":"#/definitions/container.name"},"rotate":{"$ref":"#/definitions/container.rotate"},"ttl":{"$ref":"#/definitions/container.ttl-nodefault"}},"type":"object","x-view-order":["name","ttl","rotate","metadata"]},"container.rotate":{"description":"If non-zero specifies rotation size in KB for container messages. When reaching specified size messages with lower key will be automatically deleted.","format":"uint32","maximum":10240000,"type":"integer","x-view-divider":1024,"x-view-unit":"MB"},"container.size":{"description":"size of container messages in KB","format":"uint32","type":"integer"},"container.ttl-default":{"default":-1,"description":"Time-to-live period in seconds for container messages. Only valid for messages which key is valid UNIX timestamp. -1 value means ttl is not used.","maximum":315360000,"minimum":-1,"type":"integer"},"container.ttl-nodefault":{"description":"Time-to-live period in seconds for container messages. Only valid for messages which key is valid UNIX timestamp. -1 value means ttl is not used.","maximum":315360000,"minimum":-1,"type":"integer"},"containers":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Containers collection.","items":{"$ref":"#/definitions/container"},"type":"array"}},"type":"object"},"error":{"properties":{"code":{"description":"Error code.","type":"integer"},"id":{"$ref":"#/definitions/item.id"},"reason":{"description":"Error description.","type":"string"}},"type":"object"},"errors":{"description":"Errors occurred while processing the request.","items":{"$ref":"#/definitions/error"},"type":"array"},"errors.result":{"description":"Canonical flespi response envelope used for non-2xx responses (and also when a 200 response carries per-item errors). 'result' is empty when 'errors' is populated.","properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Always empty on error-only responses.","items":{},"type":"array"}},"type":"object"},"expressions.functions.result":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"per each function information about each","items":{"description":"function information","properties":{"arguments":{"description":"information about function arguments","properties":{"maximum":{"description":"maximum number of expected arguments","type":"number"},"minimum":{"description":"minimum number of expected arguments","type":"number"}},"type":"object"},"description":{"description":"function usage description, see sample for usage sample","type":"string"},"name":{"description":"function name","type":"string"},"usage":{"description":"function usage sample, see description for detailed explanation of input arguments","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"expressions.test.get":{"properties":{"expression":{"description":"Text of expression","maxLength":4096,"type":"string","x-view-type":"expression"},"input":{"anyOf":[{"$ref":"#/definitions/expressions.test.input.object"},{"$ref":"#/definitions/expressions.test.input.array"}],"description":"Input to evaluate the expression against - either a single JSON object or an array of objects. Omit input entirely to only compile-validate the expression."},"timezone":{"$ref":"#/definitions/container.interval.timezone"}},"required":["expression"],"type":"object","x-view-order":["expression","timezone","input"]},"expressions.test.input.array":{"description":"Array of JSON objects to run expression over - one evaluation per element.","items":{"$ref":"#/definitions/expressions.test.input.object"},"maxItems":100,"title":"JSON Array","type":"array"},"expressions.test.input.object":{"additionalProperties":true,"description":"JSON object to run expression over","maxProperties":1000,"title":"JSON Object","type":"object"},"expressions.test.result":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"per each element in input evaluation result with the expression","items":{"description":"evaluation result of expression for each item from input array","properties":{"code":{"description":"evaluation result code. 0 - succeeded, 1 - not enough data to complete evaluation, -1 - failed to evaluate","type":"number"},"error":{"description":"optional error information that occurred during expression evaluation with given message, available only when code is non-zero","properties":{"column":{"description":"zero-based column index where error occurred","type":"number"},"reason":{"description":"error reason as text","type":"string"}},"type":"object"},"index":{"descrition":"index of item in input array","type":"number"},"result":{"anyOf":[{"description":"Number result","title":"Number","type":"number"},{"description":"String result","title":"String","type":"string"},{"description":"Boolean result","title":"Boolean","type":"boolean"},{"description":"Null result","title":"Null","type":"null"}]}},"type":"object"},"type":"array"}},"type":"object"},"geoset.circle":{"description":"Circular region","properties":{"center":{"$ref":"#/definitions/container.interval.geofence.coordinate"},"name":{"$ref":"#/definitions/container.interval.geofence.name"},"radius":{"description":"Radius in kilometers","maximum":1000,"minimum":0.001,"type":"number"},"type":{"const":"circle","default":"circle","description":"Circle","readOnly":true,"type":"string"}},"required":["type","center","radius"],"title":"Circle","type":"object","x-view-order":["type","name","center","radius"],"x-view-shrink-field":"name","x-view-type":"geofence"},"geoset.corridor":{"description":"Corridor of certain width that consists from multiple sequentially connected points","properties":{"name":{"$ref":"#/definitions/container.interval.geofence.name"},"path":{"description":"Series of coordinates","items":{"$ref":"#/definitions/container.interval.geofence.coordinate"},"maxItems":1000,"minItems":2,"type":"array"},"type":{"const":"corridor","default":"corridor","description":"Corridor of certain width","readOnly":true,"type":"string"},"width":{"description":"Corridor width, maximum allowed distance till centerline between two neighbor points, in kilometers","maximum":1000,"minimum":0.001,"type":"number"}},"required":["type","path","width"],"title":"Corridor","type":"object","x-view-order":["type","name","width","path"],"x-view-shrink-field":"name","x-view-type":"geofence"},"geoset.polygon":{"description":"Area enclosed by a closed path","properties":{"name":{"$ref":"#/definitions/container.interval.geofence.name"},"path":{"description":"Series of coordinates","items":{"$ref":"#/definitions/container.interval.geofence.coordinate"},"maxItems":1024,"minItems":3,"type":"array"},"type":{"const":"polygon","default":"polygon","description":"Closed path","readOnly":true,"type":"string"}},"required":["type","path"],"title":"Polygon","type":"object","x-view-order":["type","name","path"],"x-view-shrink-field":"name","x-view-type":"geofence"},"id.result":{"properties":{"result":{"description":"Element's ID list.","items":{"$ref":"#/definitions/item.id"},"type":"array"}},"type":"object"},"ids":{"properties":{"errors":{"description":"Errors occurred while processing the request.","items":{"$ref":"#/definitions/error"},"type":"array"},"result":{"description":"Containers identifiers collection.","items":{"description":"Object ID or array index of successfully processed elements","type":"integer"},"type":"array"}},"type":"object"},"item.blocked":{"description":"Active block code for item","type":"integer"},"item.btime":{"description":"Item birth timestamp","type":"double"},"item.cid":{"description":"owner ID","format":"uint32","type":"integer"},"item.enabled":{"description":"Enable or disable item","type":"boolean"},"item.enabled-default":{"default":true,"description":"Enable or disable item","type":"boolean"},"item.id":{"description":"unique item ID","format":"uint32","minimum":1,"type":"integer"},"item.mtime":{"description":"Item last modification timestamp","type":"double"},"item.name":{"description":"Item name","maxLength":1024,"minLength":1,"type":"string"},"item.packets":{"description":"packet data","properties":{"conn":{"description":"Connection ID","minimum":0,"type":"integer"},"data":{"description":"base64 representation of binary data for the packet","maxLength":4194240,"minLength":1,"type":"string"},"timestamp":{"description":"UNIX timestamp of the event","minimum":1,"type":"number","x-view-type":"datetime"},"type":{"description":"3 least significant bits - traffic event type (enum):\n  * 0 - connection is opened\n  * 1 - connection is closed\n  * 2 - incoming data\n  * 3 - outgoing data\n  * 4 - peer identified\nbits 3...7 - traffic transport type bitmask:\n  * 0x00 - tcp\n  * 0x10 - channel\n  * 0x20 - mqtt\n  * 0x40 - http\n  * 0x80 - udp\n","minimum":0,"type":"number"}},"type":"object"},"item.packets.get":{"description":"parameter to filter packets selection","properties":{"count":{"default":10000000,"description":"The number of packets to be returned\n","format":"uint32","maximum":10000000,"minimum":1,"type":"integer"},"filter":{"description":"optional filter string to return only packets conforming to specific filtering rules","maxLength":1024,"type":"string"},"from":{"description":"UNIX timestamp of left time border for packets. Use 0 to ignore left bound.\n","minimum":0,"type":"number","x-view-type":"datetime"},"reverse":{"default":false,"description":"time sorting parameter (true/false), use false to list packets from end to beginning","type":"boolean"},"to":{"description":"UNIX timestamp of right time border for packets. Use 0 to ignore right bound.","minimum":0,"type":"number","x-view-type":"datetime"}},"type":"object"},"item.priority":{"description":"Item priority. The high priority item is processed first.","maximum":100,"minimum":0,"type":"integer"},"item.priority-default":{"default":0,"description":"Item priority. The high priority item is processed first.","maximum":100,"minimum":0,"type":"integer"},"logmessage":{"additionalProperties":true,"description":"Log record. It contains fixed fields described below and additional fields based on log record type.","properties":{"event_code":{"description":"Log record code.","type":"integer"},"event_origin":{"description":"Log record origin name.","type":"string"},"event_text":{"description":"Log record text.","type":"string"},"timestamp":{"description":"Log record UNIX timestamp.","type":"number","x-view-type":"datetime"}},"type":"object"},"logs.get":{"description":"filter returned log records","properties":{"count":{"default":10000000,"description":"limit number of logs to be returned","format":"uint32","maximum":10000000,"minimum":1,"type":"integer"},"fields":{"description":"CSV-formatted list of parameters to be returned in response message list. If message does not contain any of the specified fields, it will be skipped.\n","maxLength":4096,"type":"string"},"filter":{"description":"Optional filter string to return only logs conforming to specific filtering rules. You can use flespi [expressions](https://flespi.com/kb/expressions) and reference log fields inside them.","maxLength":1024,"type":"string"},"from":{"description":"start momemnt's UNIX timestamp to limit log sample from beginning. use 0 to ignore left bound","minimum":0,"type":"number","x-view-type":"datetime"},"reverse":{"default":false,"description":"time sorting parameter (true/false), use false to list logs from end to beginning","type":"boolean"},"to":{"description":"end moment's UNIX timestamp to limit log sample to end. use 0 to ignore right bound","minimum":0,"type":"number","x-view-type":"datetime"}},"type":"object"},"metadata":{"additionalProperties":true,"description":"Set of name/value pairs. Can be used for storing additional information about the item.","format":"metadata","type":"object"},"metadata.patch":{"additionalProperties":true,"description":"Set of name/value pairs. Can be used for storing additional information about the item.","format":"metadata","type":"object"},"subitem.auto_created":{"description":"Flag is set to true when the item is assigned automatically due to belonging to any group","type":"boolean"},"subitem.fields":{"additionalProperties":true,"description":"Auxiliary fields attached to subitem","type":"object"},"subitems.array":{"description":"List of items to which a subitem is added","items":{"properties":{"id":{"$ref":"#/definitions/item.id"},"name":{"$ref":"#/definitions/item.name"}},"type":"object"},"type":"array"},"timezone.enum":{"default":"UTC","description":"Timezone specification","enum":["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],"type":"string"},"timezone.enum.base":{"default":"UTC","enum":["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],"type":"string"}},"host":"flespi.io","info":{"description":"This API provides methods to set up and manage low-level storage elements that can be used as building blocks inside any telematics system.\nCurrently two types of storage elements are available:\n* **containers** - store structurized JSON messages sorted by a unique double key. Primary storage mechanism for timeserias based telemetry data where the key is a UNIX timestamp with microseconds in its fractional part.\n* **cdns** - used for files storage. Files stored on CDNs are accessed by the public link without authorization.\n\nTo identify each REST request [flespi token](https://flespi.com/kb/tokens-access-keys-to-flespi-platform) has to be passed in the HTTP call via the header: **Authorization: FlespiToken XXXXXXXXXX**.\n\nAll modification operations with storage items are recorded in the common customer [logs subsystem](https://flespi.io/docs/#/platform/logs).\n","title":"flespi Storage REST API\n","version":"1.2"},"parameters":{"cdn-selector":{"collectionFormat":"csv","description":"Select CDNs for the API operation.\n\nSome samples you may use in cdn-selector:\n  - **all** - select all CDNs available for the user(token), this is special selector format\n  - **any** - select any single CDN available for the user(token) with the lowest storage size, this is special selector format useful to select single CDN with the lowest storage size for new file upload\n  - **1,2,3,4** - select CDNs with ID 1,2,3 and 4, this is special selector format\n  - **name=\"XXX\\*\"** - select CDNs which name starts from XXX, by field 'name' with wildcards\n\nSample API calls:\n  - **POST /storage/cdns/any/files** - select for the upload single CDN with lowest storage size\n  - **GET /storage/cdns/all?fields=id,name,size** - select all available cdns and return their id, name and size\n  - **GET /storage/cdns/name=\"my-storage\"?fields=id,name** - select CDNs with name=\"my-storage\" and return their id and name\n","in":"path","items":{"type":"string"},"name":"cdn-selector","required":true,"type":"array","x-flespi-allowed-fields-in-selectors":{"$ref":"#/definitions/cdn"}},"cdn.fields":{"collectionFormat":"csv","description":"All possible fields available for the CDN.\nIf this parameter is specified in the query path of API call each returned CDN will consists only from JSON object with specified fields.\nIf this parameter is not specified each CDN will be returned as JSON object with default fields.\n","in":"query","items":{"enum":["id","name","size","blocked","cid","metadata","ip_whitelist","created"],"type":"string"},"name":"fields","required":false,"type":"array","x-flespi-fields-description":{"$ref":"#/definitions/cdn"}},"cid-header":{"description":"Operate as given subaccount.","in":"header","name":"x-flespi-cid","type":"integer","x-view-selector":"subaccounts"},"container-selector":{"collectionFormat":"csv","description":"Select containers for the API operation.\n\nSome samples you may use in container-selector:\n  - **all** - select all containers available for the user(token), this is special selector format\n  - **1,2,3,4** - select containers with ID 1,2,3 and 4, this is special selector format\n  - **name=\"XXX\\*\"** - select containers which name starts from XXX, by field 'name' with wildcards\n\nSample API calls:\n  - **GET /storage/containers/all?fields=id,name,size** - select all available containers and return their id, name and size\n  - **GET /storage/containers/name=\"my-storage\"?fields=id,name** - select containers with name=\"my-storage\" and return their id and name\n","in":"path","items":{"type":"string"},"name":"container-selector","required":true,"type":"array","x-flespi-allowed-fields-in-selectors":{"$ref":"#/definitions/container"}},"container.fields":{"collectionFormat":"csv","description":"All possible fields available for the container.\nIf this parameter is specified in the query path of API call each returned container will consists only from JSON object with specified fields.\nIf this parameter is not specified each container will be returned as JSON object with default fields.\n","in":"query","items":{"enum":["id","name","flags","size","rotate","blocked","ttl","cid","metadata","created"],"type":"string"},"name":"fields","required":false,"type":"array","x-flespi-fields-description":{"$ref":"#/definitions/container"}},"force-header":{"description":"Set to 1 in order to force operation completion ignoring some checks","enum":[0,1],"in":"header","name":"x-flespi-force","type":"integer"},"limit":{"description":"Maximum number of items to return.\n","in":"query","name":"limit","required":false,"type":"integer"},"offset":{"description":"Number of items to skip before starting to return results.\n","in":"query","name":"offset","required":false,"type":"integer"}},"paths":{"/cdns":{"post":{"description":"Create new CDN storage space with specified configuration parameters. You pass JSON array with configuration objects - one object per each CDN to create.\n\nCall format: **POST /storage/cdns?fields=field1,field2,field3**\nwhere fields is optional argument to minimize the size of returned JSON for each created CDN\n","parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn.fields"},{"in":"body","name":"data","required":true,"schema":{"items":{"$ref":"#/definitions/cdn.post"},"maxItems":1000,"minItems":1,"type":"array"}}],"responses":{"200":{"description":"cdns collection.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Create new CDN","tags":["cdns"],"x-view-group":"Manage"}},"/cdns/{cdn-selector}":{"delete":{"description":"The method will permanently delete selected CDNs to which current user(token) has access to.\nAny file that is stored on deleted CDN will be also removed. Use with caution!\n\nUse special keyword \"all\" to delete all CDNs available for current user(token). Specify filtering conditions within path in 'cdn-selector' to delete only CDNs that conforms to specified criterias.\n\nBefore the deletion it is recommended to check for CDNs that will be updated by calling corresponding GET method.\n\nCall format: **DELETE /storage/cdns/{cdn-selector}**\n","responses":{"200":{"description":"Deleted cdns identifiers collection.","schema":{"$ref":"#/definitions/ids"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Delete selected CDNs","tags":["cdns"],"x-view-group":"Manage"},"get":{"description":"Get collection of CDN storage spaces available for user(token).\n\nUse special keyword \"all\" to retrieve all CDNs. Specify filtering conditions within path in 'cdn-selector' to retrieve only CDNs that conforms to specified criterias.\n\nCall format: **GET /storage/cdns/{cdn-selector}?fields=field1,field2,field3&limit=10&offset=0**\nwhere fields, limit and offset are optional arguments to minimize the size of returned JSON\n","parameters":[{"$ref":"#/parameters/cdn.fields"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/offset"}],"responses":{"200":{"description":"cdns collection.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"List available CDNs","tags":["cdns"],"x-view-group":"Manage"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn-selector"}],"patch":{"description":"The patch method is similar to PUT method but it is used to update only specified keys of the item's JSON fields like metadata or configuration.\n\nCall format: **PATCH /storage/cdns/{cdn-selector}**.\n","parameters":[{"$ref":"#/parameters/cdn.fields"},{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/cdn.put"}}],"responses":{"200":{"description":"Updated cdns collection.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Patch item properties","tags":["cdns"],"x-view-group":"Manage"},"put":{"description":"Update specified properties for selected CDNs.\n\nUse special keyword \"all\" to select all CDNs available for current user(token) for update. Specify filtering conditions within path in 'cdn-selector' to update only CDNs that conforms to specified criterias.\n\nBefore the update it is recommended to check for CDNs that will be updated by calling corresponding GET method.\n\nCall format: **PUT /storage/cdns/{cdn-selector}?fields=field1,field2,field3**\nwhere fields is an optional argument to minimize the size of returned JSON\n","parameters":[{"$ref":"#/parameters/cdn.fields"},{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/cdn.put"}}],"responses":{"200":{"description":"Updated cdns collection.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Modify CDN properties","tags":["cdns"],"x-view-group":"Manage"}},"/cdns/{cdn-selector}/cid":{"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn-selector"}],"put":{"description":"Move CDN to account/subaccount with specified cid. All files stored on the CDN are moved together with it.\n\nTo select CDNs to move specify filtering conditions within path in 'cdn-selector'. You may select 'all' CDNs or select them by ID, name and other criterias specified in cdn-selector.\n\nCall format: **PUT /storage/cdns/{cdn-selector}/cid**\n","parameters":[{"$ref":"#/parameters/cdn.fields"},{"in":"body","name":"data","required":true,"schema":{"properties":{"cid":{"description":"new account/subaccount ID","minimum":1,"type":"integer"}},"required":["cid"],"type":"object"}}],"responses":{"200":{"description":"CDNs collection.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Move CDN between subaccounts","tags":["cdns"],"x-flespi-extra-parameters":{"master-token-required":true},"x-view-group":"Manage"}},"/cdns/{cdn-selector}/files":{"delete":{"description":"Delete files that are located on the selected CDN storage spaces. You may specify which files to delete using 'filter' field in 'data' call parameter.\nRequest without any parameters will delete all files on CDN. Use with caution!\n\nUse special keyword \"all\" to delete files from all CDNs. Specify filtering conditions within path in 'cdn-selector' to delete files only on CDNs that conforms to specified criterias.\n\nCall format: **DELETE /storage/cdns/{cdn-selector}/files**.\n","parameters":[{"description":"file selection parameters","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/cdn.files.select"}}],"responses":{"200":{"description":"Id of cdns where successfully scheduled delete operation.","schema":{"$ref":"#/definitions/cdns"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Delete files from CDN","tags":["cdns"],"x-view-group":"Files"},"get":{"description":"List files that are located on the selected CDN storage spaces. You may specify which files to list using 'filter' field in 'data' call parameter.\n\nUse special keyword \"all\" to select all CDNs for file listing. Specify filtering conditions within path in 'cdn-selector' to list files only on CDNs that conforms to specified criterias.\n\nCall format: **GET /storage/cdns/{cdn-selector}/files**.\n","parameters":[{"description":"file selection parameters","in":"query","name":"data","required":false,"schema":{"$ref":"#/definitions/cdn.files.select"}}],"responses":{"200":{"description":"Selected files meta-information","schema":{"$ref":"#/definitions/cdn.files.result"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"List CDN files","tags":["cdns"],"x-view-group":"Files"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn-selector"}],"post":{"consumes":["multipart/form-data"],"description":"Upload files to CDN. You may use special cdn-selector value 'any' in order to automatically select CDN with minimal size.\n\nUploaded files can be retrieved via link to https://cdn.flespi.io/file/{uuid}, where {uuid} returned in result of this call.\n\nYou may upload multiple files in one API call but their combined size should not exceed 128MB. All uploaded files will be stored to selected CDNs, each with unique {uuid}.\n\nMaximum size for one uploaded file CDN can store is 128MB.\n\nCall format: **POST /storage/cdns/{cdn-selector}/files**\n","parameters":[{"description":"file binary data, name and content-type","in":"formData","name":"file","required":true,"type":"file"},{"description":"parameters, which can be used to specify file storage options.","in":"formData","name":"data","required":false,"schema":{"$ref":"#/definitions/cdn.file.post"}}],"responses":{"200":{"description":"Meta information about uploaded file","schema":{"$ref":"#/definitions/cdn.files.result"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Upload files to CDN","tags":["cdns"],"x-view-group":"Files"}},"/cdns/{cdn-selector}/logs":{"get":{"description":"Get specified CDN logs. The request without parameters will return all CDN logs.\n\n'cdn-selector' specifies selection of CDNs from which to retrieve logs. You may select 'all' CDNs or select them by ID, name and other criterias specified in cdn-selector.\n\nReply contains CDN logs sorted by timestamp.\n\nTo improve the performance of the call try always to specify 'from' and 'to' parameters with corresponding UNIX timestamps for which you want to retrieve CDN logs.\n\n'filter' parameter can be used to select only subset of logs. In filter you can utilize powerful [flespi expressions](https://flespi.com/kb/expressions).\n\nCall format: **GET /storage/cdns/{cdn-selector}/logs**.\n","parameters":[{"description":"Parameters to filter retrieved logs","in":"query","name":"data","schema":{"$ref":"#/definitions/logs.get"}}],"responses":{"200":{"description":"Log messages array","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Logs collection","items":{"$ref":"#/definitions/logmessage"},"type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Retrieve CDN logs","tags":["cdns"],"x-view-group":"Utils"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn-selector"}]},"/cdns/{cdn-selector}/logs/calculate":{"get":{"description":"Calculate intervals from logs for specified CDN.\n\nCall format: **GET /storage/cdns/{cdn-selector}/logs/calculate**.\n","parameters":[{"description":"Parameters for interval calculation","in":"query","name":"data","required":true,"schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"Calculated intervals","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Calculated intervals collection","type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Calculate intervals from CDN logs","tags":["cdns"],"x-view-group":"Utils"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/cdn-selector"}],"post":{"deprecated":true,"description":"**Deprecated**: use **GET /storage/cdns/{cdn-selector}/logs/calculate** instead.\n\nCalculate intervals from logs for specified CDN.\n\nCall format: **POST /storage/cdns/{cdn-selector}/logs/calculate**.\n","parameters":[{"description":"Parameters for interval calculation","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"Calculated intervals","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Calculated intervals collection","type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Calculate intervals from CDN logs","tags":["cdns"],"x-view-group":"Utils"}},"/changelog-posts":{"get":{"description":"Retrieve changelog posts accumulated for the flespi storage system, sorted by publication time.\n\nEach post published in a forum changelog topic of the storage system is stored by the platform and available with this method.\nThe 'name' field of the post carries the name of the specific changelog it belongs to, e.g. 'database'.\nNew posts are also published in realtime into 'flespi/message/storage/changelog' MQTT topic.\n\nAll filtering parameters should be wrapped inside data={...} argument, for example to return only the latest post use:\n**GET /storage/changelog-posts?data={\"reverse\":true,\"count\":1}**\n\nCall format: **GET /storage/changelog-posts**\n\nBoth the MQTT topic and this method are accessible with any token of the account, including ACL tokens, no extra permissions required.\n","parameters":[{"in":"query","name":"data","schema":{"$ref":"#/definitions/changelog.get"}}],"responses":{"200":{"description":"Changelog posts array.","schema":{"$ref":"#/definitions/changelog.posts"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Fetch changelog posts of the storage system","tags":["changelog"],"x-view-group":"Changelog"}},"/containers":{"post":{"description":"Create new container with specified configuration parameters. You pass JSON array with configuration objects - one object per each container to create.\n\nDuring container creation you can specify **flags** attribute, which determines duplicates strategy for new messages registration.\n\nCall format: **POST /storage/containers?fields=field1,field2,field3**\nwhere fields is optional argument to minimize the size of returned JSON for each created container\n","parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container.fields"},{"in":"body","name":"data","required":true,"schema":{"items":{"$ref":"#/definitions/container.post"},"maxItems":1000,"minItems":1,"type":"array"}}],"responses":{"200":{"description":"Containers collection.","schema":{"$ref":"#/definitions/containers"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Create new container","tags":["containers"],"x-flespi-extra-parameters":{"grant-access":"create-containers"},"x-view-group":"Manage"}},"/containers/{container-selector}":{"delete":{"description":"The method will permanently delete selected containers to which current user(token) has access to.\nAll messages that are stored on the deleted containers will be also removed. Use with caution!\n\nUse special keyword \"all\" to delete all containers available for current user(token). Specify filtering conditions within path in 'container-selector' to delete only containers that conforms to specified criterias.\n\nBefore the deletion it is recommended to check for containers that will be updated by calling corresponding GET method.\n\nCall format: **DELETE /storage/containers/{container-selector}**\n","responses":{"200":{"description":"Deleted containers identifiers collection.","schema":{"$ref":"#/definitions/ids"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Delete selected containers","tags":["containers"],"x-view-group":"Manage"},"get":{"description":"Get collection of containers available for user(token).\n\nUse special keyword \"all\" to retrieve all containers. Specify filtering conditions within path in 'container-selector' to retrieve only containers that conforms to specified criterias.\n\nCall format: **GET /storage/containers/{container-selector}?fields=field1,field2,field3&limit=10&offset=0**\nwhere fields, limit and offset are optional arguments to minimize the size of returned JSON\n","parameters":[{"$ref":"#/parameters/container.fields"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/offset"}],"responses":{"200":{"description":"Containers collection.","schema":{"$ref":"#/definitions/containers"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"List available containers","tags":["containers"],"x-view-group":"Manage"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}],"patch":{"description":"The patch method is similar to PUT method but it is used to update only specified keys of the item's JSON fields like metadata or configuration.\n\nCall format: **PATCH /storage/containers/{container-selector}**.\n","parameters":[{"$ref":"#/parameters/container.fields"},{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/container.put"}}],"responses":{"200":{"description":"Updated containers collection.","schema":{"$ref":"#/definitions/containers"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Patch item properties","tags":["containers"],"x-view-group":"Manage"},"put":{"description":"Update specified properties for selected containers.\n\nUse special keyword \"all\" to select all containers available for current user(token) for update. Specify filtering conditions within path in 'container-selector' to update only containers that conforms to specified criterias.\n\nBefore the update it is recommended to check for containers that will be updated by calling corresponding GET method.\n\nCall format: **PUT /storage/containers/{container-selector}?fields=field1,field2,field3**\nwhere fields is an optional argument to minimize the size of returned JSON\n","parameters":[{"$ref":"#/parameters/container.fields"},{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/container.put"}}],"responses":{"200":{"description":"Updated containers collection.","schema":{"$ref":"#/definitions/containers"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Modify container properties","tags":["containers"],"x-view-group":"Manage"}},"/containers/{container-selector}/calculate":{"parameters":[{"$ref":"#/parameters/cid-header"}],"post":{"deprecated":true,"description":"**Deprecated**: use **GET /storage/containers/{container-selector}/messages/calculate** instead.\n\nSplit container messages on intervals according to specified calculation rules. This is [reports engine](https://flespi.com/kb/analytics-flespi-reports-engine) in its manual mode.\nMessages keys for this call are expected to be UNIX timestamps.\n\n'container-selector' specifies selection of containers from which to retrieve intervals. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nInside call data in so-called [interval selectors](https://flespi.com/kb/intervals-selectors-build-intervals-from-messages) you define the rules on how to split container messages on intervals.\n\nOnce intervals are defined, [interval counters](https://flespi.com/kb/interval-counters-calculate-interval-messages) apply that calculate each message in interval according to specified logic.\n\nThe generated interval message contains interval begin and end time, duration and all calculated properties defined by interval counters.\n\nRead more about [flespi reports engine](https://flespi.com/kb/analytics-flespi-reports-engine) in KB.\n\nCall format: **POST /storage/containers/{container-selector}/calculate**.\n","parameters":[{"$ref":"#/parameters/container-selector"},{"description":"Intervals calculation algorithm","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"result with calculated intervals array","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"calculated intervals","items":{"$ref":"#/definitions/container.interval"},"type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Split container messages into intervals","tags":["containers"],"x-view-group":"Messages"}},"/containers/{container-selector}/cid":{"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}],"put":{"description":"Move container to account/subaccount with specified cid. All messages stored in the container are moved together with it.\n\nTo select containers to move specify filtering conditions within path in 'container-selector'. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nCall format: **PUT /storage/containers/{container-selector}/cid**\n","parameters":[{"$ref":"#/parameters/container.fields"},{"in":"body","name":"data","required":true,"schema":{"properties":{"cid":{"description":"new account/subaccount ID","minimum":1,"type":"integer"}},"required":["cid"],"type":"object"}}],"responses":{"200":{"description":"Containers collection.","schema":{"$ref":"#/definitions/containers"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Move container between subaccounts","tags":["containers"],"x-flespi-extra-parameters":{"master-token-required":true},"x-view-group":"Manage"}},"/containers/{container-selector}/logs":{"get":{"description":"Get specified container logs. The request without parameters will return all container logs.\n\n'container-selector' specifies selection of containers from which to retrieve logs. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nTo improve the performance of the call try always to specify 'from' and 'to' parameters with corresponding UNIX timestamps for which you want to retrieve container logs.\n\n'filter' parameter can be used to select only subset of logs. In filter you can utilize powerful [flespi expressions](https://flespi.com/kb/expressions).\n\nCall format: **GET /storage/containers/{container-selector}/logs**.\n","parameters":[{"description":"Parameters to filter retrieved logs","in":"query","name":"data","schema":{"$ref":"#/definitions/logs.get"}}],"responses":{"200":{"description":"Log messages array","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Logs collection","items":{"$ref":"#/definitions/logmessage"},"type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Retrieve container logs","tags":["containers"],"x-view-group":"Utils"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}]},"/containers/{container-selector}/logs/calculate":{"get":{"description":"Calculate intervals from logs for specified container.\n\nCall format: **GET /storage/containers/{container-selector}/logs/calculate**.\n","parameters":[{"description":"Parameters for interval calculation","in":"query","name":"data","required":true,"schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"Calculated intervals","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Calculated intervals collection","type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Calculate intervals from container logs","tags":["containers"],"x-view-group":"Utils"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}],"post":{"deprecated":true,"description":"**Deprecated**: use **GET /storage/containers/{container-selector}/logs/calculate** instead.\n\nCalculate intervals from logs for specified container.\n\nCall format: **POST /storage/containers/{container-selector}/logs/calculate**.\n","parameters":[{"description":"Parameters for interval calculation","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"Calculated intervals","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"Calculated intervals collection","type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Calculate intervals from container logs","tags":["containers"],"x-view-group":"Utils"}},"/containers/{container-selector}/messages":{"delete":{"description":"Delete specified messages from the container. The request without parameters will delete all container messages. Use with caution!\n\n'filter' parameter can be used to delete only subset of messages. In filter you can utilize powerful [flespi expressions](https://flespi.com/kb/expressions).\n\n'container-selector' specifies selection of containers from which to delete messages. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nCall format: **DELETE /storage/containers/{container-selector}/messages**.\n","parameters":[{"description":"Parameters for filtering set of messages to delete.\n","in":"query","name":"data","required":true,"schema":{"$ref":"#/definitions/container.messages.delete"}}],"responses":{"200":{"description":"IDs collection of containers where messages have been successfully deleted.\nThe whole request success can be checked by number of returned queue ID's:\nE.g. if command to delete messages into N containers have been sent, then there must be N container ID's in reply.\n","schema":{"$ref":"#/definitions/ids"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Delete messages from container","tags":["containers"],"x-view-group":"Messages"},"get":{"description":"Retrieve messages that are currently accumulated in the container storage. The request without parameters will return all container messages currently stored.\n\nThe container messages storage is controlled by 'ttl' and 'rotate' fields from container configuration which define how long and how many messages are stored in the container.\nAnd with this API call you can access this storage - search for specific messages, retrieve them all and even perfom basic generalization math with 'generalize' API call parameter.\n\nReply contains container messages sorted by their key, in case you request messages from multiple containers simultaneously there is no specific sort order in the output.\n\nTo improve the performance of the call always specify 'left_key' and 'right_key' parameters with corresponding keys for which you want to retrieve device messages.\n\n'filter' parameter can be used to select only subset of messages. In filter you can utilize powerful [flespi expressions](https://flespi.com/kb/expressions).\n\nYou may use 'reverse' parameter with 'true' value to search and return messages backwards. In that case if you specify 1 in 'max_count' parameter you will receive just single latest(by key) message registered for the container.\n\nParameter 'fields' can be used to specify comma-separated list of fields to return for each message.\nYou can use wildcards there, for example fields with value \"can.*,timestamp\" will return in messages just timestamp parameter and all parameters which name start from can.\n\nNon-zero **generalize** parameter will group container messages based on the generalization interval in seconds. Only keys that are multiple to the specified generalization interval will be returned with recalculated parameter values according to the specified generalization method. For this method container expect that keys are UNIX timestamps.\n\n'container-selector' specifies selection of containers from which to retrieve messages. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nCall format: **GET /storage/containers/{container-selector}/messages**.\n","parameters":[{"description":"Parameters for filtering resulting set of messages.\n","in":"query","name":"data","required":false,"schema":{"$ref":"#/definitions/container.messages.get"}}],"responses":{"200":{"description":"messages array","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"messages collection","items":{"$ref":"#/definitions/container.message"},"type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Retrieve messages from container","tags":["containers"],"x-view-group":"Messages"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}],"post":{"description":"Post messages to container.\n\nUse special keyword \"all\" to select all containers available for current user(token). Specify filtering conditions within path in 'container-selector' to post messages only containers that conforms to specified criterias.\n\nYou may post multiple messages in one call or just post one message.\n\nDepending on the messages duplicates strategy defined by container flags messages under the same key can be replaced, ignored or added.\n\nFor containers with merge messages strategy in the storage message fields under the same key will be merged.\nThe order of merging is determined by the 'timestamp' property that you pass inside 'data' parameter in the API call. By default the time of API call is used for it to automatically detect which parameter value is the latest.\n\nCall format: **POST /storage/containers/{container-selector}/messages**\n\nSuccessfully posted messages are also published via MQTT on 'flespi/message/storage/containers/{container_id}' topic for real-time consumption.\n","parameters":[{"description":"Messages to be posted to container","in":"body","name":"data","required":true,"schema":{"anyOf":[{"$ref":"#/definitions/container.messages.array"},{"$ref":"#/definitions/container.message"}]}}],"responses":{"200":{"description":"IDs collection of containers where messages have been successfully posted.\nThe whole request success can be checked by number of returned queue ID's:\nE.g. if command to post messages into N containers have been sent, then there must be N container ID's in reply.\n","schema":{"$ref":"#/definitions/ids"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Post messages to container","tags":["containers"],"x-view-group":"Messages"}},"/containers/{container-selector}/messages/calculate":{"get":{"description":"Split container messages on intervals according to specified calculation rules. This is [reports engine](https://flespi.com/kb/analytics-flespi-reports-engine) in its manual mode.\nMessages keys for this call are expected to be UNIX timestamps.\n\n'container-selector' specifies selection of containers from which to retrieve intervals. You may select 'all' containers or select them by ID, name and other criterias specified in container-selector.\n\nInside call data in so-called [interval selectors](https://flespi.com/kb/intervals-selectors-build-intervals-from-messages) you define the rules on how to split container messages on intervals.\n\nOnce intervals are defined, [interval counters](https://flespi.com/kb/interval-counters-calculate-interval-messages) apply that calculate each message in interval according to specified logic.\n\nThe generated interval message contains interval begin and end time, duration and all calculated properties defined by interval counters.\n\nRead more about [flespi reports engine](https://flespi.com/kb/analytics-flespi-reports-engine) in KB.\n\nCall format: **GET /storage/containers/{container-selector}/messages/calculate**.\n","parameters":[{"description":"Intervals calculation algorithm","in":"query","name":"data","schema":{"$ref":"#/definitions/container.intervals.calculate"}}],"responses":{"200":{"description":"result with calculated intervals array","schema":{"properties":{"errors":{"$ref":"#/definitions/errors"},"result":{"description":"calculated intervals","items":{"$ref":"#/definitions/container.interval"},"type":"array"}},"type":"object"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Split container messages into intervals","tags":["containers"],"x-view-group":"Messages"},"parameters":[{"$ref":"#/parameters/cid-header"},{"$ref":"#/parameters/container-selector"}]},"/expressions/functions":{"get":{"description":"Retrieve list of functions available to use in [expression](https://flespi.com/kb/expressions) with their description and format specification.\nJSON element can be Object (usually) or Array.\n\nCall format: **GET /storage/expressions/functions**.\n\nThis method is accessible with any token of the account, including ACL tokens, no extra permissions required.\n","responses":{"200":{"description":"list of functions","schema":{"$ref":"#/definitions/expressions.functions.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"List functions available in expressions","tags":["expressions"],"x-view-group":"Expressions"}},"/expressions/test":{"get":{"description":"Test result of [expression](https://flespi.com/kb/expressions) applied over specified input of JSON elements.\nJSON element can be Object (usually) or Array.\n\nIf input is not provided, then method just compiles expression and validates it.\n\nAny failure to compile the expression will be reported in errors part of output.\n\nCall format: **GET /storage/expressions/test**.\n\nThis method is accessible with any token of the account, including ACL tokens, no extra permissions required.\n","parameters":[{"in":"query","name":"data","schema":{"$ref":"#/definitions/expressions.test.get"}}],"responses":{"200":{"description":"expression execution result","schema":{"$ref":"#/definitions/expressions.test.result"}},"400":{"description":"Incorrect parameters.","schema":{"$ref":"#/definitions/errors.result"}},"401":{"description":"Header \"Authorization: FlespiToken XXXXXXXX\" required.\n","schema":{"$ref":"#/definitions/errors.result"}},"403":{"description":"Token or customer is blocked by the platform due to variety of reasons.\n","schema":{"$ref":"#/definitions/errors.result"}},"500":{"description":"Server is unable to process request at the moment, try again later.\n"}},"security":[{"FlespiToken":[]}],"summary":"Test expression evaluation","tags":["expressions"],"x-view-group":"Expressions"}}},"produces":["application/json"],"schemes":["https","http"],"securityDefinitions":{"FlespiToken":{"description":"Authorization through FlespiToken","in":"header","name":"Authorization","type":"apiKey"}},"swagger":"2.0","tags":[{"description":"Container is a base element for storing structurized JSON messages.\nAll messages consist of key as double a flat list of custom parameters (name/value pairs):\n\n  Field | Description\n  --------|----------\n    key | double key\n    params | parameters JSON object\n\nContain provides efficient storage system for timeseries telemetry data. Key in that case is usually a UNIX timestamp mith up to 6 digits (microseconds ) in fraction part for more precise storage capability.\n\nContainers support commands for posting new messages, reading, searching and deleting them.\n\nIt is possible to receive container messages in realtime using [MQTT](https://flespi.com/kb/how-to-consume-telematics-hub-messages-via-mqtt) by subscribing to 'flespi/message/storage/containers/{container_id}' topic. Each successful POST of messages to a container is published on this topic with the posted JSON as payload.\n\nIt is also possible to [split stored messages](https://flespi.com/kb/analytics-flespi-reports-engine) into custom intervals and pre-calculate various metrics using specified algorithms and logic.\n\nContainer name can be set to easily access certain containers using container selector for REST API operations.\n\nSpecial container attribute 'flags' during message posting determines the strategy for working with message duplicates, e.g. what happens when posting messages with an already existing key:\n\nValue    | Description\n  --------- | --------\n   0x0      | replace message with new, default action\n   0x1      | skip new message\n   0x2      | merge parameters, parameters with the same names will be replaced by values from new message\n   0x3      | allow duplicates, in this mode, during messages retrieval all duplicates for requested key will be returned to prevent data loss, even if read request limitations where specified\n\n**Special note:** containers with 'flags' mode 0x3 are not compatible with other modes (0x0, 0x1, 0x2). It is not possible to register message or change default container flags into incompatible mode.\n\nAdditional values for 'flags' for extended container usage:\n\nValue    | Description\n  --------- | --------\n   0x10     | perform automatic generalization of time series data in container (where key=UNIX timestamp)\n\n\nIf 'blocked' attribute is not zero, the container is blocked for new messages. Usually this happens when maximum allowed container size is exceeded. To unblock the container, clean up its messages first.\n\n'ttl' attribute, if non-zero, specifies the maximum time-to-live for messages in the container (in seconds up to the current moment). If set to non-zero value, storage engine will expect that keys for messages are UNIX timestamps and will automatically delete outdated messages. Can be used on timeseries data.\n\n'rotate' attribute, if non-zero, specifies the maximum size of storage buffer used in circular mode. If actual messages storage size of a container is larger than the specified value, messages with the lowest keys will be deleted automatically.\n\nAll container modification operations are recorded to the common [logs subsystem](https://flespi.io/docs/#/platform/logs) with the following possible event codes:\n\n  Event code | Description\n  -----|------\n  1|container was created via REST API\n  2|container was updated via REST API\n  3|container was deleted via REST API\n  20|container was blocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information\n  21|container was unblocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information\n  700|container size has been changed\n\nFor event_code=20 the log record contains the 'block_code' with the reason of container blocking.\n\nFor event_code=1,2,3 that are recorded when you create, update or delete the container using REST API each record contains the following standard fields:\n\n Field name | Description\n  --------|----------\n    http_data | original request parameters supplied by the caller; applicable for POST and PUT operations\n    new | item's data with default fields after operation; applicable for POST and PUT operations\n    old | item's data with default fields prior to operation; applicable for DELETE and PUT operations\n    token_id | token ID used to authorize the HTTP request\n    host | IP address from which HTTP request was received\n","name":"containers"},{"description":"CDN is a simple file storage with the possibility to access data via a public link.\nUploaded files can be retrieved via a link to https://cdn.flespi.io/file/{uuid}, where {uuid} is the unique file ID assigned during upload.\n\nCDN name can be set to easily access certain cdns using cdn selector.\n\nIf 'blocked' attribute is not zero, then cdn is blocked for new files upload. Usually this happens when maximum allowed cdn size is exceeded. To unblock the cdn, delete some files from it to free up space.\n\nAll cdn modification operations are recorded to the common [logs subsystem](https://flespi.io/docs/#/platform/logs) with the following possible event codes:\n\n  Event code | Description\n  -----|------\n  1|cdn was created via REST API\n  2|cdn was updated via REST API\n  3|cdn was deleted via REST API\n  20|cdn was blocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information\n  21|cdn was unblocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information\n  900|cdn size has been changed\n  901|file was accessed via external link, the corresponding logs are published in the [Platform logs](https://flespi.io/docs/#/platform/logs)\n  902|file was uploaded\n\nFor event_code=20 the log record contains the 'block_code' with the reason of cdn blocking.\n\nFor event_code=1,2,3 that are recorded when you create, update or delete the cdn using REST API each record contains the following standard fields:\n\n Field name | Description\n  --------|----------\n    http_data | original request parameters supplied by the caller; applicable for POST and PUT operations\n    new | item's data with default fields after operation; applicable for POST and PUT operations\n    old | item's data with default fields prior to operation; applicable for DELETE and PUT operations\n    token_id | token ID used to authorize the HTTP request\n    host | IP address from which HTTP request was received\n","name":"cdns"},{"description":"[Expressions](https://flespi.com/kb/expressions) are used in flespi everywhere - in filters for MQTT messages subscriptions, in plugins, calculators, in message search calls, different validators and so on.\n\nExpression usually operates either with a single object or with a sequential arrays of objects.\nIf expression is applied in a sequential array of objects (this is done in calculators, in various messages retrievals, logs filters and so on) expression contain state and can access parameters of previously passed object to analyze changes and differences between object parameters.\n\nExpression can be applied over JSON object, device message or for special cases in MQTT topic filters even over any non-specified value. In last case you reference the value as '$' which will evaluate to correct value type (number, string, boolean, null, JSON, etc).\nBut mostly you operate with some object that has parameters inside. For JSON object this will be key names, for device message this will be its parameter names.\n\nFor any expression writing task we suggest to use [expression testing tool](https://flespi.com/blog/expressions-testing-tool) as a great UI interface that highlight expression syntax, suggest functions to use and can be used to test expression evaluation over custom JSON objects.\nThe tool is integrated in flespi in Logs and Messages viewers for devices, channels, plugins, streams, calculators, webhooks, platform logs - elsewhere.\nJust select corresponding logs or messages with Ctrl or Shift click and call context menu to test expression over range of these objects.\n\nWith a special method **GET /storage/expressions/test** it is possible to compile user-defined expression (test validity of expression) and evaluate its over few JSON values (mostly objects, but arrays are also possible).\nThis method is used only for debug and development purposes to simplify life of flespi REST API user.\n","name":"expressions"},{"description":"Changelog posts of the flespi storage system.\n\nTo stay current with storage updates, subscribe to 'flespi/message/storage/changelog' MQTT topic delivering any new posts published in the system [changelog](https://forum.flespi.com/t/changelog) topics on the forum.\n\nThe accumulated history of such posts is available with the 'GET /storage/changelog-posts' request. Each post carries the 'title', 'url' and 'author' of the original forum post, its 'text' in markdown, the publication 'timestamp', and the 'name' of the specific changelog it belongs to:\n\nname | changelog | posts to expect\n-----|-----------|----------------\ndatabase | [flespi database](https://forum.flespi.com/d/24-changelog-flespi-database) | flespi storage features and REST API updates\n","name":"changelog"}]}