VATUSA APIv2 Documentation. Authentication methods are:
- JSON Web Tokens (Translated from Laravel session)
- Session Cookies (Client-side credentials with ULS)
- API Keys (Issued to facilities)
Method security, if applicable, is indicated in brackets at the end of each endpoint title.
Security classification:
- Private: CORS Restricted (Internal)
- Auth: Accepts Session Cookie or JWT
- Key: Accepts API Key, Session Cookie, or JWT
Facilities that have a APIv2 JWK defined in facility settings will have the data encapsulated in a signed package. For more information, please see the IT section of the VATUSA forums.
To prevent database changes in a development environment, you can either use your API sandbox key or pass the ?test query parameter with the call. Whether or not ?test is present, if both Sandbox JWK and Dev URL are configured, and the domains match, the response will be formatted according to JSON Web Signature, RFC 7515.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 2.3
- Package version: 2.3
- Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit https://www.vatusa.net
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zseartcc/vatusa-php-client.git"
}
],
"require": {
"zseartcc/vatusa-php-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/php-client/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: jwt
$config = VATUSA\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
// Configure HTTP basic authorization: session
$config = VATUSA\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new VATUSA\Client\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->authInfoGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->authInfoGet: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.vatusa.net/v2
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | authInfoGet | GET /auth/info | Get information about logged in user. [Private] |
AuthApi | authTokenGet | GET /auth/token | Get JWT. [Private] |
AuthApi | authTokenRefreshGet | GET /auth/token/refresh | Refresh JWT. [Private] |
CbtApi | cbtBlockIdChapterIdDelete | DELETE /cbt/{blockId}/{chapterId} | Delete chapter. [Auth] |
CbtApi | cbtBlockIdChapterIdPut | PUT /cbt/{blockId}/{chapterId} | Edit chapter. [Auth] |
CbtApi | cbtBlockIdGet | GET /cbt/{blockId} | Get chapters in block. |
CbtApi | cbtBlockIdPost | POST /cbt/{blockId} | Create new chapter. [Auth] |
CbtApi | cbtGet | GET /cbt | Get blocks filtered by facility. |
CbtApi | cbtIdDelete | DELETE /cbt/{id} | Delete block. [Auth] |
CbtApi | cbtIdPut | PUT /cbt/{id} | Edit block. [Auth] |
CbtApi | cbtPost | POST /cbt | Create new block. [Auth] |
CbtApi | userCidCbtHistoryGet | GET /user/{cid}/cbt/history | Get user's CBT history. [Key] |
CbtApi | userCidCbtProgressBlockIdChapterIdPut | PUT /user/{cid}/cbt/progress/{blockId}/{chapterId} | Update user's CBT progress. [Key] |
CbtApi | userCidCbtProgressBlockIdGet | GET /user/{cid}/cbt/progress/{blockId} | Get user's CBT history for block ID. [Key] |
EmailApi | emailAddressGet | GET /email/{address} | Get info of VATUSA email address. [Private] |
EmailApi | emailGet | GET /email | Get info of VATUSA email address assigned for user. [Private] |
EmailApi | emailHostedFacilityUsernameDelete | DELETE /email/hosted/{facility}/{username} | Delete VATUSA hosted email account. [Private] |
EmailApi | emailHostedFacilityUsernamePut | PUT /email/hosted/{facility}/{username} | Modify VATUSA hosted email account. [Private] |
EmailApi | emailHostedGet | GET /email/hosted | Get VATUSA hosted email accounts. [Private] |
EmailApi | emailPut | PUT /email | Modify email account. [Private] |
EmailApi | facilityIdEmailTemplateNameGet | GET /facility/{id}/email/{templateName} | Get facility's email template. [Key] |
EmailApi | facilityIdEmailTemplateNamePost | POST /facility/{id}/email/{templateName} | Modify facility's email template. [Auth] |
ExamApi | examIdAssignCidDelete | DELETE /exam/{id}/assign/{cid} | Delete exam assignment. [Auth] |
ExamApi | examIdAssignCidPost | POST /exam/{id}/assign/{cid} | Assign exam. [Auth] |
ExamApi | examQueueExamIdPost | POST /exam/queue/{examId} | Add exam to queue for the VATUSA Exam Center. [Private] |
ExamApi | examRequestGet | GET /exam/request | Generates and sends exam payload for VATUSA Exam Center based on queued exam for JWT auth'd user. [Private] |
ExamApi | examSubmitPost | POST /exam/submit | Submit exam payload for grading. [Private] |
ExamApi | examsExamidGet | GET /exams/{examid} | Get exam details |
ExamApi | examsExamidPost | POST /exams/{examid} | Create new question. [Private] |
ExamApi | examsExamidPut | PUT /exams/{examid} | Edit details of exam. [Private] |
ExamApi | examsExamidQuestionIDPut | PUT /exams/{examid}/{questionID} | Edit question. [Private] |
ExamApi | examsExamidQuestionsGet | GET /exams/{examid}/questions | Generate list of questions. [Auth] |
ExamApi | examsFacilityGet | GET /exams/{facility} | Get list of exams |
ExamApi | userCidExamHistoryGet | GET /user/{cid}/exam/history | Get user's exam history. [Key] |
FacilityApi | facilityFacilityTrainingRecordsGet | GET /facility/{facility}/training/records | Get facility's training records. [Key] |
FacilityApi | facilityGet | GET /facility | Get list of VATUSA facilities. |
FacilityApi | facilityIdEmailTemplateNameGet | GET /facility/{id}/email/{templateName} | Get facility's email template. [Key] |
FacilityApi | facilityIdEmailTemplateNamePost | POST /facility/{id}/email/{templateName} | Modify facility's email template. [Auth] |
FacilityApi | facilityIdGet | GET /facility/{id} | Get facility information. |
FacilityApi | facilityIdPut | PUT /facility/{id} | Update facility information. [Auth] |
FacilityApi | facilityIdRosterCidDelete | DELETE /facility/{id}/roster/{cid} | Delete member from facility roster. [Auth] |
FacilityApi | facilityIdRosterManageVisitorCidDelete | DELETE /facility/{id}/roster/manageVisitor/{cid} | Delete member from visiting roster. [Key] |
FacilityApi | facilityIdRosterManageVisitorCidPost | POST /facility/{id}/roster/manageVisitor/{cid} | Add member to visiting roster. [Key] |
FacilityApi | facilityIdRosterMembershipGet | GET /facility/{id}/roster/{membership} | Get facility roster. |
FacilityApi | facilityIdTransfersGet | GET /facility/{id}/transfers | Get pending transfers. [Key] |
FacilityApi | facilityIdTransfersTransferIdPut | PUT /facility/{id}/transfers/{transferId} | Modify transfer request. [Auth] |
FacilityApi | facilityIdUlsReturnsGet | GET /facility/{id}/ulsReturns | Get ULS return paths. [Key] |
FacilityApi | facilityIdUlsReturnsOrderDelete | DELETE /facility/{id}/ulsReturns/{order} | Remove ULS return path. [Key] |
FacilityApi | facilityIdUlsReturnsPost | POST /facility/{id}/ulsReturns | Add ULS return path. [Key] |
FacilityApi | facilityIdUlsReturnsPut | PUT /facility/{id}/ulsReturns | Edit ULS return path. [Key] |
RatingApi | userCidRatingHistoryGet | GET /user/{cid}/rating/history | Get user's rating history. [Key] |
RatingApi | userCidRatingPost | POST /user/{cid}/rating | Submit rating change. [Auth] |
RoleApi | userCidRolesFacilityRoleDelete | DELETE /user/{cid}/roles/{facility}/{role} | Delete role. [Auth] |
RoleApi | userCidRolesFacilityRolePost | POST /user/{cid}/roles/{facility}/{role} | Assign new role. [Auth] |
RoleApi | userRolesFacilityRoleGet | GET /user/roles/{facility}/{role} | Get users assigned to specific staff role. |
SoloApi | soloDelete | DELETE /solo | Delete solo certification. [Key] |
SoloApi | soloGet | GET /solo | Get list of active solo certifications. |
SoloApi | soloPost | POST /solo | Submit new solo certification. [Key] |
StatsApi | statsExamsFacilityGet | GET /stats/exams/{facility} | Get statistics of exam results. [Key] |
SupportApi | supportKbCategoryidQuestionidDelete | DELETE /support/kb/{categoryid}/{questionid} | Delete knowledgebase question. [Auth] |
SupportApi | supportKbCategoryidQuestionidPut | PUT /support/kb/{categoryid}/{questionid} | Modify knowledgebase question. [Auth] |
SupportApi | supportKbGet | GET /support/kb | Get knowledgebase list. |
SupportApi | supportKbIdDelete | DELETE /support/kb/{id} | Delete knowledgebase category. [Auth] |
SupportApi | supportKbIdPost | POST /support/kb/{id} | Create knowledgebase question. [Auth] |
SupportApi | supportKbIdPut | PUT /support/kb/{id} | Modify knowledgebase category. [Auth] |
SupportApi | supportKbPost | POST /support/kb | Create knowledgebase category. [Auth] |
SupportApi | supportTicketsDeptsDeptStaffGet | GET /support/tickets/depts/{dept}/staff | Get list of assignable staff members for department. |
SupportApi | supportTicketsDeptsGet | GET /support/tickets/depts | Get list of assignable departments. |
SurveyApi | surveyIdAssignCidPost | POST /survey/{id}/assign/{cid} | Assign a survey to cid. [Private] |
SurveyApi | surveyIdGet | GET /survey/{id} | Get survey questions. [Private] |
SurveyApi | surveyIdPost | POST /survey/{id} | Submit survey. [Private] |
TmuApi | tmuNoticeIdDelete | DELETE /tmu/notice/{id} | Delete TMU Notice. [Key] |
TmuApi | tmuNoticeIdGet | GET /tmu/notice/{id} | Get TMU Notice info. |
TmuApi | tmuNoticeIdPut | PUT /tmu/notice/{id} | Edit TMU Notice. [Key] |
TmuApi | tmuNoticesGet | GET /tmu/notices | Get list of TMU Notices. |
TmuApi | tmuNoticesPost | POST /tmu/notices | Add new TMU Notice. [Key] |
TrainingApi | facilityFacilityTrainingRecordsGet | GET /facility/{facility}/training/records | Get facility's training records. [Key] |
TrainingApi | trainingEvalsGet | GET /training/evals | Get all OTS evaluations. [Private] |
TrainingApi | trainingOtsEvalRecordIDGet | GET /training/otsEval/{recordID} | Get OTS Eval content. [Private] |
TrainingApi | trainingRecordRecordIDDelete | DELETE /training/record/{recordID} | Delete training record. [Key] |
TrainingApi | trainingRecordRecordIDGet | GET /training/record/{recordID} | Get training record. [Key] |
TrainingApi | trainingRecordRecordIDOtsEvalGet | GET /training/record/{recordID}/otsEval | Get attached OTS eval. [Private] |
TrainingApi | trainingRecordRecordIDPut | PUT /training/record/{recordID} | Edit training record. [Key] |
TrainingApi | trainingRecordsGet | GET /training/records | Get all training records. [Private] |
TrainingApi | userCidTrainingOtsEvalPost | POST /user/{cid}/training/otsEval | Post new OTS Eval for a user. [Private] |
TrainingApi | userCidTrainingOtsEvalsGet | GET /user/{cid}/training/otsEvals | Get user's OTS evaluations. [Private] |
TrainingApi | userCidTrainingRecordPost | POST /user/{cid}/training/record | Submit new training record. [Key] |
TrainingApi | userCidTrainingRecordsGet | GET /user/{cid}/training/records | Get user's training records. [Key] |
TransferApi | userCidTransferChecklistGet | GET /user/{cid}/transfer/checklist | Get user's transfer checklist. [Key] |
TransferApi | userCidTransferHistoryGet | GET /user/{cid}/transfer/history | Get user's transfer history. [Key] |
TransferApi | userCidTransferPost | POST /user/{cid}/transfer | Submit transfer request. [Private] |
UserApi | examIdAssignCidDelete | DELETE /exam/{id}/assign/{cid} | Delete exam assignment. [Auth] |
UserApi | examIdAssignCidPost | POST /exam/{id}/assign/{cid} | Assign exam. [Auth] |
UserApi | userCidCbtHistoryGet | GET /user/{cid}/cbt/history | Get user's CBT history. [Key] |
UserApi | userCidCbtProgressBlockIdChapterIdPut | PUT /user/{cid}/cbt/progress/{blockId}/{chapterId} | Update user's CBT progress. [Key] |
UserApi | userCidCbtProgressBlockIdGet | GET /user/{cid}/cbt/progress/{blockId} | Get user's CBT history for block ID. [Key] |
UserApi | userCidExamHistoryGet | GET /user/{cid}/exam/history | Get user's exam history. [Key] |
UserApi | userCidGet | GET /user/{cid} | Get user's information. |
UserApi | userCidLogGet | GET /user/{cid}/log | Get controller's action log. [Private] |
UserApi | userCidLogPost | POST /user/{cid}/log | Submit entry to controller's action log. [Private] |
UserApi | userCidRatingHistoryGet | GET /user/{cid}/rating/history | Get user's rating history. [Key] |
UserApi | userCidRatingPost | POST /user/{cid}/rating | Submit rating change. [Auth] |
UserApi | userCidRolesFacilityRoleDelete | DELETE /user/{cid}/roles/{facility}/{role} | Delete role. [Auth] |
UserApi | userCidRolesFacilityRolePost | POST /user/{cid}/roles/{facility}/{role} | Assign new role. [Auth] |
UserApi | userCidTrainingOtsEvalPost | POST /user/{cid}/training/otsEval | Post new OTS Eval for a user. [Private] |
UserApi | userCidTrainingOtsEvalsGet | GET /user/{cid}/training/otsEvals | Get user's OTS evaluations. [Private] |
UserApi | userCidTrainingRecordsGet | GET /user/{cid}/training/records | Get user's training records. [Key] |
UserApi | userCidTransferChecklistGet | GET /user/{cid}/transfer/checklist | Get user's transfer checklist. [Key] |
UserApi | userCidTransferHistoryGet | GET /user/{cid}/transfer/history | Get user's transfer history. [Key] |
UserApi | userCidTransferPost | POST /user/{cid}/transfer | Submit transfer request. [Private] |
UserApi | userRolesFacilityRoleGet | GET /user/roles/{facility}/{role} | Get users assigned to specific staff role. |
- Action
- Bucket
- DeleteMemberRequest
- DeleteSoloRequest
- DeleteVisitingMemberRequest
- EmailAccounts
- EmailTemplate
- Error
- Exam
- ExamQuestions
- ExamResults
- Facility
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20012FromFac
- InlineResponse20012Transfers
- InlineResponse20013
- InlineResponse20013Paths
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse20017
- InlineResponse20018
- InlineResponse20018Depts
- InlineResponse20019
- InlineResponse20019Staff
- InlineResponse2002
- InlineResponse20020
- InlineResponse20021
- InlineResponse20022
- InlineResponse20023
- InlineResponse20024
- InlineResponse20025
- InlineResponse20026
- InlineResponse20027
- InlineResponse20028
- InlineResponse20029
- InlineResponse2002Chapters
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2008Stats
- InlineResponse2009
- KnowledgebaseCategories
- KnowledgebaseQuestions
- NewSoloRequest
- OK
- OKID
- Otseval
- Promotion
- Role
- Solo
- Survey
- SurveyAssignment
- SurveyQuestion
- TmunoticesTmuFacility
- TrainingBlock
- TrainingProgress
- TrainingRecord
- Transfer
- User
- UserRoles
- Type: API key
- API key parameter name: apikey
- Location: URL query string
- Type: HTTP basic authentication
- Type: HTTP basic authentication