Skip to content

Latest commit

 

History

History
146 lines (96 loc) · 4.14 KB

UsersApi.md

File metadata and controls

146 lines (96 loc) · 4.14 KB

\UsersApi

All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph

Method HTTP request Description
CreateUser Post /v1.0/users Add new entity to users
ListUsers Get /v1.0/users Get entities from users

CreateUser

User CreateUser(ctx).User(user).Execute()

Add new entity to users

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/owncloud/libre-graph-api-go"
)

func main() {
	user := *openapiclient.NewUser("DisplayName_example", "OnPremisesSamAccountName_example") // User | New entity

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.UsersApi.CreateUser(context.Background()).User(user).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.CreateUser``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateUser`: User
	fmt.Fprintf(os.Stdout, "Response from `UsersApi.CreateUser`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern

Name Type Description Notes
user User New entity

Return type

User

Authorization

openId, basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListUsers

CollectionOfUser ListUsers(ctx).Search(search).Filter(filter).Orderby(orderby).Select_(select_).Expand(expand).Execute()

Get entities from users

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/owncloud/libre-graph-api-go"
)

func main() {
	search := "search_example" // string | Search items by search phrases (optional)
	filter := "memberOf/any(x:x/id eq 910367f9-4041-4db1-961b-d1e98f708eaf)" // string | Filter users by property values and relationship attributes (optional)
	orderby := []string{"Orderby_example"} // []string | Order items by property values (optional)
	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.UsersApi.ListUsers(context.Background()).Search(search).Filter(filter).Orderby(orderby).Select_(select_).Expand(expand).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.ListUsers``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListUsers`: CollectionOfUser
	fmt.Fprintf(os.Stdout, "Response from `UsersApi.ListUsers`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern

Name Type Description Notes
search string Search items by search phrases
filter string Filter users by property values and relationship attributes
orderby []string Order items by property values
select_ []string Select properties to be returned
expand []string Expand related entities

Return type

CollectionOfUser

Authorization

openId, basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]