[#22] Update system attributes prefix
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
1f66149316
commit
a8ec09e76a
14 changed files with 562 additions and 448 deletions
108
docs/api.md
108
docs/api.md
|
@ -56,21 +56,21 @@ Upload file as object with attributes to FrostFS.
|
|||
|
||||
###### Headers
|
||||
|
||||
| Header | Description |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Common headers | See [bearer token](#bearer-token). |
|
||||
| `X-Attribute-Neofs-*` | Used to set system NeoFS object attributes <br/> (e.g. use "X-Attribute-Neofs-Expiration-Epoch" to set `__NEOFS__EXPIRATION_EPOCH` attribute). |
|
||||
| `X-Attribute-*` | Used to set regular object attributes <br/> (e.g. use "X-Attribute-My-Tag" to set `My-Tag` attribute). |
|
||||
| `Date` | This header is used to calculate the right `__NEOFS__EXPIRATION` attribute for object. If the header is missing, the current server time is used. |
|
||||
| Header | Description |
|
||||
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Common headers | See [bearer token](#bearer-token). |
|
||||
| `X-Attribute-System-*` | Used to set system FrostFS object attributes <br/> (e.g. use "X-Attribute-System-Expiration-Epoch" to set `__SYSTEM__EXPIRATION_EPOCH` attribute). |
|
||||
| `X-Attribute-*` | Used to set regular object attributes <br/> (e.g. use "X-Attribute-My-Tag" to set `My-Tag` attribute). |
|
||||
| `Date` | This header is used to calculate the right `__SYSTEM__EXPIRATION` attribute for object. If the header is missing, the current server time is used. |
|
||||
|
||||
There are some reserved headers type of `X-Attribute-NEOFS-*` (headers are arranged in descending order of priority):
|
||||
There are some reserved headers type of `X-Attribute-FROSTFS-*` (headers are arranged in descending order of priority):
|
||||
|
||||
1. `X-Attribute-Neofs-Expiration-Epoch: 100`
|
||||
2. `X-Attribute-Neofs-Expiration-Duration: 24h30m`
|
||||
3. `X-Attribute-Neofs-Expiration-Timestamp: 1637574797`
|
||||
4. `X-Attribute-Neofs-Expiration-RFC3339: 2021-11-22T09:55:49Z`
|
||||
1. `X-Attribute-System-Expiration-Epoch: 100`
|
||||
2. `X-Attribute-System-Expiration-Duration: 24h30m`
|
||||
3. `X-Attribute-System-Expiration-Timestamp: 1637574797`
|
||||
4. `X-Attribute-System-Expiration-RFC3339: 2021-11-22T09:55:49Z`
|
||||
|
||||
which transforms to `X-Attribute-Neofs-Expiration-Epoch`. So you can provide expiration any convenient way.
|
||||
which transforms to `X-Attribute-System-Expiration-Epoch`. So you can provide expiration any convenient way.
|
||||
|
||||
If you don't specify the `X-Attribute-Timestamp` header the `Timestamp` attribute can be set anyway
|
||||
(see http-gw [configuration](gate-configuration.md#upload-header-section)).
|
||||
|
@ -121,17 +121,17 @@ Get an object (payload and attributes) by an address.
|
|||
|
||||
###### Headers
|
||||
|
||||
| Header | Description |
|
||||
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-Neofs-*` | System NeoFS object attributes <br/> (e.g. `__NEOFS__EXPIRATION_EPOCH` set "X-Attribute-Neofs-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Disposition` | Indicate how to browsers should treat file. <br/> Set `filename` as base part of `FileName` object attribute (if it's set, empty otherwise). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
| Header | Description |
|
||||
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-System-*` | System FrostFS object attributes <br/> (e.g. `__SYSTEM__EXPIRATION_EPOCH` set "X-Attribute-System-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Disposition` | Indicate how to browsers should treat file. <br/> Set `filename` as base part of `FileName` object attribute (if it's set, empty otherwise). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
|
||||
###### Status codes
|
||||
|
||||
|
@ -157,16 +157,16 @@ Get an object attributes by an address.
|
|||
|
||||
###### Headers
|
||||
|
||||
| Header | Description |
|
||||
|-----------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-Neofs-*` | System NeoFS object attributes <br/> (e.g. `__NEOFS__EXPIRATION_EPOCH` set "X-Attribute-Neofs-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
| Header | Description |
|
||||
|------------------------|------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-System-*` | System FrostFS object attributes <br/> (e.g. `__SYSTEM__EXPIRATION_EPOCH` set "X-Attribute-System-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
|
||||
###### Status codes
|
||||
|
||||
|
@ -206,17 +206,17 @@ If more than one object is found, an arbitrary one will be returned.
|
|||
|
||||
###### Headers
|
||||
|
||||
| Header | Description |
|
||||
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-Neofs-*` | System NeoFS object attributes <br/> (e.g. `__NEOFS__EXPIRATION_EPOCH` set "X-Attribute-Neofs-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Disposition` | Indicate how to browsers should treat file. <br/> Set `filename` as base part of `FileName` object attribute (if it's set, empty otherwise). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
| Header | Description |
|
||||
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-System-*` | System FrostFS object attributes <br/> (e.g. `__SYSTEM__EXPIRATION_EPOCH` set "X-Attribute-System-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Disposition` | Indicate how to browsers should treat file. <br/> Set `filename` as base part of `FileName` object attribute (if it's set, empty otherwise). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
|
||||
###### Status codes
|
||||
|
||||
|
@ -243,16 +243,16 @@ If more than one object is found, an arbitrary one will be used to get attribute
|
|||
|
||||
###### Headers
|
||||
|
||||
| Header | Description |
|
||||
|-----------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-Neofs-*` | System NeoFS object attributes <br/> (e.g. `__NEOFS__EXPIRATION_EPOCH` set "X-Attribute-Neofs-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
| Header | Description |
|
||||
|------------------------|------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `X-Attribute-System-*` | System FrostFS object attributes <br/> (e.g. `__SYSTEM__EXPIRATION_EPOCH` set "X-Attribute-System-Expiration-Epoch" header). |
|
||||
| `X-Attribute-*` | Regular object attributes <br/> (e.g. `My-Tag` set "X-Attribute-My-Tag" header). |
|
||||
| `Content-Type` | Indicate content type of object. Set from `Content-Type` attribute or detected using payload. |
|
||||
| `Content-Length` | Size of object payload. |
|
||||
| `Last-Modified` | Contains the `Timestamp` attribute (if exists) formatted as HTTP time (RFC7231,RFC1123). |
|
||||
| `X-Owner-Id` | Base58 encoded owner ID. |
|
||||
| `X-Container-Id` | Base58 encoded container ID. |
|
||||
| `X-Object-Id` | Base58 encoded object ID. |
|
||||
|
||||
###### Status codes
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue