(Group)
- CreateHrisGroup - Create a group
- GetHrisGroup - Retrieve a group
- ListHrisGroups - List all groups
- PatchHrisGroup - Update a group
- RemoveHrisGroup - Remove a group
- UpdateHrisGroup - Update a group
Create a group
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.CreateHrisGroupRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Group.CreateHrisGroup(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.HrisGroup != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateHrisGroupRequest | ✔️ | The request object to use for the request. |
*operations.CreateHrisGroupResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Retrieve a group
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.GetHrisGroupRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Group.GetHrisGroup(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.HrisGroup != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetHrisGroupRequest | ✔️ | The request object to use for the request. |
*operations.GetHrisGroupResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List all groups
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.ListHrisGroupsRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Group.ListHrisGroups(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.HrisGroups != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListHrisGroupsRequest | ✔️ | The request object to use for the request. |
*operations.ListHrisGroupsResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a group
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.PatchHrisGroupRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Group.PatchHrisGroup(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.HrisGroup != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.PatchHrisGroupRequest | ✔️ | The request object to use for the request. |
*operations.PatchHrisGroupResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Remove a group
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.RemoveHrisGroupRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Group.RemoveHrisGroup(ctx, request)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RemoveHrisGroupRequest | ✔️ | The request object to use for the request. |
*operations.RemoveHrisGroupResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a group
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
request := operations.UpdateHrisGroupRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Group.UpdateHrisGroup(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.HrisGroup != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateHrisGroupRequest | ✔️ | The request object to use for the request. |
*operations.UpdateHrisGroupResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |