mralston/haloapi
Composer 安装命令:
composer require mralston/haloapi
包简介
Fork of derricksmith/haloapi. HaloApi is a PHP Wrapper for the HaloITSM API. This class supports all endpoints and methods available in the API.
README 文档
README
HaloAPI
HaloApi is a PHP Wrapper for the HaloITSM API. This class supports all endpoints and methods available in the API.
About The Project
HaloITSM is a powerful ITIL aligned IT Service Management tool. The REST API provides access to various information in the system. This wrapper was created to make calling the HaloITSM API easier and faster.
Getting Started
Prerequisites
The following PHP extensions are required:
- curl
- json
Usage
Install with Composer
composer require mralston/haloapi
Vanilla PHP
Instantiate the class with the following parameters. See the HaloITSM API documentation for more information.
client_id client_secret grant_type scope host verifypeer
$halo = new HaloApi([
'client_id' => '<your client id>',
'client_secret' => '<your client secret>',
'grant_type' => '<your grant type>',
'scope' => '<your scope>',
'host' => '<your Halo ITSM base URL>',
'verifypeer' => true
]);
Then call an endpoint method in the class.
$tickets = $halo->getTickets([
'pageinate' => true,
'page_size' => 50,
'page_no' => 1,
'columns_id' => 1,
'includecolumns' => false,
'ticketlinktype' => null,
'searchactions' => null,
'order' => 'id',
]);
// Returns array with response headers and data
[
"status": 200,
"header": ""
HTTP/2 200
date: Thu, 01 Jan 1970 00:00:00 GMT
content-type: application/json; charset=utf-8
content-length: 56
cache-control: no-cache, no-store, must-revalidate
server:
request-context: appId=cid-v1:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
strict-transport-security: max-age=31536000; IncludeSubDomains; preload
referrer-policy: same-origin
permissions-policy: camera=(self),geolocation=(self)
"",
"data": {
"record_count": 0,
"tickets": [],
"include_children": false,
},
]
Laravel
The package contains an optional Laravel-specific service provider, config file & facade.
Once the package is installed, add the following variables to your .env file:
HALO_CLIENT_ID= HALO_CLIENT_SECRET= HALO_HOST=https://your-subdomain.haloitsm.com
Optionally, you can publish the config file:
php artisan vendor:publish --tag="halo-config"
You may then use the facade to interact with Halo:
use DerrickSmith\HaloApi\Facades\HaloApi; $tickets = HaloApi::getTickets([ 'pageinate' => true, 'page_size' => 50, 'page_no' => 1, 'columns_id' => 1, 'includecolumns' => false, 'ticketlinktype' => null, 'searchactions' => null, 'order' => 'id', ]); // Returns data object { "record_count": 0, "tickets": [], "include_children": false, }
Roadmap
-
Testing all api endpoints
-
Better error handling
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
-
Fork the Project
-
Create your Feature Branch (
git checkout -b feature/AmazingFeature) -
Commit your Changes (
git commit -m 'Add some AmazingFeature') -
Push to the Branch (
git push origin feature/AmazingFeature) -
Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Derrick Smith - @derrick_a_smith - derricksmith01@msn.com
Project Link: https://github.com/derricksmith/HaloApi
Acknowledgments
mralston/haloapi 适用场景与选型建议
mralston/haloapi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mralston/haloapi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mralston/haloapi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-15