Getting Started

This guide will help you get up and running with AgentSync's internal APIs in minutes.

Prerequisites

Before you begin, make sure you have:

  • Access to AgentSync's internal systems (Okta SSO)
  • API credentials (client ID and client secret)
  • A development environment set up

Step 1: Obtain API Credentials

  1. Request Access - Contact the DevOps team in #devops-support to request API credentials
  2. Receive Credentials - You'll receive a client_id and client_secret via secure channel
  3. Store Securely - Store credentials in a secure location (never commit to version control)

Step 2: Choose Your Environment

Select the appropriate environment for your use case:

EnvironmentPurposeBase URL
DevelopmentFeature developmenthttps://api.dev.agentsync.io
TestIntegration testinghttps://api.test.agentsync.io
SandboxUAT testinghttps://api.sandbox.agentsync.io
ProductionLive serviceshttps://api.agentsync.io

Step 3: Obtain an Access Token

Use the OAuth 2.0 Client Credentials flow to obtain an access token:

curl -X POST https://auth.agentsync.io/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Response:

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Step 4: Make Your First API Call

Use the access token to call an API endpoint:

curl -X GET https://api.dev.agentsync.io/v1/health \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Response:

{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00Z"
}

Step 5: Explore Available APIs

Now that you're authenticated, explore the available APIs:

  1. Browse the API Catalog - View all available internal APIs
  2. Review Rate Limits - Understand usage limits
  3. Read Best Practices - Follow development guidelines

Example: Python Integration

Here's a complete Python example to get you started:

import requests

# Configuration
AUTH_URL = "https://auth.agentsync.io/oauth/token"
API_BASE_URL = "https://api.dev.agentsync.io"
CLIENT_ID = "your_client_id"
CLIENT_SECRET = "your_client_secret"

def get_access_token():
    """Obtain an access token using client credentials."""
    response = requests.post(
        AUTH_URL,
        data={
            "grant_type": "client_credentials",
            "client_id": CLIENT_ID,
            "client_secret": CLIENT_SECRET
        }
    )
    response.raise_for_status()
    return response.json()["access_token"]

def make_api_call(endpoint, token):
    """Make an authenticated API call."""
    headers = {
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json"
    }
    response = requests.get(f"{API_BASE_URL}{endpoint}", headers=headers)
    response.raise_for_status()
    return response.json()

# Usage
if __name__ == "__main__":
    token = get_access_token()
    result = make_api_call("/v1/health", token)
    print(result)

Next Steps


Need help? Reach out in #devops-support on Slack.