mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
api: update mount API
This commit is contained in:
@@ -311,6 +311,7 @@ Lists all the active mount points.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Single Mount [/sys/mounts/{path}]
|
||||||
### New Mount [POST]
|
### New Mount [POST]
|
||||||
|
|
||||||
Mount a logical backend to a new path.
|
Mount a logical backend to a new path.
|
||||||
@@ -321,14 +322,12 @@ read/write mechanism once it is mounted.
|
|||||||
+ Request (application/json)
|
+ Request (application/json)
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "aws-eu",
|
|
||||||
"type": "aws",
|
"type": "aws",
|
||||||
"description": "EU AWS tokens"
|
"description": "EU AWS tokens"
|
||||||
}
|
}
|
||||||
|
|
||||||
+ Response 204
|
+ Response 204
|
||||||
|
|
||||||
## Single Mount [/sys/mounts/{path}]
|
|
||||||
### Unmount [DELETE]
|
### Unmount [DELETE]
|
||||||
|
|
||||||
Unmount a mount point.
|
Unmount a mount point.
|
||||||
|
|||||||
@@ -23,12 +23,11 @@ func (c *Sys) Mount(path, mountType, description string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body := map[string]string{
|
body := map[string]string{
|
||||||
"path": path,
|
|
||||||
"type": mountType,
|
"type": mountType,
|
||||||
"description": description,
|
"description": description,
|
||||||
}
|
}
|
||||||
|
|
||||||
r := c.c.NewRequest("POST", "/sys/mounts")
|
r := c.c.NewRequest("POST", fmt.Sprintf("/sys/mounts/%s", path))
|
||||||
if err := r.SetJSONBody(body); err != nil {
|
if err := r.SetJSONBody(body); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user