initial
This commit is contained in:
commit
3d914a4853
|
|
@ -0,0 +1 @@
|
||||||
|
.DS_Store
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
---
|
||||||
|
name: keitaro-api
|
||||||
|
description: Interact with Keitaro Admin API v1 to manage campaigns, offers, affiliate networks, domains, landing pages, and more. Use when user asks to create/update/delete Keitaro resources, fetch statistics, or manage tracker configurations. Supports full CRUD operations across all Keitaro resources.
|
||||||
|
tools: Bash, Read, Write
|
||||||
|
---
|
||||||
|
|
||||||
|
# Keitaro API Skill
|
||||||
|
|
||||||
|
This skill provides a comprehensive interface to the Keitaro Admin API v1, enabling management of affiliate marketing infrastructure including campaigns, offers, affiliate networks, domains, landing pages, and third-party integrations.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Specify if Keitaro requests are wrapped w/ cloudflare worker, so instead of:
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks"
|
||||||
|
```
|
||||||
|
we should use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s -H "x-team-key: $TEAM_KEY}" -H "x-keitaro-instance: $KT_KEY"
|
||||||
|
"https://{HOSTNAME}/admin_api/v1/affiliate_networks"
|
||||||
|
```
|
||||||
|
|
||||||
|
if not - use requests as provided;
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Env variables for scripts should be presented in working folder `.env` file, create one with `cp assets/.env.example ../../.env` if not exists;
|
||||||
|
- API Documentation Index file: `references/openapi.yaml`.
|
||||||
|
- The base path for all endpoints is `/admin_api/v1`.
|
||||||
|
- All POST/PUT requests require `Content-Type: application/json` header
|
||||||
|
- Dates should be in ISO format (YYYY-MM-DD)
|
||||||
|
- IDs are integers, not strings
|
||||||
|
- Some endpoints support pagination with `offset` and `limit` parameters
|
||||||
|
- Archive/restore endpoints exist for most resources (campaigns, offers, domains, etc.)
|
||||||
|
- The API supports bulk operations for costs and statistics updates
|
||||||
|
|
||||||
|
|
||||||
|
## Response Codes
|
||||||
|
|
||||||
|
- **200/201**: Success
|
||||||
|
- **400**: Invalid request parameters
|
||||||
|
- **401**: Missing/invalid API key
|
||||||
|
- **402**: Account limitation (subscription issue)
|
||||||
|
- **404**: Resource not found
|
||||||
|
- **406**: Request state conflict
|
||||||
|
- **422**: Validation failure
|
||||||
|
- **500**: Server error
|
||||||
|
|
||||||
|
## Usage Examples
|
||||||
|
|
||||||
|
When the user asks to:
|
||||||
|
|
||||||
|
1. **"Create an affiliate network called MaxBounty"**:
|
||||||
|
- Use the create affiliate network endpoint
|
||||||
|
- Return the created network ID
|
||||||
|
|
||||||
|
2. **"List all active campaigns"**:
|
||||||
|
- Use the campaigns list endpoint
|
||||||
|
- Filter or format the response for active campaigns
|
||||||
|
|
||||||
|
3. **"Get statistics for campaign 123 in January"**:
|
||||||
|
- Use the clicks/log endpoint with proper date range
|
||||||
|
- Include campaign_id filter
|
||||||
|
|
||||||
|
4. **"Clone offer 456 with a new name"**:
|
||||||
|
- Use the clone offer endpoint
|
||||||
|
- Pass the new name in the request
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
Always check the response status code and provide meaningful error messages:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
response=$(curl -s -w "\n%{http_code}" -H "Api-Key: $KEITARO_API_KEY" "$url")
|
||||||
|
http_code=$(echo "$response" | tail -n1)
|
||||||
|
body=$(echo "$response" | sed '$d')
|
||||||
|
|
||||||
|
if [ "$http_code" -eq 200 ]; then
|
||||||
|
echo "$body" | jq .
|
||||||
|
else
|
||||||
|
echo "Error $http_code: $body"
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Keitaro API Configuration
|
||||||
|
# Copy this file to .env and fill in your test instance credentials
|
||||||
|
|
||||||
|
KEITARO_DOMAIN=tracker-domain.com
|
||||||
|
KEITARO_API_KEY=123abc
|
||||||
|
|
@ -0,0 +1,292 @@
|
||||||
|
# Common Operations
|
||||||
|
|
||||||
|
## 1. Affiliate Networks
|
||||||
|
|
||||||
|
**List all affiliate networks:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create affiliate network:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"Network Name","postback_url":"https://example.com/postback"}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Get specific network:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks/{id}"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Update network:**
|
||||||
|
```bash
|
||||||
|
curl -X PUT -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"Updated Name"}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks/{id}"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Delete network:**
|
||||||
|
```bash
|
||||||
|
curl -X DELETE -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/affiliate_networks/{id}"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Offers
|
||||||
|
|
||||||
|
**List all offers:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/offers"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create offer:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "Offer Name",
|
||||||
|
"affiliate_network_id": 1,
|
||||||
|
"payout_value": 10.50,
|
||||||
|
"payout_currency": "USD",
|
||||||
|
"payout_type": "CPA",
|
||||||
|
"offer_type": "external",
|
||||||
|
"action_type": "offerRedirect",
|
||||||
|
"country": ["US"],
|
||||||
|
"state": "active"
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/offers"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Clone offer:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"Cloned Offer Name"}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/offers/{id}/clone"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Campaigns
|
||||||
|
|
||||||
|
**List campaigns with pagination:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/campaigns?offset=0&limit=50"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create campaign:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "Campaign Name",
|
||||||
|
"alias": "campaign-alias",
|
||||||
|
"state": "active",
|
||||||
|
"cost_auto_update": false
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/campaigns"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Enable/Disable campaign:**
|
||||||
|
```bash
|
||||||
|
# Enable
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/campaigns/{id}/enable"
|
||||||
|
|
||||||
|
# Disable
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/campaigns/{id}/disable"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Get campaign streams:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/campaigns/{id}/streams"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Domains
|
||||||
|
|
||||||
|
**List all domains:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/domains"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Add domain:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "example.com",
|
||||||
|
"state": "active",
|
||||||
|
"catch_not_found": false
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/domains"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Check domain status:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/domains/{id}/check"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Get server IP:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/domains/ip"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. Landing Pages
|
||||||
|
|
||||||
|
**List landing pages:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/landing_pages"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create landing page:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "Landing Page Name",
|
||||||
|
"action_type": "local",
|
||||||
|
"action_payload": "<html>...</html>",
|
||||||
|
"state": "active"
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/landing_pages"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Upload file to landing page:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-F "file=@/path/to/file.jpg" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/landing_pages/{id}/add_file"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Download landing page:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-o landing_page.zip \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/landing_pages/{id}/download"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. Statistics
|
||||||
|
|
||||||
|
**Query click log:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"range": {
|
||||||
|
"from": "2026-01-01",
|
||||||
|
"to": "2026-01-31",
|
||||||
|
"timezone": "UTC"
|
||||||
|
},
|
||||||
|
"columns": ["campaign_id", "clicks", "conversions"],
|
||||||
|
"metrics": ["clicks", "conversions", "revenue"],
|
||||||
|
"grouping": ["campaign_id"]
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/clicks/log"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Query conversions:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"range": {
|
||||||
|
"from": "2026-01-01",
|
||||||
|
"to": "2026-01-31",
|
||||||
|
"timezone": "UTC"
|
||||||
|
},
|
||||||
|
"filters": [{"name": "campaign_id", "operator": "EQUALS", "expression": "123"}]
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/conversions/log"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 7. Bot List Management
|
||||||
|
|
||||||
|
**Get bot list:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/botlist"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Add IPs to bot list:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"ips": ["192.168.1.1", "10.0.0.1"]
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/botlist/add"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Remove IPs from bot list:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"ips": ["192.168.1.1"]
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/botlist/exclude"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 8. Groups (Organization)
|
||||||
|
|
||||||
|
**List groups:**
|
||||||
|
```bash
|
||||||
|
# Campaigns groups
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/groups?type=campaigns"
|
||||||
|
|
||||||
|
# Offers groups
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/groups?type=offers"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create group:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "Group Name",
|
||||||
|
"type": "campaigns"
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/groups"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 9. Third-Party Integrations
|
||||||
|
|
||||||
|
**List Facebook integrations:**
|
||||||
|
```bash
|
||||||
|
curl -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/integrations/facebook"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create Facebook pixel:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "FB Pixel",
|
||||||
|
"pixel_id": "123456789",
|
||||||
|
"access_token": "token_here"
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/integrations/facebook"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Assign integration to campaign:**
|
||||||
|
```bash
|
||||||
|
curl -X POST -H "Api-Key: $KEITARO_API_KEY" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"campaign_ids": [1, 2, 3]
|
||||||
|
}' \
|
||||||
|
"https://$KEITARO_DOMAIN/admin_api/v1/integrations/facebook/{id}/campaign"
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
openapi: 3.0.0
|
||||||
|
info:
|
||||||
|
version: v1
|
||||||
|
title: Keitaro Admin API
|
||||||
|
x-logo:
|
||||||
|
url: assets/logo.png
|
||||||
|
altText: Keitaro logo
|
||||||
|
servers:
|
||||||
|
- url: /admin_api/v1
|
||||||
|
paths:
|
||||||
|
/affiliate_networks:
|
||||||
|
$ref: ./paths/affiliate_networks.yaml
|
||||||
|
/affiliate_networks/{id}:
|
||||||
|
$ref: ./paths/affiliate_networks_id_.yaml
|
||||||
|
/affiliate_networks/{id}/clone:
|
||||||
|
$ref: ./paths/affiliate_networks_id_clone.yaml
|
||||||
|
/affiliate_networks/{id}/restore:
|
||||||
|
$ref: ./paths/affiliate_networks_id_restore.yaml
|
||||||
|
/affiliate_networks/clean_archive:
|
||||||
|
$ref: ./paths/affiliate_networks_clean_archive.yaml
|
||||||
|
/affiliate_networks/deleted:
|
||||||
|
$ref: ./paths/affiliate_networks_deleted.yaml
|
||||||
|
/botlist:
|
||||||
|
$ref: ./paths/botlist.yaml
|
||||||
|
/botlist/add:
|
||||||
|
$ref: ./paths/botlist_add.yaml
|
||||||
|
/botlist/exclude:
|
||||||
|
$ref: ./paths/botlist_exclude.yaml
|
||||||
|
/campaigns:
|
||||||
|
$ref: ./paths/campaigns.yaml
|
||||||
|
/campaigns/{id}:
|
||||||
|
$ref: ./paths/campaigns_id_.yaml
|
||||||
|
/campaigns/{id}/clone:
|
||||||
|
$ref: ./paths/campaigns_id_clone.yaml
|
||||||
|
/campaigns/{id}/disable:
|
||||||
|
$ref: ./paths/campaigns_id_disable.yaml
|
||||||
|
/campaigns/{id}/enable:
|
||||||
|
$ref: ./paths/campaigns_id_enable.yaml
|
||||||
|
/campaigns/{id}/restore:
|
||||||
|
$ref: ./paths/campaigns_id_restore.yaml
|
||||||
|
/campaigns/{id}/streams:
|
||||||
|
$ref: ./paths/campaigns_id_streams.yaml
|
||||||
|
/campaigns/{id}/update_costs:
|
||||||
|
$ref: ./paths/campaigns_id_update_costs.yaml
|
||||||
|
/campaigns/clean_archive:
|
||||||
|
$ref: ./paths/campaigns_clean_archive.yaml
|
||||||
|
/campaigns/deleted:
|
||||||
|
$ref: ./paths/campaigns_deleted.yaml
|
||||||
|
/clicks/clean:
|
||||||
|
$ref: ./paths/clicks_clean.yaml
|
||||||
|
/clicks/log:
|
||||||
|
$ref: ./paths/clicks_log.yaml
|
||||||
|
/clicks/update_costs:
|
||||||
|
$ref: ./paths/clicks_update_costs.yaml
|
||||||
|
/conversions/log:
|
||||||
|
$ref: ./paths/conversions_log.yaml
|
||||||
|
/domains:
|
||||||
|
$ref: ./paths/domains.yaml
|
||||||
|
/domains/{id}:
|
||||||
|
$ref: ./paths/domains_id_.yaml
|
||||||
|
/domains/{id}/check:
|
||||||
|
$ref: ./paths/domains_id_check.yaml
|
||||||
|
/domains/{id}/restore:
|
||||||
|
$ref: ./paths/domains_id_restore.yaml
|
||||||
|
/domains/clean_archive:
|
||||||
|
$ref: ./paths/domains_clean_archive.yaml
|
||||||
|
/domains/deleted:
|
||||||
|
$ref: ./paths/domains_deleted.yaml
|
||||||
|
/domains/ip:
|
||||||
|
$ref: ./paths/domains_ip.yaml
|
||||||
|
/domains/register:
|
||||||
|
$ref: ./paths/domains_register.yaml
|
||||||
|
/groups:
|
||||||
|
$ref: ./paths/groups.yaml
|
||||||
|
/groups/{id}:
|
||||||
|
$ref: ./paths/groups_id_.yaml
|
||||||
|
/groups/{id}/delete:
|
||||||
|
$ref: ./paths/groups_id_delete.yaml
|
||||||
|
/integrations/facebook:
|
||||||
|
$ref: ./paths/integrations_facebook.yaml
|
||||||
|
/integrations/facebook/{id}:
|
||||||
|
$ref: ./paths/integrations_facebook_id_.yaml
|
||||||
|
/integrations/facebook/{id}/campaign:
|
||||||
|
$ref: ./paths/integrations_facebook_id_campaign.yaml
|
||||||
|
/landing_pages:
|
||||||
|
$ref: ./paths/landing_pages.yaml
|
||||||
|
/landing_pages/{id}:
|
||||||
|
$ref: ./paths/landing_pages_id_.yaml
|
||||||
|
/landing_pages/{id}/add_file:
|
||||||
|
$ref: ./paths/landing_pages_id_add_file.yaml
|
||||||
|
/landing_pages/{id}/clone:
|
||||||
|
$ref: ./paths/landing_pages_id_clone.yaml
|
||||||
|
/landing_pages/{id}/download:
|
||||||
|
$ref: ./paths/landing_pages_id_download.yaml
|
||||||
|
/landing_pages/{id}/get_file:
|
||||||
|
$ref: ./paths/landing_pages_id_get_file.yaml
|
||||||
|
/landing_pages/{id}/get_structure:
|
||||||
|
$ref: ./paths/landing_pages_id_get_structure.yaml
|
||||||
|
/landing_pages/{id}/remove_file:
|
||||||
|
$ref: ./paths/landing_pages_id_remove_file.yaml
|
||||||
|
/landing_pages/{id}/restore:
|
||||||
|
$ref: ./paths/landing_pages_id_restore.yaml
|
||||||
|
/landing_pages/{id}/update_file:
|
||||||
|
$ref: ./paths/landing_pages_id_update_file.yaml
|
||||||
|
/landing_pages/clean_archive:
|
||||||
|
$ref: ./paths/landing_pages_clean_archive.yaml
|
||||||
|
/landing_pages/deleted:
|
||||||
|
$ref: ./paths/landing_pages_deleted.yaml
|
||||||
|
/logs/{type}:
|
||||||
|
$ref: ./paths/logs_type_.yaml
|
||||||
|
/logs/types:
|
||||||
|
$ref: ./paths/logs_types.yaml
|
||||||
|
/offers:
|
||||||
|
$ref: ./paths/offers.yaml
|
||||||
|
/offers/{id}:
|
||||||
|
$ref: ./paths/offers_id_.yaml
|
||||||
|
/offers/{id}/add_file:
|
||||||
|
$ref: ./paths/offers_id_add_file.yaml
|
||||||
|
/offers/{id}/archive:
|
||||||
|
$ref: ./paths/offers_id_archive.yaml
|
||||||
|
/offers/{id}/clone:
|
||||||
|
$ref: ./paths/offers_id_clone.yaml
|
||||||
|
/offers/{id}/download:
|
||||||
|
$ref: ./paths/offers_id_download.yaml
|
||||||
|
/offers/{id}/get_file:
|
||||||
|
$ref: ./paths/offers_id_get_file.yaml
|
||||||
|
/offers/{id}/get_structure:
|
||||||
|
$ref: ./paths/offers_id_get_structure.yaml
|
||||||
|
/offers/{id}/remove_file:
|
||||||
|
$ref: ./paths/offers_id_remove_file.yaml
|
||||||
|
/offers/{id}/restore:
|
||||||
|
$ref: ./paths/offers_id_restore.yaml
|
||||||
|
/offers/{id}/update_file:
|
||||||
|
$ref: ./paths/offers_id_update_file.yaml
|
||||||
|
/offers/clean_archive:
|
||||||
|
$ref: ./paths/offers_clean_archive.yaml
|
||||||
|
/offers/deleted:
|
||||||
|
$ref: ./paths/offers_deleted.yaml
|
||||||
|
/report/build:
|
||||||
|
$ref: ./paths/report_build.yaml
|
||||||
|
/report/labels:
|
||||||
|
$ref: ./paths/report_labels.yaml
|
||||||
|
/stream_filters:
|
||||||
|
$ref: ./paths/stream_filters.yaml
|
||||||
|
/stream_schemas:
|
||||||
|
$ref: ./paths/stream_schemas.yaml
|
||||||
|
/stream_types:
|
||||||
|
$ref: ./paths/stream_types.yaml
|
||||||
|
/stream/{id}/events:
|
||||||
|
$ref: ./paths/stream_id_events.yaml
|
||||||
|
/streams_actions:
|
||||||
|
$ref: ./paths/streams_actions.yaml
|
||||||
|
/streams:
|
||||||
|
$ref: ./paths/streams.yaml
|
||||||
|
/streams/{id}:
|
||||||
|
$ref: ./paths/streams_id_.yaml
|
||||||
|
/streams/{id}/disable:
|
||||||
|
$ref: ./paths/streams_id_disable.yaml
|
||||||
|
/streams/{id}/enable:
|
||||||
|
$ref: ./paths/streams_id_enable.yaml
|
||||||
|
/streams/{id}/restore:
|
||||||
|
$ref: ./paths/streams_id_restore.yaml
|
||||||
|
/streams/clean_archive:
|
||||||
|
$ref: ./paths/streams_clean_archive.yaml
|
||||||
|
/streams/deleted:
|
||||||
|
$ref: ./paths/streams_deleted.yaml
|
||||||
|
/streams/search:
|
||||||
|
$ref: ./paths/streams_search.yaml
|
||||||
|
/traffic_sources:
|
||||||
|
$ref: ./paths/traffic_sources.yaml
|
||||||
|
/traffic_sources/{id}:
|
||||||
|
$ref: ./paths/traffic_sources_id_.yaml
|
||||||
|
/traffic_sources/{id}/clone:
|
||||||
|
$ref: ./paths/traffic_sources_id_clone.yaml
|
||||||
|
/traffic_sources/clean_archive:
|
||||||
|
$ref: ./paths/traffic_sources_clean_archive.yaml
|
||||||
|
/users:
|
||||||
|
$ref: ./paths/users.yaml
|
||||||
|
/users/{id}:
|
||||||
|
$ref: ./paths/users_id_.yaml
|
||||||
|
/users/{id}/access:
|
||||||
|
$ref: ./paths/users_id_access.yaml
|
||||||
|
/users/clean_archive:
|
||||||
|
$ref: ./paths/users_clean_archive.yaml
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
$ref: ./schemas/_index.yaml
|
||||||
|
parameters: {}
|
||||||
|
responses:
|
||||||
|
$ref: ./responses/_index.yaml
|
||||||
|
securitySchemes:
|
||||||
|
ApiKeyAuth:
|
||||||
|
type: apiKey
|
||||||
|
in: header
|
||||||
|
name: Api-Key
|
||||||
|
description: |
|
||||||
|
Authorization required "Api-Key" header.
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: List all affiliate networks
|
||||||
|
description: Returns a list all affiliate networks.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate networks
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/affiliate_networks');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
requestBody:
|
||||||
|
description: Create an affiliate network
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetworkRequest.yaml
|
||||||
|
summary: Create an affiliate network
|
||||||
|
description: Create an affiliate network
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate network details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/affiliate_networks');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = ["name" => "test", "postback_url" => "http://postback"];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted affiliate networks
|
||||||
|
description: Get deleted affiliate networks
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns deleted affiliate networks
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Affiliate network ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Retrieve Affiliate network details
|
||||||
|
description: Retrieve affiliate metwork details
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate network
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.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/affiliate_networks/1');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Affiliate network ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
requestBody:
|
||||||
|
description: Affiliate network fields to update
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetworkPut.yaml
|
||||||
|
summary: Update Affiliate network
|
||||||
|
description: Update an Affiliate network
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate network
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.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: >-
|
||||||
|
$params = ["name": "test2", "postback_url": "http://postback2"];
|
||||||
|
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/affiliate_networks/4');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Affiliate network ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Move affiliate network to the archive
|
||||||
|
description: Move affiliate network to the archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate network details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.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/affiliate_networks/1');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Affiliate network ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Clone affiliate network
|
||||||
|
description: Clone affiliate network
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Affiliate network
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'/admin_api/v1/affiliate_networks/1/clone');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Affiliate networks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Affiliate network ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore affiliate network
|
||||||
|
description: Restore a affiliate network
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Restore a affiliate network
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/AffiliateNetwork.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Bot list
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Retrieve rows from the bot list
|
||||||
|
description: Retrieve rows from the bot list
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Retrieve rows from the bot list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
description: Rows
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/botlist');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Bot list
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Update the bot list
|
||||||
|
description: Update the bot list
|
||||||
|
requestBody:
|
||||||
|
description: Update the bot list
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/BotListRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Update the bot list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/botlist');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'value' => "3.3.3.3\n5.5.5.5"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Bot list
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clear the bot list
|
||||||
|
description: Clear the bot list
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Clear the bot list
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/botlist');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Bot list
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add IPs to the bot list
|
||||||
|
description: Add IPs to the bot list
|
||||||
|
requestBody:
|
||||||
|
description: Add IPs to the bot list
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/BotListRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Add IPs to the bot list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/botlist/add');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'value' => "1.1.1.2"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Bot list
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Remove IPs from the bot list
|
||||||
|
description: Remove IPs from the bot list
|
||||||
|
requestBody:
|
||||||
|
description: Remove IPs from the bot list
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/BotListRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Remove IPs from the bot list
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/botlist/exclude');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'value' => "1.1.1.2"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get all campaigns
|
||||||
|
description: Returns the campaigns
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: >-
|
||||||
|
The number of campaigns to skip before starting to collect the result
|
||||||
|
set.
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The numbers of campaigns to return.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Campaigns
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create campaign
|
||||||
|
description: Creates campaign
|
||||||
|
requestBody:
|
||||||
|
description: Creates campaign
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/CampaignRequest.yaml
|
||||||
|
- $ref: ../schemas/CampaignCreateRequired.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Campaign details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'Test Campaign X',
|
||||||
|
|
||||||
|
'alias' => 'test-campaign-x',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted campaigns
|
||||||
|
description: Get deleted campaigns
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns deleted campaigns
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/deleted');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,145 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get campaign
|
||||||
|
description: Returns campaign information
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Campaign information
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/campaigns/89');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update campaign
|
||||||
|
description: Update a campaign
|
||||||
|
requestBody:
|
||||||
|
description: Fields to update
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/CampaignRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Update a Campaign
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.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');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'Test Campaign X2',
|
||||||
|
|
||||||
|
'alias' => 'test-campaign-x2',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Move campaign to archive
|
||||||
|
description: Moves campaign to archive
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: It's done
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/734');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Clone Campaign
|
||||||
|
description: Clone a Campaign
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Clone a Campaign
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/734/clone');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, '');
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Disable Campaign
|
||||||
|
description: Disable a Campaign
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Disable a Campaign
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/662/disable');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Enable Campaign
|
||||||
|
description: Enable a Campaign
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Enable a Campaign
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/662/enable');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore Campaign
|
||||||
|
description: Restore a Campaign
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Restore a Campaign
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Campaign.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/734/restore');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
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);
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Campaigns
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update costs for campaign
|
||||||
|
description: >-
|
||||||
|
<p>Updates campaign costs.</p> <b>IMPORTANT!</b> That actions is VERY SLOW.
|
||||||
|
Use <a href="#tag/Clicks/paths/~1clicks~1update_costs/post">Update costs in
|
||||||
|
bulk</a> instead</p>
|
||||||
|
requestBody:
|
||||||
|
description: Options
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/CampaignCostRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Job successfully scheduled
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'start_date' => '2017-09-10 00:00:00',
|
||||||
|
|
||||||
|
'end_date' => '2017-09-12 00:00:00',
|
||||||
|
|
||||||
|
'cost' => 10.02,
|
||||||
|
|
||||||
|
'currency' => 'EUR',
|
||||||
|
|
||||||
|
'timezone' => 'Europe/Moscow',
|
||||||
|
|
||||||
|
'only_campaign_uniques' => 1,
|
||||||
|
|
||||||
|
'filters': ['sub_id_1' => '1,2,3', 'source': 'site.ru']
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/campaigns/2/update_costs');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Clean stats
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean stats
|
||||||
|
description: Clean stats
|
||||||
|
requestBody:
|
||||||
|
description: Cleans the statistics
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/CleanRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Clean job successfully scheduled.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Success.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
"start_date": "2017-04-01",
|
||||||
|
|
||||||
|
"end_date": "2017-04-10",
|
||||||
|
|
||||||
|
"timezone": "UTC"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/clicks/clean');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Clicks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get clicks
|
||||||
|
description: Returns clicks information.
|
||||||
|
requestBody:
|
||||||
|
description: Clicks information.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/ClickRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Clicks
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Report.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Clicks
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Update costs in bulk
|
||||||
|
description: Updates costs.
|
||||||
|
requestBody:
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/ClicksUpdateCostsRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Job successfully scheduled.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Conversions
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get conversions
|
||||||
|
description: Returns conversions
|
||||||
|
requestBody:
|
||||||
|
description: Conversions
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/ConversionRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Conversions
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Report.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'columns' => ['postback_datetime', 'click_datetime', 'sub_id'],
|
||||||
|
|
||||||
|
'filters' => [
|
||||||
|
|
||||||
|
['name' => 'status', 'operator' => 'EQUALS', 'expression' => 'lead']
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'order' => [['postback_datetime', 'DESC']],
|
||||||
|
|
||||||
|
'range' => [
|
||||||
|
|
||||||
|
'from' => '2017-01-01',
|
||||||
|
|
||||||
|
'to' => '2018-04-01'
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/conversions/log');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get the list of domains
|
||||||
|
description: Returns list of the domains
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of the domains
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/domains');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
requestBody:
|
||||||
|
description: Create a domain
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/DomainRequest.yaml
|
||||||
|
- $ref: ../schemas/DomainCreateRequired.yaml
|
||||||
|
summary: Create domain
|
||||||
|
description: Create a domain
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain data
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/domains');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'domain1.com',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted domains
|
||||||
|
description: Returns list of the domains.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of the domains
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/domains/deleted');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Domain ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get domain
|
||||||
|
description: Return domain details.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.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/domains/1');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Domain ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update domain
|
||||||
|
description: Updates domain.
|
||||||
|
requestBody:
|
||||||
|
description: Domain fields to update
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/DomainRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.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/domains');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'domain1.com',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Domain ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Move Domain to Archive
|
||||||
|
description: Move a Domain to Archive
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Move a Domain to Archive
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.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/domains/1');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Domain ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update Domain Status
|
||||||
|
description: Update Domain Status
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/domains/1/check');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Domain ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore an Archived Domain
|
||||||
|
description: Restore an Archived Domain
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Domain.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/domains/734/restore');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Retrieve server ip
|
||||||
|
description: Retrieve server ip
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Server ip
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ipv4:
|
||||||
|
type: string
|
||||||
|
description: IPv4 address
|
||||||
|
ipv6:
|
||||||
|
type: string
|
||||||
|
description: IPv6 address
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Domains
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
requestBody:
|
||||||
|
description: Register a domain
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/DomainRequest.yaml
|
||||||
|
- $ref: ../schemas/DomainCreateRequired.yaml
|
||||||
|
summary: Register the domain
|
||||||
|
description: >-
|
||||||
|
<p>Register the domain</p> <b>IMPORTANT!</b> You should have installed
|
||||||
|
integration with namecheap and, optional, with cloudflare (if you want to
|
||||||
|
add zone to cloudflare via cloudflare_proxy param)
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Domain
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/Domain.yaml
|
||||||
|
- $ref: ../schemas/DomainRegister.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../responses/UnprocessableEntity.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Groups
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: type
|
||||||
|
in: query
|
||||||
|
description: Group type
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: campaigns
|
||||||
|
enum:
|
||||||
|
- campaigns
|
||||||
|
- offers
|
||||||
|
- landings
|
||||||
|
- domains
|
||||||
|
summary: Get groups
|
||||||
|
description: Returns list of the groups
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of the groups
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Group.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/groups?type=campaigns');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Groups
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create croup
|
||||||
|
description: Creates group.
|
||||||
|
requestBody:
|
||||||
|
description: Group fields.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/GroupRequest.yaml
|
||||||
|
- $ref: ../schemas/GroupCreateRequired.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Group details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Group.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/groups');
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
$params = [
|
||||||
|
'name' => 'Test Group X',
|
||||||
|
'position' => '10',
|
||||||
|
'type' => 'campaigns',
|
||||||
|
];
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Groups
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Group ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update Group
|
||||||
|
description: Update a Group
|
||||||
|
requestBody:
|
||||||
|
description: Update a Group
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/GroupRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Group
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Group.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/groups/19');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'id' => 19,
|
||||||
|
|
||||||
|
'name' => 'Test Group X2',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Groups
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Group ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete Group
|
||||||
|
description: Delete a Group
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Group
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Group.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/offers/19/delete');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'id' => 19
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get Facebook integrations
|
||||||
|
description: Returns list of Facebook integrations
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of Facebook integrations
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Facebook.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create Facebook Integration
|
||||||
|
description: Creates Facebook integration.
|
||||||
|
requestBody:
|
||||||
|
description: Integration details.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/FacebookRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Integration details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Facebook.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get Facebook integration
|
||||||
|
description: Returns Facebook integration details
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Integration details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: ../schemas/Facebook.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update Facebook integration
|
||||||
|
description: Updates Facebook integration.
|
||||||
|
requestBody:
|
||||||
|
description: Integration fields to update
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/FacebookRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Integration details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: ../schemas/Facebook.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete Facebook integration
|
||||||
|
description: Delete Facebook integration
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully deleted
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get assigned campaigns.
|
||||||
|
description: Returns list of assigned campaigns.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of assigned campaigns
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/OptionNumber.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Assign to campaign
|
||||||
|
description: Assigns FB integration to campaigns.
|
||||||
|
requestBody:
|
||||||
|
description: Campaign IDs
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
campaign_id:
|
||||||
|
description: Campaign ID
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- campaign_id
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully added
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Third-party integrations
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Integration ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
requestBody:
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
campaign_id:
|
||||||
|
description: Campaign ID
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- campaign_id
|
||||||
|
summary: Dissociate campaign
|
||||||
|
description: Dissociates campaign
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully done
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get landing pages
|
||||||
|
description: Returns list of the landing pages
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of the landing pages
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Landing.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create landing page
|
||||||
|
description: Creates landing page
|
||||||
|
requestBody:
|
||||||
|
description: Landing page fields
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/LandingRequest.yaml
|
||||||
|
- $ref: ../schemas/LandingCreateRequired.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Landing page details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted landing pages
|
||||||
|
description: Get deleted landing pages
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns deleted landing pages
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Landing.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get Landing Page
|
||||||
|
description: Get a Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.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
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update Landing Page
|
||||||
|
description: Update a Landing Page
|
||||||
|
requestBody:
|
||||||
|
description: Update a Landing Page
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/LandingRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Update a Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.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
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Archive Landing Page
|
||||||
|
description: Archive a Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.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
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Path to the File
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Create a File
|
||||||
|
description: Create a Local Landing Page File
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Create a Local Landing Page File
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Clone Landing Page
|
||||||
|
description: Clone a Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Download
|
||||||
|
description: Pack and Download the Files of the Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Binary Content of a Zip File
|
||||||
|
content:
|
||||||
|
application/octet-stream:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: File path. It must be relative, i.e. `order/success.html`.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Read File
|
||||||
|
description: Read the Content of the File
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: File Content
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get Files Structure
|
||||||
|
description: Get Files Structure of the Local Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Get Files Structure of the Local Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/EditorFiles.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Path to the File
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Remove file
|
||||||
|
description: Remove the File of the Local Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Remove the File of the Local Landing Page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore landing page
|
||||||
|
description: Restore a landing page
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Restore a landing page
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Landing.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Landing pages
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Landing Page ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Path to the File
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: data
|
||||||
|
in: query
|
||||||
|
description: New File Data
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Save File Data
|
||||||
|
description: Save the File Data of the Local Landing Page
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Save File Data
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Logs
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get log
|
||||||
|
description: Returns log rows
|
||||||
|
parameters:
|
||||||
|
- name: type
|
||||||
|
in: path
|
||||||
|
description: Logs type
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- audit
|
||||||
|
- system
|
||||||
|
- traffic
|
||||||
|
- postbacks
|
||||||
|
- ssl
|
||||||
|
- sent_postbacks
|
||||||
|
- name: limit
|
||||||
|
in: query
|
||||||
|
description: Limit rows
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: offset
|
||||||
|
in: query
|
||||||
|
description: Offset
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: query
|
||||||
|
in: query
|
||||||
|
description: Search query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Logs
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Logs.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Logs
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: type
|
||||||
|
in: path
|
||||||
|
description: Log type
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- system
|
||||||
|
- traffic
|
||||||
|
- postbacks
|
||||||
|
- ssl
|
||||||
|
- sent_postbacks
|
||||||
|
summary: Clean log
|
||||||
|
description: Cleans log
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Success
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Logs
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get log types
|
||||||
|
description: Returns list of log types
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of log types
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get offers
|
||||||
|
description: Returns list of the offers
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of offers
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Offer.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.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/offers');
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
echo curl_exec($ch);
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create offer
|
||||||
|
description: Creates offer
|
||||||
|
requestBody:
|
||||||
|
description: Offer fields
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../schemas/OfferRequest.yaml
|
||||||
|
- $ref: ../schemas/OfferCreateRequired.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Offer details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.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/offers');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'Test Offer X',
|
||||||
|
|
||||||
|
'offer_type' => 'external',
|
||||||
|
|
||||||
|
'action_type' => 'http', // HTTP redirect
|
||||||
|
|
||||||
|
'action_payload' =>
|
||||||
|
'http://offer.com?ad_campaign_id={ad_campaign_id}&stream_id={stream_id}',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted offers
|
||||||
|
description: Get deleted offers
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Returns deleted offers
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Offer.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get offer
|
||||||
|
description: Returns offer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.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
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update offer
|
||||||
|
description: Updates offer
|
||||||
|
requestBody:
|
||||||
|
description: Update an Offer
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/OfferRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.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/offers/16');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
|
||||||
|
'name' => 'Test Offer X2',
|
||||||
|
|
||||||
|
'offer_type' => 'external',
|
||||||
|
|
||||||
|
'action_type' => 'http', // HTTP redirect
|
||||||
|
|
||||||
|
'action_payload' => 'http://offer.com?ad_campaign_id={ad_campaign_id}'
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Path to the File
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Create file
|
||||||
|
description: Create the File of the Local Offer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Create the File of the Local Offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete offer
|
||||||
|
description: Moves offer to archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.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/offers/16/archive');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Clone offer
|
||||||
|
description: Clones offer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Download
|
||||||
|
description: Packs and downloads the files.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Binary Content of a Zip File
|
||||||
|
content:
|
||||||
|
application/octet-stream:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: File path, i.e. `order/success.html`.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Read File
|
||||||
|
description: Read the Content of the File
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: File content
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get file structure
|
||||||
|
description: Returns the file structure.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: File structure
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/EditorFiles.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
description: unexpected error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: File path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Delete file
|
||||||
|
description: Deletes the file.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: New file structure
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
success:
|
||||||
|
type: boolean
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore offer
|
||||||
|
description: Restore a offer
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Restore a offer
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Offer.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Offers
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Offer ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: File path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: data
|
||||||
|
in: query
|
||||||
|
description: File cointent
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Upload file
|
||||||
|
description: Saves file on server.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Save the File Data
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,749 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Reports
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Build custom report
|
||||||
|
description: >
|
||||||
|
<style>
|
||||||
|
.list-flex {
|
||||||
|
display: flex;
|
||||||
|
list-style: none;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.list-flex li {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<h3 id='operators'>
|
||||||
|
|
||||||
|
List of available operators:
|
||||||
|
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="table sectionedit75 table-responsive"><table class="inline table
|
||||||
|
table-striped table-condensed table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr class="row0">
|
||||||
|
<th class="col0 leftalign"> Operator </th><th class="col1 leftalign"> Type </th><th class="col2 leftalign"> Expression Example </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr class="row1">
|
||||||
|
<td class="col0"> EQUALS </td><td class="col1 leftalign"> Number </td><td class="col2 leftalign"> 10 </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row2">
|
||||||
|
<td class="col0 leftalign"> NOT_EQUAL </td><td class="col1 leftalign"> Number </td><td class="col2 leftalign"> 10 </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row3">
|
||||||
|
<td class="col0 leftalign"> EQUALS_OR_GREATER_THAN </td><td class="col1 leftalign"> Number </td><td class="col2 leftalign"> 10 </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row4">
|
||||||
|
<td class="col0 leftalign"> EQUALS_OR_LESS_THAN </td><td class="col1 leftalign"> Number </td><td class="col2 leftalign"> 10 </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row5">
|
||||||
|
<td class="col0 leftalign"> GREATER_THAN </td><td class="col1 leftalign"> Number </td><td class="col2 leftalign"> 10 </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row6">
|
||||||
|
<td class="col0 leftalign"> LESS_THAN </td><td class="col1 leftalign"> Number </td><td class="col2"> 10</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row7">
|
||||||
|
<td class="col0 leftalign"> MATCH_REGEXP </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> /uuid=100[0-9]{2}/ </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row8">
|
||||||
|
<td class="col0 leftalign"> NOT_MATCH_REGEXP </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> /uuid=100[0-9]{2}/ </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row9">
|
||||||
|
<td class="col0"> BEGINS_WITH </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> abc </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row10">
|
||||||
|
<td class="col0"> ENDS_WITH </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> zyx </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row11">
|
||||||
|
<td class="col0 leftalign"> CONTAINS </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> mnp </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row12">
|
||||||
|
<td class="col0 leftalign"> NOT_CONTAIN </td><td class="col1 leftalign"> String </td><td class="col2 leftalign"> abc </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row13">
|
||||||
|
<td class="col0 leftalign"> IN_LIST </td><td class="col1 leftalign"> Array </td><td class="col2 leftalign"> [“a”, “b”, “c”] </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row14">
|
||||||
|
<td class="col0 leftalign"> NOT_IN_LIST </td><td class="col1 leftalign"> Array </td><td class="col2 leftalign"> [“a”, “b”, “c”] </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row15">
|
||||||
|
<td class="col0 leftalign"> BETWEEN </td><td class="col1 leftalign"> Array </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row16">
|
||||||
|
<td class="col0 leftalign"> IS_SET </td><td class="col1 leftalign"> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row17">
|
||||||
|
<td class="col0 leftalign"> IS_NOT_SET </td><td class="col1 leftalign"> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row18">
|
||||||
|
<td class="col0 leftalign"> IS_TRUE </td><td class="col1 leftalign"> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row19">
|
||||||
|
<td class="col0 leftalign"> IS_FALSE </td><td class="col1 leftalign"> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row20">
|
||||||
|
<td class="col0 leftalign"> HAS_LABEL </td><td class="col1 leftalign"> <code>whitelist</code> or <code>blacklist</code> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="row21">
|
||||||
|
<td class="col0 leftalign"> NOT_HAS_LABEL </td><td class="col1 leftalign"> <code>whitelist</code> or <code>blacklist</code> </td><td class="col2"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table></div>
|
||||||
|
|
||||||
|
<h3 class="sectionedit78" id="field_metrics">Field 'metrics'</h3>
|
||||||
|
|
||||||
|
<div class="level3">
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Stats
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> clicks</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> campaign_unique_clicks</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> stream_unique_clicks</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> global_unique_clicks</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> uc_campaign_rate</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> uc_stream_rate</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> uc_global_rate</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> bots</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> bot_share</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> proxies</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> empty_referrers</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> conversions</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> leads</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sales</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> rejected</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> rebills</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> approve</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> lp_clicks</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> lp_ctr</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> landing_clicked_period</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cr</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> crs</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> crl</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> roi</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> roi_confirmed</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> epc</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> epc_confirmed</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cps</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cpa</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cpc</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ecpc</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ecpm</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ecpm_confirmed</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ec</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ec_confirmed</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Money
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> profitability</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cost</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> revenue</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> profit</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> lead_revenue</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sale_revenue</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> rejected_revenue</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> profit_confirmed</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="sectionedit79" id="field_columns1">Field 'columns'</h3>
|
||||||
|
|
||||||
|
<div class="level3">
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
IDS
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> click_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sub_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> visitor_code</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> campaign_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> campaign_group_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> parent_campaign_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> landing_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> offer_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ts_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> stream_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> language_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> device_type_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Data
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> campaign</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> campaign_group</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> parent_campaign</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> landing</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> landing_clicked_datetime</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> landing_clicked_period</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> offer</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ts</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> affiliate_network</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> stream</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> language</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> device_type</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> connection_type</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ip</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> country_code</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> country</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> region</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> city</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> user_agent</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> operator</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> os</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> os_version</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> browser</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> browser_version</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> device_model</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> isp</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> source</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> referrer</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> search_engine</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> keyword</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> destination</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sub_id_1..30</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> extra_param_1..10</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> revenue</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> cost</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> profit</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ad_campaign_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> external_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> creative_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Flags
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_unique_stream</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_unique_campaign</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_lead</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_sale</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_rejected</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_bot</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> is_using_proxy</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Date and Time
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> datetime</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> year</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> month</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> week</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> weekday</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> day</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> hour</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> day_hour</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Other
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ip_mask1</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> ip_mask2</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> label</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
|
||||||
|
Conversions Specific (for Entry-point <a href="#tag/Conversions"
|
||||||
|
title="admin-api ↵" class="wikilink1">Conversions</a>):
|
||||||
|
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<ul class="list-flex">
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> conversion_id</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> click_datetime</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> postback_datetime</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sale_datetime</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> sale_period</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> tid</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> status</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> previous_status</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> original_status</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="level1"><div class="li"> params</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
requestBody:
|
||||||
|
description: Build a custom report
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/ReportsRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Reports
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Report.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
x-code-samples:
|
||||||
|
- lang: PHP
|
||||||
|
source: >-
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL,
|
||||||
|
'http://example.com/admin_api/v1/report/build');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
'range' => [
|
||||||
|
'from' => '2017-09-10',
|
||||||
|
'to' => '2017-09-12',
|
||||||
|
'timezone' => 'Europe/Madrid'
|
||||||
|
],
|
||||||
|
'dimensions' => ['ts', 'landing'],
|
||||||
|
'metrics' => ['clicks', 'bot_share', 'cr'],
|
||||||
|
'filters' => [
|
||||||
|
"OR" => [
|
||||||
|
"AND" => [
|
||||||
|
['name' => 'campaign_id', 'operator' => 'EQUALS', 'expression' => 4],
|
||||||
|
['name' => 'stream_id', 'operator' => 'EQUALS', 'expression' => 8],
|
||||||
|
],
|
||||||
|
['name' => 'campaign_id', 'operator' => 'EQUALS', 'expression' => 5]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Reports
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get Labels
|
||||||
|
description: Get Labels
|
||||||
|
parameters:
|
||||||
|
- name: campaign_id
|
||||||
|
in: query
|
||||||
|
description: Campaign ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: label_name
|
||||||
|
in: query
|
||||||
|
description: Label name
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: ref_name
|
||||||
|
in: query
|
||||||
|
description: |
|
||||||
|
<style>
|
||||||
|
.list-flex {
|
||||||
|
display: flex;
|
||||||
|
list-style: none;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.list-flex li {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
List of Available Ref Names:
|
||||||
|
<ul class="list-flex">
|
||||||
|
<li class="level1"><div class="li"> ip</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> source</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> ad_campaign_id</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> creative_id</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> keyword</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> ad_campaign_idn</div>
|
||||||
|
</li>
|
||||||
|
<li class="level1"><div class="li"> sub_id_1..10</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Labels
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Labels.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
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Reports
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Update Labels
|
||||||
|
description: Update Labels
|
||||||
|
requestBody:
|
||||||
|
description: Update Labels
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/LabelRequestPost.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Labels
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Success.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
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get available flow filters
|
||||||
|
description: Returns list of available flow filters
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow filter details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/StreamFilter.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get flow events
|
||||||
|
description: Returns list of the events.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$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
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get available flow schemas
|
||||||
|
description: Returns list of available flow schemas
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List os flow schemas.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/StreamAction.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get list of flows types
|
||||||
|
description: Returns list of flow types
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of flow types
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/StreamAction.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create flow
|
||||||
|
description: Creates flow
|
||||||
|
requestBody:
|
||||||
|
description: Create a Flow
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/StreamRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Create a Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Stream.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get available flows actions
|
||||||
|
description: Returns available flow actions
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of flow actions
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/StreamAction.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get deleted flows
|
||||||
|
description: Returns deleted flows
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flows list
|
||||||
|
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
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get flow
|
||||||
|
description: Returns flow details.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$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
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update flow
|
||||||
|
description: Updates flow.
|
||||||
|
requestBody:
|
||||||
|
description: Flows fields to update.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/StreamRequestPut.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$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
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete flow
|
||||||
|
description: Moves strema to the archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$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
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Disable flow
|
||||||
|
description: Changes the state to 'disabled'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Stream.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Enable flow
|
||||||
|
description: Changes the state to 'active'.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Stream.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Flow ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Restore an Archived Flow
|
||||||
|
description: Restore an Archived Flow
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Flow
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Stream.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Flows (Streams)
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: query
|
||||||
|
in: query
|
||||||
|
description: Search query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: Search in flows
|
||||||
|
description: Searching in flows
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of results
|
||||||
|
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
|
||||||
|
'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/streams/search?query=string');
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
echo curl_exec($ch);
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get traffic sources
|
||||||
|
description: Returns list of traffic sources
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of traffic sources
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/Source.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
requestBody:
|
||||||
|
description: Traffic source fields
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/SourceRequest.yaml
|
||||||
|
summary: Create traffic source
|
||||||
|
description: Creates traffic source
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Traffic source details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Source.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Traffic source ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get traffic source
|
||||||
|
description: Returns traffic source details.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Traffic source details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Source.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
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Traffic source ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update traffic source
|
||||||
|
description: Updates traffic source.
|
||||||
|
requestBody:
|
||||||
|
description: Traffic source fields to update
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/SourceRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Traffic source details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Source.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
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Traffic source ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete traffic source
|
||||||
|
description: Changes the state to 'deleted'.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Success
|
||||||
|
'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
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Traffic sources
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: Traffic source ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Clone trafic source
|
||||||
|
description: Makes a copy of traffic source.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Traffic source details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Source.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../responses/NotFound.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get users
|
||||||
|
description: Returns list of the users
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of the users
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: ../schemas/User.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create user
|
||||||
|
description: Creates user
|
||||||
|
requestBody:
|
||||||
|
description: User fields
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/UserRequest.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: User details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/User.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'406':
|
||||||
|
$ref: ../responses/NotAcceptable.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Clean archive
|
||||||
|
description: Clean archive
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The archive was cleaned successfully
|
||||||
|
'400':
|
||||||
|
$ref: ../responses/BadRequest.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../responses/Unauthorized.yaml
|
||||||
|
'402':
|
||||||
|
$ref: ../responses/PaymentRequired.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../responses/InternalError.yaml
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: User ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Get user
|
||||||
|
description: Returns user details.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: User details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/User.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
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: User ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update user
|
||||||
|
description: Updates user.
|
||||||
|
requestBody:
|
||||||
|
description: User fields to update.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/UserRequestUpdate.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: User details.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/User.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
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: User ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Delete user
|
||||||
|
description: Deletes user. Cannot be reverted.
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: User successfully deleted
|
||||||
|
'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
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- Users
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: User ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
summary: Update access
|
||||||
|
description: Updates access for user.
|
||||||
|
requestBody:
|
||||||
|
description: New access settings.
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/UserRequestAccess.yaml
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Updated user details
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/User.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
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Bad request
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Internal error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
description: Required fields are not acceptable
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
nameField:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Entity not found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Admin API is not available in that edition
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Access denied
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/Error.yaml
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
description: Unprocessable entity
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/UnprocessableEntity.yaml
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
BadRequest:
|
||||||
|
$ref: ./BadRequest.yaml
|
||||||
|
InternalError:
|
||||||
|
$ref: ./InternalError.yaml
|
||||||
|
NotAcceptable:
|
||||||
|
$ref: ./NotAcceptable.yaml
|
||||||
|
NotFound:
|
||||||
|
$ref: ./NotFound.yaml
|
||||||
|
PaymentRequired:
|
||||||
|
$ref: ./PaymentRequired.yaml
|
||||||
|
Unauthorized:
|
||||||
|
$ref: ./Unauthorized.yaml
|
||||||
|
UnprocessableEntity:
|
||||||
|
$ref: ./UnprocessableEntity.yaml
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue