Documentation

API allows you to do many things, such as creating video, updating video (and its data) and removing the same and as such allows you to do things your way, while still communicating with our servers.

It is good to point out that if you are looking for a way to do it quickly and easily, checking out our Browser Interaction pages might be a better option, while API is definitely good for all those things that you need a bit of extra touch on.

There are 2 main nodes that have their methods:

  1. Videos
    • Video object will work directly with a video and will hold all of the details of the same
  2. Streams
    • Streams are part of the video object and as such you can have many streams available under the same video and action on a single stream would not affect the video as a whole, just that specific stream.

URL structures:
/v1/applications/*application_token*/videos/*video_token_or_key*/streams/*stream_token*/

The client sdk allows you to manipulate videos and streams from the user's browser.

/v1/applications/*application_token*/videos/*video_token_or_key*/

The videos resource allows you to access all single videos. Each video may contain more than one stream.

/v1/applications/*application_token*/videos/*video_token_or_key*/streams/*stream_token*/

The streams resource allows you to directly access all streams associated with a single video.

  1. videos
    1. index

      Query an array of videos (will return at most 50 videos by default). Newest videos come first.

      RAW: [GET] /v1/applications/*application_token*/videos/

      Return type: JSON

      limit Limit the number of returned videos. Can be set up to 100. skip Skip the first [n] entries. reverse Reverse the order in which videos are returned. states Filter videos by state tags Filter the search result to certain tags

      ZiggeoApi.Videos.index(data_object, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.index(data_object, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    2. destroy

      Delete a single video by token or key.

      RAW: [DELETE] /v1/applications/*application_token*/videos/*video_token_or_key*

      video_token_or_key Token or a key identifying the same.

      ZiggeoApi.Videos.destroy(token_or_key, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.destroy(token_or_key, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    3. create

      Create a new video.

      RAW: [POST] /v1/applications/*application_token*/videos

      Return type: JSON

      file Video file to be uploaded. min_duration Minimal duration of video. max_duration Maximal duration of video. tags Video Tags. key Unique (optional) name of video. volatile Automatically remove this video if it remains empty.

      ZiggeoApi.Videos.create(data_object, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.create(data_object, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    4. update

      Update an existing video.

      RAW: [POST] /v1/applications/*application_token*/videos/*video_token_or_key*

      Return type: JSON

      video_token_or_key Token or a key identifying the same. min_duration Minimal duration of video. max_duration Maximal duration of video. tags Video Tags. key Unique (optional) name of video. volatile Automatically remove this video if it remains empty. expiration_days After how many days will this video be deleted.

      ZiggeoApi.Videos.update(video_token_or_key, data_object, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.update(video_token_or_key, data_object, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    5. get

      Read an existing video.

      RAW: [GET] /v1/applications/*application_token*/videos/*video_token_or_key*

      Return type: JSON

      video_token_or_key Token or a key identifying the same.

      ZiggeoApi.Videos.get(token_or_key, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.get(token_or_key, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    6. image

      Get URL of the thumbnail.

      RAW: /v1/applications/*application_token*/videos/*video_token_or_key*

      Return type: URL

      video_token_or_key Token or a key identifying the same.

      ZiggeoApi.Videos.image(token_or_key);
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.image(token_or_key, {"server_auth": "your_auth_token" } );
      
    7. source

      Get URL of the video file.

      RAW: /v1/applications/*application_token*/videos/*video_token_or_key*

      Return type: URL

      video_token_or_key Token or a key identifying the same.

      ZiggeoApi.Videos.source(token_or_key);
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Videos.source(token_or_key, {"server_auth": "your_auth_token" } );
      
  2. streams
    1. destroy

      Delete the stream

      RAW: [DELETE] /v1/applications/*application_token*/videos/*video_token_or_key*/streams/*stream_token*

      video_token Token or a key identifying the video. stream_token_or_key Token or a key identifying the same.

      ZiggeoApi.Streams.destroy(video_token, stream_token_or_key, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Streams.destroy(video_token, stream_token_or_key, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    2. create

      Create a new stream

      RAW: [POST] /v1/applications/*application_token*/videos/*video_token_or_key*/streams

      Return type: JSON

      video_token Token or a key identifying the video. file Video file to be uploaded

      ZiggeoApi.Streams.create(video_token, data_object, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Streams.create(video_token, data_object, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );
      
    3. accept

      Accept stream

      RAW: [POST] /v1/applications/*application_token*/videos/*video_token_or_key*/streams/*stream_token*

      Return type: JSON

      video_token Token or a key identifying the video. stream_token_or_key Token or a key identifying the same.

      ZiggeoApi.Streams.accept(video_token, stream_token_or_key, {
      	success: function (args, result) {
      		// Success
      	},
      	failure: function (args, error) {
      		// Failure
      	}
      });
      
      This function can also be used with auth tokens as follows:
      ZiggeoApi.Streams.accept(video_token, stream_token_or_key, {
      		success: function (args, result) {
      			// Success
      		},
      		failure: function (args, error) {
      			// Failure
      		}
      	},
      	{
      		server_auth: "your_auth_token"
      	}
      );