İçeriğe geç
ajan.io

Belgeler menüsü

Bu sayfada

Becerileri Listele

Çalışma alanınızdaki Becerileri Alın

Çalışma alanınızdaki Becerileri döndürür. Bilgiye göre sayfalandırmak, aramak veya filtrelemek için sorgu parametrelerini kullanın.

Temel URL

https://api.ajan.io/skills/v1

Özel dağıtımlar Tüm isteklerde api.ajan.com'yı /api/public ile değiştirin.

Gerekli Kapsamlar

Bu uç nokta SKILL_API kapsamını gerektirir.

Parametreler

ParametreTürGerekliAçıklama
limittamsayıHayırGeri döndürülecek Beceri sayısı. Varsayılan: 50. Maksimum: 250.
cursordizeHayırSayfalandırma için önceki yanıttaki imleç.
querydizeHayırEşleşen Beceriler için arama sorgusu.
slugdizeHayırBeceri bilgisine göre filtrele. Küçük harf, rakam ve kısa çizgi kullanılmalıdır.

Örnek

javascript
const axios = require("axios");

async function listSkills() {
  const response = await axios.get("https://api.ajan.io/skills/v1", {
    params: {
      limit: 25,
      query: "support"
    },
    headers: {
      Authorization: "Bearer YOUR_API_KEY"
    }
  });

  console.log("Skills:", response.data.skills);
  return response.data.nextCursor;
}

listSkills();

Yanıt Formatı

Başarılı Yanıt (200 Tamam)

typescript
{
  skills: Array<{
    id: string;
    name: string;
    slug: string;
    description: string;
    instructions: string;
    integrationIds: string[];
    createdAt: string;
    updatedAt: string;
  }>;
  nextCursor?: string;
}

Örnek Yanıt

json
{
  "skills": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Support Reply Style",
      "slug": "support-reply-style",
      "description": "Applies the support team's tone and escalation rules.",
      "instructions": "Write concise replies, include the next best action, and escalate billing issues to the account owner.",
      "integrationIds": [],
      "createdAt": "2026-07-06T10:30:00.000Z",
      "updatedAt": "2026-07-06T10:30:00.000Z"
    }
  ],
  "nextCursor": "550e8400-e29b-41d4-a716-446655440000"
}

Hata İşleme

Durum KoduAçıklama
400Geçersiz sorgu parametresi
401Geçersiz veya eksik API anahtarı
403SKILL_API kapsamı veya Beceri ürün erişimi eksik
429Oran sınırı aşıldı
500Dahili sunucu hatası

ajan, API anahtarınızı korumak ve uygulamalarınızın güvende kalmasını sağlamak için tarayıcı kaynaklı istekleri kasıtlı olarak engeller. Daha fazla bilgi için lütfen API Key Best Practices hakkındaki kılavuzumuza bakın.

OpenAPI

openapi: 3.0.0
info:
  title: ajan API
  version: 3.0.0
servers:
  - url: https://api.ajan.io
    description: Production
security:
  - bearerAuth: []
paths:
  /skills/v1:
    get:
      tags:
        - Skills
      summary: List Skills
      description: Returns Skills in your workspace.
      operationId: listSkills
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 250
            default: 50
          description: Number of Skills to return.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Cursor from the previous response for pagination.
        - name: query
          in: query
          required: false
          schema:
            type: string
          description: Search query for matching Skills.
        - name: slug
          in: query
          required: false
          schema:
            type: string
            maxLength: 100
            pattern: ^[a-z0-9-]+$
          description: Filter by Skill slug.
      responses:
        '200':
          description: Skills returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSkillsResponse'
        '400':
          description: Invalid query parameter
        '401':
          description: Invalid or missing API key
        '403':
          description: Missing required scope or access
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
components:
  schemas:
    ListSkillsResponse:
      type: object
      required:
        - skills
      properties:
        skills:
          type: array
          items:
            $ref: '#/components/schemas/Skill'
        nextCursor:
          type: string
          format: uuid
          description: Cursor for the next page, if more results are available.
    Skill:
      type: object
      required:
        - id
        - name
        - slug
        - description
        - instructions
        - integrationIds
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the Skill.
        name:
          type: string
          maxLength: 64
          description: Skill name.
        slug:
          type: string
          maxLength: 100
          pattern: ^[a-z0-9-]+$
          description: Stable Skill slug.
        description:
          type: string
          maxLength: 1024
          description: Description used to explain when the Skill should apply.
        instructions:
          type: string
          maxLength: 50000
          description: Skill instructions.
        integrationIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Integration IDs attached to the Skill. Each integration must be
            enabled in your workspace.
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp for Skill creation.
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp for the latest Skill update.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"