Creates and returns a URL and fileKey for uploading files. Files are stored on Google's Cloud Storage Platform. For more information, see the File System Guide. Note: URLs returned by this API endpoint will expire after 10 minutes.

URL Parameters

None.

Body Parameters

NameDescriptionJSON typeRequiredDefault Value
filesAn array of fileData objects. Each fileData object represents a different fileArray of ObjectsYes
Content-TypeMIME type of file to uploadStringYes
Content-LengthThe size of the file being uploaded, in bytesNumberYes

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

OAuthAuthorizer

Example Request

URL

For Production: POST https://spacesapis.avayacloud.com/api/files/getuploadurl
For Staging: POST https://loganstagingapis.esna.com/api/files/getuploadurl

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Body

{
  "files":
    [
      {
        "Content-Type": "image/jpeg",
        "Content-Length": 134020
      },
      {
        "Content-Type": "application/pdf",
        "Content-Length": 643420
      }
    ],
    "topicId": "5f32b8sffafga05a839154db"
}

Example Response

{
  "data": [
    {
      "fileKey": "sdfasdfasdfasdfasdfasdfasdf",
      "url": "https://storage.googleapis.com/onesnatesting/logan%2Fsdfasdfasdfasdfasdfasdfasdf?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1493145848&Signature=hB3WhkLb5j9RnFbrV0djcH3sZdrBBYvuCQYqD1JqzwGw0a64gyRaUDCvKNQwCIumY6IG%2B3Ta3uAv2xpJeLqyu2dm6vWs4WdDwkuwZaB82o8TEl3bdioMgb9XQpzDVsmNpQJ0276eJ2lWGadkFfOIfXAhsCfeiixVpa3EBjw2I3ZLk0Xo1d1NASGK7%2F1J929a9X251d5QZzGvv0th4QL1dkz%2BKkTxIpaMHvX4I33DrKzOBtYXWE1QYbysRkOcyk9uOlCeOqwLXxcULTUKJeOWYasnYOHmOJeCpxYyf%2BskGTlT%2FTgvZXFQsolyNCeTfGzctw6VPGUYAIW0WAS182dXiw%3D%3D&response-content-disposition=1234567890"
    },
    {
      "fileKey": "76c23a53-4d3a-4d2a-8125-4d09203cae99",
      "url": "https://storage.googleapis.com/onesnatesting/logan%2F76c23a53-4d3a-4d2a-8125-4d09203cae99?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1493145848&Signature=QaNqDb4kfCGT0BhAK%2FoGf3DOmk%2BXCC9m0dcClr8pGub%2FAqUmqS5nhtwBA2QOsCqT4h1lcPd3UkQHHrmvK2Ohyb8RgIZvEvT51BjStUxjsRib2N9mJPe%2FsvdWjsbRV2Np4%2BCnErfFLZcc4BwZNp6%2FQPvG7%2FthJKWxYVaj%2FbC9WTNEfJDxUyjf%2BeI51thr48fdm419cI9CfVxxkUf%2FeiHod20Dqwjh9iz3fH%2FYAoqkjnkJ4U%2BBSqkbdBRhklJYWphM%2B9LLOtEb1wV8saJuNmSb8ihl7kWdx2ixMQBmg8G0OFdjx1b9M%2FK5oup%2F%2BX1afsxWTd78hZjPSel8d4FiolU6JA%3D%3D"
    }
  ]
}