api-client

Execute authenticated REST API requests against MikoPBX inside Docker containers.

569|85|Updated Jun 7, 2019
One-click install
npx skills add https://github.com/mikopbx/Core --skill api-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-client
Source: https://github.com/mikopbx/Core/tree/main/.claude/skills/api-client
Command: npx skills add https://github.com/mikopbx/Core --skill api-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docker, curl, python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Universal REST API client for MikoPBX with automatic authentication and container execution. It eliminates manual token handling and curl command construction, letting you focus on API behavior and data.

Core Features & Use Cases

  • ✅ Automatic JWT authentication
  • ✅ Container auto-detection (mikopbx-php83/mikopbx_php74)
  • ✅ All HTTP methods (GET, POST, PATCH, DELETE, PUT)
  • ✅ JSON pretty-printing
  • ✅ Form data and JSON payload support
  • ✅ Query parameter handling
  • ✅ Error messages and debugging

Quick Start

From the project root, run commands like:

  • List extensions: .//.claude/skills/api-client/scripts/api-request.sh GET extensions
  • Create an extension: .//.claude/skills/api-client/scripts/api-request.sh POST extensions --data "number=202&username=test_user"

Frequently Asked Questions about api-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate REST API testing with automatic authentication?

Automate REST API testing by running authenticated HTTP requests through the api-client, which handles JWT token generation automatically via auth-token-manager. Execute GET, POST, PATCH, PUT, or DELETE requests against MikoPBX endpoints without manual token management.

Can I test MikoPBX API endpoints without manually constructing curl commands?

Yes. The api-client eliminates manual curl construction and token handling by wrapping authenticated requests in Docker containers. Run simple commands like `.//.claude/skills/api-client/scripts/api-request.sh GET extensions` to query or modify resources directly.

What HTTP methods and payload types does the API client support?

The api-client supports all HTTP methods—GET, POST, PATCH, PUT, DELETE—with handling for JSON payloads, form data, and query parameters. Responses are automatically pretty-printed with configurable line limits for easier debugging.

Does the API client work with different MikoPBX container versions?

Yes. The api-client auto-detects MikoPBX containers (mikopbx-php83, mikopbx_php74) and executes requests inside the running container. This ensures API calls operate in the correct environment without manual container selection.

Can I use the API client to perform CRUD operations on extensions, providers, and routes?

Yes. The api-client supports full CRUD operations across MikoPBX resources including extensions, providers, CDR, routes, IVR menus, and call queues. Automatic authentication and error handling enable reliable data validation and manipulation workflows.

What dependencies do I need to run the API client?

The api-client requires Docker, curl, and Python3. These dependencies enable container detection, HTTP request execution, and authentication token management for automated API interactions.