Documentation

Read Access for Single Session to Video 1234567890 for one day.

Key points here would be:

  • read access only
  • single session
  • specific video only with token 1234567890
  • session is limited to one day (24 hours 60 minutes of each hour 60 seconds of each minute = 86400)

Example:

{
    "grants": {
        "read": {
            "resources": [
                "1234567890"
            ]
        }
    },
    "session_limit": 1,
    "usage_expiration_time": 86400
}

Reading the example:

We are granting the read access to embedding showing video with token 1234567890 over only one session link which will expire after 86400 seconds.

Create Video with option for deleting it afterwards

Key points here would be:

  • create video
  • delete video
  • limit both actions for same session

Example:

{
    "grants": {
        "create": {
            "session_owned": true
        },
        "destroy": {
            "session_owned": true
        }
    },
    "session_limit": 1
}

Reading the example:

We are granting create and destroy permissions to embedding within one session, allowing person that created the video to remove it at that point and disallowing the same action later on.

Play, Rerecord and Delete Video 1234567890

Key points here would be:

  • read access
  • update and delete permissions
  • specific video only with token 1234567890
  • it can be done at any time and any number of times

Example:

{
    "grants": {
        "read": {
            "resources": [
                "1234567890"
            ]
        },
        "update": {
            "resources": [
                "1234567890"
            ]
        },
        "destroy": {
            "resources": [
                "1234567890"
            ]
        }
    }
}

Reading the example:

We are granting the read access and update and destroy permissions to embedding showing video with token 1234567890 regardless when the same action is made.