Harness API Operations
БесплатноБез исполняемых скриптовНе проверенComprehensive guide for Harness Platform API authentication, rate limiting, error handling, and endpoint operations
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Harness API Operations Skill
When to Use This Skill
Use this skill when you need to:
- Authenticate with Harness APIs using API keys or service account tokens
- Handle API rate limits and implement exponential backoff strategies
- Process API errors with proper retry logic and graceful degradation
- Interact with Harness endpoints for pipelines, templates, services, environments
- Implement API clients with best practices for production systems
- Debug API integration issues and understand error responses
- Build automation around Harness Platform APIs
Perfect for:
- Building CI/CD automation with Harness
- Creating infrastructure templates programmatically
- Implementing GitOps workflows
- Building custom Harness integrations
- Automating pipeline and service management
- Creating monitoring and reporting tools
- Troubleshooting API connectivity issues
Core Capabilities
1. API Authentication Methods
Master three authentication approaches:
- API Key Authentication: Header-based authentication using
x-api-key - Service Account Tokens: OAuth 2.0 bearer tokens for service accounts
- Personal Access Tokens: User-scoped tokens for personal automation
- Environment Variables: Secure credential storage patterns
- Token Rotation: Implementing credential refresh strategies
- Multi-Account Management: Handling multiple Harness accounts
2. Rate Limit Management
Implement robust rate limit handling:
- Read Operations: 1000 requests per minute
- Write Operations: 300 requests per minute
- Exponential Backoff: Progressive retry delays with jitter
- Rate Limit Headers: Parsing
X-RateLimit-*headers - Request Queuing: Managing request bursts
- Concurrent Request Limits: Throttling parallel operations
3. Error Handling Strategies
Comprehensive error management:
- HTTP Status Codes: Understanding 4xx and 5xx responses
- Retry Logic: Implementing smart retry with circuit breakers
- Error Correlation: Using correlation IDs for debugging
- Graceful Degradation: Fallback strategies for partial failures
- Error Logging: Structured error logging for observability
- Timeout Management: Request and connection timeout strategies
4. Harness API Endpoints
Complete endpoint reference:
- Pipeline API: Create, update, execute, and monitor pipelines
- Template API: Manage pipeline and step templates
- Service API: CRUD operations for services
- Environment API: Environment and infrastructure management
- IaCM API: Infrastructure as Code Management workspace operations
- Connector API: Managing cloud provider and tool connectors
- Secrets API: Secret management operations
- Project API: Project and organization management
5. Request/Response Patterns
API communication patterns:
- YAML Body Formatting: Proper YAML serialization for Harness objects
- Pagination Handling: Managing large result sets
- Filtering and Sorting: Query parameter patterns
- Bulk Operations: Batch processing strategies
- Webhook Integration: Event-driven patterns
- Streaming Responses: Handling long-running operations
Authentication Patterns
Authentication Matrix
| Method | Use Case | Header Format | Scope | Rotation |
|---|---|---|---|---|
| API Key | Service automation | x-api-key: {key} |
Account/Org/Project | Manual |
| Service Account Token | CI/CD integration | Authorization: Bearer {token} |
Configurable RBAC | Automatic |
| Personal Access Token | User automation | x-api-key: {token} |
User permissions | Manual |
| OAuth 2.0 Client | Third-party apps | Authorization: Bearer {token} |
Delegated | Automatic |
Authentication Code Examples
Example 1: API Key Authentication (Python)
import requests
import os
from typing import Optional, Dict, Any
class HarnessClient:
"""Harness API client with API key authentication."""
def __init__(
self,
account_id: str,
api_key: Optional[str] = None,
base_url: str = "https://app.harness.io"
):
"""
Initialize Harness API client.
Args:
account_id: Harness account identifier
api_key: API key (defaults to HARNESS_API_KEY env var)
base_url: Harness API base URL
"""
self.account_id = account_id
self.api_key = api_key or os.getenv("HARNESS_API_KEY")
self.base_url = base_url
if not self.api_key:
raise ValueError("API key must be provided or set in HARNESS_API_KEY")
def _get_headers(self) -> Dict[str, str]:
"""Generate request headers with authentication."""
return {
"x-api-key": self.api_key,
"Content-Type": "application/yaml",
"Accept": "application/json"
}
def _make_request(
self,
method: str,
endp
Установить Harness API Operations в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Harness API Operations?
Comprehensive guide for Harness Platform API authentication, rate limiting, error handling, and endpoint operations
Как установить скилл Harness API Operations?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Harness API Operations запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic