Skip to content

Commit

Permalink
chore: update edge documentation (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
some-ci authored Jul 29, 2024
1 parent 561a702 commit ab8994c
Show file tree
Hide file tree
Showing 51 changed files with 2,439 additions and 575 deletions.
2 changes: 1 addition & 1 deletion docs/reference/api/load-time-series-data.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Load time series data."
sidebar_label: "Load time series data."
hide_title: true
hide_table_of_contents: true
api: {"parameters":[{"name":"timeseries","description":"The name of the time series.","in":"path","required":true,"schema":{"type":"string","example":"some_name"}}],"requestBody":{"description":"Parameters of the time series request.","content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The start of the time series. If not defined 7 days from now into the past."},"end":{"type":"string","format":"date-time","description":"The end of the time series. If not defined now."},"group":{"type":"array","items":{"type":"string"},"description":"Reduce the available groups to the set of defined ones."},"filter":{"type":"array","items":{"type":"string"},"description":"Filter available group members by predicate.\nOnly time series values with matching group criteria will be selected.\n","example":"group_var_foo == \"bla\""},"granularity":{"type":"string","format":"duration","description":"The granularity of the time series.\nThis can be either a duration or the number of items for the time window that is selected.\nThe granularity can not go below one hour.\nIt defaults to (end-start) / 20.\n"}}}}}},"tags":["timeseries"],"responses":{"400":{"description":"A required property is missing or the request can not be read.","content":{"text/plain":{"schema":{"type":"string"}}}},"default":{"description":"The time series data","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":"{\n \"time\": \"2021-01-01T00:00:00Z\",\n \"value\": 1\n}\n"}}}},"description":"Load time series data.","method":"post","path":"/timeseries/{timeseries}","servers":[{"url":"https://{host}:{port}","variables":{"host":{"default":"localhost"},"port":{"default":"8900"}}}],"jsonRequestBodyExample":{"start":"2024-07-18T16:39:25.074Z","end":"2024-07-18T16:39:25.074Z","group":["string"],"filter":"group_var_foo == \"bla\"","granularity":"string"},"info":{"title":"Fix Inventory Core REST API","version":"V1"},"postman":{"name":"Load time series data.","description":{"type":"text/plain"},"url":{"path":["timeseries",":timeseries"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name of the time series.","type":"text/plain"},"type":"any","value":"","key":"timeseries"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"text/plain"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}}
api: {"parameters":[{"name":"timeseries","description":"The name of the time series.","in":"path","required":true,"schema":{"type":"string","example":"some_name"}}],"requestBody":{"description":"Parameters of the time series request.","content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The start of the time series. If not defined 7 days from now into the past."},"end":{"type":"string","format":"date-time","description":"The end of the time series. If not defined now."},"group":{"type":"array","items":{"type":"string"},"description":"Reduce the available groups to the set of defined ones."},"filter":{"type":"array","items":{"type":"string"},"description":"Filter available group members by predicate.\nOnly time series values with matching group criteria will be selected.\n","example":"group_var_foo == \"bla\""},"granularity":{"type":"string","format":"duration","description":"The granularity of the time series.\nThis can be either a duration or the number of items for the time window that is selected.\nThe granularity can not go below one hour.\nIt defaults to (end-start) / 20.\n"}}}}}},"tags":["timeseries"],"responses":{"400":{"description":"A required property is missing or the request can not be read.","content":{"text/plain":{"schema":{"type":"string"}}}},"default":{"description":"The time series data","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":"{\n \"time\": \"2021-01-01T00:00:00Z\",\n \"value\": 1\n}\n"}}}},"description":"Load time series data.","method":"post","path":"/timeseries/{timeseries}","servers":[{"url":"https://{host}:{port}","variables":{"host":{"default":"localhost"},"port":{"default":"8900"}}}],"jsonRequestBodyExample":{"start":"2024-07-29T13:23:07.690Z","end":"2024-07-29T13:23:07.690Z","group":["string"],"filter":"group_var_foo == \"bla\"","granularity":"string"},"info":{"title":"Fix Inventory Core REST API","version":"V1"},"postman":{"name":"Load time series data.","description":{"type":"text/plain"},"url":{"path":["timeseries",":timeseries"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name of the time series.","type":"text/plain"},"type":"any","value":"","key":"timeseries"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"text/plain"}],"method":"POST","body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}}}}
sidebar_class_name: "post api-method"
info_path: reference/api/fix-inventory-core-rest-api
custom_edit_url: null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
---
id: search-history-events-and-provide-the-number-of-events-over-time
title: "Search history events and provide the number of events over time."
description: "Search all history events and a histogram over time."
sidebar_label: "Search history events and provide the number of events over time."
hide_title: true
hide_table_of_contents: true
api: {"description":"Search all history events and a histogram over time.\nA section can be defined (defaults to `/` == root) to interpret relative property paths.\nExample: is(volume) and (reported.age>23d or desired.clean==true or metadata.version==2)\n","tags":["graph_search"],"parameters":[{"name":"graph_id","in":"path","example":"fix","description":"The identifier of the graph","required":true,"schema":{"type":"string"}},{"name":"section","in":"query","description":"The name of the section used for all property paths. If not defined root is assumed.","required":false,"schema":{"type":"string","enum":["reported","desired","metadata"]}},{"name":"before","in":"query","description":"Count all history events before the given timestamp","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"after","in":"query","description":"Count all history events after the given timestamp","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"granularity","in":"query","description":"Optional parameter to define the granularity of the timeline","required":false,"schema":{"type":"string","format":"duration"}},{"name":"change","in":"query","description":"Optional parameter to get all history events with the given change type","required":false,"schema":{"type":"string","enum":["node_created","node_updated","node_deleted"]}}],"requestBody":{"description":"The search to perform","content":{"text/plain":{"schema":{"type":"string","example":"is(volume) and reported.volume_size>100"}}}},"responses":{"200":{"description":"The result of this search in the defined format","content":{"application/json":{"example":"[\n { \"at\": \"2024-07-14T00:00:00.000Z\", \"group\": { \"change\": \"node_created\" }, \"v\": 170 },\n { \"at\": \"2024-07-15T00:00:00.000Z\", \"group\": { \"change\": \"node_updated\" }, \"v\": 833 },\n { \"at\": \"2024-07-15T00:00:00.000Z\", \"group\": { \"change\": \"node_created\" }, \"v\": 1166 }\n]\n"}}}},"method":"post","path":"/graph/{graph_id}/search/history/timeline","servers":[{"url":"https://{host}:{port}","variables":{"host":{"default":"localhost"},"port":{"default":"8900"}}}],"info":{"title":"Fix Inventory Core REST API","version":"V1"},"postman":{"name":"Search history events and provide the number of events over time.","description":{"content":"Search all history events and a histogram over time.\nA section can be defined (defaults to `/` == root) to interpret relative property paths.\nExample: is(volume) and (reported.age>23d or desired.clean==true or metadata.version==2)\n","type":"text/plain"},"url":{"path":["graph",":graph_id","search","history","timeline"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The name of the section used for all property paths. If not defined root is assumed.","type":"text/plain"},"key":"section","value":""},{"disabled":false,"description":{"content":"(Required) Count all history events before the given timestamp","type":"text/plain"},"key":"before","value":""},{"disabled":false,"description":{"content":"(Required) Count all history events after the given timestamp","type":"text/plain"},"key":"after","value":""},{"disabled":false,"description":{"content":"Optional parameter to define the granularity of the timeline","type":"text/plain"},"key":"granularity","value":""},{"disabled":false,"description":{"content":"Optional parameter to get all history events with the given change type","type":"text/plain"},"key":"change","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) The identifier of the graph","type":"text/plain"},"type":"any","value":"","key":"graph_id"}]},"header":[{"key":"Content-Type","value":"text/plain"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":""}}}
sidebar_class_name: "post api-method"
info_path: reference/api/fix-inventory-core-rest-api
custom_edit_url: null
hide_send_button: true
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"Search history events and provide the number of events over time."}
>
</Heading>

