Skip to content

COMMAND.9 Create delivery authorization

Giuliano Catrambone edited this page Nov 27, 2018 · 17 revisions

Overview

This command creates a delivery authorization valid for a max number of retries (maxRetries parameter) and with a time to live (ttlInSeconds parameter). The create delivery authorization can be done ONLY by the owner of the content. This command might perform a redirection (redirect parameter) with the download URL. In this case it is not needed to call the download command (step nr. 2) because the download starts automatically by the redirection.

URI

/catramms/v1/delivery/:PhysicalPathKey?[:ttlInSeconds=120]&[:maxRetries=10]&[:redirect=false]&[:save=false]

Method

GET

URL Params

Required

PhysicalPathKey: key of the specific file to be authorized for the download

Optional

  • ttlInSeconds: time to live in seconds of the authorization
    • default: 120
  • maxRetries: max number of retries of the authorization
    • default: 10
  • redirect: it specifies if this command has to perform a redirection or it has to return a json with several information including the URL to be used for the download of the content
    • default: false
  • save: in case this parameter is true, the return delivery URL will contain the deliveryFileName parameter. When the delivery URL is called, this parameter cause the delivery server to add the Content-Disposition header in order to ask the client to save the downloaded file using deliveryFileName as file name. The deliveryFileName parameter is initialized using the 'deliveryFileName' metadata field decided by the user during the ingestion of the content or, in case this is empty, using the 'title' of the content.
    • default: false

Payload Data

None

Success Response

Code

  • 301 Moved Permanently in case the redirect parameter is true
  • 201 Created in case the redirect parameter is false

Content

Only in case the redirect parameter is false

{ 
    "deliveryURL": "https://mms-delivery.catrasoft.cloud/MMS_0000/CatraSoft/000/000/561/833_source.mp4?token=4&deliveryFileName=myName.mp4",
    "deliveryFileName": "myName.mp4", 
    "authorizationKey": 4, 
    "ttlInSeconds": 120, 
    "maxRetries": 10 
}

Error Response

See Common Error Responses

Sample Call

Assuming:

  • UserKey: 5

  • APIKey: SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP

  • redirect=false (default)

  • save=false (default)

    • curl -k -v -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP https://mms-api.catrasoft.cloud/catramms/v1/delivery/663
  • redirect=true

  • save=true

    • curl -k -v -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP -L https://mms-api.catrasoft.cloud/catramms/v1/delivery/663?redirect=true > myFileName.mp4
  1. Home

    Tutorial
    1. User registration
    2. Add content - Pull
    3. Add content, on success send an email
    4. Two Tasks (Add content) to be executed in parallel
    5. Add a set of video encoding profiles
    6. Add two contents, send an email, concat, cut and encode
    7. Add a single image profile (Logo)
    8. Add a video, an image, encode the image, overlay the encoded image on the video
  2. REST API version 1 (latest)

    Registration
    1. User registration
    2. Login
    3. Create Workspace
    4. Share Workspace
    5. Update Workspace
    6. Update User
    Workflow Ingestion
    1. Workflow
    2. Status/metadata of an ingestion
    3. Group Of Tasks
    Workflow As Library
    1. Workflow as Library
    2. Create-Update a Workflow as Library
    3. Delete a Workflow as Library
    4. Use of a Workflow as Library
    Add-Remove Content
    1. Add a new Content
      1. Pull
      2. Push
    2. Remove a Content
    3. Information about the contents saved into MMS
    4. Retention of a Content
    Delivery
    1. Download HTTP of a Content
    2. FTP of a Content
    3. Local copy of a Content
    4. Live Proxy
    5. VOD Proxy
    6. Countdown
    7. Check Streaming
    Social Network Delivery
    1. POST a Content on Facebook
    2. POST a Content on YouTube
    3. YouTube Live Broadcast
    4. Facebook Live Broadcast
    Encoding (video-audio-image)
    1. Add encoding profiles
    2. Remove encoding profiles
    3. Encode
    4. Information about the encoding profiles saved into MMS
    5. Predefined MMS Encoding Profiles
    Media activities
    1. Concatenate videos having same codecs
    2. Cut
    3. Video speed
    4. Extract tracks
    5. Add silent audio
    Overlay
    1. Overlay an Image on a Video
    2. Overlay a Text on a Video
    3. Picture In Picture
    4. Intro Outro Overlay
    5. Live Grid
    Frame Processing
    1. Frame of a video
    2. Periodical Frames of a video
    3. I-Frames of a video
    4. Motion JPEG video generated by Periodical Frames of a video
    5. Motion JPEG video generated by I-Frames of a video
    6. Slideshow video by images
    Recorder
    1. Live Recorder
    2. Live Cut
    Communication
    1. HTTP Callback
    2. Notification through email
    Utilities
    1. Change File Format
    2. Media Cross Reference
    Computer Vision
    1. Face Recognition
    2. Face Identification
    Configuration
    1. YouTube
    2. Facebook
    3. Live URL
    4. FTP
    5. E-Mail
Clone this wiki locally