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] | ||||
|  | ||||
| Mount a logical backend to a new path. | ||||
| @@ -321,14 +322,12 @@ read/write mechanism once it is mounted. | ||||
| + Request (application/json) | ||||
|  | ||||
|         { | ||||
|             "path": "aws-eu", | ||||
|             "type": "aws", | ||||
|             "description": "EU AWS tokens" | ||||
|         } | ||||
|  | ||||
| + Response 204 | ||||
|  | ||||
| ## Single Mount [/sys/mounts/{path}] | ||||
| ### Unmount [DELETE] | ||||
|  | ||||
| Unmount a mount point. | ||||
|   | ||||
| @@ -23,12 +23,11 @@ func (c *Sys) Mount(path, mountType, description string) error { | ||||
| 	} | ||||
|  | ||||
| 	body := map[string]string{ | ||||
| 		"path":        path, | ||||
| 		"type":        mountType, | ||||
| 		"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 { | ||||
| 		return err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Mitchell Hashimoto
					Mitchell Hashimoto