addition of new dashboard
This commit is contained in:
108
backend/http/api/v1/swagger.json
Normal file
108
backend/http/api/v1/swagger.json
Normal file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "1",
|
||||
"title": "JLINC API",
|
||||
"description": "Version 1 API for the JLINC server."
|
||||
},
|
||||
"basePath": "/api/v1",
|
||||
"schemes": ["https"],
|
||||
"tags": [
|
||||
{
|
||||
"name": "Synchronization",
|
||||
"description": "Operations related to the synchronization"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/sync/update": {
|
||||
"post": {
|
||||
"tags": ["Synchronization"],
|
||||
"summary": "Update device settings",
|
||||
"description": "Updates the settings of a specified device.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"default": "application/json"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deviceName": {
|
||||
"type": "string",
|
||||
"description": "The name of the device."
|
||||
},
|
||||
"savedTs": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Timestamp when the settings were saved, in ISO 8601 format."
|
||||
},
|
||||
"settings": {
|
||||
"type": "string",
|
||||
"description": "String representing the device settings."
|
||||
}
|
||||
},
|
||||
"required": ["deviceName", "savedTs", "settings"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful update",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates if the update was successful",
|
||||
"example": true
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
"description": "The most up to date settings data",
|
||||
"example": "eyAic2V0dGluZ..."
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"description": "What action should be taken",
|
||||
"enum": ["created", "none", "existingNewer", "incomingNewer"],
|
||||
"example": "created"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Error in the request, such as invalid signature",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates if the update was successful",
|
||||
"example": false
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "Error message explaining what went wrong"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user