Media Storage Service Overview



Availability

Media Storage Service is available globally. File sizes under 2 GB in size are supported.


Overview

Media Storage Service (MSS) is a collaborative, trusted file sharing service that enables the exchange of media file content between services for batch processing. MSS supports file content of binary form. The service is a component of the Syniverse Developer Community platform, and as such, requires that customers create a login and register for MSS. It allows customers to create, upload, download and delete media files using RESTful APIs. The life span of a file is defined when the file is created. After a file expires, it is no longer available for download.


Use Cases

Currently, Media Storage is used for the following APIs and Use Cases:

  • Batch Processing for Phone Number Verification API: Querying of phone numbers to determine Status. Media Storage is used to upload and store input files for batch processing, and store and download batch processing results.
  • Batch Processing for the Event Manager API: Subscription for phone number event notifications. Media Storage is used to upload and store input files for batch processing, and store and download batch processing results


Service Description

Media Storage Service provides RESTful APIs that support file and content management. Every file uploaded to the MSS is referenced as a file resource. The file upload to MSS is achieved by using a combination of file metadata and file content operations using the APIs identified below. These file references may be shared between services for further processing. Services collaborating on data exchange pass each other references to the file resources and download the content when appropriate. This approach may be used by services collaborating on content pipeline activities or for communication of results during one or more stages of batch processing to a customer.


File Storage: Every file resource on MSS consists of file metadata and file content. Each file is identified by a unique file identifier named file_id. Typical file management REST APIs are like CRUD APIs that are used to create a file (metadata creation), update file metadata, delete a file, read a file based on the file_id, list files or search files based on file tags or other criteria. File content may be uploaded and downloaded to and from MSS using key resource references like the file_id or file_uri in the REST APIs. This is realized through a simple HTTP POST/GET protocol where the body of the HTTP method is a stream of media or content bytes. Note: The int-companyid field needs to be provided as a HTTP header in HTTP POST for file content upload requests and HTTP GET file for content download requests.

File Upload: File content is uploaded using a POST operation to the content resource. The content type is specified as an application/octet-stream, and the body of the request should be raw content bytes.

File Download: File content is downloaded using a GET operation to the content resource. The response content type header is application/octet-stream and response body will contain the raw content bytes.

File Management: The Media Storage Service provides the following operations on files:

  • Create a new file for content upload, specifying attributes of the file to be uploaded.
  • Update metadata information about a file
  • Get list of files and file information as per query parameters
  • Get metadata information on specified file
  • Delete a file

Content Management: Content may be uploaded to a pre-created file by POST operation using the file_id resource identifier. Content may be downloaded using GET operation using the file_id resource identifier


Below is a sample request and response for Media Storage Service:


Sample Content Upload HTTP POST Request/Response

POST https://api.syniverse.com/mediastorage/v1/files/e0508ab8-8b7a-494d-8a4f-91e5d370a741/content HTTP/1.1
Authorization: Bearer LYKpXGx7jqnfISXGJCxkmfERrf0a
int-companyid: 123
Content-Type: application/octet-stream
Sample File Content!

Sample Content Download HTTP GET Request/Response

GET https://api.syniverse.com/mediastorage/v1/files/f1367aed-856f-45f9-be37-1b458a019b1a/content HTTP/1.1
Authorization: Bearer LYKpXGx7jqnfISXGJCxkmfERrf0a
int-companyid: 123
Content-Type: application/octet-stream

Example Code

Example python code showing how to use the Batch Automation with Media Storage and the Phone Number Verification API is available on Github.


Access

Before a customer can use the Media Storage Service, they need to subscribe by selecting Service Offerings -> MSS -> Subscriptions and clicking Subscribe.

The customer will also need to enable Media Storage in the Applications -> Account -> Settings -> Account & APIs -> MSS and selecting ON.


The following services are also used in conjunction with the Media Storage Service:

  • Batch Automation Service: This service processes input files uploaded and stored in the Media Storage Service, and stores the batch process output files in the Media Storage Service for download by the customer
  • Event Manager Service: This is used for delivery of file notifications as well as batch processing and phone number event change notifications