uvdesk/api-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

uvdesk/api-bundle

Composer 安装命令:

composer require uvdesk/api-bundle

包简介

Easily integrate with your community helpdesk system using the uvdesk api bundle.

README 文档

README

The API Bundle empowers integration developers to seamlessly interact with the UVDesk Community Helpdesk system using its robust RESTful API. It provides a comprehensive set of endpoints that allow external applications to perform key operations—such as creating, updating, and retrieving tickets, managing customers and agents and smooth integration with third-party platforms and custom systems.

Installation

This bundle can be easily integrated into any symfony application (though it is recommended that you're using Symfony 4 as things have changed drastically with the newer Symfony versions). Before continuing, make sure that you're using PHP 8.1 or higher and have Composer installed.

To require the api bundle into your symfony project, simply run the following from your project root:

$ composer require uvdesk/api-bundle

After installing api bundle run the below command:

$ php bin/console doctrine:schema:update --force

Finally clear your project cache by below command(write prod if running in production environment i.e --env prod):

$ php bin/console cache:clear --env dev

API References

Use the below available apis to interact with your helpdesk system.

Session:

  • POST /api/v1/session/login

    Authenticate user credentials and generate an access token in response to access helpdesk apis as the authenticated user.

    Headers:

    {
        "Authorization": "Bearer AUTH_TOKEN"
    }
    

    To generate the required auth token, simply encode the user's email and password separated by a colon in base64 format, i.e. base64_encode("email:password").

    Sample Response:

    {
        "success": true,
        "accessToken": "VBGLASXENR..."
    }
    
  • POST /api/v1/session/logout

    Invalidates an authenticated user access token so that it can't be used anymore.

    Headers:

    {
        "Authorization": "Bearer ACCESS_TOKEN"
    }
    

    ACCESS_TOKEN: The api access token that was generated either using the session login api or directly from the dashboard.

    Sample Response:

    {
        "status": true,
        "message": "Session token has been expired successfully."
    }
    

Tickets:

More examples of ticket related apis can be found over here.

  • GET /tickets

    Get a collection of all user accessible tickets.

    Headers:

    {
        "Authorization": "Bearer ACCESS_TOKEN"
    }
    

    ACCESS_TOKEN: The api access token that was generated either using the session login api or directly from the dashboard.

    Sample Response:

    {
        "tickets": [
            {
                "id": 1,
                "subject": "Support Request ...",
                "isCustomerView": false,
                "status": {
                    "id": 1,
                    "code": "open",
                    "description": "Open",
                    "colorCode": "#0056fc",
                    "sortOrder": 1
                },
                "group": null,
                "type": {
                    "id": 1,
                    "code": "support",
                    "description": "Support",
                    "isActive": true
                },
                "priority": {
                    "id": 1,
                    "code": "low",
                    "description": "Low",
                    "colorCode": "#2DD051"
                },
                "formatedCreatedAt": "16-05-2023 12:55pm",
                "totalThreads": "0",
                "agent": {
                    "id": 1,
                    "email": "agent@example.com",
                    "name": "Sample Agent",
                    "firstName": "Sample",
                    "lastName": "Agent",
                    "isEnabled": true,
                    "profileImagePath": null,
                    "smallThumbnail": null,
                    "isActive": true,
                    "isVerified": true,
                    "designation": null,
                    "contactNumber": null,
                    "signature": null,
                    "ticketAccessLevel": null
                },
                "customer": {
                    "id": 2,
                    "email": "customer@example.com",
                    "name": "Sample Customer",
                    "firstName": "Sample",
                    "lastName": "Customer",
                    "contactNumber": null,
                    "profileImagePath": null,
                    "smallThumbnail": null
                }
            }
        ],
        "pagination": {
            "last": 1,
            "current": 1,
            "numItemsPerPage": 15,
            "first": 1,
            "pageCount": 1,
            "totalCount": 1,
            "pageRange": 1,
            "startPage": 1,
            "endPage": 1,
            "pagesInRange": [
                1
            ],
            "firstPageInRange": 1,
            "lastPageInRange": 1,
            "currentItemCount": 1,
            "firstItemNumber": 1,
            "lastItemNumber": 1,
            "url": "#page/replacePage"
        },
        "userDetails": {
            "user": 1,
            "name": "Sample Agent"
        },
        "agents": [
            {
                "id": 1,
                "udId": 1,
                "email": "agent@example.com",
                "name": "Sample Agent",
                "smallThumbnail": null
            }
        ],
        "status": [
            {
                "id": 1,
                "code": "open",
                "description": "Open",
                "colorCode": "#0056fc",
                "sortOrder": 1
            },
            {
                "id": 2,
                "code": "pending",
                "description": "Pending",
                "colorCode": "#FF6A6B",
                "sortOrder": 2
            },
            {
                "id": 3,
                "code": "answered",
                "description": "Answered",
                "colorCode": "#FFDE00",
                "sortOrder": 3
            },
            {
                "id": 4,
                "code": "resolved",
                "description": "Resolved",
                "colorCode": "#2CD651",
                "sortOrder": 4
            },
            {
                "id": 5,
                "code": "closed",
                "description": "Closed",
                "colorCode": "#767676",
                "sortOrder": 5
            },
            {
                "id": 6,
                "code": "spam",
                "description": "Spam",
                "colorCode": "#00A1F2",
                "sortOrder": 6
            }
        ],
        "group": [
            {
                "id": 1,
                "name": "Default"
            }
        ],
        "team": [],
        "priority": [
            {
                "id": 1,
                "code": "low",
                "description": "Low",
                "colorCode": "#2DD051"
            },
            {
                "id": 2,
                "code": "medium",
                "description": "Medium",
                "colorCode": "#F5D02A"
            },
            {
                "id": 3,
                "code": "high",
                "description": "High",
                "colorCode": "#FA8B3C"
            },
            {
                "id": 4,
                "code": "urgent",
                "description": "Urgent",
                "colorCode": "#FF6565"
            }
        ],
        "type": [
            {
                "id": 1,
                "name": "support"
            }
        ],
        "source": {
            "email": "Email",
            "website": "Website"
        }
    }
    

License

The API Bundle and libraries included within the bundle are released under released under the OSL-3.0 license

uvdesk/api-bundle 适用场景与选型建议

uvdesk/api-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.14k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2019 年 11 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 uvdesk/api-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 uvdesk/api-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 uvdesk/api-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 21.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 16
  • Watchers: 8
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-21