2022-04-11 09:35:06 +00:00
|
|
|
swagger: "2.0"
|
|
|
|
info:
|
|
|
|
title: REST API NeoFS
|
2022-07-20 15:16:30 +00:00
|
|
|
description: REST API for native integration with NeoFS.
|
2022-04-11 09:35:06 +00:00
|
|
|
version: v1
|
|
|
|
|
|
|
|
host: localhost:8090
|
|
|
|
basePath: /v1
|
|
|
|
schemes:
|
|
|
|
- http
|
|
|
|
|
|
|
|
securityDefinitions:
|
|
|
|
BearerAuth:
|
|
|
|
type: apiKey
|
|
|
|
in: header
|
|
|
|
name: Authorization
|
2022-04-11 11:18:26 +00:00
|
|
|
description: Bearer token body to provide with NeoFS request. Must have 'Bearer ' prefix.
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
security:
|
|
|
|
- BearerAuth: [ ]
|
|
|
|
|
2022-04-11 11:18:26 +00:00
|
|
|
parameters:
|
|
|
|
signatureParam:
|
|
|
|
in: header
|
2022-04-14 08:53:13 +00:00
|
|
|
name: X-Bearer-Signature
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base64 encoded signature for bearer token.
|
2022-04-11 11:18:26 +00:00
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
signatureKeyParam:
|
|
|
|
in: header
|
2022-04-14 08:53:13 +00:00
|
|
|
name: X-Bearer-Signature-Key
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Hex encoded the public part of the key that signed the bearer token.
|
2022-04-11 11:18:26 +00:00
|
|
|
type: string
|
|
|
|
required: true
|
2022-04-15 07:03:00 +00:00
|
|
|
signatureScheme:
|
|
|
|
in: query
|
|
|
|
name: walletConnect
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Use wallet connect signature scheme or native NeoFS signature.
|
2022-04-15 07:03:00 +00:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2022-04-13 13:00:04 +00:00
|
|
|
containerId:
|
|
|
|
in: path
|
|
|
|
name: containerId
|
|
|
|
type: string
|
|
|
|
required: true
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base58 encoded container id.
|
2022-04-14 08:53:13 +00:00
|
|
|
objectId:
|
2022-04-13 13:00:04 +00:00
|
|
|
in: path
|
|
|
|
name: objectId
|
|
|
|
type: string
|
|
|
|
required: true
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base58 encoded object id.
|
2022-04-11 11:18:26 +00:00
|
|
|
|
2022-04-11 09:35:06 +00:00
|
|
|
paths:
|
|
|
|
/auth:
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsAuth
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
post:
|
|
|
|
operationId: auth
|
2022-07-20 15:16:30 +00:00
|
|
|
summary: Form bearer token to further requests
|
2022-04-11 09:35:06 +00:00
|
|
|
security: [ ]
|
|
|
|
parameters:
|
2022-06-09 09:59:02 +00:00
|
|
|
- in: header
|
|
|
|
name: X-Bearer-Owner-Id
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Owner Id (wallet address) that will sign the token.
|
2022-06-09 09:59:02 +00:00
|
|
|
type: string
|
|
|
|
required: true
|
2022-04-11 09:35:06 +00:00
|
|
|
- in: header
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Token lifetime in epoch.
|
2022-04-14 08:53:13 +00:00
|
|
|
name: X-Bearer-Lifetime
|
2022-04-11 09:35:06 +00:00
|
|
|
type: integer
|
|
|
|
default: 100
|
|
|
|
- in: body
|
2022-07-07 09:02:05 +00:00
|
|
|
name: tokens
|
2022-04-11 09:35:06 +00:00
|
|
|
required: true
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bearer tokens to form.
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
2022-07-07 09:02:05 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Bearer'
|
2022-04-11 09:35:06 +00:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
200:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base64 encoded stable binary marshaled bearer token.
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
2022-07-07 09:02:05 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/TokenResponse'
|
2022-04-11 09:35:06 +00:00
|
|
|
400:
|
|
|
|
description: Bad request
|
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-11 09:35:06 +00:00
|
|
|
|
2022-07-28 16:57:40 +00:00
|
|
|
/accounting/balance/{address}:
|
|
|
|
get:
|
|
|
|
operationId: getBalance
|
|
|
|
summary: Get balance in NeoFS
|
|
|
|
description: Getting balance of provided wallet address in NeoFS.
|
|
|
|
security: [ ]
|
|
|
|
parameters:
|
|
|
|
- in: path
|
|
|
|
name: address
|
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
description: Base58 encoded wallet address.
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Balance of address in NeoFS
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/Balance'
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-28 16:57:40 +00:00
|
|
|
400:
|
|
|
|
description: Bad request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/ErrorResponse'
|
|
|
|
|
2022-04-11 09:35:06 +00:00
|
|
|
/objects:
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsObjectsPut
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
put:
|
|
|
|
operationId: putObject
|
|
|
|
summary: Upload object to NeoFS
|
|
|
|
parameters:
|
2022-08-05 19:09:19 +00:00
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-11 09:35:06 +00:00
|
|
|
- in: body
|
|
|
|
required: true
|
|
|
|
name: object
|
|
|
|
description: Object info to upload
|
|
|
|
schema:
|
2022-04-20 14:52:41 +00:00
|
|
|
$ref: '#/definitions/ObjectUpload'
|
2022-04-11 09:35:06 +00:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
description: Address of uploaded objects
|
|
|
|
schema:
|
2022-04-18 08:30:34 +00:00
|
|
|
$ref: '#/definitions/Address'
|
|
|
|
400:
|
|
|
|
description: Bad request
|
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-18 08:30:34 +00:00
|
|
|
|
|
|
|
/objects/{containerId}/search:
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/parameters/containerId'
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsObjectsSearch
|
|
|
|
security: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Base64 encoded stable binary marshaled bearer token.
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
2022-04-18 08:30:34 +00:00
|
|
|
post:
|
|
|
|
operationId: searchObjects
|
|
|
|
summary: Search objects by filters
|
|
|
|
parameters:
|
2022-08-05 19:09:19 +00:00
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-18 08:30:34 +00:00
|
|
|
- in: query
|
|
|
|
name: offset
|
|
|
|
type: integer
|
|
|
|
default: 0
|
|
|
|
minimum: 0
|
|
|
|
description: The number of containers to skip before starting to collect the result set.
|
|
|
|
- in: query
|
|
|
|
name: limit
|
|
|
|
type: integer
|
|
|
|
default: 100
|
|
|
|
minimum: 1
|
|
|
|
maximum: 10000
|
|
|
|
description: The numbers of containers to return.
|
|
|
|
- in: body
|
|
|
|
required: true
|
|
|
|
name: searchFilters
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Filters to search objects.
|
2022-04-18 08:30:34 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/SearchFilters'
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-04-18 08:30:34 +00:00
|
|
|
description: List of objects
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/ObjectList'
|
2022-04-11 09:35:06 +00:00
|
|
|
400:
|
|
|
|
description: Bad request
|
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-11 09:35:06 +00:00
|
|
|
|
2022-04-11 11:18:26 +00:00
|
|
|
/objects/{containerId}/{objectId}:
|
2022-04-11 09:35:06 +00:00
|
|
|
parameters:
|
2022-04-13 13:00:04 +00:00
|
|
|
- $ref: '#/parameters/containerId'
|
2022-04-14 08:53:13 +00:00
|
|
|
- $ref: '#/parameters/objectId'
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsObjectsGetDelete
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
type: string
|
2022-04-11 11:18:26 +00:00
|
|
|
get:
|
|
|
|
operationId: getObjectInfo
|
2022-04-20 14:10:43 +00:00
|
|
|
summary: Get object info by address
|
|
|
|
parameters:
|
2022-08-05 19:09:19 +00:00
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-20 14:10:43 +00:00
|
|
|
- in: query
|
|
|
|
name: range-offset
|
|
|
|
type: integer
|
|
|
|
minimum: 0
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Range offset to start reading data.
|
2022-04-20 14:10:43 +00:00
|
|
|
- in: query
|
|
|
|
name: range-length
|
|
|
|
type: integer
|
|
|
|
minimum: 1
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Length of data range.
|
2022-04-20 14:10:43 +00:00
|
|
|
- in: query
|
|
|
|
name: max-payload-size
|
|
|
|
type: integer
|
|
|
|
default: 4194304
|
|
|
|
minimum: 0
|
|
|
|
maximum: 524288000
|
|
|
|
description: |
|
|
|
|
Max payload size (in bytes) that can be included in the response.
|
|
|
|
If the actual size is greater than this params the payload won't be included in the response.
|
2022-04-11 11:18:26 +00:00
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-04-11 11:18:26 +00:00
|
|
|
description: Object info
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/ObjectInfo'
|
|
|
|
400:
|
|
|
|
description: Bad request
|
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-14 08:53:13 +00:00
|
|
|
delete:
|
|
|
|
operationId: deleteObject
|
|
|
|
summary: Remove object from NeoFS
|
2022-08-05 19:09:19 +00:00
|
|
|
parameters:
|
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-14 08:53:13 +00:00
|
|
|
responses:
|
2022-07-07 09:29:51 +00:00
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Successful deletion.
|
2022-07-07 09:29:51 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/SuccessResponse'
|
2022-04-14 08:53:13 +00:00
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-14 08:53:13 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-11 11:18:26 +00:00
|
|
|
|
|
|
|
/containers:
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsContainersPutList
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
put:
|
|
|
|
operationId: putContainer
|
|
|
|
summary: Create new container in NeoFS
|
|
|
|
parameters:
|
2022-04-13 15:23:03 +00:00
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
2022-04-15 07:03:00 +00:00
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-13 08:41:04 +00:00
|
|
|
- in: query
|
2022-06-15 14:32:28 +00:00
|
|
|
name: name-scope-global
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Provide this parameter to register container name in NNS service.
|
2022-04-13 08:41:04 +00:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2022-04-11 09:35:06 +00:00
|
|
|
- in: body
|
|
|
|
name: container
|
|
|
|
required: true
|
|
|
|
description: Container info
|
|
|
|
schema:
|
2022-07-19 14:48:28 +00:00
|
|
|
$ref: '#/definitions/ContainerPutInfo'
|
2022-04-11 09:35:06 +00:00
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Identifier of the created container.
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- containerId
|
|
|
|
example:
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-13 15:23:03 +00:00
|
|
|
get:
|
|
|
|
operationId: listContainers
|
|
|
|
summary: Get list of containers
|
|
|
|
security: [ ]
|
|
|
|
parameters:
|
|
|
|
- in: query
|
|
|
|
name: ownerId
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base58 encoded owner id.
|
2022-04-13 15:23:03 +00:00
|
|
|
- in: query
|
|
|
|
name: offset
|
|
|
|
type: integer
|
|
|
|
default: 0
|
|
|
|
minimum: 0
|
|
|
|
description: The number of containers to skip before starting to collect the result set.
|
|
|
|
- in: query
|
|
|
|
name: limit
|
|
|
|
type: integer
|
|
|
|
default: 100
|
|
|
|
minimum: 1
|
|
|
|
maximum: 10000
|
|
|
|
description: The numbers of containers to return.
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Containers info.
|
2022-04-13 15:23:03 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/ContainerList'
|
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-13 15:23:03 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
/containers/{containerId}:
|
2022-04-13 08:41:04 +00:00
|
|
|
parameters:
|
2022-04-13 13:00:04 +00:00
|
|
|
- $ref: '#/parameters/containerId'
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsContainersGetDelete
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
get:
|
|
|
|
operationId: getContainer
|
|
|
|
summary: Get container by id
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Container info.
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/ContainerInfo'
|
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-11 09:35:06 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-13 08:41:04 +00:00
|
|
|
delete:
|
|
|
|
operationId: deleteContainer
|
|
|
|
summary: Delete container by id
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
2022-04-15 07:03:00 +00:00
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-13 08:41:04 +00:00
|
|
|
responses:
|
2022-07-07 09:29:51 +00:00
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Successful deletion.
|
2022-07-07 09:29:51 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/SuccessResponse'
|
2022-04-13 08:41:04 +00:00
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-13 08:41:04 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-08-05 19:09:19 +00:00
|
|
|
|
2022-04-13 13:00:04 +00:00
|
|
|
/containers/{containerId}/eacl:
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/parameters/containerId'
|
2022-08-05 19:09:19 +00:00
|
|
|
options:
|
|
|
|
operationId: optionsContainersEACL
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: CORS
|
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Headers:
|
|
|
|
type: string
|
|
|
|
Access-Control-Allow-Methods:
|
|
|
|
type: string
|
2022-04-13 13:00:04 +00:00
|
|
|
put:
|
|
|
|
operationId: putContainerEACL
|
|
|
|
summary: Set container EACL by id
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/parameters/signatureParam'
|
|
|
|
- $ref: '#/parameters/signatureKeyParam'
|
2022-04-15 07:03:00 +00:00
|
|
|
- $ref: '#/parameters/signatureScheme'
|
2022-04-13 13:00:04 +00:00
|
|
|
- in: body
|
|
|
|
name: eacl
|
|
|
|
required: true
|
2022-07-20 15:16:30 +00:00
|
|
|
description: EACL for container.
|
2022-04-13 13:00:04 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/Eacl'
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Successful EACL updating.
|
2022-07-07 09:29:51 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/SuccessResponse'
|
2022-04-13 13:00:04 +00:00
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-13 13:00:04 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-13 13:00:04 +00:00
|
|
|
get:
|
|
|
|
operationId: getContainerEACL
|
|
|
|
summary: Get container EACL by id
|
|
|
|
security: [ ]
|
|
|
|
responses:
|
|
|
|
200:
|
2022-08-05 19:09:19 +00:00
|
|
|
headers:
|
|
|
|
Access-Control-Allow-Origin:
|
|
|
|
type: string
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Container EACL information.
|
2022-04-13 13:00:04 +00:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/Eacl'
|
|
|
|
400:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bad request.
|
2022-04-13 13:00:04 +00:00
|
|
|
schema:
|
2022-07-07 12:59:38 +00:00
|
|
|
$ref: '#/definitions/ErrorResponse'
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
definitions:
|
|
|
|
Bearer:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Bearer token that is expected to be formed.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-07-07 09:02:05 +00:00
|
|
|
name:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
object:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Record'
|
|
|
|
container:
|
|
|
|
$ref: '#/definitions/Rule'
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
- name: my-bearer-token
|
|
|
|
object:
|
|
|
|
- operation: GET
|
|
|
|
action: ALLOW
|
|
|
|
filters: [ ]
|
|
|
|
targets:
|
|
|
|
- role: OTHERS
|
|
|
|
keys: [ ]
|
|
|
|
- name: "my token to create container"
|
|
|
|
container:
|
|
|
|
verb: PUT
|
2022-04-11 09:35:06 +00:00
|
|
|
Record:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: A single NeoFS EACL rule.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
action:
|
|
|
|
$ref: '#/definitions/Action'
|
|
|
|
operation:
|
|
|
|
$ref: '#/definitions/Operation'
|
|
|
|
filters:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Filter'
|
|
|
|
targets:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Target'
|
|
|
|
required:
|
|
|
|
- action
|
|
|
|
- operation
|
|
|
|
- filters
|
|
|
|
- targets
|
|
|
|
example:
|
|
|
|
operation: GET
|
|
|
|
action: ALLOW
|
|
|
|
filters: [ ]
|
|
|
|
targets:
|
|
|
|
- role: OTHERS
|
|
|
|
keys: [ ]
|
|
|
|
Action:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Rule execution result action in NeoFS EACL. Either allows or denies access if the rule's filters match.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- ALLOW
|
|
|
|
- DENY
|
|
|
|
Operation:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Request's operation type to match in NeoFS EACL if the rule is applicable to a particular request.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- GET
|
|
|
|
- HEAD
|
|
|
|
- PUT
|
|
|
|
- DELETE
|
|
|
|
- SEARCH
|
|
|
|
- RANGE
|
|
|
|
- RANGEHASH
|
|
|
|
Filter:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Filter in NeoFS EACL to check particular properties of the request or the object.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
headerType:
|
|
|
|
$ref: '#/definitions/HeaderType'
|
|
|
|
matchType:
|
|
|
|
$ref: '#/definitions/MatchType'
|
|
|
|
key:
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- headerType
|
|
|
|
- matchType
|
|
|
|
- key
|
|
|
|
- value
|
|
|
|
example:
|
|
|
|
headerType: OBJECT
|
|
|
|
matchType: STRING_NOT_EQUAL
|
|
|
|
key: FileName
|
|
|
|
value: myfile
|
|
|
|
HeaderType:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Enumeration of possible sources of Headers to apply filters in NeoFS EACL.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- REQUEST
|
|
|
|
- OBJECT
|
|
|
|
- SERVICE
|
|
|
|
MatchType:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Match type in NeoFS EACL filter.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- STRING_EQUAL
|
|
|
|
- STRING_NOT_EQUAL
|
|
|
|
Target:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Target to apply the ACL rule. Can be a subject's role class or a list of public keys to match.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
role:
|
|
|
|
$ref: '#/definitions/Role'
|
|
|
|
keys:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- role
|
|
|
|
- keys
|
|
|
|
example:
|
|
|
|
role: USER
|
|
|
|
keys:
|
|
|
|
- 021dc56fc6d81d581ae7605a8e00e0e0bab6cbad566a924a527339475a97a8e38e
|
|
|
|
Role:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Role for target in EACL.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- USER
|
|
|
|
- SYSTEM
|
|
|
|
- OTHERS
|
|
|
|
Rule:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Container session token rule.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
verb:
|
|
|
|
$ref: '#/definitions/Verb'
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- verb
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
verb: DELETE
|
|
|
|
containerId: 6jvKJCQr6e47Yx8SsbSN3fNgzroUJVkY66Q9wqxYcAjc
|
2022-04-11 09:35:06 +00:00
|
|
|
Verb:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Verb that describes the allowed container operation for token.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- PUT
|
|
|
|
- DELETE
|
|
|
|
- SETEACL
|
|
|
|
TokenResponse:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Base64 encoded marshaled token (for container or for object operations).
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-07-07 09:02:05 +00:00
|
|
|
name:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
type:
|
|
|
|
$ref: '#/definitions/TokenType'
|
|
|
|
token:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- type
|
|
|
|
- token
|
|
|
|
example:
|
|
|
|
- type: object
|
2022-07-20 15:16:30 +00:00
|
|
|
token: ClYKBAgCEA0aCAgDEAEiAggDGggIARACIgIIAxoICAIQAiICCAMaCAgDEAIiAggDGggIBBACIgIIAxoICAUQAiICCAMaCAgGEAIiAggDGggIBxACIgIIAxIbChk182WEDFuAqq3nssrGOaH0NK0ZhzF8bu+YGgQIaBgE
|
2022-04-11 09:35:06 +00:00
|
|
|
- type: container
|
|
|
|
token: ChCpanIBJCpJuJz42KOmGMSnEhsKGTWquaX2Lq6GhhO4faOYkLD0f9WkXuYJlq4aBAhnGAMiIQJgFcIEghQB5lq3AJZOVswInwc1IGhlQ7NCUh4DFO3UATIECAEQAQ==
|
|
|
|
TokenType:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Type of token.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- object
|
|
|
|
- container
|
2022-07-19 14:48:28 +00:00
|
|
|
ContainerPutInfo:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Request body to create container. To specify container name use appropriate property (name provided in attributes will be ignored).
|
2022-07-19 14:48:28 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerName:
|
|
|
|
type: string
|
|
|
|
placementPolicy:
|
|
|
|
type: string
|
|
|
|
basicAcl:
|
|
|
|
type: string
|
|
|
|
attributes:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Attribute'
|
|
|
|
example:
|
|
|
|
containerName: container
|
|
|
|
placementPolicy: "REP 3"
|
|
|
|
basicAcl: public-read-write
|
|
|
|
attributes:
|
|
|
|
- key: Custom-Attribute
|
|
|
|
value: value
|
2022-04-11 09:35:06 +00:00
|
|
|
ContainerInfo:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Information about container.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
2022-07-19 14:48:28 +00:00
|
|
|
containerName:
|
|
|
|
type: string
|
2022-04-11 09:35:06 +00:00
|
|
|
version:
|
|
|
|
type: string
|
|
|
|
ownerId:
|
|
|
|
type: string
|
|
|
|
basicAcl:
|
|
|
|
type: string
|
|
|
|
placementPolicy:
|
|
|
|
type: string
|
|
|
|
attributes:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Attribute'
|
2022-04-11 11:18:26 +00:00
|
|
|
required:
|
|
|
|
- containerId
|
2022-07-19 14:48:28 +00:00
|
|
|
- containerName
|
2022-04-11 11:18:26 +00:00
|
|
|
- version
|
|
|
|
- ownerId
|
|
|
|
- basicAcl
|
|
|
|
- placementPolicy
|
|
|
|
- attributes
|
2022-04-11 09:35:06 +00:00
|
|
|
example:
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
2022-07-20 15:16:30 +00:00
|
|
|
containerName: container
|
2022-04-11 09:35:06 +00:00
|
|
|
version: "2.11"
|
|
|
|
ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
|
|
|
|
basicAcl: "0x1fbf9fff"
|
|
|
|
placementPolicy: "REP 2"
|
|
|
|
attribute:
|
|
|
|
- key: Timestamp
|
|
|
|
value: "1648810072"
|
|
|
|
- key: Name
|
|
|
|
value: container
|
2022-04-13 15:23:03 +00:00
|
|
|
ContainerList:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: List of containers info
|
2022-04-13 15:23:03 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
size:
|
|
|
|
type: integer
|
|
|
|
containers:
|
|
|
|
type: array
|
|
|
|
items:
|
2022-07-07 14:55:13 +00:00
|
|
|
$ref: '#/definitions/ContainerInfo'
|
2022-04-13 15:23:03 +00:00
|
|
|
required:
|
|
|
|
- size
|
|
|
|
- containers
|
2022-07-20 15:16:30 +00:00
|
|
|
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
|
2022-04-18 08:30:34 +00:00
|
|
|
SearchFilters:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: List of SearchFilter elements.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
filters:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/SearchFilter'
|
|
|
|
required:
|
|
|
|
- filters
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
filters:
|
|
|
|
- key: FileName
|
|
|
|
value: some/prefix
|
|
|
|
match: MatchCommonPrefix
|
|
|
|
- key: CustomAttribute
|
|
|
|
value: tag-value
|
|
|
|
match: MatchStringEqual
|
2022-04-18 08:30:34 +00:00
|
|
|
SearchFilter:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Search filter to find objects.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
match:
|
|
|
|
$ref: '#/definitions/SearchMatch'
|
|
|
|
required:
|
|
|
|
- key
|
|
|
|
- value
|
|
|
|
- match
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
key: FileName
|
|
|
|
value: object-name
|
|
|
|
match: MatchStringEqual
|
2022-04-18 08:30:34 +00:00
|
|
|
SearchMatch:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Search match type.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- MatchStringEqual
|
|
|
|
- MatchStringNotEqual
|
|
|
|
- MatchNotPresent
|
|
|
|
- MatchCommonPrefix
|
|
|
|
ObjectList:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: List of objects.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
size:
|
|
|
|
type: integer
|
|
|
|
objects:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/ObjectBaseInfo'
|
|
|
|
required:
|
|
|
|
- size
|
|
|
|
- objects
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
size: 2
|
|
|
|
objects:
|
|
|
|
- name: "/my/object/name"
|
|
|
|
address:
|
|
|
|
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
|
|
|
- name: "/my/object/some/other/name"
|
|
|
|
address:
|
|
|
|
objectId: 3GbmMWusaWgMHokWui2zDunxMTzButuQMVLbtL3cDn8s
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
2022-04-18 08:30:34 +00:00
|
|
|
ObjectBaseInfo:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Basic object information.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
address:
|
|
|
|
$ref: '#/definitions/Address'
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- address
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
name: "/my/object/name"
|
|
|
|
address:
|
|
|
|
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
2022-04-20 14:52:41 +00:00
|
|
|
ObjectUpload:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Request body to create object.
|
2022-04-20 14:52:41 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
fileName:
|
|
|
|
type: string
|
|
|
|
payload:
|
|
|
|
type: string
|
|
|
|
attributes:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Attribute'
|
|
|
|
required:
|
|
|
|
- containerId
|
|
|
|
- fileName
|
|
|
|
example:
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
|
|
|
fileName: myFile.txt
|
|
|
|
payload: Y29udGVudCBvZiBmaWxl
|
|
|
|
attributes:
|
|
|
|
- key: User-Attribute
|
|
|
|
value: some-value
|
2022-04-11 11:18:26 +00:00
|
|
|
ObjectInfo:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Object information.
|
2022-04-11 11:18:26 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
objectId:
|
|
|
|
type: string
|
|
|
|
ownerId:
|
|
|
|
type: string
|
|
|
|
attributes:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Attribute'
|
2022-04-20 14:10:43 +00:00
|
|
|
objectSize:
|
|
|
|
type: integer
|
|
|
|
description: Object full payload size
|
|
|
|
payloadSize:
|
|
|
|
type: integer
|
|
|
|
description: Payload size in response
|
|
|
|
payload:
|
|
|
|
type: string
|
|
|
|
description: Base64 encoded object payload
|
2022-04-11 11:18:26 +00:00
|
|
|
required:
|
|
|
|
- containerId
|
|
|
|
- objectId
|
|
|
|
- ownerId
|
|
|
|
- attributes
|
2022-04-20 14:10:43 +00:00
|
|
|
- objectSize
|
|
|
|
- payloadSize
|
2022-04-11 11:18:26 +00:00
|
|
|
example:
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
|
|
|
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
|
|
|
|
ownerId: NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM
|
|
|
|
attribute:
|
|
|
|
- key: Timestamp
|
|
|
|
value: "1648810072"
|
|
|
|
- key: Name
|
|
|
|
value: object
|
2022-04-18 08:30:34 +00:00
|
|
|
Address:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Address of the object in NeoFS.
|
2022-04-18 08:30:34 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
objectId:
|
2022-04-20 14:10:43 +00:00
|
|
|
type: string
|
2022-04-18 08:30:34 +00:00
|
|
|
required:
|
|
|
|
- containerId
|
|
|
|
- objectId
|
|
|
|
example:
|
|
|
|
objectId: 8N3o7Dtr6T1xteCt6eRwhpmJ7JhME58Hyu1dvaswuTDd
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
2022-04-13 13:00:04 +00:00
|
|
|
Eacl:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: EACL NeoFS table.
|
2022-04-13 13:00:04 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
containerId:
|
|
|
|
type: string
|
|
|
|
readOnly: true
|
|
|
|
records:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/Record'
|
|
|
|
required:
|
|
|
|
- records
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
containerId: 5HZTn5qkRnmgSz9gSrw22CEdPPk6nQhkwf2Mgzyvkikv
|
|
|
|
records:
|
|
|
|
- action: GET
|
|
|
|
operation: ALLOW
|
|
|
|
filters:
|
|
|
|
- headerType: OBJECT
|
|
|
|
matchType: STRING_EQUAL
|
|
|
|
key: FileName
|
|
|
|
value: myfile
|
|
|
|
targets:
|
|
|
|
- role: OTHERS
|
2022-04-11 09:35:06 +00:00
|
|
|
Attribute:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Attribute is a pair of strings that can be attached to a container or an object.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
type: string
|
2022-04-11 11:18:26 +00:00
|
|
|
required:
|
|
|
|
- key
|
|
|
|
- value
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
key: "User-Defined-Tag"
|
|
|
|
value: "tag value"
|
2022-04-11 09:35:06 +00:00
|
|
|
Principal:
|
|
|
|
type: string
|
2022-07-28 16:57:40 +00:00
|
|
|
Balance:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
address:
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
precision:
|
|
|
|
type: integer
|
|
|
|
required:
|
|
|
|
- address
|
|
|
|
- value
|
|
|
|
- precision
|
2022-07-07 12:59:38 +00:00
|
|
|
ErrorType:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Error type. Allow determine source of the error.
|
2022-04-11 09:35:06 +00:00
|
|
|
type: string
|
2022-07-07 12:59:38 +00:00
|
|
|
enum:
|
|
|
|
- GW
|
|
|
|
- API
|
|
|
|
ErrorResponse:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Error response.
|
2022-07-07 12:59:38 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type:
|
|
|
|
$ref: '#/definitions/ErrorType'
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- type
|
|
|
|
- message
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
type: API
|
|
|
|
code: 1024
|
|
|
|
message: "incomplete object PUT by placement"
|
2022-07-07 09:29:51 +00:00
|
|
|
SuccessResponse:
|
2022-07-20 15:16:30 +00:00
|
|
|
description: Success response.
|
2022-07-07 09:29:51 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
success:
|
|
|
|
type: boolean
|
|
|
|
required:
|
|
|
|
- success
|
2022-07-20 15:16:30 +00:00
|
|
|
example:
|
|
|
|
success: true
|