{"openapi":"3.0.0","info":{"title":"AB Tests API","description":"UPro AB Tests API","contact":{"name":"Ilya Zakruta","email":"ilya.zakruta@fabros-team.com"},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/zakrutateam/ab-tests-asdasdasd/1.0.0"},{"url":"https://ab.happycolor.app/v1","description":"Production server (uses live data)"},{"url":"https://ab.happycolor.dev/v1","description":"Develop server (uses test data)"},{"url":"localhost:3000/v1","description":"Local server (uses dev data)"}],"security":[{"bearerToken":[]}],"tags":[{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/user/test/{userId}":{"get":{"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The user ID"}],"tags":["developers"],"summary":"get user's test","description":"Return ab test\n","operationId":"getUserTest","responses":{"200":{"description":"return result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTest"}}}},"401":{"description":"Access token is missing or invalid"},"500":{"description":"Unknown server error"}},"security":[{"bearerToken":[]}]}}},"components":{"schemas":{"UserTest":{"required":["affiliation","group","name"],"properties":{"name":{"type":"string","example":"test-AD-100"},"affiliation":{"type":"string","example":"ad || content || cmp || upro"},"group":{"type":"string","example":"test-group-0"},"startedAt":{"type":"string","format":"date-time"}}},"Test":{"required":["affiliation","createdAt","description","groups","name","startedAt","status","priority","percent","counter"],"properties":{"name":{"type":"string","example":"test-AD-100"},"description":{"type":"string","example":"You can read the description of the test at the link."},"link":{"type":"string","example":"https://example.com/ab/test-AD-100"},"affiliation":{"type":"string","example":"ad || content || cmp || upro"},"status":{"type":"string","example":"new || distributed || running || completed || archived"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"priority":{"type":"integer","example":1},"percent":{"type":"integer","example":100},"counter":{"type":"integer","example":101}}},"Group":{"required":["name","percent","counter"],"properties":{"name":{"type":"string","example":"Test group"},"percent":{"type":"number","example":33.3333},"counter":{"type":"integer","example":101}}},"Condition":{"required":["conditionType"],"properties":{"conditionType":{"type":"string","example":"include || exclude"},"countries":{"type":"array","items":{"type":"string","example":"by"}},"deviceTypes":{"type":"array","items":{"type":"string","example":"phone"}},"deviceManufactures":{"type":"array","items":{"type":"string","example":"apple"}},"deviceModels":{"type":"array","items":{"type":"string","example":"iphone 13 pro"}},"languages":{"type":"array","items":{"type":"string","example":"russian"}},"osTypes":{"type":"array","items":{"type":"string","example":"android"}},"osVersions":{"$ref":"#/components/schemas/TargetOs"},"appVersions":{"$ref":"#/components/schemas/TargetApp"},"installDates":{"$ref":"#/components/schemas/TargetDate"},"users":{"$ref":"#/components/schemas/TargetUser"},"law":{"type":"array","items":{"type":"string","example":"gdpr || ccpa"}},"lat":{"type":"boolean","example":true}}},"TargetOs":{"type":"object","properties":{"min":{"type":"string","example":"14.1"},"max":{"type":"string","example":"15.0"},"list":{"type":"array","items":{"type":"string","example":"12.5"}}}},"TargetApp":{"type":"object","properties":{"min":{"type":"string","example":"1.0.1"},"max":{"type":"string","example":"10.1.9"},"list":{"type":"array","items":{"type":"string","example":"10.1.9"}}}},"TargetDate":{"type":"object","properties":{"min":{"type":"string","format":"date-time"},"max":{"type":"string","format":"date-time"},"list":{"type":"array","format":"date-time","example":"2016-08-29T09:12:33Z+03:00","items":{"type":"string"}},"special":{"type":"array","items":{"type":"string"}}}},"TargetUser":{"type":"object","properties":{"types":{"type":"array","example":"new || old","items":{"type":"string"}},"list":{"type":"array","items":{"type":"string"}},"special":{"type":"array","items":{"type":"string"}}}}},"responses":{"UnauthorizedError":{"description":"Access token is missing or invalid"},"ServerError":{"description":"Unknown server error"}},"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer"}}}}