With the /sites endpoint user can manage sites from the database.
GET
/api/sites/List
Get a list of all sites
Request Example
/api/sites/List
RESPONSE EXAMPLE
[
{
"Id": "string"
"SiteName": "string",
"LogoName": "string",
"Filename": "string"
},
{...}
]
GET
/api/sites/Get
Get a Site
Request Example
/api/sites/Get?id=SiteId&name=SiteName
Use id parameter to get Site by id or
Use name parameter to get Site by name
RESPONSE EXAMPLE
If found, a Site is returned with status code 200. Otherwise an error with code and message is returned with status code 404
{
"Id": "string"
"SiteName": "string",
"LogoName": "string",
"Filename": "string"
}
POST
/api/sites/Create
Create a Site
Model Request Example
Request Content will be of type multipart/form-data with following keys
file - (Required) The logo file
SiteName - Name to use for the Site
LogoName - Name to use for the Logo
Response Example
If the operation is successful a Site will be returned with status code 201
Otherwise an error with code and message will be returned with status code 409
PUT
/api/sites/Update
Update a Site
Request Example
/api/sites/Update?id=SiteId&name=SiteName
Use id parameter to identify the Site to update by id or
Use name parameter to identify the Site to update by name
Model Request Example
Request Content will be of type multipart/form-data with following keys
file - (Required) The logo file
SiteName - Name to use for the Site
LogoName - Name to use for the Logo
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409
DELETE
/api/sites/Delete
Delete a Site
Request Example
/api/sites/Delete?id=SiteId&name=SiteName
Use id parameter to identify the Site to update by id or
Use name parameter to identify the Site to delete by name
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409