[#24] Update examples and description in spec

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-07-20 18:16:30 +03:00 committed by Kirillov Denis
parent 8f4c94f134
commit b412af2e22
53 changed files with 685 additions and 207 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Action action // Action Rule execution result action in NeoFS EACL. Either allows or denies access if the rule's filters match.
// //
// swagger:model Action // swagger:model Action
type Action string type Action string

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Address address // Address Address of the object in NeoFS.
// Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"} // Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"}
// //
// swagger:model Address // swagger:model Address

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Attribute attribute // Attribute Attribute is a pair of strings that can be attached to a container or an object.
// Example: {"key":"User-Defined-Tag","value":"tag value"}
// //
// swagger:model Attribute // swagger:model Attribute
type Attribute struct { type Attribute struct {

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/swag" "github.com/go-openapi/swag"
) )
// Bearer bearer // Bearer Bearer token that is expected to be formed.
// Example: [{"name":"my-bearer-token","object":[{"action":"ALLOW","filters":[],"operation":"GET","targets":[{"keys":[],"role":"OTHERS"}]}]},{"container":{"verb":"PUT"},"name":"my token to create container"}]
// //
// swagger:model Bearer // swagger:model Bearer
type Bearer struct { type Bearer struct {

View file

@ -15,8 +15,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ContainerInfo container info // ContainerInfo Information about container.
// Example: {"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"container"}],"basicAcl":"0x1fbf9fff","containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM","placementPolicy":"REP 2","version":"2.11"} // Example: {"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"container"}],"basicAcl":"0x1fbf9fff","containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","containerName":"container","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM","placementPolicy":"REP 2","version":"2.11"}
// //
// swagger:model ContainerInfo // swagger:model ContainerInfo
type ContainerInfo struct { type ContainerInfo struct {

View file

@ -15,7 +15,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ContainerList container list // ContainerList List of containers info
// Example: {"containers":[{"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"container"}],"basicAcl":"0x1fbf9fff","containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","containerName":"container","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM","placementPolicy":"REP 2","version":"2.11"},{"attribute":[{"key":"Name","value":"container2"}],"basicAcl":"0x1fbf9fff","containerId":"FsE7HLQBBYc2WFJzuTXMcpspDEmwUxsD5YmNb2r25uUu","containerName":"container2","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM","placementPolicy":"REP 1","version":"2.11"}],"size":2}
// //
// swagger:model ContainerList // swagger:model ContainerList
type ContainerList struct { type ContainerList struct {

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/swag" "github.com/go-openapi/swag"
) )
// ContainerPutInfo Represent request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored). // ContainerPutInfo Request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored).
// Example: {"attributes":[{"key":"Custom-Attribute","value":"value"}],"basicAcl":"public-read-write","containerName":"container","placementPolicy":"REP 3"} // Example: {"attributes":[{"key":"Custom-Attribute","value":"value"}],"basicAcl":"public-read-write","containerName":"container","placementPolicy":"REP 3"}
// //
// swagger:model ContainerPutInfo // swagger:model ContainerPutInfo

View file

@ -15,7 +15,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Eacl eacl // Eacl EACL NeoFS table.
// Example: {"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","records":[{"action":"GET","filters":[{"headerType":"OBJECT","key":"FileName","matchType":"STRING_EQUAL","value":"myfile"}],"operation":"ALLOW","targets":[{"role":"OTHERS"}]}]}
// //
// swagger:model Eacl // swagger:model Eacl
type Eacl struct { type Eacl struct {

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ErrorResponse error response // ErrorResponse Error response.
// Example: {"code":1024,"message":"incomplete object PUT by placement","type":"API"}
// //
// swagger:model ErrorResponse // swagger:model ErrorResponse
type ErrorResponse struct { type ErrorResponse struct {

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ErrorType error type // ErrorType Error type. Allow determine source of the error.
// //
// swagger:model ErrorType // swagger:model ErrorType
type ErrorType string type ErrorType string

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Filter filter // Filter Filter in NeoFS EACL to check particular properties of the request or the object.
// Example: {"headerType":"OBJECT","key":"FileName","matchType":"STRING_NOT_EQUAL","value":"myfile"} // Example: {"headerType":"OBJECT","key":"FileName","matchType":"STRING_NOT_EQUAL","value":"myfile"}
// //
// swagger:model Filter // swagger:model Filter

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// HeaderType header type // HeaderType Enumeration of possible sources of Headers to apply filters in NeoFS EACL.
// //
// swagger:model HeaderType // swagger:model HeaderType
type HeaderType string type HeaderType string

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// MatchType match type // MatchType Match type in NeoFS EACL filter.
// //
// swagger:model MatchType // swagger:model MatchType
type MatchType string type MatchType string

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ObjectBaseInfo object base info // ObjectBaseInfo Basic object information.
// Example: {"address":{"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"},"name":"/my/object/name"}
// //
// swagger:model ObjectBaseInfo // swagger:model ObjectBaseInfo
type ObjectBaseInfo struct { type ObjectBaseInfo struct {

View file

@ -15,7 +15,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ObjectInfo object info // ObjectInfo Object information.
// Example: {"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"object"}],"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM"} // Example: {"attribute":[{"key":"Timestamp","value":"1648810072"},{"key":"Name","value":"object"}],"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd","ownerId":"NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM"}
// //
// swagger:model ObjectInfo // swagger:model ObjectInfo

View file

@ -15,7 +15,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ObjectList object list // ObjectList List of objects.
// Example: {"objects":[{"address":{"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd"},"name":"/my/object/name"},{"address":{"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","objectId":"3GbmMWusaWgMHokWui2zDunxMTzButuQMVLbtL3cDn8s"},"name":"/my/object/some/other/name"}],"size":2}
// //
// swagger:model ObjectList // swagger:model ObjectList
type ObjectList struct { type ObjectList struct {

View file

@ -15,7 +15,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// ObjectUpload object upload // ObjectUpload Request body to create object.
// Example: {"attributes":[{"key":"User-Attribute","value":"some-value"}],"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","fileName":"myFile.txt","payload":"Y29udGVudCBvZiBmaWxl"} // Example: {"attributes":[{"key":"User-Attribute","value":"some-value"}],"containerId":"5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv","fileName":"myFile.txt","payload":"Y29udGVudCBvZiBmaWxl"}
// //
// swagger:model ObjectUpload // swagger:model ObjectUpload

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Operation operation // Operation Request's operation type to match in NeoFS EACL if the rule is applicable to a particular request.
// //
// swagger:model Operation // swagger:model Operation
type Operation string type Operation string

View file

@ -15,7 +15,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Record record // Record A single NeoFS EACL rule.
// Example: {"action":"ALLOW","filters":[],"operation":"GET","targets":[{"keys":[],"role":"OTHERS"}]} // Example: {"action":"ALLOW","filters":[],"operation":"GET","targets":[{"keys":[],"role":"OTHERS"}]}
// //
// swagger:model Record // swagger:model Record

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Role role // Role Role for target in EACL.
// //
// swagger:model Role // swagger:model Role
type Role string type Role string

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Rule rule // Rule Container session token rule.
// Example: {"containerId":"6jvKJCQr6e47Yx8SsbSN3fNgzroUJVkY66Q9wqxYcAjc","verb":"DELETE"}
// //
// swagger:model Rule // swagger:model Rule
type Rule struct { type Rule struct {

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// SearchFilter search filter // SearchFilter Search filter to find objects.
// Example: {"key":"FileName","match":"MatchStringEqual","value":"object-name"}
// //
// swagger:model SearchFilter // swagger:model SearchFilter
type SearchFilter struct { type SearchFilter struct {

View file

@ -15,7 +15,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// SearchFilters search filters // SearchFilters List of SearchFilter elements.
// Example: {"filters":[{"key":"FileName","match":"MatchCommonPrefix","value":"some/prefix"},{"key":"CustomAttribute","match":"MatchStringEqual","value":"tag-value"}]}
// //
// swagger:model SearchFilters // swagger:model SearchFilters
type SearchFilters struct { type SearchFilters struct {

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// SearchMatch search match // SearchMatch Search match type.
// //
// swagger:model SearchMatch // swagger:model SearchMatch
type SearchMatch string type SearchMatch string

View file

@ -14,7 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// SuccessResponse success response // SuccessResponse Success response.
// Example: {"success":true}
// //
// swagger:model SuccessResponse // swagger:model SuccessResponse
type SuccessResponse struct { type SuccessResponse struct {

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Target target // Target Target to apply the ACL rule. Can be a subject's role class or a list of public keys to match.
// Example: {"keys":["021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e"],"role":"USER"} // Example: {"keys":["021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e"],"role":"USER"}
// //
// swagger:model Target // swagger:model Target

View file

@ -14,8 +14,8 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// TokenResponse token response // TokenResponse Base64 encoded marshaled token (for container or for object operations).
// Example: [{"token":"sometoken-todo-add","type":"object"},{"token":"ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==","type":"container"}] // Example: [{"token":"ClYKBAgCEA0aCAgDEAEiAggDGggIARACIgIIAxoICAIQAiICCAMaCAgDEAIiAggDGggIBBACIgIIAxoICAUQAiICCAMaCAgGEAIiAggDGggIBxACIgIIAxIbChk182WEDFuAqq3nssrGOaH0NK0ZhzF8bu+YGgQIaBgE","type":"object"},{"token":"ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==","type":"container"}]
// //
// swagger:model TokenResponse // swagger:model TokenResponse
type TokenResponse struct { type TokenResponse struct {

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// TokenType token type // TokenType Type of token.
// //
// swagger:model TokenType // swagger:model TokenType
type TokenType string type TokenType string

View file

@ -14,7 +14,7 @@ import (
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
) )
// Verb verb // Verb Verb that describes the allowed container operation for token.
// //
// swagger:model Verb // swagger:model Verb
type Verb string type Verb string

View file

@ -2,7 +2,7 @@
// Package restapi REST API NeoFS // Package restapi REST API NeoFS
// //
// REST API NeoFS // REST API for native integration with NeoFS.
// Schemes: // Schemes:
// http // http
// Host: localhost:8090 // Host: localhost:8090

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@ func NewAuth(ctx *middleware.Context, handler AuthHandler) *Auth {
/* Auth swagger:route POST /auth auth /* Auth swagger:route POST /auth auth
Form bearer token to futher requests Form bearer token to further requests
*/ */
type Auth struct { type Auth struct {

View file

@ -43,17 +43,17 @@ type AuthParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Token lifetime in epoch /*Token lifetime in epoch.
In: header In: header
Default: 100 Default: 100
*/ */
XBearerLifetime *int64 XBearerLifetime *int64
/*Owner Id (wallet address) that will sign the token /*Owner Id (wallet address) that will sign the token.
Required: true Required: true
In: header In: header
*/ */
XBearerOwnerID string XBearerOwnerID string
/*Bearer token /*Bearer tokens to form.
Required: true Required: true
In: body In: body
*/ */

View file

@ -16,7 +16,7 @@ import (
// AuthOKCode is the HTTP code returned for type AuthOK // AuthOKCode is the HTTP code returned for type AuthOK
const AuthOKCode int = 200 const AuthOKCode int = 200
/*AuthOK Base64 encoded stable binary marshaled bearer token /*AuthOK Base64 encoded stable binary marshaled bearer token.
swagger:response authOK swagger:response authOK
*/ */

View file

@ -40,22 +40,22 @@ type DeleteContainerParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignatureKey string XBearerSignatureKey string
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */
ContainerID string ContainerID string
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -16,7 +16,7 @@ import (
// DeleteContainerOKCode is the HTTP code returned for type DeleteContainerOK // DeleteContainerOKCode is the HTTP code returned for type DeleteContainerOK
const DeleteContainerOKCode int = 200 const DeleteContainerOKCode int = 200
/*DeleteContainerOK Successful deletion /*DeleteContainerOK Successful deletion.
swagger:response deleteContainerOK swagger:response deleteContainerOK
*/ */
@ -60,7 +60,7 @@ func (o *DeleteContainerOK) WriteResponse(rw http.ResponseWriter, producer runti
// DeleteContainerBadRequestCode is the HTTP code returned for type DeleteContainerBadRequest // DeleteContainerBadRequestCode is the HTTP code returned for type DeleteContainerBadRequest
const DeleteContainerBadRequestCode int = 400 const DeleteContainerBadRequestCode int = 400
/*DeleteContainerBadRequest Bad request /*DeleteContainerBadRequest Bad request.
swagger:response deleteContainerBadRequest swagger:response deleteContainerBadRequest
*/ */

View file

@ -40,27 +40,27 @@ type DeleteObjectParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignatureKey string XBearerSignatureKey string
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */
ContainerID string ContainerID string
/*Base58 encoded object id /*Base58 encoded object id.
Required: true Required: true
In: path In: path
*/ */
ObjectID string ObjectID string
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -16,7 +16,7 @@ import (
// DeleteObjectOKCode is the HTTP code returned for type DeleteObjectOK // DeleteObjectOKCode is the HTTP code returned for type DeleteObjectOK
const DeleteObjectOKCode int = 200 const DeleteObjectOKCode int = 200
/*DeleteObjectOK Successful deletion /*DeleteObjectOK Successful deletion.
swagger:response deleteObjectOK swagger:response deleteObjectOK
*/ */
@ -60,7 +60,7 @@ func (o *DeleteObjectOK) WriteResponse(rw http.ResponseWriter, producer runtime.
// DeleteObjectBadRequestCode is the HTTP code returned for type DeleteObjectBadRequest // DeleteObjectBadRequestCode is the HTTP code returned for type DeleteObjectBadRequest
const DeleteObjectBadRequestCode int = 400 const DeleteObjectBadRequestCode int = 400
/*DeleteObjectBadRequest Bad request /*DeleteObjectBadRequest Bad request.
swagger:response deleteObjectBadRequest swagger:response deleteObjectBadRequest
*/ */

View file

@ -30,7 +30,7 @@ type GetContainerEACLParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */

View file

@ -16,7 +16,7 @@ import (
// GetContainerEACLOKCode is the HTTP code returned for type GetContainerEACLOK // GetContainerEACLOKCode is the HTTP code returned for type GetContainerEACLOK
const GetContainerEACLOKCode int = 200 const GetContainerEACLOKCode int = 200
/*GetContainerEACLOK Container EACL information /*GetContainerEACLOK Container EACL information.
swagger:response getContainerEAclOK swagger:response getContainerEAclOK
*/ */
@ -60,7 +60,7 @@ func (o *GetContainerEACLOK) WriteResponse(rw http.ResponseWriter, producer runt
// GetContainerEACLBadRequestCode is the HTTP code returned for type GetContainerEACLBadRequest // GetContainerEACLBadRequestCode is the HTTP code returned for type GetContainerEACLBadRequest
const GetContainerEACLBadRequestCode int = 400 const GetContainerEACLBadRequestCode int = 400
/*GetContainerEACLBadRequest Bad request /*GetContainerEACLBadRequest Bad request.
swagger:response getContainerEAclBadRequest swagger:response getContainerEAclBadRequest
*/ */

View file

@ -30,7 +30,7 @@ type GetContainerParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */

View file

@ -16,7 +16,7 @@ import (
// GetContainerOKCode is the HTTP code returned for type GetContainerOK // GetContainerOKCode is the HTTP code returned for type GetContainerOK
const GetContainerOKCode int = 200 const GetContainerOKCode int = 200
/*GetContainerOK Container info /*GetContainerOK Container info.
swagger:response getContainerOK swagger:response getContainerOK
*/ */
@ -60,7 +60,7 @@ func (o *GetContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.
// GetContainerBadRequestCode is the HTTP code returned for type GetContainerBadRequest // GetContainerBadRequestCode is the HTTP code returned for type GetContainerBadRequest
const GetContainerBadRequestCode int = 400 const GetContainerBadRequestCode int = 400
/*GetContainerBadRequest Bad request /*GetContainerBadRequest Bad request.
swagger:response getContainerBadRequest swagger:response getContainerBadRequest
*/ */

View file

@ -44,17 +44,17 @@ type GetObjectInfoParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignatureKey string XBearerSignatureKey string
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */
@ -68,22 +68,22 @@ type GetObjectInfoParams struct {
Default: 4.194304e+06 Default: 4.194304e+06
*/ */
MaxPayloadSize *int64 MaxPayloadSize *int64
/*Base58 encoded object id /*Base58 encoded object id.
Required: true Required: true
In: path In: path
*/ */
ObjectID string ObjectID string
/* /*Length of data range.
Minimum: 1 Minimum: 1
In: query In: query
*/ */
RangeLength *int64 RangeLength *int64
/* /*Range offset to start reading data.
Minimum: 0 Minimum: 0
In: query In: query
*/ */
RangeOffset *int64 RangeOffset *int64
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -56,7 +56,7 @@ type ListContainersParams struct {
Default: 0 Default: 0
*/ */
Offset *int64 Offset *int64
/*Base58 encoded owner id /*Base58 encoded owner id.
Required: true Required: true
In: query In: query
*/ */

View file

@ -16,7 +16,7 @@ import (
// ListContainersOKCode is the HTTP code returned for type ListContainersOK // ListContainersOKCode is the HTTP code returned for type ListContainersOK
const ListContainersOKCode int = 200 const ListContainersOKCode int = 200
/*ListContainersOK Containers info /*ListContainersOK Containers info.
swagger:response listContainersOK swagger:response listContainersOK
*/ */
@ -60,7 +60,7 @@ func (o *ListContainersOK) WriteResponse(rw http.ResponseWriter, producer runtim
// ListContainersBadRequestCode is the HTTP code returned for type ListContainersBadRequest // ListContainersBadRequestCode is the HTTP code returned for type ListContainersBadRequest
const ListContainersBadRequestCode int = 400 const ListContainersBadRequestCode int = 400
/*ListContainersBadRequest Bad request /*ListContainersBadRequest Bad request.
swagger:response listContainersBadRequest swagger:response listContainersBadRequest
*/ */

View file

@ -87,7 +87,7 @@ func NewNeofsRestGwAPI(spec *loads.Document) *NeofsRestGwAPI {
} }
} }
/*NeofsRestGwAPI REST API NeoFS */ /*NeofsRestGwAPI REST API for native integration with NeoFS. */
type NeofsRestGwAPI struct { type NeofsRestGwAPI struct {
spec *loads.Document spec *loads.Document
context *middleware.Context context *middleware.Context

View file

@ -44,27 +44,27 @@ type PutContainerEACLParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignatureKey string XBearerSignatureKey string
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */
ContainerID string ContainerID string
/*EACL for container /*EACL for container.
Required: true Required: true
In: body In: body
*/ */
Eacl *models.Eacl Eacl *models.Eacl
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -16,7 +16,7 @@ import (
// PutContainerEACLOKCode is the HTTP code returned for type PutContainerEACLOK // PutContainerEACLOKCode is the HTTP code returned for type PutContainerEACLOK
const PutContainerEACLOKCode int = 200 const PutContainerEACLOKCode int = 200
/*PutContainerEACLOK Successful EACL updating /*PutContainerEACLOK Successful EACL updating.
swagger:response putContainerEAclOK swagger:response putContainerEAclOK
*/ */
@ -60,7 +60,7 @@ func (o *PutContainerEACLOK) WriteResponse(rw http.ResponseWriter, producer runt
// PutContainerEACLBadRequestCode is the HTTP code returned for type PutContainerEACLBadRequest // PutContainerEACLBadRequestCode is the HTTP code returned for type PutContainerEACLBadRequest
const PutContainerEACLBadRequestCode int = 400 const PutContainerEACLBadRequestCode int = 400
/*PutContainerEACLBadRequest Bad request /*PutContainerEACLBadRequest Bad request.
swagger:response putContainerEAclBadRequest swagger:response putContainerEAclBadRequest
*/ */

View file

@ -47,12 +47,12 @@ type PutContainerParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
@ -62,12 +62,12 @@ type PutContainerParams struct {
In: body In: body
*/ */
Container *models.ContainerPutInfo Container *models.ContainerPutInfo
/*Provide this parameter to register container name in NNS service /*Provide this parameter to register container name in NNS service.
In: query In: query
Default: false Default: false
*/ */
NameScopeGlobal *bool NameScopeGlobal *bool
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -16,7 +16,7 @@ import (
// PutContainerOKCode is the HTTP code returned for type PutContainerOK // PutContainerOKCode is the HTTP code returned for type PutContainerOK
const PutContainerOKCode int = 200 const PutContainerOKCode int = 200
/*PutContainerOK Address of uploaded objects /*PutContainerOK Identifier of the created container.
swagger:response putContainerOK swagger:response putContainerOK
*/ */
@ -60,7 +60,7 @@ func (o *PutContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.
// PutContainerBadRequestCode is the HTTP code returned for type PutContainerBadRequest // PutContainerBadRequestCode is the HTTP code returned for type PutContainerBadRequest
const PutContainerBadRequestCode int = 400 const PutContainerBadRequestCode int = 400
/*PutContainerBadRequest Bad request /*PutContainerBadRequest Bad request.
swagger:response putContainerBadRequest swagger:response putContainerBadRequest
*/ */

View file

@ -44,12 +44,12 @@ type PutObjectParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
@ -59,7 +59,7 @@ type PutObjectParams struct {
In: body In: body
*/ */
Object *models.ObjectUpload Object *models.ObjectUpload
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -51,17 +51,17 @@ type SearchObjectsParams struct {
// HTTP Request Object // HTTP Request Object
HTTPRequest *http.Request `json:"-"` HTTPRequest *http.Request `json:"-"`
/*Base64 encoded signature for bearer token /*Base64 encoded signature for bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignature string XBearerSignature string
/*Hex encoded the public part of the key that signed the bearer token /*Hex encoded the public part of the key that signed the bearer token.
Required: true Required: true
In: header In: header
*/ */
XBearerSignatureKey string XBearerSignatureKey string
/*Base58 encoded container id /*Base58 encoded container id.
Required: true Required: true
In: path In: path
*/ */
@ -79,12 +79,12 @@ type SearchObjectsParams struct {
Default: 0 Default: 0
*/ */
Offset *int64 Offset *int64
/*Filters to search objects /*Filters to search objects.
Required: true Required: true
In: body In: body
*/ */
SearchFilters *models.SearchFilters SearchFilters *models.SearchFilters
/*Use wallect connect signature scheme or not /*Use wallet connect signature scheme or native NeoFS signature.
In: query In: query
Default: false Default: false
*/ */

View file

@ -1,14 +1,13 @@
swagger: "2.0" swagger: "2.0"
info: info:
title: REST API NeoFS title: REST API NeoFS
description: REST API NeoFS description: REST API for native integration with NeoFS.
version: v1 version: v1
host: localhost:8090 host: localhost:8090
basePath: /v1 basePath: /v1
schemes: schemes:
- http - http
# - https
securityDefinitions: securityDefinitions:
BearerAuth: BearerAuth:
@ -24,19 +23,19 @@ parameters:
signatureParam: signatureParam:
in: header in: header
name: X-Bearer-Signature name: X-Bearer-Signature
description: Base64 encoded signature for bearer token description: Base64 encoded signature for bearer token.
type: string type: string
required: true required: true
signatureKeyParam: signatureKeyParam:
in: header in: header
name: X-Bearer-Signature-Key name: X-Bearer-Signature-Key
description: Hex encoded the public part of the key that signed the bearer token description: Hex encoded the public part of the key that signed the bearer token.
type: string type: string
required: true required: true
signatureScheme: signatureScheme:
in: query in: query
name: walletConnect name: walletConnect
description: Use wallect connect signature scheme or not description: Use wallet connect signature scheme or native NeoFS signature.
type: boolean type: boolean
default: false default: false
containerId: containerId:
@ -44,35 +43,35 @@ parameters:
name: containerId name: containerId
type: string type: string
required: true required: true
description: Base58 encoded container id description: Base58 encoded container id.
objectId: objectId:
in: path in: path
name: objectId name: objectId
type: string type: string
required: true required: true
description: Base58 encoded object id description: Base58 encoded object id.
paths: paths:
/auth: /auth:
post: post:
operationId: auth operationId: auth
summary: Form bearer token to futher requests summary: Form bearer token to further requests
security: [ ] security: [ ]
parameters: parameters:
- in: header - in: header
name: X-Bearer-Owner-Id name: X-Bearer-Owner-Id
description: Owner Id (wallet address) that will sign the token description: Owner Id (wallet address) that will sign the token.
type: string type: string
required: true required: true
- in: header - in: header
description: Token lifetime in epoch description: Token lifetime in epoch.
name: X-Bearer-Lifetime name: X-Bearer-Lifetime
type: integer type: integer
default: 100 default: 100
- in: body - in: body
name: tokens name: tokens
required: true required: true
description: Bearer token description: Bearer tokens to form.
schema: schema:
type: array type: array
items: items:
@ -83,7 +82,7 @@ paths:
- application/json - application/json
responses: responses:
200: 200:
description: Base64 encoded stable binary marshaled bearer token description: Base64 encoded stable binary marshaled bearer token.
schema: schema:
type: array type: array
items: items:
@ -148,7 +147,7 @@ paths:
- in: body - in: body
required: true required: true
name: searchFilters name: searchFilters
description: Filters to search objects description: Filters to search objects.
schema: schema:
$ref: '#/definitions/SearchFilters' $ref: '#/definitions/SearchFilters'
responses: responses:
@ -176,10 +175,12 @@ paths:
name: range-offset name: range-offset
type: integer type: integer
minimum: 0 minimum: 0
description: Range offset to start reading data.
- in: query - in: query
name: range-length name: range-length
type: integer type: integer
minimum: 1 minimum: 1
description: Length of data range.
- in: query - in: query
name: max-payload-size name: max-payload-size
type: integer type: integer
@ -203,11 +204,11 @@ paths:
summary: Remove object from NeoFS summary: Remove object from NeoFS
responses: responses:
200: 200:
description: Successful deletion description: Successful deletion.
schema: schema:
$ref: '#/definitions/SuccessResponse' $ref: '#/definitions/SuccessResponse'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
@ -221,7 +222,7 @@ paths:
- $ref: '#/parameters/signatureScheme' - $ref: '#/parameters/signatureScheme'
- in: query - in: query
name: name-scope-global name: name-scope-global
description: Provide this parameter to register container name in NNS service description: Provide this parameter to register container name in NNS service.
type: boolean type: boolean
default: false default: false
- in: body - in: body
@ -232,7 +233,7 @@ paths:
$ref: '#/definitions/ContainerPutInfo' $ref: '#/definitions/ContainerPutInfo'
responses: responses:
200: 200:
description: Address of uploaded objects description: Identifier of the created container.
schema: schema:
type: object type: object
properties: properties:
@ -243,7 +244,7 @@ paths:
example: example:
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
get: get:
@ -255,7 +256,7 @@ paths:
name: ownerId name: ownerId
required: true required: true
type: string type: string
description: Base58 encoded owner id description: Base58 encoded owner id.
- in: query - in: query
name: offset name: offset
type: integer type: integer
@ -271,11 +272,11 @@ paths:
description: The numbers of containers to return. description: The numbers of containers to return.
responses: responses:
200: 200:
description: Containers info description: Containers info.
schema: schema:
$ref: '#/definitions/ContainerList' $ref: '#/definitions/ContainerList'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
@ -288,11 +289,11 @@ paths:
security: [ ] security: [ ]
responses: responses:
200: 200:
description: Container info description: Container info.
schema: schema:
$ref: '#/definitions/ContainerInfo' $ref: '#/definitions/ContainerInfo'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
delete: delete:
@ -304,11 +305,11 @@ paths:
- $ref: '#/parameters/signatureScheme' - $ref: '#/parameters/signatureScheme'
responses: responses:
200: 200:
description: Successful deletion description: Successful deletion.
schema: schema:
$ref: '#/definitions/SuccessResponse' $ref: '#/definitions/SuccessResponse'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
/containers/{containerId}/eacl: /containers/{containerId}/eacl:
@ -324,16 +325,16 @@ paths:
- in: body - in: body
name: eacl name: eacl
required: true required: true
description: EACL for container description: EACL for container.
schema: schema:
$ref: '#/definitions/Eacl' $ref: '#/definitions/Eacl'
responses: responses:
200: 200:
description: Successful EACL updating description: Successful EACL updating.
schema: schema:
$ref: '#/definitions/SuccessResponse' $ref: '#/definitions/SuccessResponse'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
get: get:
@ -342,16 +343,17 @@ paths:
security: [ ] security: [ ]
responses: responses:
200: 200:
description: Container EACL information description: Container EACL information.
schema: schema:
$ref: '#/definitions/Eacl' $ref: '#/definitions/Eacl'
400: 400:
description: Bad request description: Bad request.
schema: schema:
$ref: '#/definitions/ErrorResponse' $ref: '#/definitions/ErrorResponse'
definitions: definitions:
Bearer: Bearer:
description: Bearer token that is expected to be formed.
type: object type: object
properties: properties:
name: name:
@ -362,7 +364,20 @@ definitions:
$ref: '#/definitions/Record' $ref: '#/definitions/Record'
container: container:
$ref: '#/definitions/Rule' $ref: '#/definitions/Rule'
example:
- name: my-bearer-token
object:
- operation: GET
action: ALLOW
filters: [ ]
targets:
- role: OTHERS
keys: [ ]
- name: "my token to create container"
container:
verb: PUT
Record: Record:
description: A single NeoFS EACL rule.
type: object type: object
properties: properties:
action: action:
@ -390,11 +405,13 @@ definitions:
- role: OTHERS - role: OTHERS
keys: [ ] keys: [ ]
Action: Action:
description: Rule execution result action in NeoFS EACL. Either allows or denies access if the rule's filters match.
type: string type: string
enum: enum:
- ALLOW - ALLOW
- DENY - DENY
Operation: Operation:
description: Request's operation type to match in NeoFS EACL if the rule is applicable to a particular request.
type: string type: string
enum: enum:
- GET - GET
@ -405,6 +422,7 @@ definitions:
- RANGE - RANGE
- RANGEHASH - RANGEHASH
Filter: Filter:
description: Filter in NeoFS EACL to check particular properties of the request or the object.
type: object type: object
properties: properties:
headerType: headerType:
@ -426,17 +444,20 @@ definitions:
key: FileName key: FileName
value: myfile value: myfile
HeaderType: HeaderType:
description: Enumeration of possible sources of Headers to apply filters in NeoFS EACL.
type: string type: string
enum: enum:
- REQUEST - REQUEST
- OBJECT - OBJECT
- SERVICE - SERVICE
MatchType: MatchType:
description: Match type in NeoFS EACL filter.
type: string type: string
enum: enum:
- STRING_EQUAL - STRING_EQUAL
- STRING_NOT_EQUAL - STRING_NOT_EQUAL
Target: Target:
description: Target to apply the ACL rule. Can be a subject's role class or a list of public keys to match.
type: object type: object
properties: properties:
role: role:
@ -453,12 +474,14 @@ definitions:
keys: keys:
- 021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e - 021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e
Role: Role:
description: Role for target in EACL.
type: string type: string
enum: enum:
- USER - USER
- SYSTEM - SYSTEM
- OTHERS - OTHERS
Rule: Rule:
description: Container session token rule.
type: object type: object
properties: properties:
verb: verb:
@ -467,13 +490,18 @@ definitions:
type: string type: string
required: required:
- verb - verb
example:
verb: DELETE
containerId: 6jvKJCQr6e47Yx8SsbSN3fNgzroUJVkY66Q9wqxYcAjc
Verb: Verb:
description: Verb that describes the allowed container operation for token.
type: string type: string
enum: enum:
- PUT - PUT
- DELETE - DELETE
- SETEACL - SETEACL
TokenResponse: TokenResponse:
description: Base64 encoded marshaled token (for container or for object operations).
type: object type: object
properties: properties:
name: name:
@ -487,16 +515,17 @@ definitions:
- token - token
example: example:
- type: object - type: object
token: sometoken-todo-add token: ClYKBAgCEA0aCAgDEAEiAggDGggIARACIgIIAxoICAIQAiICCAMaCAgDEAIiAggDGggIBBACIgIIAxoICAUQAiICCAMaCAgGEAIiAggDGggIBxACIgIIAxIbChk182WEDFuAqq3nssrGOaH0NK0ZhzF8bu+YGgQIaBgE
- type: container - type: container
token: ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ== token: ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==
TokenType: TokenType:
description: Type of token.
type: string type: string
enum: enum:
- object - object
- container - container
ContainerPutInfo: ContainerPutInfo:
description: Represent request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored). description: Request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored).
type: object type: object
properties: properties:
containerName: containerName:
@ -517,6 +546,7 @@ definitions:
- key: Custom-Attribute - key: Custom-Attribute
value: value value: value
ContainerInfo: ContainerInfo:
description: Information about container.
type: object type: object
properties: properties:
containerId: containerId:
@ -545,6 +575,7 @@ definitions:
- attributes - attributes
example: example:
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
containerName: container
version: "2.11" version: "2.11"
ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
basicAcl: "0x1fbf9fff" basicAcl: "0x1fbf9fff"
@ -555,6 +586,7 @@ definitions:
- key: Name - key: Name
value: container value: container
ContainerList: ContainerList:
description: List of containers info
type: object type: object
properties: properties:
size: size:
@ -566,7 +598,31 @@ definitions:
required: required:
- size - size
- containers - containers
example:
size: 2
containers:
- containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
containerName: container
version: "2.11"
ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
basicAcl: "0x1fbf9fff"
placementPolicy: "REP 2"
attribute:
- key: Timestamp
value: "1648810072"
- key: Name
value: container
- containerId: FsE7HLQBBYc2WFJzuTXMcpspDEmwUxsD5YmNb2r25uUu
containerName: container2
version: "2.11"
ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
basicAcl: "0x1fbf9fff"
placementPolicy: "REP 1"
attribute:
- key: Name
value: container2
SearchFilters: SearchFilters:
description: List of SearchFilter elements.
type: object type: object
properties: properties:
filters: filters:
@ -575,7 +631,16 @@ definitions:
$ref: '#/definitions/SearchFilter' $ref: '#/definitions/SearchFilter'
required: required:
- filters - filters
example:
filters:
- key: FileName
value: some/prefix
match: MatchCommonPrefix
- key: CustomAttribute
value: tag-value
match: MatchStringEqual
SearchFilter: SearchFilter:
description: Search filter to find objects.
type: object type: object
properties: properties:
key: key:
@ -588,7 +653,12 @@ definitions:
- key - key
- value - value
- match - match
example:
key: FileName
value: object-name
match: MatchStringEqual
SearchMatch: SearchMatch:
description: Search match type.
type: string type: string
enum: enum:
- MatchStringEqual - MatchStringEqual
@ -596,6 +666,7 @@ definitions:
- MatchNotPresent - MatchNotPresent
- MatchCommonPrefix - MatchCommonPrefix
ObjectList: ObjectList:
description: List of objects.
type: object type: object
properties: properties:
size: size:
@ -607,7 +678,19 @@ definitions:
required: required:
- size - size
- objects - objects
example:
size: 2
objects:
- name: "/my/object/name"
address:
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
- name: "/my/object/some/other/name"
address:
objectId: 3GbmMWusaWgMHokWui2zDunxMTzButuQMVLbtL3cDn8s
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
ObjectBaseInfo: ObjectBaseInfo:
description: Basic object information.
type: object type: object
properties: properties:
address: address:
@ -616,7 +699,13 @@ definitions:
type: string type: string
required: required:
- address - address
example:
name: "/my/object/name"
address:
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
ObjectUpload: ObjectUpload:
description: Request body to create object.
type: object type: object
properties: properties:
containerId: containerId:
@ -640,6 +729,7 @@ definitions:
- key: User-Attribute - key: User-Attribute
value: some-value value: some-value
ObjectInfo: ObjectInfo:
description: Object information.
type: object type: object
properties: properties:
containerId: containerId:
@ -678,6 +768,7 @@ definitions:
- key: Name - key: Name
value: object value: object
Address: Address:
description: Address of the object in NeoFS.
type: object type: object
properties: properties:
containerId: containerId:
@ -691,6 +782,7 @@ definitions:
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
Eacl: Eacl:
description: EACL NeoFS table.
type: object type: object
properties: properties:
containerId: containerId:
@ -702,7 +794,20 @@ definitions:
$ref: '#/definitions/Record' $ref: '#/definitions/Record'
required: required:
- records - records
example:
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
records:
- action: GET
operation: ALLOW
filters:
- headerType: OBJECT
matchType: STRING_EQUAL
key: FileName
value: myfile
targets:
- role: OTHERS
Attribute: Attribute:
description: Attribute is a pair of strings that can be attached to a container or an object.
type: object type: object
properties: properties:
key: key:
@ -712,14 +817,19 @@ definitions:
required: required:
- key - key
- value - value
example:
key: "User-Defined-Tag"
value: "tag value"
Principal: Principal:
type: string type: string
ErrorType: ErrorType:
description: Error type. Allow determine source of the error.
type: string type: string
enum: enum:
- GW - GW
- API - API
ErrorResponse: ErrorResponse:
description: Error response.
type: object type: object
properties: properties:
type: type:
@ -731,10 +841,17 @@ definitions:
required: required:
- type - type
- message - message
example:
type: API
code: 1024
message: "incomplete object PUT by placement"
SuccessResponse: SuccessResponse:
description: Success response.
type: object type: object
properties: properties:
success: success:
type: boolean type: boolean
required: required:
- success - success
example:
success: true