games.cdn.createGameCdnSite


Description

Creates a new CDN site for the given game.


Code Examples

# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/cloud/games/{game_id}/cdn/sites'

Request Parameters

game_id

required path parameter

Request Body

  • display_name
    string

    Represent a resource's readable display name.

  • files
    array of objects

    A list of files preparing to upload.

    • files.path
      string

      The path/filename of the file.

    • files.content_type
      string

      The MIME type of the file.

    • files.content_length
      number

      Unsigned 64 bit integer.


Response Body

  • site_id
    string
  • upload_id
    string
  • presigned_requests
    array of objects
    • presigned_requests.path
      string

      The name of the file to upload. This is the same as the one given in the upload prepare file.

    • presigned_requests.url
      string

      The URL of the presigned request for which to upload your file to.

    • presigned_requests.byte_offset
      number

      The byte offset for this multipart chunk. Always 0 if not a multipart upload.

    • presigned_requests.content_length
      number

      Expected size of this upload.