#Questions regarding FSA (File System Analytics) API

1 messages · Page 1 of 1 (latest)

primal swallow
#

Our customer is unable to access Discord from their corporate computers, therefore posting this for them. Questions are as follows:

  1. We set the active period is 5 years, When I try to retrieve ‘analytics.by_accessed_time.bytes_used’, the API returns the label of FSA data:

labels': ['2024-W04', '2024-W03', '2024-W02', '2024-W01', '2023-W52', '2024-01', '2023-12', '2023-11', '2024-Q1', '2023-Q4', '2023-Q3', '2023-Q2', '2024', '2023', '2022', '2021', '--2020', 'unknown'],
Can you explain that why year 2020 is using different label than other years’ label (it displays with "--" when the others do not)?

  1. If files were accessed in 2021, 2022, 2023, does ‘by_accessed_time.bytes_used’ include in all those three years, or just 2023?
primal swallow
#

Anyone able to assist with this one?

solar raven
#

I can try my best.
1)… Can you explain that why year 2020 is using different … (it displays with "--" when the others do not)?
""" (from the docs)
Each label indicates the period of time the corresponding data is associated with. A label can take one of the following forms:<ul>
<li>a partial date in an extended ISO8601 representation</li>
<li>an interval between partial dates in an extended ISO8601 representation, where "<span>-</span>-" is used to separate the beginning and end of the interval</li>
<li>the string literal <span>"</span>unknown"</li>

<li>Either the beginning or end of an interval may be omitted. When the beginning is omitted, the interval includes points in time arbitrarily far in the past. When the end is omitted, the interval includes points in time through the end of the current week.</li>

"""
Note that "<span>-</span>-" is rendered as the “--” if you view the doc online. I think the span tomfoolery was needed because otherwise the renderer would convert “--” to an mdash or some other non-ASCII character that is not what literally goes into the REST requests and responses.

So “--2020” means 2020 or earlier.

#
  1. If files were accessed in 2021, 2022, 2023, does ‘by_accessed_time.bytes_used’ include in all those three years, or just 2023?

Each file can track the time it was last accessed, and then all of its bytes will be counted in the histogram element or elements relevant to that date.

So if you had a single file that was accessed in 2021, 2022, and 2023, it would only show up for 2023 since that’s when it was most recently accessed.

If you had multiple files accessed in the three years, where their bytes show up depends on when particular files were last accessed. E.g., files that were accessed in 2021 but not 2022 or 2023 would have their bytes under 2021. Files that were accessed in 2022 but not 2023 would have their bytes under 2022. Any files accessed in 2023 would show up under 2023.

Note: there is also a limited ability to request custom time periods. E.g., if the customer is most interested in files that were last modified in 2021, 2022, or 2023, they could the system to calculate that by including a “2021--2023” label in an analytics.histogram_by_time_labels parameter to the GET request to the files endpoint.

#

I hope that helps answer your questions!