Skip to content

Latest commit

 

History

History
120 lines (72 loc) · 3.58 KB

VariantApi.md

File metadata and controls

120 lines (72 loc) · 3.58 KB

\VariantApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
CreateVariant Post /flags/{flagID}/variants
DeleteVariant Delete /flags/{flagID}/variants/{variantID}
FindVariants Get /flags/{flagID}/variants
PutVariant Put /flags/{flagID}/variants/{variantID}

CreateVariant

Variant CreateVariant(ctx, flagID, body)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
flagID int64 numeric ID of the flag
body CreateVariantRequest create a variant

Return type

Variant

Authorization

No authorization required

HTTP request headers

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

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

DeleteVariant

DeleteVariant(ctx, flagID, variantID)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
flagID int64 numeric ID of the flag
variantID int64 numeric ID of the variant

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

FindVariants

[]Variant FindVariants(ctx, flagID)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
flagID int64 numeric ID of the flag

Return type

[]Variant

Authorization

No authorization required

HTTP request headers

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

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

PutVariant

Variant PutVariant(ctx, flagID, variantID, body)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
flagID int64 numeric ID of the flag
variantID int64 numeric ID of the variant
body PutVariantRequest update a variant

Return type

Variant

Authorization

No authorization required

HTTP request headers

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

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