You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.3 KiB
PHP
85 lines
2.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
$APIS = [
|
|
"ping" => [
|
|
"load" => "ping.php",
|
|
"vars" => [
|
|
]
|
|
],
|
|
"lookup" => [
|
|
"load" => "machine.php",
|
|
"vars" => [
|
|
"id" => "/^[0-9a-zA-Z]+$/"
|
|
]
|
|
],
|
|
"editmachine" => [
|
|
"load" => "machine.php",
|
|
"vars" => [
|
|
"id" => "/^[0-9a-zA-Z]+$/",
|
|
"type (optional)" => "numeric",
|
|
"model (optional)" => "string",
|
|
"clientid (optional)" => "string",
|
|
"os (optional)" => "string",
|
|
"serial (optional)" => "string",
|
|
"manufacturer (optional)" => "string",
|
|
"condition (optional)" => "numeric",
|
|
"price (optional)" => "numeric",
|
|
"privatenotes (optional)" => "string",
|
|
"publicnotes (optional)" => "string"
|
|
]
|
|
],
|
|
"addmachine" => [
|
|
"load" => "machine.php",
|
|
"vars" => [
|
|
"type (optional)" => "numeric",
|
|
"model (optional)" => "string",
|
|
"clientid (optional)" => "string",
|
|
"os (optional)" => "string",
|
|
"serial (optional)" => "string",
|
|
"manufacturer (optional)" => "string",
|
|
"condition (optional)" => "numeric",
|
|
"price (optional)" => "numeric",
|
|
"privatenotes (optional)" => "string",
|
|
"publicnotes (optional)" => "string"
|
|
]
|
|
],
|
|
"getclient" => [
|
|
"load" => "client.php",
|
|
"vars" => [
|
|
"clientid" => "string"
|
|
]
|
|
],
|
|
"getclients" => [
|
|
"load" => "client.php",
|
|
"vars" => [
|
|
]
|
|
],
|
|
"searchclients" => [
|
|
"load" => "client.php",
|
|
"vars" => [
|
|
"q" => "string"
|
|
]
|
|
],
|
|
"addevent" => [
|
|
"load" => "addevent.php",
|
|
"vars" => [
|
|
"id" => "/^[0-9a-zA-Z]+$/",
|
|
"date" => "string",
|
|
"event" => "string",
|
|
"publicnotes (optional)" => "string",
|
|
"privatenotes (optional)" => "string"
|
|
]
|
|
],
|
|
"geteventtypes" => [
|
|
"load" => "geteventtypes.php",
|
|
"vars" => [
|
|
]
|
|
]
|
|
];
|