opensupports/server/controllers/system/get-api-keys.php

38 lines
785 B
PHP
Raw Normal View History

<?php
use Respect\Validation\Validator as DataValidator;
2017-04-18 02:09:16 +02:00
/**
* @api {post} /system/get-api-keys Get APIKeys
* @apiVersion 4.1.0
2017-04-18 02:09:16 +02:00
*
* @apiName Get APIKeys
2017-04-18 02:09:16 +02:00
*
* @apiGroup System
2017-04-18 02:09:16 +02:00
*
* @apiDescription This path retrieves the all APIKeys.
2017-04-18 02:09:16 +02:00
*
* @apiPermission staff3
2017-04-18 02:09:16 +02:00
*
2017-04-21 08:09:24 +02:00
* @apiUse NO_PERMISSION
*
* @apiSuccess {[APIKey](#api-Data_Structures-ObjectApikey)[]} data Array of APIKeys
2017-04-18 02:09:16 +02:00
*
*/
class GetAPIKeysController extends Controller {
const PATH = '/get-api-keys';
const METHOD = 'POST';
public function validations() {
return [
'permission' => 'staff_3',
'requestData' => []
];
}
public function handler() {
$apiList = APIKey::getAll();
Response::respondSuccess($apiList->toArray());
}
}