218 lines
4.9 KiB
JSON
218 lines
4.9 KiB
JSON
{
|
|
"Title": "Applications",
|
|
"Interface": "Application",
|
|
"Struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types"
|
|
]
|
|
}
|
|
],
|
|
"Parameters": null,
|
|
"Protocol": "",
|
|
"Authentication": [],
|
|
"Path": "/application",
|
|
"APIs": [
|
|
{
|
|
"Name": "list",
|
|
"Method": "GET",
|
|
"Title": "List applications",
|
|
"Path": "/",
|
|
"Parameters": {
|
|
"get": [
|
|
{
|
|
"name": "name",
|
|
"required": false,
|
|
"title": "Application name",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Filter applications",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "deleted",
|
|
"required": false,
|
|
"title": "Exclude (0, default), include (1) or return only (2) deleted roles",
|
|
"type": "uint"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"title": "Limit",
|
|
"type": "uint"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"title": "Offset",
|
|
"type": "uint"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"title": "Page number (1-based)",
|
|
"type": "uint"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"title": "Returned items per page (default 50)",
|
|
"type": "uint"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"title": "Sort items",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "create",
|
|
"Method": "POST",
|
|
"Title": "Create application",
|
|
"Path": "/",
|
|
"Parameters": {
|
|
"post": [
|
|
{
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Application name",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "unify",
|
|
"required": false,
|
|
"title": "Unify properties",
|
|
"type": "sqlxTypes.JSONText"
|
|
},
|
|
{
|
|
"name": "config",
|
|
"required": false,
|
|
"title": "Arbitrary JSON holding application configuration",
|
|
"type": "sqlxTypes.JSONText"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "update",
|
|
"Method": "PUT",
|
|
"Title": "Update user details",
|
|
"Path": "/{applicationID}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "applicationID",
|
|
"required": true,
|
|
"title": "Application ID",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Email",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled",
|
|
"type": "bool"
|
|
},
|
|
{
|
|
"name": "unify",
|
|
"required": false,
|
|
"title": "Unify properties",
|
|
"type": "sqlxTypes.JSONText"
|
|
},
|
|
{
|
|
"name": "config",
|
|
"required": false,
|
|
"title": "Arbitrary JSON holding application configuration",
|
|
"type": "sqlxTypes.JSONText"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "read",
|
|
"Method": "GET",
|
|
"Title": "Read application details",
|
|
"Path": "/{applicationID}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "applicationID",
|
|
"required": true,
|
|
"title": "Application ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "delete",
|
|
"Method": "DELETE",
|
|
"Title": "Remove application",
|
|
"Path": "/{applicationID}",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "applicationID",
|
|
"required": true,
|
|
"title": "Application ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "undelete",
|
|
"Method": "POST",
|
|
"Title": "Undelete application",
|
|
"Path": "/{applicationID}/undelete",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "applicationID",
|
|
"required": true,
|
|
"title": "Application ID",
|
|
"type": "uint64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "triggerScript",
|
|
"Method": "POST",
|
|
"Title": "Fire system:application trigger",
|
|
"Path": "/{applicationID}/trigger",
|
|
"Parameters": {
|
|
"path": [
|
|
{
|
|
"name": "applicationID",
|
|
"required": true,
|
|
"title": "ID",
|
|
"type": "uint64"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "script",
|
|
"required": true,
|
|
"title": "Script to execute",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |