keitaro-api-skill/references/paths/campaigns_id_streams.yaml

47 lines
1.1 KiB
YAML

get:
tags:
- Flows (Streams)
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
description: Campaign ID
required: true
schema:
type: integer
summary: Get flows
description: Returns campaign flows
responses:
'200':
description: List of flows
content:
application/json:
schema:
type: array
items:
$ref: ../schemas/Stream.yaml
'400':
$ref: ../responses/BadRequest.yaml
'401':
$ref: ../responses/Unauthorized.yaml
'402':
$ref: ../responses/PaymentRequired.yaml
'404':
$ref: ../responses/NotFound.yaml
'500':
$ref: ../responses/InternalError.yaml
x-code-samples:
- lang: PHP
source: >-
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'http://example.com/admin_api/v1/campaigns/2/streams');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);