<MethodEndpoint
method={"post"}
path={"/graph/{graph_id}/search/history/timeline"}
>

</MethodEndpoint>

Search all history events and a histogram over time. A section can be defined (defaults to `/` == root) to interpret relative property paths. Example: is(volume) and (reported.age&gt;23d or desired.clean==true or metadata.version==2)

<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>

<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"name":"graph_id","in":"path","example":"fix","description":"The identifier of the graph","required":true,"schema":{"type":"string"}}}
>

</ParamsItem>
</ul>
</div>
</details><details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Query Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"name":"section","in":"query","description":"The name of the section used for all property paths. If not defined root is assumed.","required":false,"schema":{"type":"string","enum":["reported","desired","metadata"]}}}
>

</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"before","in":"query","description":"Count all history events before the given timestamp","required":true,"schema":{"type":"string","format":"date-time"}}}
>

</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"after","in":"query","description":"Count all history events after the given timestamp","required":true,"schema":{"type":"string","format":"date-time"}}}
>

</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"granularity","in":"query","description":"Optional parameter to define the granularity of the timeline","required":false,"schema":{"type":"string","format":"duration"}}}
>

</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"change","in":"query","description":"Optional parameter to get all history events with the given change type","required":false,"schema":{"type":"string","enum":["node_created","node_updated","node_deleted"]}}}
>

</ParamsItem>
</ul>
</div>
</details><MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"text/plain"}
value={"text/plain-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
<div
style={{"marginTop":"1rem","marginBottom":"1rem"}}
>


The search to perform


</div>
</div><ul
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>


string


</div>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>


The result of this search in the defined format


</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>

</div><ul
style={{"marginLeft":"1rem"}}
>
any
</ul>
</details>
</TabItem><TabItem
label={"Example"}
value={"Example"}
>
<ResponseSamples
responseExample={"[\n { \"at\": \"2024-07-14T00:00:00.000Z\", \"group\": { \"change\": \"node_created\" }, \"v\": 170 },\n { \"at\": \"2024-07-15T00:00:00.000Z\", \"group\": { \"change\": \"node_updated\" }, \"v\": 833 },\n { \"at\": \"2024-07-15T00:00:00.000Z\", \"group\": { \"change\": \"node_created\" }, \"v\": 1166 }\n]\n"}
language={"json"}
>

</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>
7 changes: 7 additions & 0 deletions docs/reference/api/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ const sidebar: SidebarsConfig = {
label: 'Explain the search execution plan',
className: 'api-method post',
},
{
type: 'doc',
id: 'reference/api/search-history-events-and-provide-the-number-of-events-over-time',
label:
'Search history events and provide the number of events over time.',
className: 'api-method post',
},
{
type: 'doc',
id: 'reference/api/search-all-history-events-and-return-them',
Expand Down
Loading

0 comments on commit ab8994c

Please sign in to comment.