Official Plugins (Kuzzle v2.x)
S3 v3.x
2

getUrl #

Gets a public URL for an uploaded file.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/get-url/<bucketRegion>/<bucketName>?fileKey=<fileKey>
Method: GET

Other protocols #

{
  "controller": "s3/file",
  "action": "getUrl",
  "bucketName":"bucket-name",
  "bucketRegion":"bucket-region",
  "fileKey": "xen/<uuid>-headcrab.png"
}

Arguments #

  • fileKey: file key in S3 bucket
  • bucketName: the name of the bucket
  • bucketRegion: the region where the specified bucket is located,
  • publicUrl (optionnal): boolean indicating that plugin should return public URL

Response #

Returns an object containing the file signed public URL.

{
  "status": 200,
  "error": null,
  "action": "fileGetUrl",
  "controller": "s3/file",
  "requestId": "<unique request identifier>",
  "result": {
    "fileUrl": "<pre signed url>" 
  }
}

Possible errors #