NAV
Shell HTTP JavaScript Node.JS Ruby Python Java Go

On Rewind API v8.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

On Rewind API documentation based on OpenAPI 3.0. This document provides info on all publicly accessible routes if identified with a bearer token.

Base URLs:

Email: API Support

Authentication

Auth Service

post__auth_login

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/auth/login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Accept-Version: v5'

POST https://api-gateway.onrewind.tv/auth/login HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json
Accept-Version: v5

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept-Version':'v5'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/auth/login',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "username": "string",
  "password": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept-Version':'v5'

};

fetch('https://api-gateway.onrewind.tv/auth/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Accept-Version' => 'v5'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/auth/login',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Version': 'v5'
}

r = requests.post('https://api-gateway.onrewind.tv/auth/login', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/auth/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Accept-Version": []string{"v5"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/auth/login", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /auth/login

Log in an user

Send credentials to retrieve an accessToken. If the 'Accept-Version' header is specified to value "v5", user data will be returned, but this version is deprecated and not recommended as data might not be in sync.

Body parameter

{
  "username": "string",
  "password": "string"
}

Parameters

Name In Type Required Description
Accept-Version header string false none
body body object true credentials data
» username body string false username of the user
» password body string false password of the user

Enumerated Values

Parameter Value
Accept-Version v5
Accept-Version v6

Example responses

200 Response

{
  "id": "string",
  "accessToken": "string",
  "tokenType": "Bearer",
  "expiresIn": 86400
}

Responses

Status Meaning Description Schema
200 OK The user is logged in Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(uuid) false none user id
» accessToken string(JWT) false none accessToken to be used in every subsequent requests
» tokenType string false none type of the token being returned, at the moment only bearer token can be returned
» expiresIn integer false none expiry time of the token, defaults to 24h

post__auth_fan_login

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/auth/fan/login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Accept-Version: v5' \
  -H 'x-account-key: string'

POST https://api-gateway.onrewind.tv/auth/fan/login HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json
Accept-Version: v5
x-account-key: string

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept-Version':'v5',
  'x-account-key':'string'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/auth/fan/login',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "email": "string",
  "password": "string",
  "googleTokenId": "string",
  "facebookAccessToken": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Accept-Version':'v5',
  'x-account-key':'string'

};

fetch('https://api-gateway.onrewind.tv/auth/fan/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Accept-Version' => 'v5',
  'x-account-key' => 'string'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/auth/fan/login',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Accept-Version': 'v5',
  'x-account-key': 'string'
}

