NAV
Python Go HTTP JavaScript Node.js

MLS API v1

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

Base URLs:

Authentication

AccountingService

Returns a list of invoices

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices',
{
  method: 'GET',

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

GET /accounting/v1beta1/invoices

List all the invoices connected to your account.

Parameters

Name In Type Required Description
start_time query string(date-time) false The filter is applied to issue_time
end_time query string(date-time) false The filter is applied to issue_time

Example responses

200 Response

{
  "invoices": [
    {
      "amount": 0.1,
      "currency": "string",
      "due_time": "2019-08-24T14:15:22Z",
      "end_time": "2019-08-24T14:15:22Z",
      "id": "string",
      "issue_time": "2019-08-24T14:15:22Z",
      "org_id": "string",
      "payment": {
        "amount": 0.1,
        "create_time": "2019-08-24T14:15:22Z",
        "currency": "string",
        "id": "string",
        "invoice_id": "string",
        "message": "string",
        "org_id": "string",
        "payment_method": {
          "card": {
            "brand": "string",
            "exp_month": 0,
            "exp_year": 0,
            "last_digits": "string",
            "name": "string"
          },
          "create_time": "2019-08-24T14:15:22Z",
          "id": "string",
          "is_default": true,
          "org_id": "string",
          "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
          "update_time": "2019-08-24T14:15:22Z"
        },
        "status": "PAYMENT_STATUS_UNSPECIFIED"
      },
      "start_time": "2019-08-24T14:15:22Z",
      "status": "STATUS_UNSPECIFIED",
      "update_time": "2019-08-24T14:15:22Z",
      "usages": [
        {
          "amount": 0.1,
          "amount_unit": "AMOUNT_UNIT_UNSPECIFIED",
          "cost": {
            "amount": 0.1,
            "currency": "string"
          },
          "description": "string",
          "end_time": "2019-08-24T14:15:22Z",
          "sku_id": "string",
          "start_time": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListInvoicesResponse
default Default An unexpected error response. google.rpc.Status

Download an invoice

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices/{invoice_id}/download', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices/{invoice_id}/download", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices/{invoice_id}/download HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices/{invoice_id}/download',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/invoices/{invoice_id}/download',
{
  method: 'GET',

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

GET /accounting/v1beta1/invoices/{invoice_id}/download

Generates and return a downloadable URL of invoice.

Parameters

Name In Type Required Description
invoice_id path string true Unique id of the invoice.

Example responses

200 Response

{
  "download_url": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.DownloadInvoiceResponse
default Default An unexpected error response. google.rpc.Status

Return organization's information

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}',
{
  method: 'GET',

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

GET /accounting/v1beta1/organizations/{org_id}

Get organization's information

Parameters

Name In Type Required Description
org_id path string true none

Example responses

200 Response

{
  "organization": {
    "email": "string",
    "id": "string",
    "invoice_template_id": "string",
    "is_enabled": true,
    "is_test": true,
    "name": "string",
    "tax": {
      "address_lines": [
        "string"
      ],
      "city": "string",
      "country": "st",
      "id": "string",
      "name": "string",
      "phone_number": "string",
      "province": "string",
      "zip_code": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.GetOrganizationResponse
404 Not Found Organization not found Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Updates organization data

Code samples

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

r = requests.patch('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}", data)
    req.Header = headers

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

PATCH https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "id": "string",
  "invoice_template_id": "string",
  "is_enabled": true,
  "is_test": true,
  "name": "string",
  "tax": {
    "address_lines": [
      "string"
    ],
    "city": "string",
    "country": "st",
    "id": "string",
    "name": "string",
    "phone_number": "string",
    "province": "string",
    "zip_code": "string"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "email": "string",
  "id": "string",
  "invoice_template_id": "string",
  "is_enabled": true,
  "is_test": true,
  "name": "string",
  "tax": {
    "address_lines": [
      "string"
    ],
    "city": "string",
    "country": "st",
    "id": "string",
    "name": "string",
    "phone_number": "string",
    "province": "string",
    "zip_code": "string"
  }
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/organizations/{org_id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /accounting/v1beta1/organizations/{org_id}

Updates organization's info

Body parameter

{
  "email": "string",
  "id": "string",
  "invoice_template_id": "string",
  "is_enabled": true,
  "is_test": true,
  "name": "string",
  "tax": {
    "address_lines": [
      "string"
    ],
    "city": "string",
    "country": "st",
    "id": "string",
    "name": "string",
    "phone_number": "string",
    "province": "string",
    "zip_code": "string"
  }
}

Parameters

Name In Type Required Description
org_id path string true none
body body mycujoo.accounting.v1beta1.Organization true none

Example responses

200 Response

{
  "email": "string",
  "id": "string",
  "invoice_template_id": "string",
  "is_enabled": true,
  "is_test": true,
  "name": "string",
  "tax": {
    "address_lines": [
      "string"
    ],
    "city": "string",
    "country": "st",
    "id": "string",
    "name": "string",
    "phone_number": "string",
    "province": "string",
    "zip_code": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK (empty) mycujoo.accounting.v1beta1.Organization
404 Not Found Organization not found Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns payments activities

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/payments HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments',
{
  method: 'GET',

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

GET /accounting/v1beta1/payments

Returns payments activities.

Parameters

Name In Type Required Description
invoice_id query string false Invoice ID that payments are related to it.

Example responses

200 Response

{
  "payments": [
    {
      "amount": 0.1,
      "create_time": "2019-08-24T14:15:22Z",
      "currency": "string",
      "id": "string",
      "invoice_id": "string",
      "message": "string",
      "org_id": "string",
      "payment_method": {
        "card": {
          "brand": "string",
          "exp_month": 0,
          "exp_year": 0,
          "last_digits": "string",
          "name": "string"
        },
        "create_time": "2019-08-24T14:15:22Z",
        "id": "string",
        "is_default": true,
        "org_id": "string",
        "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
        "update_time": "2019-08-24T14:15:22Z"
      },
      "status": "PAYMENT_STATUS_UNSPECIFIED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListPaymentsResponse
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns the list of payment methods

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods',
{
  method: 'GET',

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

GET /accounting/v1beta1/payments/methods

Returns the list of payment methods.

Example responses

200 Response

{
  "payment_method": [
    {
      "card": {
        "brand": "string",
        "exp_month": 0,
        "exp_year": 0,
        "last_digits": "string",
        "name": "string"
      },
      "create_time": "2019-08-24T14:15:22Z",
      "id": "string",
      "is_default": true,
      "org_id": "string",
      "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
      "update_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListPaymentMethodsResponse
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Creates a new Stripe payment method

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/stripe', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/stripe", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/stripe HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "setup_intent_id": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/stripe',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "setup_intent_id": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/stripe',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounting/v1beta1/payments/methods/stripe

Creates a new Stripe payment method.

Body parameter

{
  "setup_intent_id": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounting.v1beta1.CreateStripePaymentMethodRequest true none

Example responses

200 Response

{
  "card": {
    "brand": "string",
    "exp_month": 0,
    "exp_year": 0,
    "last_digits": "string",
    "name": "string"
  },
  "create_time": "2019-08-24T14:15:22Z",
  "id": "string",
  "is_default": true,
  "org_id": "string",
  "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
  "update_time": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK (empty) mycujoo.accounting.v1beta1.PaymentMethod
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns the requested payment method

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'GET',

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

GET /accounting/v1beta1/payments/methods/{id}

Returns the requested payment method.

Parameters

Name In Type Required Description
id path string true Unique Payment method ID

Example responses

200 Response

{
  "payment_method": {
    "card": {
      "brand": "string",
      "exp_month": 0,
      "exp_year": 0,
      "last_digits": "string",
      "name": "string"
    },
    "create_time": "2019-08-24T14:15:22Z",
    "id": "string",
    "is_default": true,
    "org_id": "string",
    "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
    "update_time": "2019-08-24T14:15:22Z"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.GetPaymentMethodResponse
404 Not Found Payment method not found Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Deletes an payment method

Code samples

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

r = requests.delete('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}", data)
    req.Header = headers

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

DELETE https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'DELETE',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'DELETE',

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

DELETE /accounting/v1beta1/payments/methods/{id}

Deletes a payment method.

Parameters

Name In Type Required Description
id path string true Unique Payment method ID

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.DeletePaymentMethodResponse
404 Not Found Payment method not found Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Updates the existing payment method

Code samples

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

r = requests.patch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}", data)
    req.Header = headers

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

PATCH https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "is_default": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "is_default": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/methods/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /accounting/v1beta1/payments/methods/{id}

Modifying the existing payment method.

Body parameter

{
  "is_default": true
}

Parameters

Name In Type Required Description
id path string true Unique Payment method ID
body body mycujoo.accounting.v1beta1.PaymentMethodUpdate true none

Example responses

200 Response

{
  "card": {
    "brand": "string",
    "exp_month": 0,
    "exp_year": 0,
    "last_digits": "string",
    "name": "string"
  },
  "create_time": "2019-08-24T14:15:22Z",
  "id": "string",
  "is_default": true,
  "org_id": "string",
  "provider": "PAYMENT_METHOD_PROVIDER_UNSPECIFIED",
  "update_time": "2019-08-24T14:15:22Z"
}

Responses

Status Meaning Description Schema
200 OK (empty) mycujoo.accounting.v1beta1.PaymentMethod
404 Not Found Payment method not found Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Creates a new stripe setup intent

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/providers/stripe/setupintent', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/providers/stripe/setupintent", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/providers/stripe/setupintent HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/providers/stripe/setupintent',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/payments/providers/stripe/setupintent',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounting/v1beta1/payments/providers/stripe/setupintent

Creates a new stripe setup intent.

Body parameter

{}

Parameters

Name In Type Required Description
body body mycujoo.accounting.v1beta1.CreateStripeSetupIntentRequest true none

Example responses

200 Response

{
  "client_secret": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.CreateStripeSetupIntentResponse
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns a list of SKU pricings.

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing', headers = headers)

print(r.json())

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://mcls-api.mycujoo.tv/accounting/v1beta1/pricing", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


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

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing',
{
  method: 'GET',

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

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

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

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing',
{
  method: 'GET',

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

GET /accounting/v1beta1/pricing

List all prices.

Example responses

200 Response

{
  "pricings": [
    {
      "current_usage": 0.1,
      "description": "string",
      "discounts": [
        {
          "end_time": "2019-08-24T14:15:22Z",
          "max_usage": 0.1,
          "min_usage": 0.1,
          "price": {
            "currency_code": "string",
            "nanos": 0,
            "units": "string"
          },
          "start_time": "2019-08-24T14:15:22Z"
        }
      ],
      "msrp": {
        "currency_code": "string",
        "nanos": 0,
        "units": "string"
      },
      "price": {
        "currency_code": "string",
        "nanos": 0,
        "units": "string"
      },
      "sku_id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListPricingResponse
default Default An unexpected error response. google.rpc.Status

Returns a list of SKU pricings specifically for an organization.

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing/{org_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing/{org_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing/{org_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing/{org_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/pricing/{org_id}',
{
  method: 'GET',

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

GET /accounting/v1beta1/pricing/{org_id}

List all prices for your account.

Parameters

Name In Type Required Description
org_id path string true none

Example responses

200 Response

{
  "pricings": [
    {
      "current_usage": 0.1,
      "description": "string",
      "discounts": [
        {
          "end_time": "2019-08-24T14:15:22Z",
          "max_usage": 0.1,
          "min_usage": 0.1,
          "price": {
            "currency_code": "string",
            "nanos": 0,
            "units": "string"
          },
          "start_time": "2019-08-24T14:15:22Z"
        }
      ],
      "msrp": {
        "currency_code": "string",
        "nanos": 0,
        "units": "string"
      },
      "price": {
        "currency_code": "string",
        "nanos": 0,
        "units": "string"
      },
      "sku_id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListOrganizationPricingResponse
default Default An unexpected error response. google.rpc.Status

Returns a list of skus usages

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/usages", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/usages HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages',
{
  method: 'GET',

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

GET /accounting/v1beta1/usages

List all the SKUs usages connected to your account.

Parameters

Name In Type Required Description
aggregate query boolean false Aggregate multi SKUs with the same ID in one result
start_time query string(date-time) false The filter applies to start_time
end_time query string(date-time) false The filter applies to end_time
page_size query integer(int32) false A positive number that is the maximum number of results to return.
page_token query string false If this field is not empty then it must contain the next_page_token value

Detailed descriptions

page_token: If this field is not empty then it must contain the next_page_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

Example responses

200 Response

{
  "next_page_token": "string",
  "usages": [
    {
      "amount": 0.1,
      "end_time": "2019-08-24T14:15:22Z",
      "sku_id": "string",
      "start_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListSKUUsageResponse
default Default An unexpected error response. google.rpc.Status

Returns a list of running skus usages for the current period

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages/running', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/usages/running", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/usages/running HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages/running',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/usages/running',
{
  method: 'GET',

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

GET /accounting/v1beta1/usages/running

List all the SKUs usages connected to your account. You used them previusely.

Example responses

200 Response

{
  "amount": 0.1,
  "currency": "string",
  "end_time": "2019-08-24T14:15:22Z",
  "start_time": "2019-08-24T14:15:22Z",
  "update_time": "2019-08-24T14:15:22Z",
  "usages": [
    {
      "amount": 0.1,
      "amount_unit": "AMOUNT_UNIT_UNSPECIFIED",
      "cost": {
        "amount": 0.1,
        "currency": "string"
      },
      "description": "string",
      "end_time": "2019-08-24T14:15:22Z",
      "sku_id": "string",
      "start_time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.ListRunningSKUUsageResponse
default Default An unexpected error response. google.rpc.Status

Returns the information of the requested VAT number

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounting/v1beta1/vat/validate', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounting/v1beta1/vat/validate", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounting/v1beta1/vat/validate HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/vat/validate',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounting/v1beta1/vat/validate',
{
  method: 'GET',

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

GET /accounting/v1beta1/vat/validate

Returns the information of the requeted VAT number.

Parameters

Name In Type Required Description
vat_number query string false The VAT number.

Example responses

200 Response

{
  "company_address": "string",
  "company_name": "string",
  "country_code": "string",
  "is_valid": true,
  "vat_number": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounting.v1beta1.GetVATValidationResponse
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

AccountsService

ListAccountsRequest

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounts/v1', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounts/v1", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounts/v1 HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1',
{
  method: 'GET',

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

GET /accounts/v1

Returns list of account matched by input query (if specified) or all within the org.

Parameters

Name In Type Required Description
page_size query integer(int32) false Maximum number of records to return
page_token query string false If this field is not empty then it must contain the next_page_token value

Detailed descriptions

page_token: If this field is not empty then it must contain the next_page_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

Example responses

200 Response

{
  "accounts": [
    {
      "email": "string",
      "first_name": "string",
      "id": "string",
      "is_verified": true,
      "last_name": "string"
    }
  ],
  "next_page_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.ListAccountsResponse
default Default An unexpected error response. google.rpc.Status

CreateAccount

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1 HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "first_name": "string",
  "last_name": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "email": "string",
  "first_name": "string",
  "last_name": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1

Creates account within organization.

Body parameter

{
  "email": "string",
  "first_name": "string",
  "last_name": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.CreateAccountRequest true none

Example responses

200 Response

{
  "password": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.CreateAccountResponse
default Default An unexpected error response. google.rpc.Status

UpdateAccount

Code samples

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

r = requests.patch('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}", data)
    req.Header = headers

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

PATCH https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "first_name": "string",
  "last_name": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "first_name": "string",
  "last_name": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /accounts/v1/accounts/{account_id}

Updates user account profile data.

Body parameter

{
  "first_name": "string",
  "last_name": "string"
}

Parameters

Name In Type Required Description
account_id path string true none
body body mycujoo.accounts.v1.AccountUpdate true none

Example responses

200 Response

{
  "account": {
    "email": "string",
    "first_name": "string",
    "id": "string",
    "is_verified": true,
    "last_name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.UpdateAccountResponse
default Default An unexpected error response. google.rpc.Status

DeleteBindings

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}/delete_bindings', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}/delete_bindings", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}/delete_bindings HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}/delete_bindings',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/accounts/{account_id}/delete_bindings',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/accounts/{account_id}/delete_bindings

This method revokes all roles for the given account by deleting all account bindings.

Body parameter

{}

Parameters

Name In Type Required Description
account_id path string true ID of the account to revoke roles from
body body object true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.DeleteBindingsResponse
default Default An unexpected error response. google.rpc.Status

BatchGetAccounts

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/batch', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/batch", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/batch HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "account_ids": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "account_ids": [
    "string"
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/batch

Loads account information for multiple accounts.

Body parameter

{
  "account_ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.BatchGetAccountsRequest true none

Example responses

200 Response

{
  "accounts": [
    {
      "email": "string",
      "first_name": "string",
      "id": "string",
      "is_verified": true,
      "last_name": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.BatchGetAccountsResponse
default Default An unexpected error response. google.rpc.Status

BatchGetAccountsByEmail

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/batch/by_email', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/batch/by_email", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/batch/by_email HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email_addresses": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch/by_email',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "email_addresses": [
    "string"
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch/by_email',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/batch/by_email

Loads account information for multiple accounts by list of email addresses.

Body parameter

{
  "email_addresses": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.BatchGetAccountsByEmailRequest true none

Example responses

200 Response

{
  "accounts": [
    {
      "email": "string",
      "first_name": "string",
      "id": "string",
      "is_verified": true,
      "last_name": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.BatchGetAccountsByEmailResponse
default Default An unexpected error response. google.rpc.Status

BatchDeleteAccounts

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/batch/delete', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/batch/delete", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/batch/delete HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "ids": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch/delete',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "ids": [
    "string"
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/batch/delete',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/batch/delete

Deletes accounts and removes them from associated IAM policies

Body parameter

{
  "ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.BatchDeleteAccountsRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.BatchDeleteAccountsResponse
default Default An unexpected error response. google.rpc.Status

ChangePassword

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/change_password', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/change_password", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/change_password HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "new_password": "string",
  "old_password": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/change_password',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "new_password": "string",
  "old_password": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/change_password',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/change_password

Changes account password using old password and new password.

Body parameter

{
  "new_password": "string",
  "old_password": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.ChangePasswordRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.ChangePasswordResponse
default Default An unexpected error response. google.rpc.Status

CheckPasswordReset

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/check_password_reset', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/check_password_reset", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/check_password_reset HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "reset_code": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/check_password_reset',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/check_password_reset',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/check_password_reset

It will check that reset code is still valid and we can proceed with changing password. It generates token that we can use to immediately sign-in to account.

Body parameter

{
  "reset_code": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.CheckPasswordResetRequest true none

Example responses

200 Response

{
  "token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.CheckPasswordResetResponse
default Default An unexpected error response. google.rpc.Status

InviteAccount

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/invitations', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/invitations", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/invitations HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "first_name": "string",
  "last_name": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/invitations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "email": "string",
  "first_name": "string",
  "last_name": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/invitations',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/invitations

Basically creates account same as CreateAccount but is meant to be used by unprivileged users so that the endpoint does not return any data like password

Body parameter

{
  "email": "string",
  "first_name": "string",
  "last_name": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.InviteAccountRequest true none

Example responses

200 Response

{
  "account_id": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.InviteAccountResponse
default Default An unexpected error response. google.rpc.Status

GetMyAccount

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounts/v1/myself', headers = headers)

print(r.json())

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://mcls-api.mycujoo.tv/accounts/v1/myself", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounts/v1/myself HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/myself',
{
  method: 'GET',

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

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

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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/myself',
{
  method: 'GET',

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

GET /accounts/v1/myself

Example responses

200 Response

{
  "account": {
    "email": "string",
    "first_name": "string",
    "id": "string",
    "is_verified": true,
    "last_name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.GetMyAccountResponse
default Default An unexpected error response. google.rpc.Status

ResendAccountVerification

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/resend_account_verification', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/resend_account_verification", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/resend_account_verification HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "org_id": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/resend_account_verification',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/resend_account_verification',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/resend_account_verification

Resends account email verification message.

Body parameter

{
  "email": "string",
  "org_id": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.ResendAccountVerificationRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.ResendAccountVerificationResponse
default Default An unexpected error response. google.rpc.Status

ResetPassword

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/reset_password', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/reset_password", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/reset_password HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "new_password": "string",
  "reset_code": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/reset_password',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/reset_password',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/reset_password

Changes account password without old password from forgot your password page UI.

Body parameter

{
  "new_password": "string",
  "reset_code": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.ResetPasswordRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.ResetPasswordResponse
default Default An unexpected error response. google.rpc.Status

SendPasswordReset

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/send_password_reset', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/send_password_reset", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/send_password_reset HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "email": "string",
  "org_id": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/send_password_reset',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

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

fetch('https://mcls-api.mycujoo.tv/accounts/v1/send_password_reset',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/send_password_reset

Requests password change. It sends an email with a special link if associated account exists.

Body parameter

{
  "email": "string",
  "org_id": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.SendPasswordResetRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.SendPasswordResetResponse
default Default An unexpected error response. google.rpc.Status

VerifyAccountEmail

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/accounts/v1/verify_account', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/accounts/v1/verify_account", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/accounts/v1/verify_account HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "account_id": "string",
  "org_id": "string",
  "verification_code": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/verify_account',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "account_id": "string",
  "org_id": "string",
  "verification_code": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/verify_account',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /accounts/v1/verify_account

Marks that account email address is verified.

Body parameter

{
  "account_id": "string",
  "org_id": "string",
  "verification_code": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.accounts.v1.VerifyAccountEmailRequest true none

Example responses

200 Response

{
  "token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.VerifyAccountEmailResponse
default Default An unexpected error response. google.rpc.Status

GetAccount

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/accounts/v1/{account_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/accounts/v1/{account_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/accounts/v1/{account_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/{account_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/accounts/v1/{account_id}',
{
  method: 'GET',

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

GET /accounts/v1/{account_id}

In order to request information about currently logged in account you can use value myself for the account_id

Parameters

Name In Type Required Description
account_id path string true none

Example responses

200 Response

{
  "account": {
    "email": "string",
    "first_name": "string",
    "id": "string",
    "is_verified": true,
    "last_name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.accounts.v1.GetAccountResponse
default Default An unexpected error response. google.rpc.Status

ActionsService

Lists actions

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1 HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1',
{
  method: 'GET',

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

GET /actions/v1beta1

List all the actions

Parameters

Name In Type Required Description
service_id query string false Filter list by service ID
category_id query string false Filter list by category ID
page_size query integer(int32) false Maximum number of records to return
page_token query string false The pagination token in the List request.

Example responses

200 Response

{
  "items": [
    {
      "category_id": "string",
      "description": "string",
      "icon_url": "string",
      "id": "string",
      "is_active": true,
      "service_id": "string",
      "title": "string"
    }
  ],
  "next_page_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.ListActionsResponse
default Default An unexpected error response. google.rpc.Status

Lists action calls

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/calls', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/calls", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/calls HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls',
{
  method: 'GET',

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

GET /actions/v1beta1/calls

List all action calls

Parameters

Name In Type Required Description
group_id query string false none

Example responses

200 Response

{
  "items": [
    {
      "configuration_id": "string",
      "group_id": "string",
      "id": "string",
      "request_data": {
        "data": {},
        "id": "string"
      },
      "response_data": {
        "data": {},
        "id": "string"
      },
      "state": "ACTION_CALL_STATE_UNSPECIFIED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.ListActionCallsResponse
default Default An unexpected error response. google.rpc.Status

Returns a single action call

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}',
{
  method: 'GET',

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

GET /actions/v1beta1/calls/{id}

Returns a single action call.

Parameters

Name In Type Required Description
id path string true none

Example responses

200 Response

{
  "action_call": {
    "configuration_id": "string",
    "group_id": "string",
    "id": "string",
    "request_data": {
      "data": {},
      "id": "string"
    },
    "response_data": {
      "data": {},
      "id": "string"
    },
    "state": "ACTION_CALL_STATE_UNSPECIFIED"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.GetActionCallResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Updates an action call

Code samples

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

r = requests.patch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}", data)
    req.Header = headers

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

PATCH https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "data": {}
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "data": {}
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/calls/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /actions/v1beta1/calls/{id}

Updates an action call.

Body parameter

{
  "data": {}
}

Parameters

Name In Type Required Description
id path string true none
body body mycujoo.actions.v1beta1.UpdateActionCallRequestFields true Fields to update

Example responses

200 Response

{
  "action_call": {
    "configuration_id": "string",
    "group_id": "string",
    "id": "string",
    "request_data": {
      "data": {},
      "id": "string"
    },
    "response_data": {
      "data": {},
      "id": "string"
    },
    "state": "ACTION_CALL_STATE_UNSPECIFIED"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.UpdateActionCallResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Lists action categories

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/categories', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/categories", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/categories HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/categories',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/categories',
{
  method: 'GET',

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

GET /actions/v1beta1/categories

List all the available categories of actions

Parameters

Name In Type Required Description
page_size query integer(int32) false Maximum number of records to return
page_token query string false The pagination token in the List request.
hide_empty query boolean false Whether to filter out categories with no available actions

Example responses

200 Response

{
  "items": [
    {
      "description": "string",
      "id": "string",
      "menu_title": "string",
      "title": "string"
    }
  ],
  "next_page_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.ListActionCategoriesResponse
default Default An unexpected error response. google.rpc.Status

Lists action configurations

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/configurations", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/configurations HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations',
{
  method: 'GET',

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

GET /actions/v1beta1/configurations

List all the action configurations of a group

Parameters

Name In Type Required Description
group_id query string false none

Example responses

200 Response

{
  "items": [
    {
      "action_id": "string",
      "action_title": "string",
      "group_id": "string",
      "id": "string",
      "order": 0,
      "title": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.ListActionConfigurationsResponse
default Default An unexpected error response. google.rpc.Status

Creates an action configuration

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/actions/v1beta1/configurations", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/actions/v1beta1/configurations HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "action_id": "string",
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "group_id": "string",
  "title": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "action_id": "string",
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "group_id": "string",
  "title": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /actions/v1beta1/configurations

Creates a new action configuration.

Body parameter

{
  "action_id": "string",
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "group_id": "string",
  "title": "string"
}

Parameters

Name In Type Required Description
body body mycujoo.actions.v1beta1.CreateActionConfigurationRequest true none

Example responses

200 Response

{
  "action_configuration": {
    "action_id": "string",
    "fields": [
      {
        "bool_value": true,
        "datetime_value": "2019-08-24T14:15:22Z",
        "field": "string",
        "float_value": 0.1,
        "number_value": "string",
        "string_value": "string"
      }
    ],
    "group_id": "string",
    "id": "string",
    "order": 0,
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.CreateActionConfigurationResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns a single action configuration

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'GET',

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

GET /actions/v1beta1/configurations/{id}

Returns a single action type.

Parameters

Name In Type Required Description
id path string true none

Example responses

200 Response

{
  "action_configuration": {
    "action_id": "string",
    "fields": [
      {
        "bool_value": true,
        "datetime_value": "2019-08-24T14:15:22Z",
        "field": "string",
        "float_value": 0.1,
        "number_value": "string",
        "string_value": "string"
      }
    ],
    "group_id": "string",
    "id": "string",
    "order": 0,
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.GetActionConfigurationResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Deletes an action configuration

Code samples

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

r = requests.delete('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}", data)
    req.Header = headers

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

DELETE https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'DELETE',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'DELETE',

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

DELETE /actions/v1beta1/configurations/{id}

Deletes an action configuration.

Parameters

Name In Type Required Description
id path string true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.DeleteActionConfigurationResponse
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Updates an action configuration

Code samples

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

r = requests.patch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}", data)
    req.Header = headers

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

PATCH https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "order": 0,
  "title": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "order": 0,
  "title": "string"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/configurations/{id}',
{
  method: 'PATCH',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /actions/v1beta1/configurations/{id}

Updates an action configuration.

Body parameter

{
  "fields": [
    {
      "bool_value": true,
      "datetime_value": "2019-08-24T14:15:22Z",
      "field": "string",
      "float_value": 0.1,
      "number_value": "string",
      "string_value": "string"
    }
  ],
  "order": 0,
  "title": "string"
}

Parameters

Name In Type Required Description
id path string true none
body body mycujoo.actions.v1beta1.UpdateActionConfigurationRequestFields true Fields to update

Example responses

200 Response

{
  "action_configuration": {
    "action_id": "string",
    "fields": [
      {
        "bool_value": true,
        "datetime_value": "2019-08-24T14:15:22Z",
        "field": "string",
        "float_value": 0.1,
        "number_value": "string",
        "string_value": "string"
      }
    ],
    "group_id": "string",
    "id": "string",
    "order": 0,
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.UpdateActionConfigurationResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

Returns a single action

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/actions/v1beta1/{id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/actions/v1beta1/{id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/actions/v1beta1/{id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/{id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/actions/v1beta1/{id}',
{
  method: 'GET',

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

GET /actions/v1beta1/{id}

Returns a single action

Parameters

Name In Type Required Description
id path string true none

Example responses

200 Response

{
  "action": {
    "action_fields": [
      {
        "bool_value": true,
        "datetime_value": "2019-08-24T14:15:22Z",
        "float_value": 0.1,
        "is_configurable": true,
        "is_required": true,
        "label": "string",
        "name": "string",
        "no_default_value": true,
        "number_value": "string",
        "string_value": "string",
        "validators": [
          {
            "max": 0,
            "min": 0,
            "regex": "string"
          }
        ],
        "value_options": [
          {
            "bool_value": true,
            "datetime_value": "2019-08-24T14:15:22Z",
            "float_value": 0.1,
            "label": "string",
            "number_value": "string",
            "string_value": "string"
          }
        ],
        "value_type": "VALUE_TYPE_UNSPECIFIED"
      }
    ],
    "category_id": "string",
    "description": "string",
    "icon_url": "string",
    "id": "string",
    "is_active": true,
    "request_schema_id": "string",
    "request_topic": "string",
    "response_schema_id": "string",
    "response_topic": "string",
    "service_id": "string",
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.actions.v1beta1.GetActionResponse
400 Bad Request Bad input parameters Inline
500 Internal Server Error Internal Server Error Inline
default Default An unexpected error response. google.rpc.Status

Response Schema

StreamingAnalyticsService

Get consumption analytics for all streams in a project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}

Get consumption analytics for all streams in a project.

Parameters

Name In Type Required Description
project_id path string true example: abc123
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Example responses

200 Response

{
  "average_watch_time": {
    "content_type_watch_time": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "minutes": 0.1
      }
    ],
    "total_minutes": 0.1
  },
  "project_id": "string",
  "unique_users": {
    "content_type_users": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "users_count": 0
      }
    ],
    "total_users": 0
  },
  "watch_time": {
    "content_type_watch_time": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "minutes": 0.1
      }
    ],
    "total_minutes": 0.1
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetProjectConsumptionStatsResponse
default Default An unexpected error response. google.rpc.Status

Get the average playtime timeseries for a specific project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/average-playtime', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/average-playtime", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/average-playtime HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/average-playtime',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/average-playtime',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/average-playtime

Get the average playtime timeseries for a specific project

Parameters

Name In Type Required Description
project_id path string true example: elevendata
time_step query string false example: TIME_STEP_DAY
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "average_playtime_points": [
    {
      "average_playtime": 0.1,
      "time": "2019-08-24T14:15:22Z"
    }
  ],
  "time_step": "TIME_STEP_UNSPECIFIED"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetProjectAveragePlaytimeTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

List stream stats summary for a project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/streams', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/streams", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/streams HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/streams',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/streams',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/streams

List stream stats summary for a project

Parameters

Name In Type Required Description
project_id path string true example: elevendata
page_size query integer(int32) false The maximum number of streams to return.
order_by query string false Order of the results.
page_token query string false A page token, received from a previous ListStreamStatSummaryRequest call.
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

page_size: The maximum number of streams to return. If unspecified, at most 20 streams will be returned.

order_by: Order of the results.

The possible ordering columns are: total_plays, total_playtime, unique_users, title, average_buffer_ratio_live, average_buffer_ratio_vod, average_play_time For example: total_plays desc (AIP-132)

page_token: A page token, received from a previous ListStreamStatSummaryRequest call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListStreamStatSummaryRequest must match the call that provided the page token.

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Example responses

200 Response

{
  "next_page_token": "string",
  "streams": [
    {
      "average_live_buffer_ratio": 0.1,
      "average_play_time": 0.1,
      "average_vod_buffer_ratio": 0.1,
      "stream_id": "string",
      "title": "string",
      "total_plays": 0,
      "total_playtime": 0.1,
      "total_users": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.ListStreamStatSummariesResponse
default Default An unexpected error response. google.rpc.Status

Get the total plays timeseries for a specific project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-plays', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-plays", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-plays HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-plays',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-plays',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/total-plays

Get the total plays timeseries for a specific project

Parameters

Name In Type Required Description
project_id path string true example: elevendata
time_step query string false example: TIME_STEP_DAY
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "time_step": "TIME_STEP_UNSPECIFIED",
  "total_plays_points": [
    {
      "plays": 0,
      "time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetProjectTotalPlaysTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get the total playtime timeseries for a specific project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-playtime', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-playtime", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-playtime HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-playtime',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/total-playtime',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/total-playtime

Get the total playtime timeseries for a specific project

Parameters

Name In Type Required Description
project_id path string true example: elevendata
time_step query string false example: TIME_STEP_DAY
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "time_step": "TIME_STEP_UNSPECIFIED",
  "total_playtime_points": [
    {
      "time": "2019-08-24T14:15:22Z",
      "total_playtime": 0.1
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetProjectTotalPlaytimeTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get the unique users time series for a specific project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/unique-users', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/unique-users", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/unique-users HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/unique-users',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/unique-users',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/unique-users

Get the unique users time series for a specific project

Parameters

Name In Type Required Description
project_id path string true example: elevendata
time_step query string false example: TIME_STEP_DAY
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "time_step": "TIME_STEP_UNSPECIFIED",
  "unique_users_points": [
    {
      "time": "2019-08-24T14:15:22Z",
      "unique_users": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetProjectUniqueUsersTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

List watch events from a project

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/watch-events', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/watch-events", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/watch-events HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/watch-events',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/projects/{project_id}/watch-events',
{
  method: 'GET',

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

GET /analytics/v1/consumption/projects/{project_id}/watch-events

List watch events for a project

Parameters

Name In Type Required Description
project_id path string true example: eleven-italy
filter query string false Filters the list of the result using KQL
page_size query integer(int32) false The maximum number of events to return.
page_token query string false A page token, received from a previous ListWatchEventsRequest call.
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
order_by query string false Order of the results.

Detailed descriptions

filter: Filters the list of the result using KQL example: stream_id:cl1w6bavs0peo0134kflbwkc7 event_type:(PLAY OR STOP) identity_id:"45da7744-ced8-47e1-8caf-09a01616647d" Possible filters: - event_type - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

page_size: The maximum number of events to return. If unspecified, at most 10 watch events will be returned.

page_token: A page token, received from a previous ListWatchEventsRequest call. Provide this to retrieve the subsequent page.

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

order_by: Order of the results. For example: event_time asc If not present the default ordering is event_time desc

Example responses

200 Response

{
  "next_page_token": "string",
  "watch_events": [
    {
      "cdn": "string",
      "city": "string",
      "connection_type": "string",
      "country_code": "string",
      "device_name": "string",
      "effective_time": "string",
      "event_time": "2019-08-24T14:15:22Z",
      "event_type": "string",
      "happiness_score": 0.1,
      "has_error": true,
      "identity_id": "string",
      "ip": "string",
      "isp": "string",
      "session_id": "string",
      "stream_id": "string",
      "title": "string",
      "type_view": "CONTENT_TYPE_UNSPECIFIED",
      "watch_duration": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.ListWatchEventsResponse
default Default An unexpected error response. google.rpc.Status

Get consumption analytics for a single stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/consumption/streams/{stream_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/consumption/streams/{stream_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/consumption/streams/{stream_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/streams/{stream_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/consumption/streams/{stream_id}',
{
  method: 'GET',

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

GET /analytics/v1/consumption/streams/{stream_id}

Get consumption analytics for a single stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Example responses

200 Response

{
  "average_watch_time": {
    "content_type_watch_time": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "minutes": 0.1
      }
    ],
    "total_minutes": 0.1
  },
  "stream_id": "string",
  "unique_users": {
    "content_type_users": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "users_count": 0
      }
    ],
    "total_users": 0
  },
  "watch_time": {
    "content_type_watch_time": [
      {
        "content_type": "CONTENT_TYPE_UNSPECIFIED",
        "minutes": 0.1
      }
    ],
    "total_minutes": 0.1
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetStreamConsumptionStatsResponse
default Default An unexpected error response. google.rpc.Status

Get the media source stats snapshots in batch

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/stats-snapshot', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/media_sources/stats-snapshot", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/media_sources/stats-snapshot HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/stats-snapshot',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/stats-snapshot',
{
  method: 'GET',

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

GET /analytics/v1/media_sources/stats-snapshot

Get the media source stats snapshots in batch.

Parameters

Name In Type Required Description
media_source_ids query array[string] false example: ck8u9fwwu1wtg0hewiqz3we6j

Example responses

200 Response

{
  "snapshots": [
    {
      "media_source_id": "string",
      "snapshot": {
        "audio_bit_rate": 0,
        "bit_rate": 0,
        "connection_count": 0,
        "frame_rate": 0.1,
        "key_frame_consistent": true,
        "key_frame_interval": 0.1,
        "time": "2019-08-24T14:15:22Z",
        "video_height": 0
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetMediaSourceStatsSnapshotBatchResponse
default Default An unexpected error response. google.rpc.Status

Get stats time series for a media source

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats',
{
  method: 'GET',

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

GET /analytics/v1/media_sources/{media_source_id}/stats

Get stats time series for a media source.

Parameters

Name In Type Required Description
media_source_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

Example responses

200 Response

{
  "time_series": [
    {
      "audio_bit_rate": 0,
      "bit_rate": 0,
      "connection_count": 0,
      "frame_rate": 0.1,
      "key_frame_consistent": true,
      "key_frame_interval": 0.1,
      "time": "2019-08-24T14:15:22Z",
      "video_height": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetMediaSourceStatsTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get the stats snapshot for a media source

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats-snapshot', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats-snapshot", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats-snapshot HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats-snapshot',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/media_sources/{media_source_id}/stats-snapshot',
{
  method: 'GET',

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

GET /analytics/v1/media_sources/{media_source_id}/stats-snapshot

Get the stats snapshot for a media source.

Parameters

Name In Type Required Description
media_source_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j

Example responses

200 Response

{
  "snapshot": {
    "audio_bit_rate": 0,
    "bit_rate": 0,
    "connection_count": 0,
    "frame_rate": 0.1,
    "key_frame_consistent": true,
    "key_frame_interval": 0.1,
    "time": "2019-08-24T14:15:22Z",
    "video_height": 0
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetMediaSourceStatsSnapshotResponse
default Default An unexpected error response. google.rpc.Status

Get the video stats snapshots in batch

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/video-stats-snapshot', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/video-stats-snapshot", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/video-stats-snapshot HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/video-stats-snapshot',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/video-stats-snapshot',
{
  method: 'GET',

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

GET /analytics/v1/streams/video-stats-snapshot

Get the video stats snapshots in batch.

Parameters

Name In Type Required Description
stream_ids query array[string] false example: ck8u9fwwu1wtg0hewiqz3we6j

Example responses

200 Response

{
  "snapshots": [
    {
      "snapshot": {
        "audio_bit_rate": 0,
        "bit_rate": 0,
        "connection_count": 0,
        "frame_rate": 0.1,
        "key_frame_consistent": true,
        "key_frame_interval": 0.1,
        "resolution": 0,
        "time": "2019-08-24T14:15:22Z"
      },
      "stream_id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetVideoStatsSnapshotBatchResponse
default Default An unexpected error response. google.rpc.Status

Get all stats for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}

Get all stats for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Example responses

200 Response

{
  "buffer_ratio_time_series": [
    {
      "content_type": "CONTENT_TYPE_UNSPECIFIED",
      "points": [
        {
          "ratio": 0.1,
          "time": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ],
  "concurrent_plays_time_series": [
    {
      "plays": 0,
      "time": "2019-08-24T14:15:22Z"
    }
  ],
  "total_users_time_series": [
    {
      "content_type": "CONTENT_TYPE_UNSPECIFIED",
      "users_count": 0
    }
  ],
  "video_stats_time_series": [
    {
      "audio_bit_rate": 0,
      "bit_rate": 0,
      "connection_count": 0,
      "frame_rate": 0.1,
      "key_frame_consistent": true,
      "key_frame_interval": 0.1,
      "resolution": 0,
      "time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetStreamStatsResponse
default Default An unexpected error response. google.rpc.Status

List activity logs for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/activities', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/activities", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/activities HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/activities',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/activities',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/activities

List activity logs for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
filter query string false Filters the list of the result using KQL
page_size query integer(int32) false The maximum number of activities to return. The service may return fewer than
page_token query string false A page token, received from a previous ListStreamActivityLogs call.

Detailed descriptions

filter: Filters the list of the result using KQL example: create_time>="2023-04-26T16:23:13Z" create_time<"2023-04-26T16:33:13Z" source:thumbnails

page_size: The maximum number of activities to return. The service may return fewer than this value. If unspecified, at most 50 activities will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token: A page token, received from a previous ListStreamActivityLogs call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListStreamActivityLogs must match the call that provided the page token.

Example responses

200 Response

{
  "activities": [
    {
      "create_time": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "source": "string"
    }
  ],
  "next_page_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.ListStreamActivityLogsResponse
default Default An unexpected error response. google.rpc.Status

Get buffer ratio time series per content type for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/buffer-ratio', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/buffer-ratio", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/buffer-ratio HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/buffer-ratio',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/buffer-ratio',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/buffer-ratio

Get buffer ratio time series per content type for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
time_step query string false example: TIME_STEP_HOUR
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "time_series": [
    {
      "content_type": "CONTENT_TYPE_UNSPECIFIED",
      "points": [
        {
          "ratio": 0.1,
          "time": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ],
  "time_step": "TIME_STEP_UNSPECIFIED"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetBufferRatioTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get concurrent plays time series for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/concurrent-plays', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/concurrent-plays", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/concurrent-plays HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/concurrent-plays',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/concurrent-plays',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/concurrent-plays

Get concurrent plays time series for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.
time_step query string false example: TIME_STEP_HOUR
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Enumerated Values

Parameter Value
time_step TIME_STEP_UNSPECIFIED
time_step TIME_STEP_MINUTE
time_step TIME_STEP_HOUR
time_step TIME_STEP_DAY
time_step TIME_STEP_MONTH
time_step TIME_STEP_YEAR

Example responses

200 Response

{
  "concurrent_plays": [
    {
      "plays": 0,
      "time": "2019-08-24T14:15:22Z"
    }
  ],
  "time_step": "TIME_STEP_UNSPECIFIED"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetConcurrentPlaysTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get total users for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/total-users', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/total-users", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/total-users HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/total-users',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/total-users',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/total-users

Get total users for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
filter query string false Filters the result by several dimensions using KQL

Detailed descriptions

filter: Filters the result by several dimensions using KQL example: city:(London OR Manchester) isp:Vodafone " Possible filters: - identity_id - device_type - isp - connection_type - country_code - region - state_province - city - os - cdn

Example responses

200 Response

{
  "stream_id": "string",
  "total_users": [
    {
      "content_type": "CONTENT_TYPE_UNSPECIFIED",
      "users_count": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetTotalUsersResponse
default Default An unexpected error response. google.rpc.Status

Get video stats time series for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/video-stats

Get video stats time series for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j
interval.start_time query string(date-time) false Optional. Inclusive start of the interval.
interval.end_time query string(date-time) false Optional. Exclusive end of the interval.

Detailed descriptions

interval.start_time: Optional. Inclusive start of the interval.

If specified, a Timestamp matching this interval will have to be the same or after the start.

interval.end_time: Optional. Exclusive end of the interval.

If specified, a Timestamp matching this interval will have to be before the end.

Example responses

200 Response

{
  "time_series": [
    {
      "audio_bit_rate": 0,
      "bit_rate": 0,
      "connection_count": 0,
      "frame_rate": 0.1,
      "key_frame_consistent": true,
      "key_frame_interval": 0.1,
      "resolution": 0,
      "time": "2019-08-24T14:15:22Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetVideoStatsTimeSeriesResponse
default Default An unexpected error response. google.rpc.Status

Get the video stats snapshot for a stream

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats-snapshot', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats-snapshot", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats-snapshot HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats-snapshot',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1/streams/{stream_id}/video-stats-snapshot',
{
  method: 'GET',

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

GET /analytics/v1/streams/{stream_id}/video-stats-snapshot

Get the video stats snapshot for a stream.

Parameters

Name In Type Required Description
stream_id path string true example: ck8u9fwwu1wtg0hewiqz3we6j

Example responses

200 Response

{
  "snapshot": {
    "audio_bit_rate": 0,
    "bit_rate": 0,
    "connection_count": 0,
    "frame_rate": 0.1,
    "key_frame_consistent": true,
    "key_frame_interval": 0.1,
    "resolution": 0,
    "time": "2019-08-24T14:15:22Z"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1.GetVideoStatsSnapshotResponse
default Default An unexpected error response. google.rpc.Status

Get a watch session by id

Code samples

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

r = requests.get('https://mcls-api.mycujoo.tv/analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id}', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://mcls-api.mycujoo.tv/analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id}", data)
    req.Header = headers

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

GET https://mcls-api.mycujoo.tv/analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id} HTTP/1.1
Host: mcls-api.mycujoo.tv
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id}',
{
  method: 'GET',

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

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

const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'
};

fetch('https://mcls-api.mycujoo.tv/analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id}',
{
  method: 'GET',

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

GET /analytics/v1beta1/consumption/projects/{project_id}/sessions/{session_id}

Get a watch session by id

Parameters

Name In Type Required Description
project_id path string true example: eleven-italy
session_id path string true The id of the session

Example responses

200 Response

{
  "content": {
    "media_resource": "string",
    "origin": "string",
    "stream_id": "string",
    "streaming_protocol": "string",
    "title": "string",
    "type_view": "CONTENT_TYPE_UNSPECIFIED"
  },
  "device": {
    "browser_name": "string",
    "browser_version": "string",
    "model": "string",
    "os": "string",
    "os_version": "string",
    "player": "string",
    "plugin_version": "string",
    "type": "string",
    "vendor": "string"
  },
  "effective_watch_duration": "string",
  "events": [
    {
      "buffer_duration": "string",
      "event_time": "2019-08-24T14:15:22Z",
      "event_type": "string",
      "offset": "string",
      "play_head": "string",
      "rendition": "string"
    }
  ],
  "geolocation": {
    "city": "string",
    "country_code": "string",
    "region": "string"
  },
  "identity": {
    "happiness_score": 0.1,
    "identity_id": "string",
    "is_registered": true
  },
  "network": {
    "cdn": "string",
    "connection_type": "string",
    "isp": "string"
  },
  "quality": {
    "buffer_ratio": 0.1,
    "buffers_count": 0,
    "error_description": "string",
    "error_metadata": "string",
    "error_player_code": "string",
    "error_type": "string",
    "join_time": "string"
  },
  "session_end": "2019-08-24T14:15:22Z",
  "session_id": "string",
  "session_start": "2019-08-24T14:15:22Z",
  "watch_duration": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. mycujoo.analytics.v1beta1.GetSessionResponse
default Default An unexpected error response. google.rpc.Status

AnnotationService

TestIamPermissions

Code samples

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

r = requests.post('https://mcls-api.mycujoo.tv/annotations/v1/sets/test_iam_permissions', headers = headers)

print(r.json())

package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://mcls-api.mycujoo.tv/annotations/v1/sets/test_iam_permissions", data)
    req.Header = headers

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

POST https://mcls-api.mycujoo.tv/annotations/v1/sets/test_iam_permissions HTTP/1.1
Host: mcls-api.mycujoo.tv
Content-