Skip to content

Latest commit

 

History

History
235 lines (142 loc) · 7.02 KB

FlagApi.md

File metadata and controls

235 lines (142 loc) · 7.02 KB

\FlagApi

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

Method HTTP request Description
CreateFlag Post /flags
DeleteFlag Delete /flags/{flagID}
FindFlags Get /flags
GetFlag Get /flags/{flagID}
GetFlagEntityTypes Get /flags/entity_types
GetFlagSnapshots Get /flags/{flagID}/snapshots
PutFlag Put /flags/{flagID}
SetFlagEnabled Put /flags/{flagID}/enabled

CreateFlag

Flag CreateFlag(ctx, body)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateFlagRequest create a flag

Return type

Flag

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]

DeleteFlag

DeleteFlag(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

(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]

FindFlags

[]Flag FindFlags(ctx, optional)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *FindFlagsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a FindFlagsOpts struct

Name Type Description Notes
limit optional.Int64 the numbers of flags to return
enabled optional.Bool return flags having given enabled status
description optional.String return flags exactly matching given description
descriptionLike optional.String return flags partially matching given description
key optional.String return flags matching given key
offset optional.Int64 return flags given the offset, it should usually set together with limit
preload optional.Bool return flags with preloaded segments and variants

Return type

[]Flag

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]

GetFlag

Flag GetFlag(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 to get

Return type

Flag

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]

GetFlagEntityTypes

[]string GetFlagEntityTypes(ctx, )

Required Parameters

This endpoint does not need any parameter.

Return type

[]string

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]

GetFlagSnapshots

[]FlagSnapshot GetFlagSnapshots(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 to get

Return type

[]FlagSnapshot

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]

PutFlag

Flag PutFlag(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 to get
body PutFlagRequest update a flag

Return type

Flag

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]

SetFlagEnabled

Flag SetFlagEnabled(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 to get
body SetFlagEnabledRequest set flag enabled state

Return type

Flag

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]