All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
AddMember | Post /v1.0/groups/{group-id}/members/$ref | Add a member to a group |
DeleteGroup | Delete /v1.0/groups/{group-id} | Delete entity from groups |
DeleteMember | Delete /v1.0/groups/{group-id}/members/{directory-object-id}/$ref | Delete member from a group |
GetGroup | Get /v1.0/groups/{group-id} | Get entity from groups by key |
ListMembers | Get /v1.0/groups/{group-id}/members | Get a list of the group's direct members |
UpdateGroup | Patch /v1.0/groups/{group-id} | Update entity in groups |
AddMember(ctx, groupId).MemberReference(memberReference).Execute()
Add a member to a group
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "groupId_example" // string | key: id of group
memberReference := *openapiclient.NewMemberReference() // MemberReference | Object to be added as member
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupApi.AddMember(context.Background(), groupId).MemberReference(memberReference).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.AddMember``: %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. | |
groupId | string | key: id of group |
Other parameters are passed through a pointer to a apiAddMemberRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
memberReference | MemberReference | Object to be added as member |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteGroup(ctx, groupId).IfMatch(ifMatch).Execute()
Delete entity from groups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "groupId_example" // string | key: id of group
ifMatch := "ifMatch_example" // string | ETag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupApi.DeleteGroup(context.Background(), groupId).IfMatch(ifMatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.DeleteGroup``: %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. | |
groupId | string | key: id of group |
Other parameters are passed through a pointer to a apiDeleteGroupRequest 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]
DeleteMember(ctx, groupId, directoryObjectId).IfMatch(ifMatch).Execute()
Delete member from a group
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "groupId_example" // string | key: id of group
directoryObjectId := "directoryObjectId_example" // string | key: id of group member to remove
ifMatch := "ifMatch_example" // string | ETag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupApi.DeleteMember(context.Background(), groupId, directoryObjectId).IfMatch(ifMatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.DeleteMember``: %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. | |
groupId | string | key: id of group | |
directoryObjectId | string | key: id of group member to remove |
Other parameters are passed through a pointer to a apiDeleteMemberRequest 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]
Group GetGroup(ctx, groupId).Select_(select_).Expand(expand).Execute()
Get entity from groups by key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "groupId_example" // string | key: id or name of group
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.GroupApi.GetGroup(context.Background(), groupId).Select_(select_).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.GetGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetGroup`: Group
fmt.Fprintf(os.Stdout, "Response from `GroupApi.GetGroup`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | key: id or name of group |
Other parameters are passed through a pointer to a apiGetGroupRequest 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]
CollectionOfUsers ListMembers(ctx, groupId).Execute()
Get a list of the group's direct members
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or name of group
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupApi.ListMembers(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.ListMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListMembers`: CollectionOfUsers
fmt.Fprintf(os.Stdout, "Response from `GroupApi.ListMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | key: id or name of group |
Other parameters are passed through a pointer to a apiListMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateGroup(ctx, groupId).Group(group).Execute()
Update entity in groups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
groupId := "groupId_example" // string | key: id of group
group := *openapiclient.NewGroup() // Group | New property values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupApi.UpdateGroup(context.Background(), groupId).Group(group).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.UpdateGroup``: %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. | |
groupId | string | key: id of group |
Other parameters are passed through a pointer to a apiUpdateGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
group | Group | New property values |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]