Skip to content

Commit

Permalink
admin: added definition for topic mount/unmount APIs
Browse files Browse the repository at this point in the history
Added definitions for topic mount/unmount REST APIs. The definitions are
placed in `migrations.json` file which is counter intuitive but it
allows reusing the data migration related definitions.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Sep 3, 2024
1 parent d983e51 commit 497f45c
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/v/redpanda/admin/api-doc/migration.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,27 @@
"type": "inbound_migration"
}
}
},
"mount_configuration": {
"type": "object",
"required": [
"topics"
],
"properties": {
"topics": {
"type": "array",
"items": {
"type": "inbound_topic"
},
"description": "List of topics to mount"
}
}
},
"migration_info": {
"type": "object",
"properties": {
"id": {
"type": "int"
}
}
}
47 changes: 47 additions & 0 deletions src/v/redpanda/admin/api-doc/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,51 @@
}
]
}
},
"/v1/topics/mount": {
"post": {
"operationId": "mount_topics",
"summary": "Mount topic according to provided configuration",
"requestBody": {
"description": "Mount topic configuration",
"required": true,
"content": {
"application/json": {
"schema": "mount_configuration"
}
}
},
"responses": {
"200": {
"description": "Underlying migration information",
"schema": "migration_info"
}
}
}
},
"/v1/topics/unmount": {
"post": {
"operationId": "unmount_topics",
"summary": "Unmount the topics provided in the list",
"requestBody": {
"description": "List of topics to unmount",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "namespaced_topic"
}
}
}
}
},
"responses": {
"200": {
"description": "Underlying migration information",
"schema": "migration_info"
}
}
}
}

0 comments on commit 497f45c

Please sign in to comment.