r = requests.post('https://api-gateway.onrewind.tv/auth/fan/login', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/auth/fan/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Accept-Version": []string{"v5"},
        "x-account-key": []string{"string"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/auth/fan/login", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /auth/fan/login

Log in a fan

Send credentials to retrieve an accessToken. Credentials may be a set of email/password or a google token id or a facebook access token.

Body parameter

{
  "email": "string",
  "password": "string",
  "googleTokenId": "string",
  "facebookAccessToken": "string"
}

Parameters

Name In Type Required Description
Accept-Version header string false none
x-account-key header string true Identifies the customer's account
body body object true Credentials data ; must be either a set of email/password or a googleTokenId or a facebookAccessToken.
» email body string false email of the fan
» password body string false password of the fan
» googleTokenId body string false google api token id returned by the google api when the user after logged in using its google account.
» facebookAccessToken body string false facebook access token returned by the facebook api when the user logged in using its facebook account.

Enumerated Values

Parameter Value
Accept-Version v5
Accept-Version v6

Example responses

200 Response

{
  "id": "string",
  "accessToken": "string",
  "tokenType": "Bearer",
  "expiresIn": 86400
}

Responses

Status Meaning Description Schema
200 OK The fan is logged in Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(uuid) false none fan id
» accessToken string(JWT) false none accessToken to be used in every subsequent requests
» tokenType string false none type of the token being returned, at the moment only bearer token can be returned
» expiresIn integer false none expiry time of the token, defaults to 24h

post__auth_logout

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/auth/logout \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/auth/logout HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/auth/logout',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/auth/logout',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/auth/logout',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/auth/logout', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/auth/logout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/auth/logout", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /auth/logout

Log out a fan

Logout a fan by invalidating his accessToken

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK The fan is logged out and his token is now invalid Inline
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» message string false none message describing if the token is already expired or if it's been successfully logged out

post__auth_fan_logout

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/auth/fan/logout \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/auth/fan/logout HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/auth/fan/logout',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/auth/fan/logout',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/auth/fan/logout',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/auth/fan/logout', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/auth/fan/logout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/auth/fan/logout", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /auth/fan/logout

Log out an fan

Logout an fan by invalidating his accessToken

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK The fan is logged out and his token is now invalid Inline
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» message string false none message describing if the token is already expired or if it's been successfully logged out

Chats Service - Chat

post__chats-service-api_chats

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/chats-service-api/chats \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/chats-service-api/chats HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "resourceId": "string",
  "resourceType": "event"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/chats-service-api/chats',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/chats-service-api/chats', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/chats-service-api/chats", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /chats-service-api/chats

Create a new chat

Create a new chat

Body parameter

{
  "resourceId": "string",
  "resourceType": "event"
}

Parameters

Name In Type Required Description
body body Chat true chat data to be sent

Example responses

201 Response

{
  "id": "string",
  "resourceId": "string",
  "resourceType": "event"
}

Responses

Status Meaning Description Schema
201 Created The chat is created Chat
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_chats-service-api_chats{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/chats-service-api/chats/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/chats-service-api/chats/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/chats-service-api/chats/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/chats-service-api/chats/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /chats-service-api/chats/{id}

Fetch a chat

Fetch a chat matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "resourceId": "string",
  "resourceType": "event"
}

Responses

Status Meaning Description Schema
200 OK Chat data matching the id Chat
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_chats-service-api_chats{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/chats-service-api/chats/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/chats-service-api/chats/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/chats-service-api/chats/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/chats-service-api/chats/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/chats-service-api/chats/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /chats-service-api/chats/{id}

Delete a chat

Delete a chat

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the chat has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Chats Service - Message

post_chats-service-api_chats{chatId}_messages

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /chats-service-api/chats/{chatId}/messages

Create a new message

Create a new message

Body parameter

{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Parameters

Name In Type Required Description
chatId path string(uuid) true the uuid of the chat
body body Message true message data to be sent

Example responses

201 Response

{
  "id": "string",
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Responses

Status Meaning Description Schema
201 Created The message is created Message
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_chats-service-api_chats{chatId}_messages

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /chats-service-api/chats/{chatId}/messages

Index of messages

Get the list of all messages.

Parameters

Name In Type Required Description
chatId path string(uuid) true the uuid of the chat

Example responses

200 Response

[
  {
    "id": "string",
    "content": {
      "text": ""
    },
    "flagged": false,
    "hidden": false,
    "FanId": "string",
    "ParentId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Messages Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Message] false none none
» Chat object false none none
»» id string(uuid) true read-only none
»» content object(json) false none content of the message,
»» flagged boolean true none if true, the message has been flagged by an user as inappropriate. It can be used to filter messages to make moderation easier.
»» hidden boolean true none if true, the message has been hidden by a moderator. The message can then be filtered for end users but still be visible for the author.
»» FanId string(uuid) true none id of the fan that authored the message
»» ParentId string(uuid) false none id of the parent message, can be used to create a thread

get_chats-service-api_chats{chatId}messages{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /chats-service-api/chats/{chatId}/messages/{id}

Fetch a message

Fetch a message matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
chatId path string(uuid) true the uuid of the chat

Example responses

200 Response

{
  "id": "string",
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Responses

Status Meaning Description Schema
200 OK Message data matching the id Message
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_chats-service-api_chats{chatId}messages{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /chats-service-api/chats/{chatId}/messages/{id}

Update a message matching the given id

Body parameter

{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
chatId path string(uuid) true the uuid of the chat
body body Message true message data to be sent

Example responses

200 Response

{
  "id": "string",
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated message Message
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_chats-service-api_chats{chatId}messages{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /chats-service-api/chats/{chatId}/messages/{id}

Delete a message

Delete a message

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
chatId path string(uuid) true the uuid of the chat

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the message has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_chats-service-api_chats{chatId}messages{id}_flag

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/chats-service-api/chats/{chatId}/messages/{id}/flag", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /chats-service-api/chats/{chatId}/messages/{id}/flag

Flag a message matching the given id. Can be used by users to report inappropriate content.

Body parameter

{
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
chatId path string(uuid) true the uuid of the chat
body body Message false WARNING - The body of this request will be ignored.

Example responses

200 Response

{
  "id": "string",
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Responses

Status Meaning Description Schema
200 OK Message updated with attribute "flagged" set to True Message
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Chats Service - ExtendedFan

post__chats-service-api_extended-fans

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/chats-service-api/extended-fans \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/chats-service-api/extended-fans HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "FanId": "string",
  "isBlocked": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/extended-fans',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/chats-service-api/extended-fans', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/extended-fans");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/chats-service-api/extended-fans", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /chats-service-api/extended-fans

Create a new extendedFan

Create a new extendedFan

Body parameter

{
  "FanId": "string",
  "isBlocked": true
}

Parameters

Name In Type Required Description
chatId path string(uuid) true the uuid of the chat
body body ExtendedFan true extendedFan data to be sent

Example responses

201 Response

{
  "id": "string",
  "FanId": "string",
  "isBlocked": true
}

Responses

Status Meaning Description Schema
201 Created The extendedFan is created ExtendedFan
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_chats-service-api_extended-fans{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /chats-service-api/extended-fans/{id}

Fetch an ExtendedFan

Fetch an ExtendedFan matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "FanId": "string",
  "isBlocked": true
}

Responses

Status Meaning Description Schema
200 OK ExtendedFan data matching the id ExtendedFan
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_chats-service-api_extended-fans{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "FanId": "string",
  "isBlocked": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /chats-service-api/extended-fans/{id}

Update an ExtendedFan matching the given id

Body parameter

{
  "FanId": "string",
  "isBlocked": true
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body ExtendedFan true ExtendedFan data to be sent

Example responses

200 Response

{
  "id": "string",
  "FanId": "string",
  "isBlocked": true
}

Responses

Status Meaning Description Schema
200 OK Updated ExtendedFan ExtendedFan
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_chats-service-api_extended-fans{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/chats-service-api/extended-fans/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /chats-service-api/extended-fans/{id}

Delete an ExtendedFan

Delete an ExtendedFan

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the ExtendedFan has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

CMS Service - Item

get__cms-service-api_items

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/cms-service-api/items?type=string \
  -H 'Accept: application/json' \
  -H 'x-account-key: string' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/cms-service-api/items?type=string HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json
x-account-key: string

var headers = {
  'Accept':'application/json',
  'x-account-key':'string',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/cms-service-api/items',
  method: 'get',
  data: '?type=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-account-key':'string',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/cms-service-api/items?type=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-account-key' => 'string',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/cms-service-api/items',
  params: {
  'type' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'x-account-key': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/cms-service-api/items', params={
  'type': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/cms-service-api/items?type=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "x-account-key": []string{"string"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/cms-service-api/items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /cms-service-api/items

Index of items stored in the CMS

Get the list of all items.

Parameters

Name In Type Required Description
x-account-key header string true The key assigned to the On Rewind customer account - used for authentication.
type query string true The type of the items that should be returned by the CMS.
language query string false The language of the items that should be returned by the CMS.
order query string false The name of the criteria used to sort items (one of id, name, type, lastModified).
limit query integer false Number of content items to retrieve in a single request
skip query integer false Number of content items to skip

Example responses

200 Response

[
  {
    "system": {
      "id": "string",
      "name": "string",
      "type": "string",
      "last_modified": "string"
    },
    "elements": {
      "event": "string",
      "video": {
        "id": "string",
        "name": "string",
        "description": "string",
        "duration": 0,
        "poster": "http://example.com",
        "url": "http://example.com",
        "visibility": "public",
        "status": "none",
        "archiveData": {},
        "vendorName": "jwplayer",
        "vendorVideoId": "string",
        "vendorApiKey": "string",
        "tags": {
          "private": [
            "string"
          ],
          "public": [
            "string"
          ]
        },
        "AccountId": "string"
      }
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A list of items Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CMSItem] false none none
» CMSItem object false none none
»» system object true none Metadata about the item as stored in the CMS
»»» id string true none The id of the item as assigned automatically by the CMS
»»» name string true none The name of the item as entered in the CMS
»»» type string true none The type of item
»»» last_modified string true none The date and time when the item was last modified in the CMS
»» elements object true none A container object for one or several objects making up this item
»»» event string false none none
»»» video object false none none
»»»» id string(uuid) false read-only none
»»»» name string true none The name of the video
»»»» description string false none The description of the video
»»»» duration number false none The duration of the video in seconds
»»»» poster string(uri) false none The URL of the video poster
»»»» url string(uri) false none The URL of the video file
»»»» visibility string false none The visibility of the video
»»»» status string false none The status of the video
»»»» archiveData object false none Archive the video data in this object instead of removing it
»»»» vendorName string false none The name of the vendor
»»»» vendorVideoId string false none Video id on the third party service when the video is hosted externally
»»»» vendorApiKey string false none Api key of the third party
»»»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»»»» private [string] false none List of private tag.
»»»»» public [string] false none List of private tag.
»»»» AccountId string(uuid) false none none

Enumerated Values

Property Value
visibility public
visibility private
status none
status original
status in_progress
status encoded
status archived
status vendor
vendorName jwplayer
vendorName dailymotion

Main API - Auth

get__main-api_auth_ping

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/auth/ping \
  -H 'Accept: text/plain'

GET https://api-gateway.onrewind.tv/main-api/auth/ping HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: text/plain

var headers = {
  'Accept':'text/plain'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/auth/ping',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'text/plain'

};

fetch('https://api-gateway.onrewind.tv/main-api/auth/ping',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'text/plain'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/auth/ping',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'text/plain'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/auth/ping', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/auth/ping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"text/plain"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/auth/ping", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/auth/ping

Test API is up and running

Test API is up and running

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK The API returns 'ok' string

Main API - Business player

post__main-api_business-players

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/business-players \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/business-players HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/business-players',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/business-players', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/business-players", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/business-players

Create a new business player

Create a new business player. These data are used by our business (conference) player

Body parameter

{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
body body BusinessPlayer true business player data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
201 Created The business player created BusinessPlayer
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_business-players

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/business-players \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/business-players HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/business-players',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/business-players', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/business-players", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/business-players

Index of business players

Index of business players

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "organiserName": "string",
    "state": "replay",
    "placeholder": {
      "poster": "string",
      "text": "string"
    },
    "options": {
      "autostart": true,
      "chapterOnLoad": true,
      "chaptersTitle": "string",
      "initialStartingTime": 0,
      "showControls": true
    },
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "activatedModules": [
      0
    ],
    "visibility": "public",
    "tags": {
      "private": [
        "string"
      ],
      "public": [
        "string"
      ]
    },
    "AccountId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of business players Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [BusinessPlayer] false none none
» BusinessPlayer object false none none
»» id string(uuid) false read-only none
»» name string true none Business player's name
»» description string false none Business player's description
»» organiserName string true none The name of the business organiser
»» state string false none The state of the player
»» placeholder object false none Attribute storing extra data about the business player placeholder
»»» poster string false none The URL of the placeholder image
»»» text string false none The text associated to the placeholder
»» options object false none Attribute storing extra data about the business player
»»» autostart boolean false none none
»»» chapterOnLoad boolean false none none
»»» chaptersTitle string false none none
»»» initialStartingTime integer false none none
»»» showControls boolean false none none
»» startDate string(date-time) false none The date when the business starts
»» endDate string(date-time) false none The date when the business ends
»» activatedModules [integer] false none The list of active modules for this business player
»» visibility string false none The visibility of the player
»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»» private [string] false none List of private tag.
»»» public [string] false none List of private tag.
»» AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

get_main-api_business-players{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/business-players/{id} \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/business-players/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/business-players/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/business-players/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/business-players/{id}

Fetch a business player

Fetch a business player matching the given id. Used by our business player, therefore this route is public.

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Business player data matching the id BusinessPlayer
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_business-players{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/business-players/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/business-players/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/business-players/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/business-players/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/business-players/{id}

Update a business player matching the given id

Body parameter

{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body BusinessPlayer true business player data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated business player BusinessPlayer
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_business-players{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/business-players/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/business-players/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/business-players/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/business-players/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/business-players/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/business-players/{id}

Delete a business player

Delete a business player

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the business player has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_main-api_business-players{id}_clips

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/business-players/{id}/clips", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/business-players/{id}/clips

Fetch the list of a business player's clips

Fetch the list of a business player's clips

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "state": "none",
    "meta": {
      "format": "string",
      "duration": 0
    },
    "url": "string",
    "AccountId": "string",
    "UserId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK List of clips Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Clip] false none none
» Clip object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the clip
»» state string false none The state of the clip
»» meta object true none Attribute storing extra data about the clip
»»» format string false none The file format (ex MP4)
»»» duration integer false none The duration of the clip in seconds
»» url string false none The url of the clip (from external providers)
»» AccountId string(uuid) false none The account id
»» UserId string(uuid) false none The user id

Enumerated Values

Property Value
state none
state error
state ready
state in_progress

get_main-api_business-players{id}_embed

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/business-players/{id}/embed", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/business-players/{id}/embed

Fetch a business player's embed code

Fetch a business player's embed code

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK HTML embed code for the business player string
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

post_main-api_business-players{id}_process-end-live

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/business-players/{id}/process-end-live", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/business-players/{id}/process-end-live

Process a live business player's switch to 'replay' state

Process a live business's switch to 'replay' state. It will create a new video and associate to the business player once it's encoded.

Body parameter

{
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body BusinessPlayer true id of the business player

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK The business player created. BusinessPlayer
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

Main API - Challenger

post__main-api_challengers

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/challengers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/challengers HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/challengers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/challengers', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/challengers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/challengers

Create a new challenger

Create a new challenger

Body parameter

{
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Parameters

Name In Type Required Description
body body Challenger true challenger data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
201 Created The user is created Challenger
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_challengers

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/challengers \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/challengers HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/challengers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/challengers', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/challengers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/challengers

Index of challengers

Get the list of all challengers.

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "type": "standard",
    "country": "string",
    "birthday": "2020-09-16",
    "picture": "string",
    "profileOptions": {},
    "jerseyPicture": "string",
    "firstName": "string",
    "role": "string",
    "TeamId": "string",
    "SportId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Challengers Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Challenger] false none none
» Challenger object false none none
»» id string(uuid) false read-only none
»» name string true none name of the challenger
»» type string false none Type of the challenger, possible values are: - standard: the challenger is a challenger. - team: the challenger is a team. It has many teammate. - teammate: the challenger is a teammate. It belongs to team.
»» country string false none country code of the challenger
»» birthday string(date) false none the birthday of the challenger (standard, teammate)
»» picture string false none the filename of the main picture of the challenger
»» profileOptions object(json) false none Object that contains statistics and buttons to display the challenger profile
»» jerseyPicture string false none the filename of the picture of the challengers jersey (standard, team)
»» firstName string false none the first name of the challenger (standard, teammate)
»» role string false none the role of the challenger
»» TeamId string(uuid) false none Reference to a team instance (challenger)
»» SportId string(uuid) false none Reference to a sport instance

Enumerated Values

Property Value
type standard
type team
type teammate

get_main-api_challengers{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/challengers/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/challengers/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/challengers/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/challengers/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/challengers/{id}

Fetch a challenger

Fetch a challenger matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Challenger data matching the id Challenger
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_challengers{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/challengers/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/challengers/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/challengers/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/challengers/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/challengers/{id}

Update a challenger matching the given id

Body parameter

{
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Challenger true challenger data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated challenger Challenger
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_challengers{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/challengers/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/challengers/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/challengers/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/challengers/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/challengers/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/challengers/{id}

Delete a challenger

Delete a challenger

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content The challenger has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Clip

post__main-api_clips

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/clips \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/clips HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/clips',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "state": "none",
  "meta": {
    "format": "string",
    "duration": 0
  },
  "url": "string",
  "AccountId": "string",
  "UserId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/clips',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/clips',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/clips', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/clips");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/clips", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/clips

Create a new clip

Create a new clip

Body parameter

{
  "name": "string",
  "state": "none",
  "meta": {
    "format": "string",
    "duration": 0
  },
  "url": "string",
  "AccountId": "string",
  "UserId": "string"
}

Parameters

Name In Type Required Description
body body Clip true clip data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "state": "none",
  "meta": {
    "format": "string",
    "duration": 0
  },
  "url": "string",
  "AccountId": "string",
  "UserId": "string"
}

Responses

Status Meaning Description Schema
201 Created The clip is created Clip
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_clips

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/clips \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/clips HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/clips',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/clips',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/clips',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/clips', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/clips");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/clips", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/clips

Index of clips

Get the list of all clips.

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "state": "none",
    "meta": {
      "format": "string",
      "duration": 0
    },
    "url": "string",
    "AccountId": "string",
    "UserId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Clips Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Clip] false none none
» Clip object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the clip
»» state string false none The state of the clip
»» meta object true none Attribute storing extra data about the clip
»»» format string false none The file format (ex MP4)
»»» duration integer false none The duration of the clip in seconds
»» url string false none The url of the clip (from external providers)
»» AccountId string(uuid) false none The account id
»» UserId string(uuid) false none The user id

Enumerated Values

Property Value
state none
state error
state ready
state in_progress

delete_main-api_clips{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/clips/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/clips/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/clips/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/clips/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/clips/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/clips/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/clips/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/clips/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/clips/{id}

Delete a clip

Delete a clip

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content The clip has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - DataProviderMapping

post_main-api_data-provider-mapping{providerName}_subscriptions

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "username": "string",
  "password": "string",
  "tenant": "string",
  "secret": "string",
  "AccountKey": "string",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/data-provider-mapping/{providerName}/subscriptions

Subscribe an account to a provider's notifications

This service opens subscriptions to a given provider's notifications.

Body parameter

{
  "username": "string",
  "password": "string",
  "tenant": "string",
  "secret": "string",
  "AccountKey": "string",
  "SportId": "string"
}

Parameters

Name In Type Required Description
providerName path string true the name of the data provider service
body body object true subscription data to be sent
» username body string false The username needed to access the provider's API
» password body string false The password needed to access the provider's API
» tenant body string false identifier on the provider's side
» secret body string false secret generated by onrewind which will be used by the provider to sign the request for each notification
» AccountKey body string false the identifier for the customer account which will be subscribed to the provider's notifications
» SportId body string false id of the sport for the customer account which will be subscribed to the provider's notifications

Example responses

400 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
201 Created The subscriptions are created None
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_main-api_data-provider-mapping{providerName}_subscriptions

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  method: 'get',
  data: '?username=string&password=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  params: {
  'username' => 'string',
'password' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions', params={
  'username': 'string',  'password': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/data-provider-mapping/{providerName}/subscriptions

Get the list of subscriptions

This service list the subscriptions to a given provider's notifications.

Parameters

Name In Type Required Description
providerName path string true the name of the data provider service
username query string true The username needed to access the provider's API
password query string true The password needed to access the provider's API

Example responses

400 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK The list of subscriptions None
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_main-api_data-provider-mapping{providerName}_subscriptions

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  method: 'delete',
  data: '?username=string&password=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions',
  params: {
  'username' => 'string',
'password' => 'string'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions', params={
  'username': 'string',  'password': 'string'
}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions?username=string&password=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/data-provider-mapping/{providerName}/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/data-provider-mapping/{providerName}/subscriptions

Delete all the subscriptions

This service remove all the subscriptions to a given provider's notifications.

Parameters

Name In Type Required Description
providerName path string true the name of the data provider service
username query string true The username needed to access the provider's API
password query string true The password needed to access the provider's API

Example responses

400 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content The list of subscriptions None
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

Main API - Competition

post__main-api_competitions

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/competitions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/competitions HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/competitions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/competitions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/competitions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/competitions', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/competitions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/competitions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/competitions

Create a new competition

Create a new competition

Body parameter

{
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Parameters

Name In Type Required Description
body body Competition true competition data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
201 Created The competition is created Competition
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_competitions

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/competitions \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/competitions HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/competitions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/competitions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/competitions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/competitions', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/competitions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/competitions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/competitions

Index of competitions

Get the list of all competitions.

Parameters

Name In Type Required Description
limit path integer false number of expected results
SportId path string(uuid) false the uuid of the sport

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "slug": "string",
    "displayOrder": 0,
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "SportId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Competitions Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Competition] false none none
» Competition object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the competition
»» slug string false none The slug of the competition used in the url
»» displayOrder number false none The position in the list of competitions when listing all the competitions for a given sport.
»» startDate string(date-time) false none The date when the competition starts
»» endDate string(date-time) false none The date when the competition ends
»» SportId string(uuid) false none The id of the associated sport

get_main-api_competitions{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/competitions/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/competitions/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/competitions/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/competitions/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/competitions/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/competitions/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/competitions/{id}

Fetch a competition

Fetch a competition matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Competition data matching the id Competition
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_competitions{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/competitions/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/competitions/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/competitions/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/competitions/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/competitions/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/competitions/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/competitions/{id}

Update a competition matching the given id

Body parameter

{
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Competition true competition data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated competition Competition
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_competitions{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/competitions/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/competitions/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/competitions/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/competitions/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/competitions/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/competitions/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/competitions/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/competitions/{id}

Delete a competition

Delete a competition

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the competition has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Event

post__main-api_events

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/events \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/events HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/events',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/events',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/events', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/events

Create a new event

Create a new event. Events are used by our sports player.

Body parameter

{
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
body body Event true event data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
201 Created The event created Event
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_events

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/events HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events

Index of events

Index of events

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "organiserName": "string",
    "description": "string",
    "location": "string",
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "state": "replay",
    "placeholder": {
      "poster": "string",
      "text": "string"
    },
    "activatedModules": [
      0
    ],
    "pricingPlans": [
      "string"
    ],
    "geoBlockingMapping": {},
    "dailymotionLiveStreamId": "string",
    "youtubeLiveStreamId": "string",
    "hashtag": "string",
    "options": {},
    "score": {
      "teamIn": "string",
      "teamOut": "string",
      "scoreIn": "string",
      "scoreOut": "string"
    },
    "facebookPlaylistId": "string",
    "visibility": "public",
    "tags": {
      "private": [
        "string"
      ],
      "public": [
        "string"
      ]
    },
    "AccountId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of events Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Event] false none none
» Event object false none none
»» id string(uuid) false read-only none
»» name string true none Event's name
»» organiserName string false none name of the organiser of the event
»» description string false none Event's description
»» location string false none Event's location
»» startDate string(date-time) false none The date when the event starts
»» endDate string(date-time) false none The date when the event ends
»» state string false none The state of the event
»» placeholder object false none Attribute storing extra data about the event placeholder
»»» poster string false none The URL of the placeholder image
»»» text string false none The text associated to the placeholder
»» activatedModules [integer] false none The list of active modules for this event
»» pricingPlans [string] false none Attribute storing payment plan. Need payment module activated
»» geoBlockingMapping object false none contains an object with key=CountryCode and value="onrewind.com, http://myplayer.onrewind.com/player.html"
»» dailymotionLiveStreamId string false none holding dailymotion stream id
»» youtubeLiveStreamId string false none holding youtube stream id
»» hashtag string false none twitter hashtag of the event, used to build twitter feed around an event
»» options object false none Attribute storing extra data about the event
»» score object false none score of current event, this field was added quickly to solve a customer problemn. We do not recommend using this field.
»»» teamIn string false none name of home team
»»» teamOut string false none name of away team
»»» scoreIn string false none socre of home team
»»» scoreOut string false none socre of away team
»» facebookPlaylistId string false none facebook playlist id, used to upload event's clips to customer facebook page inside this playlist.
»» visibility string false none The visibility of the player
»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»» private [string] false none List of private tag.
»»» public [string] false none List of private tag.
»» AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

get_main-api_events{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events/{id} \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/events/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events/{id}

Fetch an event

Fetch an event matching the given id.

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Event data matching the id Event
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_events{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/events/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/events/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/events/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/events/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/events/{id}

Update an event matching the given id

Body parameter

{
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Event true event data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated event Event
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_events{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/events/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/events/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/events/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/events/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/events/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/events/{id}

Delete an event

Delete an event

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the event has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_main-api_events{id}_player

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events/{id}/player \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/events/{id}/player HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/{id}/player',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/{id}/player',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events/{id}/player',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events/{id}/player', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/{id}/player");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events/{id}/player", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events/{id}/player

Fetch an event with extra data needed for the player.

Fetch an event matching the given id. Similar to /events/:id but with extra data populated needed for the player. This route is using caching and therefore is recommended to get good performance.

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Event data matching the id Event
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get__main-api_events_fixtures

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events/fixtures \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/events/fixtures HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/fixtures',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/fixtures',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events/fixtures',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events/fixtures', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/fixtures");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events/fixtures", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events/fixtures

Fetch upcoming events.

Select upcoming events, compared to the server time. You can specify a limit of results as well as filtering by account id. Events must be in [liveOff, LiveDailymotion, LiveOn] state.

Parameters

Name In Type Required Description
accountId query string false The customer account id
limit query number false The number of events to return

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "organiserName": "string",
    "description": "string",
    "location": "string",
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "state": "replay",
    "placeholder": {
      "poster": "string",
      "text": "string"
    },
    "activatedModules": [
      0
    ],
    "pricingPlans": [
      "string"
    ],
    "geoBlockingMapping": {},
    "dailymotionLiveStreamId": "string",
    "youtubeLiveStreamId": "string",
    "hashtag": "string",
    "options": {},
    "score": {
      "teamIn": "string",
      "teamOut": "string",
      "scoreIn": "string",
      "scoreOut": "string"
    },
    "facebookPlaylistId": "string",
    "visibility": "public",
    "tags": {
      "private": [
        "string"
      ],
      "public": [
        "string"
      ]
    },
    "AccountId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of upcoming events Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Event] false none none
» Event object false none none
»» id string(uuid) false read-only none
»» name string true none Event's name
»» organiserName string false none name of the organiser of the event
»» description string false none Event's description
»» location string false none Event's location
»» startDate string(date-time) false none The date when the event starts
»» endDate string(date-time) false none The date when the event ends
»» state string false none The state of the event
»» placeholder object false none Attribute storing extra data about the event placeholder
»»» poster string false none The URL of the placeholder image
»»» text string false none The text associated to the placeholder
»» activatedModules [integer] false none The list of active modules for this event
»» pricingPlans [string] false none Attribute storing payment plan. Need payment module activated
»» geoBlockingMapping object false none contains an object with key=CountryCode and value="onrewind.com, http://myplayer.onrewind.com/player.html"
»» dailymotionLiveStreamId string false none holding dailymotion stream id
»» youtubeLiveStreamId string false none holding youtube stream id
»» hashtag string false none twitter hashtag of the event, used to build twitter feed around an event
»» options object false none Attribute storing extra data about the event
»» score object false none score of current event, this field was added quickly to solve a customer problemn. We do not recommend using this field.
»»» teamIn string false none name of home team
»»» teamOut string false none name of away team
»»» scoreIn string false none socre of home team
»»» scoreOut string false none socre of away team
»» facebookPlaylistId string false none facebook playlist id, used to upload event's clips to customer facebook page inside this playlist.
»» visibility string false none The visibility of the player
»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»» private [string] false none List of private tag.
»»» public [string] false none List of private tag.
»» AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

get__main-api_events_rewinds

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events/rewinds \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/events/rewinds HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/rewinds',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/rewinds',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events/rewinds',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events/rewinds', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/rewinds");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events/rewinds", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events/rewinds

Fetch past events.

Select past events, compared to the server time. You can specify a limit of results as well as filtering by account id. Events must be in [replay] state and have a video associated.

Parameters

Name In Type Required Description
accountId query string false The customer account id
limit query number false The number of events to return

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "organiserName": "string",
    "description": "string",
    "location": "string",
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "state": "replay",
    "placeholder": {
      "poster": "string",
      "text": "string"
    },
    "activatedModules": [
      0
    ],
    "pricingPlans": [
      "string"
    ],
    "geoBlockingMapping": {},
    "dailymotionLiveStreamId": "string",
    "youtubeLiveStreamId": "string",
    "hashtag": "string",
    "options": {},
    "score": {
      "teamIn": "string",
      "teamOut": "string",
      "scoreIn": "string",
      "scoreOut": "string"
    },
    "facebookPlaylistId": "string",
    "visibility": "public",
    "tags": {
      "private": [
        "string"
      ],
      "public": [
        "string"
      ]
    },
    "AccountId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of past events Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Event] false none none
» Event object false none none
»» id string(uuid) false read-only none
»» name string true none Event's name
»» organiserName string false none name of the organiser of the event
»» description string false none Event's description
»» location string false none Event's location
»» startDate string(date-time) false none The date when the event starts
»» endDate string(date-time) false none The date when the event ends
»» state string false none The state of the event
»» placeholder object false none Attribute storing extra data about the event placeholder
»»» poster string false none The URL of the placeholder image
»»» text string false none The text associated to the placeholder
»» activatedModules [integer] false none The list of active modules for this event
»» pricingPlans [string] false none Attribute storing payment plan. Need payment module activated
»» geoBlockingMapping object false none contains an object with key=CountryCode and value="onrewind.com, http://myplayer.onrewind.com/player.html"
»» dailymotionLiveStreamId string false none holding dailymotion stream id
»» youtubeLiveStreamId string false none holding youtube stream id
»» hashtag string false none twitter hashtag of the event, used to build twitter feed around an event
»» options object false none Attribute storing extra data about the event
»» score object false none score of current event, this field was added quickly to solve a customer problemn. We do not recommend using this field.
»»» teamIn string false none name of home team
»»» teamOut string false none name of away team
»»» scoreIn string false none socre of home team
»»» scoreOut string false none socre of away team
»» facebookPlaylistId string false none facebook playlist id, used to upload event's clips to customer facebook page inside this playlist.
»» visibility string false none The visibility of the player
»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»» private [string] false none List of private tag.
»»» public [string] false none List of private tag.
»» AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

get__main-api_events_spotlight

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/events/spotlight \
  -H 'Accept: application/json'

GET https://api-gateway.onrewind.tv/main-api/events/spotlight HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/events/spotlight',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api-gateway.onrewind.tv/main-api/events/spotlight',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/events/spotlight',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/events/spotlight', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/events/spotlight");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/events/spotlight", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/events/spotlight

Fetch a random event out of latest events.

Fetch a random event belonging to given account id.

Parameters

Name In Type Required Description
accountId query string false The customer account id
limit query number false The number of events to choose from

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Event randomly chosen Event
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Round

post_main-api_seasons{seasonId}competitions{competitionId}_rounds

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "competitionOrder": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/seasons/{seasonId}/competitions/{competitionId}/rounds

Create a new round

Create a new round

Body parameter

{
  "name": "string",
  "competitionOrder": 0
}

Parameters

Name In Type Required Description
seasonId path string(uuid) true the uuid of the season
competitionId path string(uuid) true the uuid of the competition
body body object true round data to be sent
» name body string false The name of the round
» competitionOrder body number false The position in the list of rounds when listing all the rounds for a given round.

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "competitionOrder": 0,
  "CompetitionId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
201 Created The round is created Round
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_main-api_seasons{seasonId}competitions{competitionId}_rounds

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/seasons/{seasonId}/competitions/{competitionId}/rounds

Index of rounds

Get the list of all rounds.

Parameters

Name In Type Required Description
seasonId path string(uuid) true the uuid of the season
competitionId path string(uuid) true the uuid of the competition
limit path integer false number of expected results

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "competitionOrder": 0,
    "CompetitionId": "string",
    "SeasonId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Rounds Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Round] false none none
» Round object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the round
»» competitionOrder number false none The position in the list of rounds when listing all the rounds for a given round.
»» CompetitionId string(uuid) false none The id of the associated round
»» SeasonId string(uuid) false none The id of the associated season

get_main-api_seasons{seasonId}competitions{competitionId}rounds{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}

Fetch a round

Fetch a round matching the given id

Parameters

Name In Type Required Description
seasonId path string(uuid) true the uuid of the season
competitionId path string(uuid) true the uuid of the competition
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "competitionOrder": 0,
  "CompetitionId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
200 OK Round data matching the id Round
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_seasons{seasonId}competitions{competitionId}rounds{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "competitionOrder": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}

Update a round matching the given id

Body parameter

{
  "name": "string",
  "competitionOrder": 0
}

Parameters

Name In Type Required Description
seasonId path string(uuid) true the uuid of the season
competitionId path string(uuid) true the uuid of the competition
id path string(uuid) true the uuid of the object
body body object true round data to be sent
» name body string false The name of the round
» competitionOrder body number false The position in the list of rounds when listing all the rounds for a given round.

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "competitionOrder": 0,
  "CompetitionId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated round Round
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_seasons{seasonId}competitions{competitionId}rounds{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/seasons/{seasonId}/competitions/{competitionId}/rounds/{id}

Delete a round

Delete a round

Parameters

Name In Type Required Description
seasonId path string(uuid) true the uuid of the season
competitionId path string(uuid) true the uuid of the competition
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the round has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Season

post__main-api_seasons

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/seasons \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/seasons HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/seasons',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/seasons', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/seasons", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/seasons

Create a new season

Create a new season

Body parameter

{
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Parameters

Name In Type Required Description
body body Season true season data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
201 Created The season is created Season
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_seasons

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/seasons \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/seasons HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/seasons',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/seasons', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/seasons", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/seasons

Index of seasons

Get the list of all seasons.

Parameters

Name In Type Required Description
limit path integer false number of expected results
SportId path string(uuid) false the uuid of the sport

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "startDate": "2020-09-16T09:19:36Z",
    "endDate": "2020-09-16T09:19:36Z",
    "SportId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Seasons Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Season] false none none
» Season object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the season
»» startDate string(date-time) false none The date when the season starts
»» endDate string(date-time) false none The date when the season ends
»» SportId string(uuid) false none The id of the associated sport

get_main-api_seasons{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/seasons/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/seasons/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/seasons/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/seasons/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/seasons/{id}

Fetch a season

Fetch a season matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Season data matching the id Season
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_seasons{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/seasons/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/seasons/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/seasons/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/seasons/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/seasons/{id}

Update a season matching the given id

Body parameter

{
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Season true season data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated season Season
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_seasons{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/seasons/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/seasons/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/seasons/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/seasons/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/seasons/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/seasons/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/seasons/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/seasons/{id}

Delete a season

Delete a season

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the season has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Squad

get__main-api_challengers:{challengerId}_squads

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/challengers:{challengerId}/squads", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/challengers:{challengerId}/squads

Index of squads

Index of squads, returns the TeamSquads associated to the challenger.

Parameters

Name In Type Required Description
challengerId path string(uuid) true the uuid of the challenger

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "meta": {},
    "TeamId": "string",
    "SeasonId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of squads Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Squad] false none none
» Squad object false none none
»» id string(uuid) false read-only none
»» name string false none Squad's name.
»» meta object false none Squad's meta data.
»» TeamId string(uuid) false none team's id when creating a TeamSquad.
»» SeasonId string(uuid) false none season's id when creating a TeamSquad.

post__main-api_squads

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/squads \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/squads HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/squads',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/squads',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/squads',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/squads', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/squads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/squads", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/squads

Create a new squad for a team

Create a new squad for a team

Body parameter

{
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Parameters

Name In Type Required Description
body body Squad true squad data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
201 Created The squad created Squad
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_main-api_squads{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/squads/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/squads/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/squads/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/squads/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/squads/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/squads/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/squads/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/squads/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/squads/{id}

Fetch a squad

Fetch the TeamSquad matching the given id ; if is for a challenger of type 'team', it will return a TeamSquad, otherwise a TeammateSquad.

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched squad Squad
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_squads{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/squads/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/squads/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/squads/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/squads/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/squads/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/squads/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/squads/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/squads/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/squads/{id}

Delete a squad

Delete the squad matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
200 OK The deleted squad Squad
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

post_main-api_squads{id}_teammates

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/squads/{id}/teammates

Associate a teammate to the given teams's squad.

Associate a teammate to the given team's squad.

Body parameter

{
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Squad true squad data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Responses

Status Meaning Description Schema
201 Created The squad created Squad
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get_main-api_squads{id}_teammates

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/squads/{id}/teammates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/squads/{id}/teammates

Fetch the teammates associated to a squad.

Fetch the teammates associated to a squad.

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "type": "standard",
    "country": "string",
    "birthday": "2020-09-16",
    "picture": "string",
    "profileOptions": {},
    "jerseyPicture": "string",
    "firstName": "string",
    "role": "string",
    "TeamId": "string",
    "SportId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of teammates Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Challenger] false none none
» Challenger object false none none
»» id string(uuid) false read-only none
»» name string true none name of the challenger
»» type string false none Type of the challenger, possible values are: - standard: the challenger is a challenger. - team: the challenger is a team. It has many teammate. - teammate: the challenger is a teammate. It belongs to team.
»» country string false none country code of the challenger
»» birthday string(date) false none the birthday of the challenger (standard, teammate)
»» picture string false none the filename of the main picture of the challenger
»» profileOptions object(json) false none Object that contains statistics and buttons to display the challenger profile
»» jerseyPicture string false none the filename of the picture of the challengers jersey (standard, team)
»» firstName string false none the first name of the challenger (standard, teammate)
»» role string false none the role of the challenger
»» TeamId string(uuid) false none Reference to a team instance (challenger)
»» SportId string(uuid) false none Reference to a sport instance

Enumerated Values

Property Value
type standard
type team
type teammate

Main API - Sport

post__main-api_sports

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/sports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/sports HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/sports',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/sports',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/sports',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/sports', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/sports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/sports", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/sports

Create a new sport

Create a new sport

Body parameter

{
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Parameters

Name In Type Required Description
body body Sport true sport data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Responses

Status Meaning Description Schema
201 Created The sport is created Sport
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_sports

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/sports \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/sports HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/sports',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/sports',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/sports',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/sports', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/sports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/sports", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/sports

Index of sports

Get the list of all sports.

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "timelineType": "single",
    "svgSpriteFilename": "string",
    "sportsFieldFilename": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Sports Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Sport] false none none
» Sport object false none none
»» id string(uuid) false read-only none
»» name string true none Sport's name
»» description string false none Sport's description
»» timelineType string false none define timeline type
»» svgSpriteFilename string false none name of svg sprite holding all svg icons used in this sport
»» sportsFieldFilename string false none name of sports field file that is used to represent the field of the sport, used for multicam

Enumerated Values

Property Value
timelineType single
timelineType double

get_main-api_sports{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/sports/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/sports/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/sports/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/sports/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/sports/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/sports/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/sports/{id}

Fetch a sport

Fetch a sport matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Responses

Status Meaning Description Schema
200 OK Sport data matching the id Sport
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_sports{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/sports/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/sports/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/sports/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/sports/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/sports/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/sports/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/sports/{id}

Update a sport matching the given id

Body parameter

{
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Sport true sport data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated sport Sport
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

delete_main-api_sports{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/sports/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/sports/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/sports/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/sports/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/sports/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/sports/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/sports/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/sports/{id}

Delete a sport

Delete a sport

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the sport has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Stream

get_main-api_streamable{streamableId}_streams

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/streamable/{streamableId}/streams

Index of streams

Get a list of all streams

Parameters

Name In Type Required Description
streamableId path string(uuid) true the uuid of the streamable
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "streamType": "main",
    "key": "string",
    "token": "string",
    "recordName": "string",
    "offset": 0,
    "mapCoordinates": {
      "x": 0,
      "y": 0,
      "r": 0
    },
    "options": {},
    "streamable": "string",
    "streamableId": "string",
    "url": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of streams Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Stream] false none none
» Stream object false none none
»» id string(uuid) false read-only none
»» streamType string true none Stream's type
»» key string true none Stream's key. Automatically generated during the stream's creation.
»» token string true none Stream's token. Automatically generated during the stream's creation.
»» recordName string false none Stream's record name
»» offset integer false none Stream's offset in seconds related to the main stream of the event
»» mapCoordinates object false none Stream's camera position in the related sport field.
»»» x integer true none horizontal position in the minimap
»»» y integer true none vertical position in the minimap
»»» r integer false none angle of the camera
»» options object false none Stream's options used to store particular values
»» streamable string true none Stream's polymorphic association to a streamable model. Current available values are 'event', 'businessPlayer', 'simulcast' and are related to the corresponding models which must have at least one stream.
»» streamableId string(uuid) true none Stream's polymorphic association to a streamable model. It references the id of the associated Event, BusinessPlayer or Simulcast.
»» url string false none The url of the clip (from external providers)

Enumerated Values

Property Value
streamType main
streamType backup
streamType additionnal

post_main-api_streamable{streamableId}_streams

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/streamable/{streamableId}/streams

Create a new stream

Create a new stream

Body parameter

{
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Parameters

Name In Type Required Description
streamableId path string(uuid) true the uuid of the streamable
body body Stream true stream data to be sent

Example responses

201 Response

{
  "id": "string",
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Responses

Status Meaning Description Schema
201 Created The stream is created Stream
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error
409 Conflict ConflictInModel Error

delete_main-api_streamable{streamableId}streams{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/streamable/{streamableId}/streams/{id}

Delete a stream

Delete the stream matching the given id

Parameters

Name In Type Required Description
streamableId path string(uuid) true the uuid of the streamable
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Responses

Status Meaning Description Schema
200 OK The deleted stream Stream
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_streamable{streamableId}streams{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/streamable/{streamableId}/streams/{id}

Update the stream data

Update the stream data matching given id

Body parameter

{
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Parameters

Name In Type Required Description
streamableId path string(uuid) true the uuid of the streamable
id path string(uuid) true the uuid of the object
body body Stream true stream data to be sent

Example responses

200 Response

{
  "id": "string",
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated stream Stream
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error
409 Conflict ConflictInModel Error

get_main-api_streamable{streamableId}streams{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/streamable/{streamableId}/streams/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/streamable/{streamableId}/streams/{id}

Fetch a stream

Fetch the stream matching the given id

Parameters

Name In Type Required Description
streamableId path string(uuid) true the uuid of the streamable
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched stream Stream
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Main API - Video

post__main-api_videos

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/videos \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/videos HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/videos',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/videos', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/videos", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/videos

Create a new video

Create a new video.

Body parameter

{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
body body Video true video data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
201 Created The video created Video
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__main-api_videos

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/videos \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/videos HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/videos',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/videos', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/videos", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/videos

Index of videos

Index of videos

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "duration": 0,
    "poster": "http://example.com",
    "url": "http://example.com",
    "visibility": "public",
    "status": "none",
    "archiveData": {},
    "vendorName": "jwplayer",
    "vendorVideoId": "string",
    "vendorApiKey": "string",
    "tags": {
      "private": [
        "string"
      ],
      "public": [
        "string"
      ]
    },
    "AccountId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of videos Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Video] false none none
» Video object false none none
»» id string(uuid) false read-only none
»» name string true none The name of the video
»» description string false none The description of the video
»» duration number false none The duration of the video in seconds
»» poster string(uri) false none The URL of the video poster
»» url string(uri) false none The URL of the video file
»» visibility string false none The visibility of the video
»» status string false none The status of the video
»» archiveData object false none Archive the video data in this object instead of removing it
»» vendorName string false none The name of the vendor
»» vendorVideoId string false none Video id on the third party service when the video is hosted externally
»» vendorApiKey string false none Api key of the third party
»» tags object false none Attribute storing extra data to be used for classification or search purposes
»»» private [string] false none List of private tag.
»»» public [string] false none List of private tag.
»» AccountId string(uuid) false none none

Enumerated Values

Property Value
visibility public
visibility private
status none
status original
status in_progress
status encoded
status archived
status vendor
vendorName jwplayer
vendorName dailymotion

delete_main-api_videos{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/main-api/videos/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/main-api/videos/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/main-api/videos/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/main-api/videos/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /main-api/videos/{id}

Delete a video

Delete the video matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK The deleted video Video
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_main-api_videos{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/main-api/videos/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/main-api/videos/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/main-api/videos/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/main-api/videos/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /main-api/videos/{id}

Update the video data

Update the video data matching given id

Body parameter

{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Video true video data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated video Video
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_main-api_videos{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/main-api/videos/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/main-api/videos/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/main-api/videos/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/main-api/videos/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/main-api/videos/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /main-api/videos/{id}

Fetch a video

Fetch the video matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched video Video
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

post_main-api_videos{id}_encoding-job

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/videos/{id}/encoding-job", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/videos/{id}/encoding-job

Trigger the encoding of an original file

After a video has been uploaded or created with original status, the encoding can be triggered by calling this route

Body parameter

{
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Video true id of the video

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK The video is being transcoded. Video
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

post__main-api_videos_import-url

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/main-api/videos/import-url \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/main-api/videos/import-url HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/main-api/videos/import-url',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "originUrl": "string",
  "name": "string",
  "description": "string",
  "poster": "string",
  "duration": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/main-api/videos/import-url',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/main-api/videos/import-url',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/main-api/videos/import-url', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/main-api/videos/import-url");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/main-api/videos/import-url", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /main-api/videos/import-url

Import an url and create a transcoded video

Import an existing video

Body parameter

{
  "originUrl": "string",
  "name": "string",
  "description": "string",
  "poster": "string",
  "duration": 0
}

Parameters

Name In Type Required Description
body body object true none
» originUrl body string false url of the existing video
» name body string false name of the video
» description body string false description of the video
» poster body string false url of an image to be used as the video poster
» duration body number false duration of the video

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Responses

Status Meaning Description Schema
200 OK The video is being imported. Video
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

Users Service - Account

get__users-service-api_accounts

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/accounts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/accounts HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/accounts',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/accounts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/accounts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/accounts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/accounts

Index of accounts

Get a list of all accounts

Parameters

Name In Type Required Description
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "key": "string",
    "name": "string",
    "description": "string",
    "meta": {
      "hashtag": "string",
      "google_analytics_id": "string"
    },
    "SportId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Accounts Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Account] false none none
» Account object false none none
»» id string(uuid) false read-only none
»» key string false none code name to identify an account in friendler manner
»» name string false none Account's name
»» description string false none Account's description
»» meta object false none Attribute storing extra data about the user, like a google analytics account id
»»» hashtag string false none none
»»» google_analytics_id string false none none
»» SportId string(uuid) false none Reference to a sport instance

post__users-service-api_accounts

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/accounts \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/accounts HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/accounts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/accounts', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/accounts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/accounts

Create a new account

Create a new account

Body parameter

{
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Parameters

Name In Type Required Description
body body Account true account data to be sent

Example responses

201 Response

{
  "id": "string",
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Responses

Status Meaning Description Schema
201 Created The account is created Account
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_users-service-api_accounts{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/users-service-api/accounts/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/users-service-api/accounts/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/accounts/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/users-service-api/accounts/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /users-service-api/accounts/{id}

Delete an account

Delete an account

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the account has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_users-service-api_accounts{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/users-service-api/accounts/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/users-service-api/accounts/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/accounts/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/users-service-api/accounts/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /users-service-api/accounts/{id}

Update the account data

it will update the account data matching given id

Body parameter

{
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Account true account data to be sent

Example responses

200 Response

{
  "id": "string",
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated information of logged account based on access token Account
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_users-service-api_accounts{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/accounts/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/accounts/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/accounts/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/accounts/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/accounts/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/accounts/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/accounts/{id}

Fetch an account

Fetch an account matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched information of logged account based on access token Account
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Users Service - FanActivity

get__users-service-api_activities

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/activities \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/activities HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/activities',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/activities',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/activities',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/activities', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/activities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/activities", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/activities

Index of fan activities

Get a list of all activities filtered by any of the available parameters

Parameters

Name In Type Required Description
type path string false the type of the activity
resourceType path string false the type of the resource
resourceId path string(uuid) false the uuid of the resource
limit path integer false number of expected results

Enumerated Values

Parameter Value
type like
type watch
type bookmark
resourceType marker
resourceType event
resourceType challenger
resourceType article
resourceType video
resourceType team
resourceType teammate
resourceType message

Example responses

200 Response

[
  {
    "id": "string",
    "type": "watch",
    "meta": {},
    "resourceType": "event",
    "resourceId": "string",
    "FanId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Activities Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [FanActivity] false none none
» FanActivity object false none none
»» id string(uuid) true read-only none
»» type string true none type of the activity
»» meta object false none Attribute storing extra data about the activity
»» resourceType string true none type of the resource
»» resourceId string(uuid) true none id of the resource
»» FanId string true none id of the fan

Enumerated Values

Property Value
type watch
type like
type bookmark
resourceType event
resourceType video
resourceType team
resourceType teammate
resourceType marker
resourceType challenger
resourceType article
resourceType message

post__users-service-api_activities

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/activities \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/activities HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/activities',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "type": "watch",
  "meta": {},
  "resourceType": "event",
  "resourceId": "string",
  "FanId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/activities',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/activities',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/activities', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/activities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/activities", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/activities

Create a new fan activity

Create a new fan activity

Body parameter

{
  "type": "watch",
  "meta": {},
  "resourceType": "event",
  "resourceId": "string",
  "FanId": "string"
}

Parameters

Name In Type Required Description
body body FanActivity true fan activity data to be sent

Example responses

201 Response

{
  "id": "string",
  "type": "watch",
  "meta": {},
  "resourceType": "event",
  "resourceId": "string",
  "FanId": "string"
}

Responses

Status Meaning Description Schema
201 Created The fan activity is created FanActivity
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_users-service-api_activities{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/users-service-api/activities/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/users-service-api/activities/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/users-service-api/activities/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/activities/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/users-service-api/activities/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /users-service-api/activities/{id}

Delete an fan activity

Delete an fan activity

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the fan activity has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_users-service-api_activities{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/activities/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/activities/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/activities/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/activities/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/activities/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/activities/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/activities/{id}

Fetch an fan activity

Fetch an fan activity matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "type": "watch",
  "meta": {},
  "resourceType": "event",
  "resourceId": "string",
  "FanId": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched information of logged fan activity based on access token FanActivity
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Users Service - Group

get__users-service-api_groups

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/groups \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/groups HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/groups',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/groups',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/groups',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/groups', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/groups

Index of groups

Get a list of all groups

Parameters

Name In Type Required Description
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "accessLevel": 0
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Groups Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Group] false none none
» Group object false none none
»» id string(uuid) false read-only none
»» name string true none Group's name
»» description string false none Group's description
»» accessLevel integer false none define group access level that allows to add higher permissions

post__users-service-api_groups

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/groups \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/groups HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/groups',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/groups',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/groups',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/groups', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/groups

Create a new group

Create a new group

Body parameter

{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Parameters

Name In Type Required Description
body body Group true group data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
201 Created The group is created Group
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_users-service-api_groups{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/users-service-api/groups/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/users-service-api/groups/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/users-service-api/groups/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/groups/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/users-service-api/groups/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /users-service-api/groups/{id}

Delete an group

Delete an group

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the group has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_users-service-api_groups{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/users-service-api/groups/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/users-service-api/groups/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/users-service-api/groups/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/groups/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/users-service-api/groups/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /users-service-api/groups/{id}

Update the group data

it will update the group data matching given id

Body parameter

{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Group true group data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
200 OK Updated information of logged group based on access token Group
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_users-service-api_groups{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/groups/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/groups/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/groups/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/groups/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/groups/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/groups/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/groups/{id}

Fetch an group

Fetch an group matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
200 OK Fetched information of logged group based on access token Group
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Users Service - Module

get__users-service-api_modules

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/modules \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/modules HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/modules',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/modules',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/modules',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/modules', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/modules");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/modules", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/modules

Index of modules

Get a list of all modules

Parameters

Name In Type Required Description
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "code": 0,
    "name": "string",
    "description": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Modules Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Module] false none none
» Module object false none none
»» id string(uuid) false read-only none
»» code integer true none Integer associated to a module, current values are as follow { 'RESTRAINED_ACCESS': 1, 'BLOCKMARK': 2, 'ESHOP_LINKS': 3, 'WHITE_LABEL': 4, 'GEO_BLOCKING': 5, 'ADVERTISING': 6, 'REMOTE_CONTROL': 7, 'NOTIFICATION': 8, 'SIMULCAST': 9, 'DVR': 10, 'CHAT': 11, 'STREAM_CLIPPING': 12, 'OPTA_PARSING': 13, 'CLEENG_RESTRICTION': 14 }
»» name string false none Module's name
»» description string false none Module's description

post__users-service-api_modules

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/modules \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/modules HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/modules',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "code": 0,
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/modules',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/modules',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/modules', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/modules");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/modules", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/modules

Create a new module

Create a new module

Body parameter

{
  "code": 0,
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
body body Module true module data to be sent

Example responses

201 Response

{
  "id": "string",
  "code": 0,
  "name": "string",
  "description": "string"
}

Responses

Status Meaning Description Schema
201 Created The module is created Module
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_users-service-api_modules{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/users-service-api/modules/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/users-service-api/modules/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/users-service-api/modules/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/modules/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/users-service-api/modules/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /users-service-api/modules/{id}

Delete an module

Delete an module

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the module has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_users-service-api_modules{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/users-service-api/modules/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/users-service-api/modules/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "code": 0,
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/users-service-api/modules/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/modules/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/users-service-api/modules/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /users-service-api/modules/{id}

Update the module data

it will update the module data matching given id

Body parameter

{
  "code": 0,
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Module true module data to be sent

Example responses

200 Response

{
  "id": "string",
  "code": 0,
  "name": "string",
  "description": "string"
}

Responses

Status Meaning Description Schema
200 OK Updated information of logged module based on access token Module
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_users-service-api_modules{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/modules/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/modules/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/modules/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/modules/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/modules/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/modules/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/modules/{id}

Fetch an module

Fetch an module matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "code": 0,
  "name": "string",
  "description": "string"
}

Responses

Status Meaning Description Schema
200 OK Fetched information of logged module based on access token Module
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Users Service - Role

get__users-service-api_roles

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/roles \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/roles HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/roles',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/roles',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/roles',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/roles', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/roles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/roles", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/roles

Index of roles

Get a list of all roles

Parameters

Name In Type Required Description
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "accessLevel": 0
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Roles Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Role] false none none
» Role object false none none
»» id string(uuid) false read-only none
»» name string true none Role's name
»» description string false none Role's description
»» accessLevel integer false none define role access level that allows to add higher permissions

post__users-service-api_roles

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/roles \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/roles HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/roles',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/roles',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/roles',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/roles', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/roles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/roles", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/roles

Create a new role

Create a new role

Body parameter

{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Parameters

Name In Type Required Description
body body Role true role data to be sent

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
201 Created The role is created Role
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

delete_users-service-api_roles{id}

Code samples

# You can also use wget
curl -X DELETE https://api-gateway.onrewind.tv/users-service-api/roles/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api-gateway.onrewind.tv/users-service-api/roles/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gateway.onrewind.tv/users-service-api/roles/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/roles/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gateway.onrewind.tv/users-service-api/roles/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /users-service-api/roles/{id}

Delete an role

Delete an role

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

403 Response

{
  "code": "string",
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content the role has been deleted successfully None
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put_users-service-api_roles{id}

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/users-service-api/roles/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/users-service-api/roles/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/users-service-api/roles/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/roles/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/users-service-api/roles/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /users-service-api/roles/{id}

Update the role data

it will update the role data matching given id

Body parameter

{
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object
body body Role true role data to be sent

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
200 OK Updated information of logged role based on access token Role
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get_users-service-api_roles{id}

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/roles/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/roles/{id} HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/roles/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/roles/{id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/roles/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/roles/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/roles/{id}

Fetch an role

Fetch an role matching the given id

Parameters

Name In Type Required Description
id path string(uuid) true the uuid of the object

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Responses

Status Meaning Description Schema
200 OK Fetched information of logged role based on access token Role
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Users Service - User

get__users-service-api_users

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/users \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/users HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/users',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/users',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/users', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/users

Index of users

Get a list of all users

Parameters

Name In Type Required Description
fields query string false Comma separated string to filter desired fields

Example responses

200 Response

[
  {
    "id": "string",
    "username": "string",
    "email": "string",
    "lastName": "string",
    "firstName": "string",
    "phone": "string",
    "type": "inactive",
    "password": "pa$$word",
    "meta": {
      "hashtag": "string",
      "google_analytics_id": "string"
    },
    "oauth": {
      "youtube": {},
      "dailymotion": {},
      "facebook": {},
      "cleeng": {},
      "twitter": {},
      "twitch": {},
      "opta": {}
    },
    "Groups": [
      {
        "id": "string",
        "name": "string",
        "description": "string",
        "accessLevel": 0
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Users Inline
403 Forbidden UserNotAuthorized Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [User] false none none
» User object false none none
»» id string(uuid) false read-only none
»» username string true none Username of the user
»» email string false none Email of the user
»» lastName string false none last name of the user
»» firstName string false none first name of the user
»» phone string(phone) false none none
»» type string false none none
»» password string(password) false none none
»» meta object false none Attribute storing extra data about the user, like a google analytics account id
»»» hashtag string false none none
»»» google_analytics_id string false none none
»» oauth object false none Attribute storing third party oauth data specific to the user (oauth token, account id, etc...)
»»» youtube object false none none
»»» dailymotion object false none none
»»» facebook object false none none
»»» cleeng object false none none
»»» twitter object false none none
»»» twitch object false none none
»»» opta object false none none
»» Groups [anyOf] true none none

anyOf

Name Type Required Restrictions Description
»»» anonymous object false none none
»»»» id string(uuid) false read-only none
»»»» name string true none Group's name
»»»» description string false none Group's description
»»»» accessLevel integer false none define group access level that allows to add higher permissions

or

Name Type Required Restrictions Description
»»» anonymous string(uuid) false none none

Enumerated Values

Property Value
type active
type inactive
type system

post__users-service-api_users

Code samples

# You can also use wget
curl -X POST https://api-gateway.onrewind.tv/users-service-api/users \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api-gateway.onrewind.tv/users-service-api/users HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/users',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/users',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api-gateway.onrewind.tv/users-service-api/users',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gateway.onrewind.tv/users-service-api/users', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gateway.onrewind.tv/users-service-api/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /users-service-api/users

Create a new user

Create a new user

Body parameter

{
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body User true user data to be sent

Example responses

201 Response

{
  "id": "string",
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created The user is created User
400 Bad Request InvalidModel Error
403 Forbidden UserNotAuthorized Error

get__users-service-api_users_me

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/users/me \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/users/me HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/users/me',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/users/me',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/users/me',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/users/me', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/users/me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/users/me", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/users/me

Fetch my own data

Based on current access token, it will fetch the user data

Example responses

200 Response

{
  "id": "string",
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Retrieve information of logged user based on access token User
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

put__users-service-api_users_me

Code samples

# You can also use wget
curl -X PUT https://api-gateway.onrewind.tv/users-service-api/users/me \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT https://api-gateway.onrewind.tv/users-service-api/users/me HTTP/1.1
Host: api-gateway.onrewind.tv
Content-Type: application/json
Accept: application/json

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/users/me',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/users/me',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put 'https://api-gateway.onrewind.tv/users-service-api/users/me',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gateway.onrewind.tv/users-service-api/users/me', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/users/me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gateway.onrewind.tv/users-service-api/users/me", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /users-service-api/users/me

Update my own data

Based on current access token, it will update the user data

Body parameter

{
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body User true user data to be sent

Example responses

200 Response

{
  "id": "string",
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Update information of logged user based on access token User
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

get__users-service-api_users_me_context

Code samples

# You can also use wget
curl -X GET https://api-gateway.onrewind.tv/users-service-api/users/me/context \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api-gateway.onrewind.tv/users-service-api/users/me/context HTTP/1.1
Host: api-gateway.onrewind.tv
Accept: application/json

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

$.ajax({
  url: 'https://api-gateway.onrewind.tv/users-service-api/users/me/context',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api-gateway.onrewind.tv/users-service-api/users/me/context',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api-gateway.onrewind.tv/users-service-api/users/me/context',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gateway.onrewind.tv/users-service-api/users/me/context', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api-gateway.onrewind.tv/users-service-api/users/me/context");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gateway.onrewind.tv/users-service-api/users/me/context", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /users-service-api/users/me/context

Fetch resources making up the context of a user

Based on current access token, it will fetch the user's Groups, Roles, AccountId, Modules

Example responses

200 Response

{
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ],
  "Roles": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ],
  "AccountId": "string",
  "Modules": [
    {
      "id": "string",
      "code": 0,
      "name": "string",
      "description": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK User's "context" Inline
403 Forbidden UserNotAuthorized Error
404 Not Found NotFound Error

Response Schema

Status Code 200

Name Type Required Restrictions Description
» Groups [Group] false none none
»» Group object false none none
»»» id string(uuid) false read-only none
»»» name string true none Group's name
»»» description string false none Group's description
»»» accessLevel integer false none define group access level that allows to add higher permissions
»» Roles [Role] false none none
»»» Role object false none none
»»»» id string(uuid) false read-only none
»»»» name string true none Role's name
»»»» description string false none Role's description
»»»» accessLevel integer false none define role access level that allows to add higher permissions
»»» AccountId string(uuid) false none none
»»» Modules [Module] false none none
»»»» Module object false none none
»»»»» id string(uuid) false read-only none
»»»»» code integer true none Integer associated to a module, current values are as follow { 'RESTRAINED_ACCESS': 1, 'BLOCKMARK': 2, 'ESHOP_LINKS': 3, 'WHITE_LABEL': 4, 'GEO_BLOCKING': 5, 'ADVERTISING': 6, 'REMOTE_CONTROL': 7, 'NOTIFICATION': 8, 'SIMULCAST': 9, 'DVR': 10, 'CHAT': 11, 'STREAM_CLIPPING': 12, 'OPTA_PARSING': 13, 'CLEENG_RESTRICTION': 14 }
»»»»» name string false none Module's name
»»»»» description string false none Module's description

Schemas

Account

{
  "id": "string",
  "key": "string",
  "name": "string",
  "description": "string",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "SportId": "string"
}

Account

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
key string false none code name to identify an account in friendler manner
name string false none Account's name
description string false none Account's description
meta object false none Attribute storing extra data about the user, like a google analytics account id
» hashtag string false none none
» google_analytics_id string false none none
SportId string(uuid) false none Reference to a sport instance

BusinessPlayer

{
  "id": "string",
  "name": "string",
  "description": "string",
  "organiserName": "string",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "options": {
    "autostart": true,
    "chapterOnLoad": true,
    "chaptersTitle": "string",
    "initialStartingTime": 0,
    "showControls": true
  },
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "activatedModules": [
    0
  ],
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

BusinessPlayer

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none Business player's name
description string false none Business player's description
organiserName string true none The name of the business organiser
state string false none The state of the player
placeholder object false none Attribute storing extra data about the business player placeholder
» poster string false none The URL of the placeholder image
» text string false none The text associated to the placeholder
options object false none Attribute storing extra data about the business player
» autostart boolean false none none
» chapterOnLoad boolean false none none
» chaptersTitle string false none none
» initialStartingTime integer false none none
» showControls boolean false none none
startDate string(date-time) false none The date when the business starts
endDate string(date-time) false none The date when the business ends
activatedModules [integer] false none The list of active modules for this business player
visibility string false none The visibility of the player
tags object false none Attribute storing extra data to be used for classification or search purposes
» private [string] false none List of private tag.
» public [string] false none List of private tag.
AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

Challenger

{
  "id": "string",
  "name": "string",
  "type": "standard",
  "country": "string",
  "birthday": "2020-09-16",
  "picture": "string",
  "profileOptions": {},
  "jerseyPicture": "string",
  "firstName": "string",
  "role": "string",
  "TeamId": "string",
  "SportId": "string"
}

Challenger

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none name of the challenger
type string false none Type of the challenger, possible values are: - standard: the challenger is a challenger. - team: the challenger is a team. It has many teammate. - teammate: the challenger is a teammate. It belongs to team.
country string false none country code of the challenger
birthday string(date) false none the birthday of the challenger (standard, teammate)
picture string false none the filename of the main picture of the challenger
profileOptions object(json) false none Object that contains statistics and buttons to display the challenger profile
jerseyPicture string false none the filename of the picture of the challengers jersey (standard, team)
firstName string false none the first name of the challenger (standard, teammate)
role string false none the role of the challenger
TeamId string(uuid) false none Reference to a team instance (challenger)
SportId string(uuid) false none Reference to a sport instance

Enumerated Values

Property Value
type standard
type team
type teammate

Chat

{
  "id": "string",
  "resourceId": "string",
  "resourceType": "event"
}

Chat

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
resourceId string(uuid) false none id of the resource on which the chat is activated
resourceType string false none type of the resource on which the chat is activated

Enumerated Values

Property Value
resourceType event
resourceType business-player

Clip

{
  "id": "string",
  "name": "string",
  "state": "none",
  "meta": {
    "format": "string",
    "duration": 0
  },
  "url": "string",
  "AccountId": "string",
  "UserId": "string"
}

Clip

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none The name of the clip
state string false none The state of the clip
meta object true none Attribute storing extra data about the clip
» format string false none The file format (ex MP4)
» duration integer false none The duration of the clip in seconds
url string false none The url of the clip (from external providers)
AccountId string(uuid) false none The account id
UserId string(uuid) false none The user id

Enumerated Values

Property Value
state none
state error
state ready
state in_progress

CMSItem

{
  "system": {
    "id": "string",
    "name": "string",
    "type": "string",
    "last_modified": "string"
  },
  "elements": {
    "event": "string",
    "video": {
      "id": "string",
      "name": "string",
      "description": "string",
      "duration": 0,
      "poster": "http://example.com",
      "url": "http://example.com",
      "visibility": "public",
      "status": "none",
      "archiveData": {},
      "vendorName": "jwplayer",
      "vendorVideoId": "string",
      "vendorApiKey": "string",
      "tags": {
        "private": [
          "string"
        ],
        "public": [
          "string"
        ]
      },
      "AccountId": "string"
    }
  }
}

CMSItem

Properties

Name Type Required Restrictions Description
system object true none Metadata about the item as stored in the CMS
» id string true none The id of the item as assigned automatically by the CMS
» name string true none The name of the item as entered in the CMS
» type string true none The type of item
» last_modified string true none The date and time when the item was last modified in the CMS
elements object true none A container object for one or several objects making up this item
» event string false none none
» video Video false none none

Error

{
  "code": "string",
  "message": "string"
}

Error

Properties

Name Type Required Restrictions Description
code string true none none
message string true none none

Event

{
  "id": "string",
  "name": "string",
  "organiserName": "string",
  "description": "string",
  "location": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "state": "replay",
  "placeholder": {
    "poster": "string",
    "text": "string"
  },
  "activatedModules": [
    0
  ],
  "pricingPlans": [
    "string"
  ],
  "geoBlockingMapping": {},
  "dailymotionLiveStreamId": "string",
  "youtubeLiveStreamId": "string",
  "hashtag": "string",
  "options": {},
  "score": {
    "teamIn": "string",
    "teamOut": "string",
    "scoreIn": "string",
    "scoreOut": "string"
  },
  "facebookPlaylistId": "string",
  "visibility": "public",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Event

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none Event's name
organiserName string false none name of the organiser of the event
description string false none Event's description
location string false none Event's location
startDate string(date-time) false none The date when the event starts
endDate string(date-time) false none The date when the event ends
state string false none The state of the event
placeholder object false none Attribute storing extra data about the event placeholder
» poster string false none The URL of the placeholder image
» text string false none The text associated to the placeholder
activatedModules [integer] false none The list of active modules for this event
pricingPlans [string] false none Attribute storing payment plan. Need payment module activated
geoBlockingMapping object false none contains an object with key=CountryCode and value="onrewind.com, http://myplayer.onrewind.com/player.html"
dailymotionLiveStreamId string false none holding dailymotion stream id
youtubeLiveStreamId string false none holding youtube stream id
hashtag string false none twitter hashtag of the event, used to build twitter feed around an event
options object false none Attribute storing extra data about the event
score object false none score of current event, this field was added quickly to solve a customer problemn. We do not recommend using this field.
» teamIn string false none name of home team
» teamOut string false none name of away team
» scoreIn string false none socre of home team
» scoreOut string false none socre of away team
facebookPlaylistId string false none facebook playlist id, used to upload event's clips to customer facebook page inside this playlist.
visibility string false none The visibility of the player
tags object false none Attribute storing extra data to be used for classification or search purposes
» private [string] false none List of private tag.
» public [string] false none List of private tag.
AccountId string(uuid) false none none

Enumerated Values

Property Value
state liveOn
state liveOff
state replay
visibility public
visibility private

ExtendedFan

{
  "id": "string",
  "FanId": "string",
  "isBlocked": true
}

ExtendedFan

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
FanId string(uuid) true none FanId representing the fan we are extending
isBlocked boolean false none value to know if a fan has been blocked from using chats

Fan

{
  "id": "string",
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

Fan

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
username string false none username of the fan
email string false none Email of the fan
lastName string false none last name of the fan
firstName string false none first name of the fan
phone string(phone) false none none
type string false none none
password string(password) false none none
meta object false none Attribute storing extra data about the fan, like a google analytics account id
» hashtag string false none none
» google_analytics_id string false none none
oauth object false none Attribute storing third party oauth data specific to the fan (oauth token, account id, etc...)
» youtube object false none none
» dailymotion object false none none
» facebook object false none none
» cleeng object false none none
» twitter object false none none
» twitch object false none none
» opta object false none none
Groups [anyOf] true none none

anyOf

Name Type Required Restrictions Description
» anonymous Group false none none

or

Name Type Required Restrictions Description
» anonymous string(uuid) false none none

Enumerated Values

Property Value
type active
type inactive
type system

Group

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Group

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none Group's name
description string false none Group's description
accessLevel integer false none define group access level that allows to add higher permissions

Message

{
  "id": "string",
  "content": {
    "text": ""
  },
  "flagged": false,
  "hidden": false,
  "FanId": "string",
  "ParentId": "string"
}

Chat

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only none
content object(json) false none content of the message,
flagged boolean true none if true, the message has been flagged by an user as inappropriate. It can be used to filter messages to make moderation easier.
hidden boolean true none if true, the message has been hidden by a moderator. The message can then be filtered for end users but still be visible for the author.
FanId string(uuid) true none id of the fan that authored the message
ParentId string(uuid) false none id of the parent message, can be used to create a thread

Module

{
  "id": "string",
  "code": 0,
  "name": "string",
  "description": "string"
}

Module

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
code integer true none Integer associated to a module, current values are as follow { 'RESTRAINED_ACCESS': 1, 'BLOCKMARK': 2, 'ESHOP_LINKS': 3, 'WHITE_LABEL': 4, 'GEO_BLOCKING': 5, 'ADVERTISING': 6, 'REMOTE_CONTROL': 7, 'NOTIFICATION': 8, 'SIMULCAST': 9, 'DVR': 10, 'CHAT': 11, 'STREAM_CLIPPING': 12, 'OPTA_PARSING': 13, 'CLEENG_RESTRICTION': 14 }
name string false none Module's name
description string false none Module's description

Role

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accessLevel": 0
}

Role

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none Role's name
description string false none Role's description
accessLevel integer false none define role access level that allows to add higher permissions

Sport

{
  "id": "string",
  "name": "string",
  "description": "string",
  "timelineType": "single",
  "svgSpriteFilename": "string",
  "sportsFieldFilename": "string"
}

Sport

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none Sport's name
description string false none Sport's description
timelineType string false none define timeline type
svgSpriteFilename string false none name of svg sprite holding all svg icons used in this sport
sportsFieldFilename string false none name of sports field file that is used to represent the field of the sport, used for multicam

Enumerated Values

Property Value
timelineType single
timelineType double

Stream

{
  "id": "string",
  "streamType": "main",
  "key": "string",
  "token": "string",
  "recordName": "string",
  "offset": 0,
  "mapCoordinates": {
    "x": 0,
    "y": 0,
    "r": 0
  },
  "options": {},
  "streamable": "string",
  "streamableId": "string",
  "url": "string"
}

Stream

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
streamType string true none Stream's type
key string true none Stream's key. Automatically generated during the stream's creation.
token string true none Stream's token. Automatically generated during the stream's creation.
recordName string false none Stream's record name
offset integer false none Stream's offset in seconds related to the main stream of the event
mapCoordinates object false none Stream's camera position in the related sport field.
» x integer true none horizontal position in the minimap
» y integer true none vertical position in the minimap
» r integer false none angle of the camera
options object false none Stream's options used to store particular values
streamable string true none Stream's polymorphic association to a streamable model. Current available values are 'event', 'businessPlayer', 'simulcast' and are related to the corresponding models which must have at least one stream.
streamableId string(uuid) true none Stream's polymorphic association to a streamable model. It references the id of the associated Event, BusinessPlayer or Simulcast.
url string false none The url of the clip (from external providers)

Enumerated Values

Property Value
streamType main
streamType backup
streamType additionnal

User

{
  "id": "string",
  "username": "string",
  "email": "string",
  "lastName": "string",
  "firstName": "string",
  "phone": "string",
  "type": "inactive",
  "password": "pa$$word",
  "meta": {
    "hashtag": "string",
    "google_analytics_id": "string"
  },
  "oauth": {
    "youtube": {},
    "dailymotion": {},
    "facebook": {},
    "cleeng": {},
    "twitter": {},
    "twitch": {},
    "opta": {}
  },
  "Groups": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "accessLevel": 0
    }
  ]
}

User

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
username string true none Username of the user
email string false none Email of the user
lastName string false none last name of the user
firstName string false none first name of the user
phone string(phone) false none none
type string false none none
password string(password) false none none
meta object false none Attribute storing extra data about the user, like a google analytics account id
» hashtag string false none none
» google_analytics_id string false none none
oauth object false none Attribute storing third party oauth data specific to the user (oauth token, account id, etc...)
» youtube object false none none
» dailymotion object false none none
» facebook object false none none
» cleeng object false none none
» twitter object false none none
» twitch object false none none
» opta object false none none
Groups [anyOf] true none none

anyOf

Name Type Required Restrictions Description
» anonymous Group false none none

or

Name Type Required Restrictions Description
» anonymous string(uuid) false none none

Enumerated Values

Property Value
type active
type inactive
type system

Video

{
  "id": "string",
  "name": "string",
  "description": "string",
  "duration": 0,
  "poster": "http://example.com",
  "url": "http://example.com",
  "visibility": "public",
  "status": "none",
  "archiveData": {},
  "vendorName": "jwplayer",
  "vendorVideoId": "string",
  "vendorApiKey": "string",
  "tags": {
    "private": [
      "string"
    ],
    "public": [
      "string"
    ]
  },
  "AccountId": "string"
}

Video

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none The name of the video
description string false none The description of the video
duration number false none The duration of the video in seconds
poster string(uri) false none The URL of the video poster
url string(uri) false none The URL of the video file
visibility string false none The visibility of the video
status string false none The status of the video
archiveData object false none Archive the video data in this object instead of removing it
vendorName string false none The name of the vendor
vendorVideoId string false none Video id on the third party service when the video is hosted externally
vendorApiKey string false none Api key of the third party
tags object false none Attribute storing extra data to be used for classification or search purposes
» private [string] false none List of private tag.
» public [string] false none List of private tag.
AccountId string(uuid) false none none

Enumerated Values

Property Value
visibility public
visibility private
status none
status original
status in_progress
status encoded
status archived
status vendor
vendorName jwplayer
vendorName dailymotion

FanActivity

{
  "id": "string",
  "type": "watch",
  "meta": {},
  "resourceType": "event",
  "resourceId": "string",
  "FanId": "string"
}

FanActivity

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only none
type string true none type of the activity
meta object false none Attribute storing extra data about the activity
resourceType string true none type of the resource
resourceId string(uuid) true none id of the resource
FanId string true none id of the fan

Enumerated Values

Property Value
type watch
type like
type bookmark
resourceType event
resourceType video
resourceType team
resourceType teammate
resourceType marker
resourceType challenger
resourceType article
resourceType message

Season

{
  "id": "string",
  "name": "string",
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Season

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none The name of the season
startDate string(date-time) false none The date when the season starts
endDate string(date-time) false none The date when the season ends
SportId string(uuid) false none The id of the associated sport

Squad

{
  "id": "string",
  "name": "string",
  "meta": {},
  "TeamId": "string",
  "SeasonId": "string"
}

Squad

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string false none Squad's name.
meta object false none Squad's meta data.
TeamId string(uuid) false none team's id when creating a TeamSquad.
SeasonId string(uuid) false none season's id when creating a TeamSquad.

Competition

{
  "id": "string",
  "name": "string",
  "slug": "string",
  "displayOrder": 0,
  "startDate": "2020-09-16T09:19:36Z",
  "endDate": "2020-09-16T09:19:36Z",
  "SportId": "string"
}

Competition

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none The name of the competition
slug string false none The slug of the competition used in the url
displayOrder number false none The position in the list of competitions when listing all the competitions for a given sport.
startDate string(date-time) false none The date when the competition starts
endDate string(date-time) false none The date when the competition ends
SportId string(uuid) false none The id of the associated sport

Round

{
  "id": "string",
  "name": "string",
  "competitionOrder": 0,
  "CompetitionId": "string",
  "SeasonId": "string"
}

Round

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none The name of the round
competitionOrder number false none The position in the list of rounds when listing all the rounds for a given round.
CompetitionId string(uuid) false none The id of the associated round
SeasonId string(uuid) false none The id of the associated season