All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateGroup | Post /groups | Create a new group |
DeleteGroupById | Delete /groups/{groupId} | Delete a group by the specified ID. |
GetGroupById | Get /groups/{groupId} | Get a group by the specified ID. |
ListGroups | Get /groups | List groups |
GroupMetaData CreateGroup(ctx).CreateGroupMetaData(createGroupMetaData).Execute()
Create a new group
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Apicurio/apicurio-registry-client-sdk-go"
)
func main() {
createGroupMetaData := *openapiclient.NewCreateGroupMetaData("Id_example") // CreateGroupMetaData |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.CreateGroup(context.Background()).CreateGroupMetaData(createGroupMetaData).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.CreateGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateGroup`: GroupMetaData
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.CreateGroup`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createGroupMetaData | CreateGroupMetaData |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteGroupById(ctx, groupId).Execute()
Delete a group by the specified ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Apicurio/apicurio-registry-client-sdk-go"
)
func main() {
groupId := "groupId_example" // string | The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GroupsAPI.DeleteGroupById(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.DeleteGroupById``: %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 | The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. |
Other parameters are passed through a pointer to a apiDeleteGroupByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupMetaData GetGroupById(ctx, groupId).Execute()
Get a group by the specified ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Apicurio/apicurio-registry-client-sdk-go"
)
func main() {
groupId := "groupId_example" // string | The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.GetGroupById(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetGroupById`: GroupMetaData
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | The artifact group ID. Must be a string provided by the client, representing the name of the grouping of artifacts. |
Other parameters are passed through a pointer to a apiGetGroupByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupSearchResults ListGroups(ctx).Limit(limit).Offset(offset).Order(order).Orderby(orderby).Execute()
List groups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Apicurio/apicurio-registry-client-sdk-go"
)
func main() {
limit := int32(56) // int32 | The number of groups to return. Defaults to 20. (optional)
offset := int32(56) // int32 | The number of groups to skip before starting the result set. Defaults to 0. (optional)
order := openapiclient.SortOrder("asc") // SortOrder | Sort order, ascending (`asc`) or descending (`desc`). (optional)
orderby := openapiclient.SortBy("name") // SortBy | The field to sort by. Can be one of: * `name` * `createdOn` (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsAPI.ListGroups(context.Background()).Limit(limit).Offset(offset).Order(order).Orderby(orderby).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.ListGroups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListGroups`: GroupSearchResults
fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.ListGroups`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | The number of groups to return. Defaults to 20. | |
offset | int32 | The number of groups to skip before starting the result set. Defaults to 0. | |
order | SortOrder | Sort order, ascending (`asc`) or descending (`desc`). | |
orderby | SortBy | The field to sort by. Can be one of: * `name` * `createdOn` |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]