Skip to content
This repository has been archived by the owner on Jun 1, 2018. It is now read-only.

Straas/StraaS-stream-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StraaS.io - Streaming as a Service, Your Best OTT Solution

World-class streaming and advertisement technology to drive profit and provide best multi-screen, multi-device user experiences.

The Enigma

Enigma provides transcoding as a service. She converts the source media content to the easily distributed format.

Making a request

All URLs start with https://tx.straas.io/api/v1/. SSL only. The path is prefixed with the API version. If we change the API in backward-incompatible ways, we'll bump the version marker and maintain stable support for the old URLs.

That's all!

Authentication

Please refer Authentication wiki. You should use application token to accees Enigma API.

Given client_id and client_secret, the application token could be generated by below POST request

curl -X POST --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  -d '{"client_id":<YOUR_CLIENT_ID>,"client_secret":<YOUR_CLIENT_SECRET>}' \
  'https://cms.straas.io/api/v1/app/token'

If success, the response will be like as below

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBfaWQiOjg4MywiZXhwIjoxNDY4NTcyNDMyfQ.mfSXrlBtGLckF3X3Ig5sCH-wX2-9grOpXw0BOsM_PWs"
}

Then you should use the token to access all Enigma API by setting HTTP header Authorization to the token.

Handling errors

If Enigma is having trouble, you might see a 5xx error. 500 means that the app is entirely down, but you might also see 502 Bad Gateway, 503 Service Unavailable, or 504 Gateway Timeout. It's your responsibility in all of these cases to retry your request later.

Rate limiting

You can perform up to 500 requests per 10 second period from the same IP address for the same account. If you exceed this limit, you'll get a 429 Too Many Requests response for subsequent requests. Check the Retry-After header to see how many seconds to wait before retrying the request.

API ready for use

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published