Skip to content

Commit

Permalink
generated api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Oct 29, 2023
1 parent eefb3fb commit 090ce8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/ztnet/docs/Rest Api/create-a-new-user.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "If no users have been created yet, no API key is required. Otherwi
sidebar_label: "Create a new user"
hide_title: true
hide_table_of_contents: true
api: {"description":"If no users have been created yet, no API key is required. Otherwise, an API key must be included in the request header.\nKeep in mind that first user created will be the admin user.\n","security":[{"x-ztnet-auth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","password","name"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string | null","description":"The date and time at which the user's account will expire. If null, the account will never expire.\nMust be in ISO 8601 format (e.g. 2023-10-28T00:00:00Z).\n\nNot applicable if the user is an admin (first user). Admin accounts never expire.\n"}}},"example":{"email":"test@example.com","password":"password123","name":"Test User","expiresAt":"2023-10-28T00:00:00Z"}}}},"responses":{"200":{"description":"User successfully created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string"}},"example":{"id":"12345","email":"test@example.com","name":"Test User","expiresAt":"2023-10-28T00:00:00Z"}}}}},"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"}}}}}}},"method":"post","path":"/api/v1/user","securitySchemes":{"x-ztnet-auth":{"type":"apiKey","required":true,"in":"header","name":"x-ztnet-auth","description":"API key can be generated from the ZTNet admin section."}},"jsonRequestBodyExample":{"email":"string","password":"string","name":"string"},"info":{"title":"ZTNet Web API","info_path":"restapi/ztnet-web-api","version":"1.0.0","description":"Public API for ZTNet application.\n\nThis API is rate-limited to 10 requests per minute\n"},"postman":{"name":"Create a new user","description":{"content":"If no users have been created yet, no API key is required. Otherwise, an API key must be included in the request header.\nKeep in mind that first user created will be the admin user.\n","type":"text/plain"},"url":{"path":["api","v1","user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-ztnet-auth","key":"key"},{"type":"any","value":"<API Key>","key":"value"},{"type":"any","value":"header","key":"in"}]}}}
api: {"description":"If no users have been created yet, no API key is required. Otherwise, an API key must be included in the request header.\nKeep in mind that first user created will be the admin user.\n","security":[{"x-ztnet-auth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","password","name"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string | null","description":"The date and time at which the user's account will expire. If null, the account will never expire.\nMust be in ISO 8601 format (e.g. 2023-10-28T00:00:00Z).\n\nNot applicable if the user is an admin (first user). Admin accounts never expire.\n"}}},"example":{"email":"test@example.com","password":"password123","name":"Test User","expiresAt":"2023-10-28T00:00:00Z"}}}},"responses":{"200":{"description":"User successfully created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string"}},"example":{"id":"12345","email":"test@example.com","name":"Test User","expiresAt":"2023-10-28T00:00:00Z"}}}}},"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"}}}}}}},"method":"post","path":"/api/v1/user","securitySchemes":{"x-ztnet-auth":{"type":"apiKey","required":true,"in":"header","name":"x-ztnet-auth","description":"API key can be generated from the ZTNet admin section."}},"jsonRequestBodyExample":{"email":"string","password":"string","name":"string"},"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":"Create a new user","description":{"content":"If no users have been created yet, no API key is required. Otherwise, an API key must be included in the request header.\nKeep in mind that first user created will be the admin user.\n","type":"text/plain"},"url":{"path":["api","v1","user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-ztnet-auth","key":"key"},{"type":"any","value":"<API Key>","key":"value"},{"type":"any","value":"header","key":"in"}]}}}
sidebar_class_name: "post api-method"
info_path: Rest Api/ztnet-web-api
custom_edit_url: null
Expand Down
4 changes: 2 additions & 2 deletions docs/ztnet/docs/Rest Api/ztnet-web-api.info.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: ztnet-web-api
title: "ZTNet Web API"
description: "Public API for ZTNet application."
description: "Public API for ZTNet. Available from ztnet version 0.4.0 onwards."
sidebar_label: Introduction
sidebar_position: 0
hide_title: true
Expand All @@ -19,7 +19,7 @@ import Export from "@theme/ApiDemoPanel/Export";



Public API for ZTNet application.
Public API for ZTNet. Available from ztnet version 0.4.0 onwards.

This API is rate-limited to 10 requests per minute

Expand Down

0 comments on commit 090ce8f

Please sign in to comment.