-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from sinamics/update_userid
Change user ID in database from int to 25char id
- Loading branch information
Showing
43 changed files
with
1,170 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docs/ztnet/docs/Rest Api/Network/create-new-network.api.mdx
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
docs/ztnet/docs/Rest Api/Network/get-user-networks.api.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
id: get-user-networks | ||
title: "Returns a list of Networks you have access to" | ||
description: "Returns a list of Networks you have access to" | ||
sidebar_label: "Returns a list of Networks you have access to" | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: {"operationId":"getUserNetworks","parameters":[{"name":"x-ztnet-auth","in":"header","required":true,"schema":{"type":"string"},"description":"API Key for the user"}],"responses":{"200":{"description":"An array of Network IDs","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"examples":{"example1":{"value":["networkid#1","networkid#2"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"description":"Returns a list of Networks you have access to","method":"get","path":"/network","info":{"title":"ZTNet Web API","info_path":"restapi/ztnet-web-api","version":"1.0.0","description":"Public API for ZTNet. Available from ztnet version 0.4.0 onwards.\n\nThis API is rate-limited to 10 requests per minute\n"},"postman":{"name":"Returns a list of Networks you have access to","description":{"type":"text/plain"},"url":{"path":["network"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"(Required) API Key for the user","type":"text/plain"},"key":"x-ztnet-auth","value":""},{"key":"Accept","value":"application/json"}],"method":"GET"}} | ||
sidebar_class_name: "get api-method" | ||
info_path: Rest Api/Network/ztnet-web-api | ||
custom_edit_url: null | ||
--- | ||
|
||
import ApiTabs from "@theme/ApiTabs"; | ||
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 DiscriminatorTabs from "@theme/DiscriminatorTabs"; | ||
import TabItem from "@theme/TabItem"; | ||
|
||
## Returns a list of Networks you have access to | ||
|
||
|
||
|
||
Returns a list of Networks you have access to | ||
|
||
<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Header Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"x-ztnet-auth","in":"header","required":true,"schema":{"type":"string"},"description":"API Key for the user"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div> | ||
|
||
An array of Network IDs | ||
|
||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><div style={{"marginTop":".5rem","marginBottom":".5rem","marginLeft":"1rem"}}> | ||
|
||
string | ||
|
||
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n \"string\"\n]"} language={"json"}></ResponseSamples></TabItem><TabItem label={"example1"} value={"example1"}><ResponseSamples responseExample={"[\n \"networkid#1\",\n \"networkid#2\"\n]"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div> | ||
|
||
Unauthorized | ||
|
||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"error"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"error\": \"string\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"429"} value={"429"}><div> | ||
|
||
Rate limit exceeded | ||
|
||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"error"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"error\": \"string\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"500"} value={"500"}><div> | ||
|
||
Internal server error | ||
|
||
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"message"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"message\": \"string\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...t/docs/Rest Api/create-a-new-user.api.mdx → .../docs/Rest Api/User/post-new-user.api.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
id: ztnet-web-api | ||
title: "ZTNet Web API" | ||
description: "Public API for ZTNet. Available from ztnet version 0.4.0 onwards." | ||
sidebar_label: Introduction | ||
sidebar_position: 0 | ||
hide_title: true | ||
custom_edit_url: null | ||
--- | ||
|
||
import ApiLogo from "@theme/ApiLogo"; | ||
import SchemaTabs from "@theme/SchemaTabs"; | ||
import TabItem from "@theme/TabItem"; | ||
import Export from "@theme/ApiDemoPanel/Export"; | ||
|
||
<span className={"theme-doc-version-badge badge badge--secondary"}>Version: 1.0.0</span> | ||
|
||
# ZTNet Web API | ||
|
||
|
||
|
||
Public API for ZTNet. Available from ztnet version 0.4.0 onwards. | ||
|
||
This API is rate-limited to 10 requests per minute | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
NetworkExample: | ||
authTokens: [null] | ||
authorizationEndpoint: "" | ||
capabilities: [] | ||
clientId: "" | ||
creationTime: 1698676570111 | ||
dns: [] | ||
enableBroadcast: true | ||
id: "network_id" | ||
ipAssignmentPools: | ||
- ipRangeEnd: "172.25.25.254" | ||
ipRangeStart: "172.25.25.1" | ||
mtu: 2800 | ||
multicastLimit: 32 | ||
name: "slimy-earwig" | ||
nwid: "network_id" | ||
objtype: "network" | ||
private: true | ||
remoteTraceLevel: 0 | ||
remoteTraceTarget: null | ||
revision: 1 | ||
routes: | ||
- target: "172.25.25.0/24" | ||
via: null | ||
rules: | ||
- not: false | ||
or: false | ||
type: "ACTION_ACCEPT" | ||
rulesSource: "" | ||
ssoEnabled: false | ||
tags: [] | ||
v4AssignMode: | ||
zt: true | ||
v6AssignMode: | ||
6plane: false | ||
rfc4193: false | ||
zt: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
NetworkResponse: | ||
type: object | ||
properties: | ||
authTokens: | ||
type: array | ||
items: | ||
type: string | ||
nullable: true | ||
authorizationEndpoint: | ||
type: string | ||
capabilities: | ||
type: array | ||
items: | ||
type: string | ||
clientId: | ||
type: string | ||
creationTime: | ||
type: integer | ||
dns: | ||
type: array | ||
items: | ||
type: string | ||
enableBroadcast: | ||
type: boolean | ||
id: | ||
type: string | ||
ipAssignmentPools: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
ipRangeEnd: | ||
type: string | ||
ipRangeStart: | ||
type: string | ||
mtu: | ||
type: integer | ||
multicastLimit: | ||
type: integer | ||
name: | ||
type: string | ||
nwid: | ||
type: string | ||
objtype: | ||
type: string | ||
private: | ||
type: boolean | ||
remoteTraceLevel: | ||
type: integer | ||
remoteTraceTarget: | ||
type: string | ||
revision: | ||
type: integer | ||
routes: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
target: | ||
type: string | ||
via: | ||
type: string | ||
nullable: true | ||
rules: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
not: | ||
type: boolean | ||
or: | ||
type: boolean | ||
type: | ||
type: string | ||
rulesSource: | ||
type: string | ||
ssoEnabled: | ||
type: boolean | ||
tags: | ||
type: array | ||
items: | ||
type: string | ||
v4AssignMode: | ||
type: object | ||
properties: | ||
zt: | ||
type: boolean | ||
v6AssignMode: | ||
type: object | ||
properties: | ||
6plane: | ||
type: boolean | ||
rfc4193: | ||
type: boolean | ||
zt: | ||
type: boolean |
Oops, something went wrong.