Object Storage

Object Storage Object URL Create

post
https://api.linode.com/v4/object-storage/buckets/{clusterId}/{bucket}/object-url

Creates a pre-signed URL to access a single Object in a bucket. This can be used to share objects, and also to create/delete objects by using the appropriate HTTP method in your request body's method parameter.

This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.

Path Parameters

clusterId
Required
string

The ID of the cluster this bucket exists in.

bucket
Required
string

The bucket name.

Request Body Schema

method
Required
string

The HTTP method allowed to be used with the pre-signed URL.

name
Required
string

The name of the object that will be accessed with the pre-signed URL. This object need not exist, and no error will be returned if it doesn't. This behavior is useful for generating pre-signed URLs to upload new objects to by setting the method to "PUT".

content_type
string

The expected Content-type header of the request this signed URL will be valid for. If provided, the Content-type header must be sent with the request when this URL is used, and must be the same as it was when the signed URL was created. Required for all methods except "GET" or "DELETE".

expires_in
integer

How long this signed URL will be valid for, in seconds. If omitted, the URL will be valid for 3600 seconds (1 hour).

Request Samples

curl -H "Content-Type: application/json" \
 -H "Authorization: Bearer $TOKEN" \
  -X POST -d '{
      "method": "GET",
      "name": "example"
    }' \
  https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/object-url

Response Samples

{
  "url": "https://us-east-1.linodeobjects.com/example-bucket/example?Signature=qr98TEucCntPgEG%2BsZQGDsJg93c%3D&Expires=1567609905&AWSAccessKeyId=G4YAF81XWY61DQM94SE0"
}

Responses

200: The URL with which to access your object.

url
string

The signed URL to perform the request at.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.