Skip to content

Latest commit

 

History

History
124 lines (76 loc) · 4.08 KB

ConstraintApi.md

File metadata and controls

124 lines (76 loc) · 4.08 KB

\ConstraintApi

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

Method HTTP request Description
CreateConstraint Post /flags/{flagID}/segments/{segmentID}/constraints
DeleteConstraint Delete /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}
FindConstraints Get /flags/{flagID}/segments/{segmentID}/constraints
PutConstraint Put /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}

CreateConstraint

Constraint CreateConstraint(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 CreateConstraintRequest create a constraint

Return type

Constraint

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]

DeleteConstraint

DeleteConstraint(ctx, flagID, segmentID, constraintID)

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
constraintID int64 numeric ID of the constraint

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]

FindConstraints

[]Constraint FindConstraints(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

[]Constraint

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]

PutConstraint

Constraint PutConstraint(ctx, flagID, segmentID, constraintID, 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
constraintID int64 numeric ID of the constraint
body CreateConstraintRequest create a constraint

Return type

Constraint

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]