create or update storage instance.md

Create or Update Storage instance

Media API · Storage

PUT https://app.mk.io/api/v1/projects/{project_name}/media/storage/{storage_name}

Create or update a Storage instance. Only the description, credentials and privateLinkServiceConnection details are updatable.

RBAC Capability Required: infra.storage.create or infra.storage.update

Authentication

Path parameters

Name Type Required Description
project_name string Yes
storage_name string Yes

Request body

Content type: application/json

Example request

curl -X PUT "https://app.mk.io/api/v1/projects/{project_name}/media/storage/{storage_name}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "spec": {
    "bucketName": "my-aws-bucket",
    "credential": {
      "accessKeyId": "AKIAEXAMPLE123456789",
      "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
    },
    "description": "Input media files for processing.",
    "type": "AWS.S3"
  }
}'

Responses

200 — Storage instance successfully updated

201 — Storage instance successfully created

401 — Unauthorized

403 — Forbidden

404 — Not Found

429 — Too Many Requests

500 — Internal Server Error


Source spec: media-api · operationId: [put]_/api/v1/projects/{project_name}/media/storage/{storage_name}