API Reference Overview api-reference-overview

The Concurrency Monitoring API provides a RESTful interface for managing streaming sessions and enforcing concurrent usage policies. This reference provides complete documentation for all endpoints, authentication methods, request/response formats, and error handling.

API Base URLs

Production Environment

https://streams.adobeprimetime.com/v2/

Staging Environment

https://streams-stage.adobeprimetime.com/v2/

Note: Always use the staging environment for development and testing. Production credentials are provided only after successful staging integration.

Authentication

All API calls require HTTP Basic Authentication using your application credentials:

  • Username: Your application ID (provided by Adobe)
  • Password: Empty string

Example Authentication Header

curl -u "<your-app-id>:" https://streams-stage.adobeprimetime.com/v2/sessions

For an application with id "demo-app" the authentication header would be exactly as shown below, including the quotes and colon:
curl -u "demo-app:" https://streams-stage.adobeprimetime.com/v2/sessions

Response Format Standards

Success Responses

All successful responses follow this structure:

{
  "status": "success",
  "data": {
    // Response-specific data
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Error Responses

All error responses follow this structure:

{
  "associatedAdvice": [
    {
      "policyName": "string",
      "ruleName": "string",
      "scope": {},
      "attribute": "string",
      "threshold": 0,
      "conflicts": [
        {}
      ]
    }
  ],
  "obligations": [
    {
      "namespace": "string",
      "action": "string",
      "arguments": [
        "string"
      ]
    }
  ]
}

Evaluation Result Format

When policies are evaluated (especially for 409 conflicts), responses include an evaluation result:

{
  "evaluationResult": {
    "decision": "DENY",
    "obligations": [
      {
        "id": "obligation-id",
        "fulfillOn": "DENY",
        "attributes": {
          "attribute1": "value1"
        }
      }
    ],
    "associatedAdvice": [
      {
        "id": "advice-id",
        "adviceType": "rule-violation",
        "attributes": {
          "rule": "rule-name",
          "threshold": 3,
          "current": 4,
          "conflicts": [
            {
              "sessionId": "session-123",
              "terminationCode": "term-456",
              "metadata": {
                "deviceId": "device-789",
                "channel": "Channel1"
              }
            }
          ]
        }
      }
    ]
  }
}

Common HTTP Status Codes

Code
Description
When Returned
200
OK
Successful GET requests
202
Created/Accepted
Successful session creation/heartbeat recorded
400
Bad Request
Invalid parameters or missing required fields
401
Unauthorized
Invalid or missing authentication
403
Forbidden
Insufficient permissions
404
Session ID Not Found
Session ID not generated by CM service
409
Conflict
Policy violation (concurrent limit reached)
410
Gone
Session expired or was terminated
429
Too Many Requests
Rate limit exceeded

Parameter Passing Methods

Path Parameters

Required parameters that are part of the URL path:

  1. {idp} - Identity Provider identifier
  2. {subject} - User identifier (typically from Adobe Pass)
  3. {sessionId} - Session identifier (returned in Location header)

Additionals Parameters

Optional parameters are passed in the URL:

GET /sessions/{idp}/{subject}?platform=test

Form Data (POST/PUT)

Metadata and session data in request body:

POST /sessions/{idp}/{subject}
Content-Type: application/x-www-form-urlencoded

channel=Channel1&deviceId=device-123&contentType=live

Headers

Special parameters passed in HTTP headers:

X-Terminate: termination-code-123
X-Client-Version: 1.0.0

Error Handling Best Practices

409 Conflict Handling

When you receive a 409 Conflict response:

  1. Parse the evaluation result to understand the policy violation
  2. Extract conflict information from associatedAdvice
  3. Present options to the user based on your LIFO/FIFO strategy
  4. Use termination codes if implementing LIFO behavior

410 Gone Handling

When you receive a 410 Gone response:

  1. Check if response has a body - indicates remote termination
  2. Parse advice to understand why session was terminated
  3. Update UI to reflect session termination
  4. Handle gracefully - session may have timed out naturally
  5. Start a new session - if deemed appropriate, initiate a new session

Rate Limiting

When you receive a 429 Too Many Requests:

  1. Limit call frequency to up to 200 requests per minute, which is the maximum level accepted by CM
  2. Send heartbeats at the required interval, which is one per minute.

Testing Tools

Interactive API Explorer

Use our Swagger UI for interactive testing:

  1. Enter your application ID in the top-right corner
  2. Click “Explore” to set authentication
  3. Test endpoints with real parameters
  4. View request/response examples
recommendation-more-help
42139a1e-84f9-43e7-9581-d6e1d65973da