curl --request POST \
--url https://api.nebius.cloud/storage/v1/buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"bucketPolicy": {
"rules": [
{
"anonymous": {},
"groupId": "<string>",
"paths": [
"<string>"
],
"roles": [
"<string>"
]
}
]
},
"cors": {
"rules": [
{
"allowedHeaders": [
"<string>"
],
"allowedMethods": [
"<string>"
],
"allowedOrigins": [
"<string>"
],
"exposeHeaders": [
"<string>"
],
"id": "<string>",
"maxAgeSeconds": 123
}
]
},
"defaultStorageClass": "STORAGE_CLASS_UNSPECIFIED",
"forceStorageClass": true,
"lifecycleConfiguration": {
"lastAccessFilter": {
"conditions": [
{
"type": "TYPE_UNSPECIFIED",
"methods": [
"METHOD_UNSPECIFIED"
],
"userAgents": [
"<string>"
]
}
]
},
"rules": [
{
"id": "<string>",
"status": "STATUS_UNSPECIFIED",
"abortIncompleteMultipartUpload": {
"daysAfterInitiation": 123
},
"expiration": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"expiredObjectDeleteMarker": true
},
"filter": {
"objectSizeGreaterThanBytes": "<string>",
"objectSizeLessThanBytes": "<string>",
"prefix": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"noncurrentVersionExpiration": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123
},
"noncurrentVersionTransition": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
},
"transition": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"daysSinceLastAccess": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
}
}
]
},
"maxSizeBytes": "<string>",
"objectAuditLogging": "OBJECT_AUDIT_LOGGING_UNSPECIFIED",
"versioningPolicy": "VERSIONING_POLICY_UNSPECIFIED"
}
}
'import requests
url = "https://api.nebius.cloud/storage/v1/buckets"
payload = {
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"bucketPolicy": { "rules": [
{
"anonymous": {},
"groupId": "<string>",
"paths": ["<string>"],
"roles": ["<string>"]
}
] },
"cors": { "rules": [
{
"allowedHeaders": ["<string>"],
"allowedMethods": ["<string>"],
"allowedOrigins": ["<string>"],
"exposeHeaders": ["<string>"],
"id": "<string>",
"maxAgeSeconds": 123
}
] },
"defaultStorageClass": "STORAGE_CLASS_UNSPECIFIED",
"forceStorageClass": True,
"lifecycleConfiguration": {
"lastAccessFilter": { "conditions": [
{
"type": "TYPE_UNSPECIFIED",
"methods": ["METHOD_UNSPECIFIED"],
"userAgents": ["<string>"]
}
] },
"rules": [
{
"id": "<string>",
"status": "STATUS_UNSPECIFIED",
"abortIncompleteMultipartUpload": { "daysAfterInitiation": 123 },
"expiration": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"expiredObjectDeleteMarker": True
},
"filter": {
"objectSizeGreaterThanBytes": "<string>",
"objectSizeLessThanBytes": "<string>",
"prefix": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"noncurrentVersionExpiration": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123
},
"noncurrentVersionTransition": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
},
"transition": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"daysSinceLastAccess": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
}
}
]
},
"maxSizeBytes": "<string>",
"objectAuditLogging": "OBJECT_AUDIT_LOGGING_UNSPECIFIED",
"versioningPolicy": "VERSIONING_POLICY_UNSPECIFIED"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
parentId: '<string>',
id: '<string>',
labels: {},
name: '<string>',
resourceVersion: '<string>'
},
spec: {
bucketPolicy: {
rules: [{anonymous: {}, groupId: '<string>', paths: ['<string>'], roles: ['<string>']}]
},
cors: {
rules: [
{
allowedHeaders: ['<string>'],
allowedMethods: ['<string>'],
allowedOrigins: ['<string>'],
exposeHeaders: ['<string>'],
id: '<string>',
maxAgeSeconds: 123
}
]
},
defaultStorageClass: 'STORAGE_CLASS_UNSPECIFIED',
forceStorageClass: true,
lifecycleConfiguration: {
lastAccessFilter: {
conditions: [
{
type: 'TYPE_UNSPECIFIED',
methods: ['METHOD_UNSPECIFIED'],
userAgents: ['<string>']
}
]
},
rules: [
{
id: '<string>',
status: 'STATUS_UNSPECIFIED',
abortIncompleteMultipartUpload: {daysAfterInitiation: 123},
expiration: {date: '2023-11-07T05:31:56Z', days: 123, expiredObjectDeleteMarker: true},
filter: {
objectSizeGreaterThanBytes: '<string>',
objectSizeLessThanBytes: '<string>',
prefix: '<string>',
tags: [{key: '<string>', value: '<string>'}]
},
noncurrentVersionExpiration: {newerNoncurrentVersions: 123, noncurrentDays: 123},
noncurrentVersionTransition: {
newerNoncurrentVersions: 123,
noncurrentDays: 123,
storageClass: 'STORAGE_CLASS_UNSPECIFIED'
},
transition: {
date: '2023-11-07T05:31:56Z',
days: 123,
daysSinceLastAccess: 123,
storageClass: 'STORAGE_CLASS_UNSPECIFIED'
}
}
]
},
maxSizeBytes: '<string>',
objectAuditLogging: 'OBJECT_AUDIT_LOGGING_UNSPECIFIED',
versioningPolicy: 'VERSIONING_POLICY_UNSPECIFIED'
}
})
};
fetch('https://api.nebius.cloud/storage/v1/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nebius.cloud/storage/v1/buckets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'parentId' => '<string>',
'id' => '<string>',
'labels' => [
],
'name' => '<string>',
'resourceVersion' => '<string>'
],
'spec' => [
'bucketPolicy' => [
'rules' => [
[
'anonymous' => [
],
'groupId' => '<string>',
'paths' => [
'<string>'
],
'roles' => [
'<string>'
]
]
]
],
'cors' => [
'rules' => [
[
'allowedHeaders' => [
'<string>'
],
'allowedMethods' => [
'<string>'
],
'allowedOrigins' => [
'<string>'
],
'exposeHeaders' => [
'<string>'
],
'id' => '<string>',
'maxAgeSeconds' => 123
]
]
],
'defaultStorageClass' => 'STORAGE_CLASS_UNSPECIFIED',
'forceStorageClass' => true,
'lifecycleConfiguration' => [
'lastAccessFilter' => [
'conditions' => [
[
'type' => 'TYPE_UNSPECIFIED',
'methods' => [
'METHOD_UNSPECIFIED'
],
'userAgents' => [
'<string>'
]
]
]
],
'rules' => [
[
'id' => '<string>',
'status' => 'STATUS_UNSPECIFIED',
'abortIncompleteMultipartUpload' => [
'daysAfterInitiation' => 123
],
'expiration' => [
'date' => '2023-11-07T05:31:56Z',
'days' => 123,
'expiredObjectDeleteMarker' => true
],
'filter' => [
'objectSizeGreaterThanBytes' => '<string>',
'objectSizeLessThanBytes' => '<string>',
'prefix' => '<string>',
'tags' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
],
'noncurrentVersionExpiration' => [
'newerNoncurrentVersions' => 123,
'noncurrentDays' => 123
],
'noncurrentVersionTransition' => [
'newerNoncurrentVersions' => 123,
'noncurrentDays' => 123,
'storageClass' => 'STORAGE_CLASS_UNSPECIFIED'
],
'transition' => [
'date' => '2023-11-07T05:31:56Z',
'days' => 123,
'daysSinceLastAccess' => 123,
'storageClass' => 'STORAGE_CLASS_UNSPECIFIED'
]
]
]
],
'maxSizeBytes' => '<string>',
'objectAuditLogging' => 'OBJECT_AUDIT_LOGGING_UNSPECIFIED',
'versioningPolicy' => 'VERSIONING_POLICY_UNSPECIFIED'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nebius.cloud/storage/v1/buckets"
payload := strings.NewReader("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nebius.cloud/storage/v1/buckets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/storage/v1/buckets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"progressData": {
"@type": "<string>"
},
"progressTracker": {
"description": "<string>",
"estimatedFinishedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"steps": [
{
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
}
],
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
},
"request": {
"@type": "<string>"
},
"requestHeaders": {},
"resourceId": "<string>",
"status": {
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}
}Create
curl --request POST \
--url https://api.nebius.cloud/storage/v1/buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"bucketPolicy": {
"rules": [
{
"anonymous": {},
"groupId": "<string>",
"paths": [
"<string>"
],
"roles": [
"<string>"
]
}
]
},
"cors": {
"rules": [
{
"allowedHeaders": [
"<string>"
],
"allowedMethods": [
"<string>"
],
"allowedOrigins": [
"<string>"
],
"exposeHeaders": [
"<string>"
],
"id": "<string>",
"maxAgeSeconds": 123
}
]
},
"defaultStorageClass": "STORAGE_CLASS_UNSPECIFIED",
"forceStorageClass": true,
"lifecycleConfiguration": {
"lastAccessFilter": {
"conditions": [
{
"type": "TYPE_UNSPECIFIED",
"methods": [
"METHOD_UNSPECIFIED"
],
"userAgents": [
"<string>"
]
}
]
},
"rules": [
{
"id": "<string>",
"status": "STATUS_UNSPECIFIED",
"abortIncompleteMultipartUpload": {
"daysAfterInitiation": 123
},
"expiration": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"expiredObjectDeleteMarker": true
},
"filter": {
"objectSizeGreaterThanBytes": "<string>",
"objectSizeLessThanBytes": "<string>",
"prefix": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"noncurrentVersionExpiration": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123
},
"noncurrentVersionTransition": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
},
"transition": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"daysSinceLastAccess": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
}
}
]
},
"maxSizeBytes": "<string>",
"objectAuditLogging": "OBJECT_AUDIT_LOGGING_UNSPECIFIED",
"versioningPolicy": "VERSIONING_POLICY_UNSPECIFIED"
}
}
'import requests
url = "https://api.nebius.cloud/storage/v1/buckets"
payload = {
"metadata": {
"parentId": "<string>",
"id": "<string>",
"labels": {},
"name": "<string>",
"resourceVersion": "<string>"
},
"spec": {
"bucketPolicy": { "rules": [
{
"anonymous": {},
"groupId": "<string>",
"paths": ["<string>"],
"roles": ["<string>"]
}
] },
"cors": { "rules": [
{
"allowedHeaders": ["<string>"],
"allowedMethods": ["<string>"],
"allowedOrigins": ["<string>"],
"exposeHeaders": ["<string>"],
"id": "<string>",
"maxAgeSeconds": 123
}
] },
"defaultStorageClass": "STORAGE_CLASS_UNSPECIFIED",
"forceStorageClass": True,
"lifecycleConfiguration": {
"lastAccessFilter": { "conditions": [
{
"type": "TYPE_UNSPECIFIED",
"methods": ["METHOD_UNSPECIFIED"],
"userAgents": ["<string>"]
}
] },
"rules": [
{
"id": "<string>",
"status": "STATUS_UNSPECIFIED",
"abortIncompleteMultipartUpload": { "daysAfterInitiation": 123 },
"expiration": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"expiredObjectDeleteMarker": True
},
"filter": {
"objectSizeGreaterThanBytes": "<string>",
"objectSizeLessThanBytes": "<string>",
"prefix": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"noncurrentVersionExpiration": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123
},
"noncurrentVersionTransition": {
"newerNoncurrentVersions": 123,
"noncurrentDays": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
},
"transition": {
"date": "2023-11-07T05:31:56Z",
"days": 123,
"daysSinceLastAccess": 123,
"storageClass": "STORAGE_CLASS_UNSPECIFIED"
}
}
]
},
"maxSizeBytes": "<string>",
"objectAuditLogging": "OBJECT_AUDIT_LOGGING_UNSPECIFIED",
"versioningPolicy": "VERSIONING_POLICY_UNSPECIFIED"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
parentId: '<string>',
id: '<string>',
labels: {},
name: '<string>',
resourceVersion: '<string>'
},
spec: {
bucketPolicy: {
rules: [{anonymous: {}, groupId: '<string>', paths: ['<string>'], roles: ['<string>']}]
},
cors: {
rules: [
{
allowedHeaders: ['<string>'],
allowedMethods: ['<string>'],
allowedOrigins: ['<string>'],
exposeHeaders: ['<string>'],
id: '<string>',
maxAgeSeconds: 123
}
]
},
defaultStorageClass: 'STORAGE_CLASS_UNSPECIFIED',
forceStorageClass: true,
lifecycleConfiguration: {
lastAccessFilter: {
conditions: [
{
type: 'TYPE_UNSPECIFIED',
methods: ['METHOD_UNSPECIFIED'],
userAgents: ['<string>']
}
]
},
rules: [
{
id: '<string>',
status: 'STATUS_UNSPECIFIED',
abortIncompleteMultipartUpload: {daysAfterInitiation: 123},
expiration: {date: '2023-11-07T05:31:56Z', days: 123, expiredObjectDeleteMarker: true},
filter: {
objectSizeGreaterThanBytes: '<string>',
objectSizeLessThanBytes: '<string>',
prefix: '<string>',
tags: [{key: '<string>', value: '<string>'}]
},
noncurrentVersionExpiration: {newerNoncurrentVersions: 123, noncurrentDays: 123},
noncurrentVersionTransition: {
newerNoncurrentVersions: 123,
noncurrentDays: 123,
storageClass: 'STORAGE_CLASS_UNSPECIFIED'
},
transition: {
date: '2023-11-07T05:31:56Z',
days: 123,
daysSinceLastAccess: 123,
storageClass: 'STORAGE_CLASS_UNSPECIFIED'
}
}
]
},
maxSizeBytes: '<string>',
objectAuditLogging: 'OBJECT_AUDIT_LOGGING_UNSPECIFIED',
versioningPolicy: 'VERSIONING_POLICY_UNSPECIFIED'
}
})
};
fetch('https://api.nebius.cloud/storage/v1/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nebius.cloud/storage/v1/buckets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'parentId' => '<string>',
'id' => '<string>',
'labels' => [
],
'name' => '<string>',
'resourceVersion' => '<string>'
],
'spec' => [
'bucketPolicy' => [
'rules' => [
[
'anonymous' => [
],
'groupId' => '<string>',
'paths' => [
'<string>'
],
'roles' => [
'<string>'
]
]
]
],
'cors' => [
'rules' => [
[
'allowedHeaders' => [
'<string>'
],
'allowedMethods' => [
'<string>'
],
'allowedOrigins' => [
'<string>'
],
'exposeHeaders' => [
'<string>'
],
'id' => '<string>',
'maxAgeSeconds' => 123
]
]
],
'defaultStorageClass' => 'STORAGE_CLASS_UNSPECIFIED',
'forceStorageClass' => true,
'lifecycleConfiguration' => [
'lastAccessFilter' => [
'conditions' => [
[
'type' => 'TYPE_UNSPECIFIED',
'methods' => [
'METHOD_UNSPECIFIED'
],
'userAgents' => [
'<string>'
]
]
]
],
'rules' => [
[
'id' => '<string>',
'status' => 'STATUS_UNSPECIFIED',
'abortIncompleteMultipartUpload' => [
'daysAfterInitiation' => 123
],
'expiration' => [
'date' => '2023-11-07T05:31:56Z',
'days' => 123,
'expiredObjectDeleteMarker' => true
],
'filter' => [
'objectSizeGreaterThanBytes' => '<string>',
'objectSizeLessThanBytes' => '<string>',
'prefix' => '<string>',
'tags' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
],
'noncurrentVersionExpiration' => [
'newerNoncurrentVersions' => 123,
'noncurrentDays' => 123
],
'noncurrentVersionTransition' => [
'newerNoncurrentVersions' => 123,
'noncurrentDays' => 123,
'storageClass' => 'STORAGE_CLASS_UNSPECIFIED'
],
'transition' => [
'date' => '2023-11-07T05:31:56Z',
'days' => 123,
'daysSinceLastAccess' => 123,
'storageClass' => 'STORAGE_CLASS_UNSPECIFIED'
]
]
]
],
'maxSizeBytes' => '<string>',
'objectAuditLogging' => 'OBJECT_AUDIT_LOGGING_UNSPECIFIED',
'versioningPolicy' => 'VERSIONING_POLICY_UNSPECIFIED'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nebius.cloud/storage/v1/buckets"
payload := strings.NewReader("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nebius.cloud/storage/v1/buckets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nebius.cloud/storage/v1/buckets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"parentId\": \"<string>\",\n \"id\": \"<string>\",\n \"labels\": {},\n \"name\": \"<string>\",\n \"resourceVersion\": \"<string>\"\n },\n \"spec\": {\n \"bucketPolicy\": {\n \"rules\": [\n {\n \"anonymous\": {},\n \"groupId\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"cors\": {\n \"rules\": [\n {\n \"allowedHeaders\": [\n \"<string>\"\n ],\n \"allowedMethods\": [\n \"<string>\"\n ],\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"exposeHeaders\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"maxAgeSeconds\": 123\n }\n ]\n },\n \"defaultStorageClass\": \"STORAGE_CLASS_UNSPECIFIED\",\n \"forceStorageClass\": true,\n \"lifecycleConfiguration\": {\n \"lastAccessFilter\": {\n \"conditions\": [\n {\n \"type\": \"TYPE_UNSPECIFIED\",\n \"methods\": [\n \"METHOD_UNSPECIFIED\"\n ],\n \"userAgents\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"abortIncompleteMultipartUpload\": {\n \"daysAfterInitiation\": 123\n },\n \"expiration\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"expiredObjectDeleteMarker\": true\n },\n \"filter\": {\n \"objectSizeGreaterThanBytes\": \"<string>\",\n \"objectSizeLessThanBytes\": \"<string>\",\n \"prefix\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"noncurrentVersionExpiration\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123\n },\n \"noncurrentVersionTransition\": {\n \"newerNoncurrentVersions\": 123,\n \"noncurrentDays\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n },\n \"transition\": {\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123,\n \"daysSinceLastAccess\": 123,\n \"storageClass\": \"STORAGE_CLASS_UNSPECIFIED\"\n }\n }\n ]\n },\n \"maxSizeBytes\": \"<string>\",\n \"objectAuditLogging\": \"OBJECT_AUDIT_LOGGING_UNSPECIFIED\",\n \"versioningPolicy\": \"VERSIONING_POLICY_UNSPECIFIED\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"progressData": {
"@type": "<string>"
},
"progressTracker": {
"description": "<string>",
"estimatedFinishedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"steps": [
{
"description": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
}
],
"workDone": {
"doneTickCount": "<string>",
"totalTickCount": "<string>"
}
},
"request": {
"@type": "<string>"
},
"requestHeaders": {},
"resourceId": "<string>",
"status": {
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}
}Authorizations
The Authorization header expects a Bearer token.
Body
Response
A successful response.
Creation timestamp.
ID of the user or service account who initiated the operation.
Human-readable description of the operation. 0-256 characters long.
The time when the operation has finished.
ID of the operation.
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message
Show child attributes
Show child attributes
Information for tracking the progress of a task (e.g., an API operation or background maintenance action). This serves as a UI contract and may be directly reflected in CLI, Console, and other tools.
Show child attributes
Show child attributes
Any contains an arbitrary serialized protocol buffer message along with a
URL that describes the type of the serialized message
Show child attributes
Show child attributes
Show child attributes
Show child attributes
ID of the resource that this operation creates, updates, deletes or otherwise changes.
If the operation affects multiple resources or does not affect any API resources at all (e.g. a routine maintenance operation visible to the user), the [resource_id] must be empty.
The Status type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used by gRPC. Each Status message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
Show child attributes
Show child attributes
Was this page helpful?