Skip to content

Latest commit

 

History

History
808 lines (511 loc) · 19.9 KB

TagsApi.md

File metadata and controls

808 lines (511 loc) · 19.9 KB

\TagsApi

All URIs are relative to http://localhost

Method HTTP request Description
AddTagToFeatures Put /api/admin/projects/{projectId}/tags
CreateTag Post /api/admin/tags
CreateTagType Post /api/admin/tag-types
DeleteTag Delete /api/admin/tags/{type}/{value}
DeleteTagType Delete /api/admin/tag-types/{name}
GetTag Get /api/admin/tags/{type}/{value}
GetTagType Get /api/admin/tag-types/{name}
GetTagTypes Get /api/admin/tag-types
GetTags Get /api/admin/tags
GetTagsByType Get /api/admin/tags/{type}
UpdateTagType Put /api/admin/tag-types/{name}
ValidateTagType Post /api/admin/tag-types/validate

AddTagToFeatures

AddTagToFeatures(ctx, projectId).TagsBulkAddSchema(tagsBulkAddSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    tagsBulkAddSchema := *openapiclient.NewTagsBulkAddSchema([]string{"Features_example"}, *openapiclient.NewUpdateTagsSchema([]openapiclient.TagSchema{*openapiclient.NewTagSchema("a-tag-value", "simple")}, []openapiclient.TagSchema{*openapiclient.NewTagSchema("a-tag-value", "simple")})) // TagsBulkAddSchema | tagsBulkAddSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TagsApi.AddTagToFeatures(context.Background(), projectId).TagsBulkAddSchema(tagsBulkAddSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TagsApi.AddTagToFeatures``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string

Other Parameters

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

Name Type Description Notes

tagsBulkAddSchema | TagsBulkAddSchema | tagsBulkAddSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

CreateTag

TagWithVersionSchema CreateTag(ctx).TagSchema(tagSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    tagSchema := *openapiclient.NewTagSchema("a-tag-value", "simple") // TagSchema | tagSchema

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tagSchema TagSchema tagSchema

Return type

TagWithVersionSchema

Authorization

apiKey

HTTP request headers

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

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

CreateTagType

TagTypeSchema CreateTagType(ctx).TagTypeSchema(tagTypeSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    tagTypeSchema := *openapiclient.NewTagTypeSchema("Name_example") // TagTypeSchema | tagTypeSchema

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tagTypeSchema TagTypeSchema tagTypeSchema

Return type

TagTypeSchema

Authorization

apiKey

HTTP request headers

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

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

DeleteTag

DeleteTag(ctx, type_, value).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    type_ := "type__example" // string | 
    value := "value_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TagsApi.DeleteTag(context.Background(), type_, value).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TagsApi.DeleteTag``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
type_ string
value string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteTagType

DeleteTagType(ctx, name).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    name := "name_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TagsApi.DeleteTagType(context.Background(), name).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TagsApi.DeleteTagType``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetTag

TagWithVersionSchema GetTag(ctx, type_, value).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    type_ := "type__example" // string | 
    value := "value_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
type_ string
value string

Other Parameters

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

Name Type Description Notes

Return type

TagWithVersionSchema

Authorization

apiKey

HTTP request headers

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

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

GetTagType

TagTypeSchema GetTagType(ctx, name).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    name := "name_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string

Other Parameters

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

Name Type Description Notes

Return type

TagTypeSchema

Authorization

apiKey

HTTP request headers

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

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

GetTagTypes

TagTypesSchema GetTagTypes(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

TagTypesSchema

Authorization

apiKey

HTTP request headers

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

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

GetTags

TagsSchema GetTags(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

TagsSchema

Authorization

apiKey

HTTP request headers

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

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

GetTagsByType

TagsSchema GetTagsByType(ctx, type_).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    type_ := "type__example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
type_ string

Other Parameters

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

Name Type Description Notes

Return type

TagsSchema

Authorization

apiKey

HTTP request headers

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

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

UpdateTagType

UpdateTagType(ctx, name).UpdateTagTypeSchema(updateTagTypeSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    name := "name_example" // string | 
    updateTagTypeSchema := *openapiclient.NewUpdateTagTypeSchema() // UpdateTagTypeSchema | updateTagTypeSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TagsApi.UpdateTagType(context.Background(), name).UpdateTagTypeSchema(updateTagTypeSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TagsApi.UpdateTagType``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string

Other Parameters

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

Name Type Description Notes

updateTagTypeSchema | UpdateTagTypeSchema | updateTagTypeSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

ValidateTagType

ValidateTagTypeSchema ValidateTagType(ctx).TagTypeSchema(tagTypeSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    tagTypeSchema := *openapiclient.NewTagTypeSchema("Name_example") // TagTypeSchema | tagTypeSchema

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tagTypeSchema TagTypeSchema tagTypeSchema

Return type

ValidateTagTypeSchema

Authorization

apiKey

HTTP request headers

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

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