All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
DeleteUser | Delete /v1.0/users/{user-id} | Delete entity from users |
ExportPersonalData | Post /v1.0/users/{user-id}/exportPersonalData | export personal data of a user |
GetUser | Get /v1.0/users/{user-id} | Get entity from users by key |
UpdateUser | Patch /v1.0/users/{user-id} | Update entity in users |
DeleteUser(ctx, userId).IfMatch(ifMatch).Execute()
Delete entity from users
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id or name of user
ifMatch := "ifMatch_example" // string | ETag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.DeleteUser(context.Background(), userId).IfMatch(ifMatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %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. | |
userId | string | key: id or name of user |
Other parameters are passed through a pointer to a apiDeleteUserRequest 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]
ExportPersonalData(ctx, userId).ExportPersonalDataRequest(exportPersonalDataRequest).Execute()
export personal data of a user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id or name of user
exportPersonalDataRequest := *openapiclient.NewExportPersonalDataRequest() // ExportPersonalDataRequest | destination the file should be created at (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.ExportPersonalData(context.Background(), userId).ExportPersonalDataRequest(exportPersonalDataRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.ExportPersonalData``: %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. | |
userId | string | key: id or name of user |
Other parameters are passed through a pointer to a apiExportPersonalDataRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
exportPersonalDataRequest | ExportPersonalDataRequest | destination the file should be created at |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User GetUser(ctx, userId).Select_(select_).Expand(expand).Execute()
Get entity from users by key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id or name of user
select_ := []string{"Select_example"} // []string | Select properties to be returned (optional)
expand := []string{"Expand_example"} // []string | Expand related entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.GetUser(context.Background(), userId).Select_(select_).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetUser`: User
fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUser`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | key: id or name of user |
Other parameters are passed through a pointer to a apiGetUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
select_ | []string | Select properties to be returned | expand | []string | Expand related entities |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User UpdateUser(ctx, userId).UserUpdate(userUpdate).Execute()
Update entity in users
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "userId_example" // string | key: id of user
userUpdate := *openapiclient.NewUserUpdate() // UserUpdate | New property values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.UpdateUser(context.Background(), userId).UserUpdate(userUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateUser`: User
fmt.Fprintf(os.Stdout, "Response from `UserApi.UpdateUser`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | key: id of user |
Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
userUpdate | UserUpdate | New property values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]