Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add batch evaluation #48

Merged
merged 1 commit into from Oct 20, 2017
Merged

Add batch evaluation #48

merged 1 commit into from Oct 20, 2017

Conversation

zhouzhuojie
Copy link
Collaborator

Batch evaluation.

image

curl --request POST \
  --url http://localhost:18000/api/v1/evaluation/batch \
  --header 'content-type: application/json' \
  --data '{\n  "entities": [\n    {\n      "entityID": "123",\n      "entityType": "user",\n      "entityContext": {\n				"state": "CA"\n			}\n    }\n  ],\n  "enableDebug": true,\n  "flagIDs": [\n    4,2\n  ]\n}'

{
	"evaluationResults": [
		{
			"evalContext": {
				"enableDebug": true,
				"entityContext": {
					"state": "CA"
				},
				"entityID": "123",
				"entityType": "user",
				"flagID": 4
			},
			"evalDebugLog": {
				"msg": "flagID 4 has no segments",
				"segmentDebugLogs": null
			},
			"flagID": 4,
			"segmentID": null,
			"timestamp": "2017-10-20T18:57:27Z",
			"variantAttachment": null,
			"variantID": null,
			"variantKey": null
		},
		{
			"evalContext": {
				"enableDebug": true,
				"entityContext": {
					"state": "CA"
				},
				"entityID": "123",
				"entityType": "user",
				"flagID": 2
			},
			"evalDebugLog": {
				"segmentDebugLogs": [
					{
						"msg": "matched all constraints. rollout yes. {BucketNum:94 DistributionArray:{VariantIDs:[3] PercentsAccumulated:[1000]} VariantID:3 RolloutPercent:50}",
						"segmentID": 2
					}
				]
			},
			"flagID": 2,
			"segmentID": 2,
			"timestamp": "2017-10-20T18:57:27Z",
			"variantAttachment": {
				"color": "super-green"
			},
			"variantID": 3,
			"variantKey": "green"
		}
	]
}

@zhouzhuojie zhouzhuojie requested review from jameschan1 and a team October 20, 2017 18:59
@zhouzhuojie zhouzhuojie merged commit 0bfb0d3 into master Oct 20, 2017
@zhouzhuojie zhouzhuojie deleted the zz/multi-evaluation branch October 20, 2017 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants