All URIs are relative to https://localhost:9200/graph
| Method | HTTP request | Description |
|---|---|---|
| CreateDrive | Post /v1.0/drives | Create a new drive of a specific type |
| DeleteDrive | Delete /v1.0/drives/{drive-id} | Delete a specific space |
| GetDrive | Get /v1.0/drives/{drive-id} | Get drive by id |
| UpdateDrive | Patch /v1.0/drives/{drive-id} | Update the drive |
Drive CreateDrive(ctx).Drive(drive).Execute()
Create a new drive of a specific type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
drive := *openapiclient.NewDrive("Name_example") // Drive | New space property values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DrivesApi.CreateDrive(context.Background()).Drive(drive).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DrivesApi.CreateDrive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDrive`: Drive
fmt.Fprintf(os.Stdout, "Response from `DrivesApi.CreateDrive`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateDriveRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| drive | Drive | New space property values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDrive(ctx, driveId).IfMatch(ifMatch).Execute()
Delete a specific space
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
driveId := "driveId_example" // string | key: id of drive
ifMatch := "ifMatch_example" // string | ETag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DrivesApi.DeleteDrive(context.Background(), driveId).IfMatch(ifMatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DrivesApi.DeleteDrive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| driveId | string | key: id of drive |
Other parameters are passed through a pointer to a apiDeleteDriveRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ifMatch | string | ETag |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Drive GetDrive(ctx, driveId).Select_(select_).Execute()
Get drive by id
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
driveId := "driveId_example" // string | key: id of drive
select_ := []string{"Select_example"} // []string | Select properties to be returned. By default all properties are returned. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DrivesApi.GetDrive(context.Background(), driveId).Select_(select_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DrivesApi.GetDrive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDrive`: Drive
fmt.Fprintf(os.Stdout, "Response from `DrivesApi.GetDrive`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| driveId | string | key: id of drive |
Other parameters are passed through a pointer to a apiGetDriveRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
select_ | []string | Select properties to be returned. By default all properties are returned. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Drive UpdateDrive(ctx, driveId).DriveUpdate(driveUpdate).Execute()
Update the drive
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opencloud-eu/libre-graph-api-go"
)
func main() {
driveId := "driveId_example" // string | key: id of drive
driveUpdate := *openapiclient.NewDriveUpdate() // DriveUpdate | New space values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DrivesApi.UpdateDrive(context.Background(), driveId).DriveUpdate(driveUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DrivesApi.UpdateDrive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDrive`: Drive
fmt.Fprintf(os.Stdout, "Response from `DrivesApi.UpdateDrive`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| driveId | string | key: id of drive |
Other parameters are passed through a pointer to a apiUpdateDriveRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
driveUpdate | DriveUpdate | New space values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]