Config the origin configuration of a Domain
Create or modify the origin configuration of a streaming domain name, which affects the HTTP-FLV streams of the domain
Request
Request-Line
POST /lls/v1.0/domain/{domain}/origin
Request Parameters
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
domain | String | Mandatory | domain name. |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
sourceType | String | Mandatory | Origin pull method. Valid values are domain, ip. domain: Origin pull from the customer's origin server. The origin server address is in the domain name format. Multiple domain names for origin pull can be configured. If origin pull fails, domain names are polled based on the configured sequence until origin pull succeeds. ip: Origin pull from the customer's origin server. The origin server address is in the IP address format. Multiple IP addresses for origin pull can be configured. If origin pull fails, IP addresses are polled based on the configured sequence until origin pull succeeds. A maximum of one domain name for origin pull can be configured. During origin pull, set the header of httpflv HOST and the RTMP tcurl field to the configured domain name, respectively. Otherwise, the current IP address is used as the HOST. |
originSchema | String | Optional | Schema for origin pull. Valid values are http, https. Default is https. |
sourceDomains | Array | Optional | Domain names for origin pull. It is mandatory when the value of sourceType is "domain". |
sourceIPs | Array | Optional | IP addresses for origin pull. It is mandatory when the value of sourceType is "ip". |
sourcePort | Integer | Optional | Port for origin pull. It is mandatory when the value of sourceType is "ip". |
sourceIPHost | String | Optional | The host of the IP address for origin pull. It is mandatory when the value of sourceType is "ip". |
Response
Response Body
Status Codes, Error Codes and Error Messages
Status Code | Error Code | Error Message |
---|---|---|
400 | LLS.Domain.NotFound | Domain name is not found. |
Examples
Modify the origin configuration of a Domain with domain names
Request
POST /lls/v1.0/domain/ingest.example.com/origin HTTP/1.1
{
"sourceType": "domain",
"originSchema": "https",
"sourceDomains": [
"first.customer1.com",
"second.customer2.com",
"third.customer3.com"
]
}
Modify the origin configuration of a Domain with IP addresses
Request
PUT /lls/v1.0/domain/ingest2.example.com/origin HTTP/1.1
{
"sourceType": "ip",
"originSchema": "http",
"sourceIPs": [
"38.0.101.76",
"51.15.16.17",
"62.60.226.226"
],
"sourcePort": 443,
"sourceIPHost": "origin2.example.com"
}
Best Practices
Rate Limiting
Rate Limits
Rate limiting is posed upon the API, please kindly check your API calls to ensure complying with the rate limit below:
- 100 requests per minute
- 1000 requests per hour