Swift supports some "meta" operations both for the service and for your account.

Not all requests mentioned here require authentication. If a request requires authentication (or if it differs if authenticated vs. "anonymous"/unauthenticated), it will be distinctly mentioned.

Get Service Capabilities

Swift can return a specification of what capabilities the endpoint has.

This request can be unauthenticated.

It is performed via a GET against /info.

# BEGIN REQUEST #
GET /info HTTP/1.1
Host: us-east1.swift.netfire.com
User-Agent: python-swiftclient-4.3.0
# END REQUEST #

# BEGIN RESPONSE #
HTTP/1.1 200 OK
X-Trans-Id: tx00000f4dc574a085fe6b0-006517c9cc-988dd5-us-east1
X-Openstack-Request-Id: tx00000f4dc574a085fe6b0-006517c9cc-988dd5-us-east1
Content-Type: application/json; charset=utf-8
Content-Length: 434
Date: Sat, 30 Sep 2023 07:10:04 GMT
Connection: close

## BEGIN RESPONSE BODY ##
{"bulk_delete":{},"container_quotas":{},"swift":{"max_file_size":5368709120,"container_listing_limit":10000,"version":"16.2.13","policies":[{"default":true,"name":"default-placement"}],"max_object_name_size":1024,"strict_cors_mode":true,"max_container_name_length":255},"tempurl":{"methods":["GET","HEAD","PUT","POST","DELETE"]},"slo":{"max_manifest_segments":1000},"account_quotas":{},"staticweb":{},"tempauth":{"account_acls":true}}
## END RESPONSE BODY ##
# END RESPONSE #

"Prettified" response body:

{
  "bulk_delete": {},
  "container_quotas": {},
  "swift": {
    "max_file_size": 5368709120,
    "container_listing_limit": 10000,
    "version": "16.2.13",
    "policies": [
      {
        "default": true,
        "name": "default-placement"
      }
    ],
    "max_object_name_size": 1024,
    "strict_cors_mode": true,
    "max_container_name_length": 255
  },
  "tempurl": {
    "methods": [
      "GET",
      "HEAD",
      "PUT",
      "POST",
      "DELETE"
    ]
  },
  "slo": {
    "max_manifest_segments": 1000
  },
  "account_quotas": {},
  "staticweb": {},
  "tempauth": {
    "account_acls": true
  }
}

Get Status

A status request can be performed against your account, a container you own, or an object in a container you own depending on the URL path used. They are all HEAD requests.

All types of status requests require authentication.

Account Status

An account status request can be performed by performing a HEAD request against your Storage URL (X-Storage-Url).

# BEGIN REQUEST #
HEAD /v1/AUTH_NetFire$example HTTP/1.1
Host: us-east1.swift.netfire.com
X-Auth-Token: [REDACTED]
User-Agent: python-swiftclient-4.3.0
# END REQUEST #

# BEGIN RESPONSE #
HTTP/1.1 204 No Content
X-Timestamp: 1696060969.05244
X-Account-Container-Count: 1
X-Account-Object-Count: 7
X-Account-Bytes-Used: 1024005
X-Account-Bytes-Used-Actual: 1044480
X-Account-Storage-Policy-Default-Placement-Container-Count: 1
X-Account-Storage-Policy-Default-Placement-Object-Count: 7
X-Account-Storage-Policy-Default-Placement-Bytes-Used: 1024005
X-Account-Storage-Policy-Default-Placement-Bytes-Used-Actual: 1044480
X-Account-Meta-Quota-Bytes: 10737418240
X-Account-Meta-Quota-Count: 1200
X-Trans-Id: tx0000028f41c8dc12d56b4-006517d629-988dcc-us-east1
X-Openstack-Request-Id: tx0000028f41c8dc12d56b4-006517d629-988dcc-us-east1
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Sat, 30 Sep 2023 08:02:49 GMT
Connection: close
# END RESPONSE #

📘

You may see different headers!

If you enable additional features for your account, such as Temp URL keys or additional placement strategies are available to your account, you will see them here.

e.g. In the case that you have enabled Temp URL keys, you will see X-Account-Meta-Temp-Url-Key: [YOUR KEY HERE] and optionally, if you have set a second key, X-Account-Meta-Temp-Url-Key-2: [YOUR SECOND KEY HERE]. For additional placement strategies/policies available for your account, they will be listed in other X-Account-Storage-Policy-<placement_name>-<usage> headers (where <usage> is each of Container-Count, Object-Count, Bytes-Used, and Bytes-Used-Actual).

Alternatively, if you do not have certain quotas enabled for your account, you will not see their header present. (This is contrasted with S3 usage reporting, which will explicitly always provide quotas and indicate if they are unlimited.)

Container Status

A container status request can be performed by performing a HEAD request on the Container URL. The below example uses a container name of example.

It displays the storage usage, placement ("where/what tier" it's stored in), and storage class ("how" it's stored; the type of storage) information of the specified container.

# BEGIN REQUEST #
HEAD /v1/AUTH_NetFire$example/example HTTP/1.1
Host: us-east1.swift.netfire.com
X-Auth-Token: [REDACTED]
User-Agent: python-swiftclient-4.3.0
# END REQUEST #

# BEGIN RESPONSE #
HTTP/1.1 204 No Content
X-Timestamp: 1678122838.62950
X-Container-Object-Count: 7
X-Container-Bytes-Used: 1024005
X-Container-Bytes-Used-Actual: 1044480
X-Storage-Policy: default-placement
X-Storage-Class: STANDARD
Last-Modified: Sat, 30 Sep 2023 05:54:10 GMT
X-Trans-Id: tx00000409892a93f2828b4-006517d7ce-988dc3-us-east1
X-Openstack-Request-Id: tx00000409892a93f2828b4-006517d7ce-988dc3-us-east1
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Sat, 30 Sep 2023 08:09:50 GMT
Connection: close
# END RESPONSE #

Object Status

An object status request can be performed by performing a HEAD request on the Object URL. The below example uses a container name of example and an object name of pathprefix1/cat.png.

It displays the size of the object (Content-Length, units in Accept-Ranges), when it was last modified (Last-Modified), and the content MIME type (RFC 9110 § 8.3) (Content-Type). You will likely also see an etag header, which is very useful for caching and CDN purposes if you are consuming your NetFire Cloud Storage in that use case (recommended reading RFC 9110 § 8.8.3).

HEAD /v1/AUTH_NetFire$example/example/pathprefix1/cat.png HTTP/1.1
Host: us-east1.swift.netfire.com
X-Auth-Token: [REDACTED]
User-Agent: python-swiftclient-4.3.0

HTTP/1.1 200 OK
Content-Length: 24351
Accept-Ranges: bytes
etag: 8783c70360231686325c4952c87e5bc4
Last-Modified: Sat, 30 Sep 2023 08:24:23 GMT
X-Timestamp: 1696062263.75441
X-Object-Meta-Mtime: 1696062227.840350
X-Trans-Id: tx000004192a7698010aada-006517db7c-988dcc-us-east1
X-Openstack-Request-Id: tx000004192a7698010aada-006517db7c-988dcc-us-east1
Content-Type: image/png
Date: Sat, 30 Sep 2023 08:25:32 GMT
Connection: close

📘

You may see additional headers!

As shown above, e.g. X-Timestamp, X-Object-Meta-Mtime, etc. there may be additional headers if you/your client/your client library has applied additional metadata to the object.