Skip to content

Latest commit

 

History

History
148 lines (89 loc) · 4.5 KB

SegmentApi.md

File metadata and controls

148 lines (89 loc) · 4.5 KB

\SegmentApi

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

Method HTTP request Description
CreateSegment Post /flags/{flagID}/segments
DeleteSegment Delete /flags/{flagID}/segments/{segmentID}
FindSegments Get /flags/{flagID}/segments
PutSegment Put /flags/{flagID}/segments/{segmentID}
PutSegmentsReorder Put /flags/{flagID}/segments/reorder

CreateSegment

Segment CreateSegment(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 CreateSegmentRequest create a segment under a flag

Return type

Segment

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]

DeleteSegment

DeleteSegment(ctx, flagID, segmentID)

Required Parameters

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

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]

FindSegments

[]Segment FindSegments(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

[]Segment

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]

PutSegment

Segment PutSegment(ctx, flagID, segmentID, 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
segmentID int64 numeric ID of the segment
body PutSegmentRequest update a segment

Return type

Segment

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]

PutSegmentsReorder

PutSegmentsReorder(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 PutSegmentReorderRequest reorder segments

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]