-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.http
More file actions
61 lines (52 loc) · 1.22 KB
/
Copy pathrequests.http
File metadata and controls
61 lines (52 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
### Authentication Endpoints
#### Register Developer Account
POST http://localhost:8080/api/v1/auth/register
Content-Type: application/json
{
"username": "developer1",
"email": "dev1@featuremesh.com",
"password": "securepassword123",
"role": "DEVELOPER"
}
### Login
POST http://localhost:8080/api/v1/auth/login
Content-Type: application/json
{
"username": "developer1",
"password": "securepassword123"
}
### Flag Administration Endpoints (requires JWT Authorization header)
#### Create Flag
POST http://localhost:8080/api/v1/flags
Authorization: Bearer <JWT_ACCESS_TOKEN>
Content-Type: application/json
{
"key": "new-checkout",
"name": "New Checkout System",
"description": "Enables the react-based stripe payment checkout gateway.",
"type": "BOOLEAN",
"enabled": true,
"environmentSlug": "development",
"targetingRules": [
{
"attribute": "country",
"operator": "EQUALS",
"value": "IN",
"priority": 1
}
],
"rolloutRule": {
"percentage": 50
}
}
#### Evaluate Flag
POST http://localhost:8080/api/v1/evaluate
Content-Type: application/json
{
"flagKey": "new-checkout",
"environmentSlug": "development",
"userId": "user-abc-456",
"context": {
"country": "IN"
}
}