{"openapi":"3.0.1","info":{"title":"MentorcliQ API","description":" <p>Documentation for the <strong>MentorcliQ API</strong></p>\n <p>The MentorcliQ API is designed to manage user availability, including operations to retrieve, create, update, or deprovision users on the MentorcliQ platform.</p>\n <p>Access to any public APIs requires <strong>authorization</strong>. To authorize, you need to provide a valid token in the \"Authorize\" section and click the \"Authorize\" button. The token's validity will be verified on every request.</p>\n <div>\n <ul>\n     <li>To <i>retrieve</i> a list of users, use the <strong>/api/public/v1/users</strong> endpoint with the <strong>GET</strong> request method.</li>\n     <li>To <i>create</i> a new user, use the <strong>/api/public/v1/users</strong> endpoint with the <strong>POST</strong> request method. <i>User's email should be unique in the platform.</i></li>\n     <li>To <i>update</i> user information, use the <strong>/api/public/v1/users/{email}</strong> endpoint with the <strong>PUT</strong> request method. The answers will only be updated for the specified questions. If any question and its answer are not included in the request body, the old answer will remain unchanged. If an answer for any question is set to <i>null</i> or an empty string, the old value will be removed</li>\n     <li>To <i>deprovision</i> a user, use the <strong>/api/public/v1/users/{email}/{deprovisionType}</strong> endpoint with the <strong>PUT</strong> request method.</li>\n        <ul>\n            <li>When <strong>deprovisionType</strong> is <strong>DEPROVISION</strong>, then the user will be deprovisioned, removed from active matches and unenrolled from active enrollments.</li>\n            <li>When <strong>deprovisionType</strong> is <strong>DEPROVISION_AND_ANONYMIZE</strong>, then the user will be deprovisioned, removed from active matches and unenrolled from active enrollments. User information (email, name, answers to questions, etc.) will be anonymized.</li>\n        </ul>\n </ul>\n <p>In the <i>retrieve</i>, <i>create</i>, <i>update</i> user requests the type of answer value is changed based on answer type. The detailed description of the answers is described in the schema of each request.</p>\n </div>\n <p><strong>Note:</strong> To retrieve the available list of profile questions for <i>creating</i> or <i>updating</i> users, send a request to the <strong>/api/public/v1/profile-questions</strong> endpoint.</p>\n","version":"v1"},"servers":[{"url":"https://api.croda.mentorcliq.com"}],"security":[{"bearerAuth":[]}],"paths":{"/api/public/v1/users/{email}":{"put":{"tags":["User Controller"],"summary":"Update user data","operationId":"update","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateDto"}}},"required":true},"responses":{"2xx":{"description":"Users data is updated successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"4xx":{"description":"Invalid request is provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}}}}},"/api/public/v1/users/{email}/{deprovisionType}":{"put":{"tags":["User Controller"],"summary":"Deprovision user","operationId":"deprovision","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"deprovisionType","in":"path","required":true,"schema":{"type":"string","enum":["DEPROVISION","DEPROVISION_AND_ANONYMIZE"]}}],"responses":{"2xx":{"description":"User is deprovisioned successfully"},"4xx":{"description":"Invalid request is provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}}}}},"/api/public/v1/users":{"get":{"tags":["User Controller"],"summary":"Get users list","operationId":"get","parameters":[{"name":"page","in":"query","description":"Zero based page index (0..N)","required":false,"schema":{"maximum":2147483647,"minimum":0,"type":"integer","description":"Zero based page index (0..N)","format":"int32","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned (1..N)","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer","description":"The size of the page to be returned (1..N)","format":"int32","default":10}},{"name":"search","in":"query","description":"Search term to filter users by first name, last name, or email (case-insensitive substring match)","required":false,"schema":{"type":"string","description":"Search term to filter users by first name, last name, or email (case-insensitive substring match)"}}],"responses":{"2xx":{"description":"Users data is fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPageResponseDto"}}}},"4xx":{"description":"Invalid request is provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}}}},"post":{"tags":["User Controller"],"summary":"Create a new user","operationId":"create","requestBody":{"description":"Create user request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateDto"}}},"required":true},"responses":{"2xx":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}},"4xx":{"description":"Invalid request is provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}}}}},"/api/public/v1/profile-questions":{"get":{"tags":["Profile Questions Controller"],"summary":"Get questions list","operationId":"getQuestions","responses":{"5xx":{"description":"Internal issues are detected. Please try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}},"2xx":{"description":"Questions data is fetched successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileQuestionDto"}}}}},"4xx":{"description":"Invalid request is provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MQApiError"}}}}}}}},"components":{"schemas":{"AnswerDto":{"type":"object","properties":{"questionId":{"type":"integer","format":"int64"},"answer":{"$ref":"#/components/schemas/BaseAnswerDto"}},"example":"\"questionId\": 2, \"answer\": {\"type\": \"TEXT\", \"value\": \"some text answer here\"}"},"BaseAnswerDto":{"type":"object","properties":{"value":{"type":"object","description":"The type of the value will change based on the 'type' property value. <br/> When the 'type' is NAME then the 'value' should be an instance of the NameDto. <br/>When the 'type' is TEXT then the 'value' should be an instance of String. <br/> When the 'type' is DATE then the 'value' should be a date value with format yyyy-mm-dd. <br/> When the 'type' is DROP_DOWN_SELECT then the 'value' should be one of the question's select options. <br/> When the 'type' is MULTI_SELECT then the 'value' should be a list of the question's select options.","oneOf":[{"$ref":"#/components/schemas/NameDto"},{"type":"string"},{"type":"array","items":{"type":"string"}}]},"type":{"type":"string"}}},"NameDto":{"required":["first","last"],"type":"object","properties":{"first":{"type":"string"},"last":{"type":"string"}}},"UserUpdateDto":{"required":["email"],"type":"object","properties":{"password":{"type":"string","example":"password"},"email":{"type":"string","example":"e-mail@address.com"},"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","enum":["PLATFORM_ADMIN","PROGRAM_ADMIN","PROGRAM_MANAGER","IT_ADMIN"]},"enum":["PLATFORM_ADMIN","PROGRAM_ADMIN","PROGRAM_MANAGER","IT_ADMIN"]},"active":{"type":"boolean"},"answers":{"type":"array","example":[{"questionId":1,"answer":{"type":"NAME","value":{"first":"firstName","last":"lastName"}}},{"questionId":2,"answer":{"type":"TEXT","value":"some text answer here"}},{"questionId":3,"answer":{"type":"DATE","value":"1970-01-15"}},{"questionId":4,"answer":{"type":"DROP_DOWN_SELECT","value":"first option"}},{"questionId":5,"answer":{"type":"MULTI_SELECT","value":["first option","second option"]}}],"items":{"$ref":"#/components/schemas/AnswerDto"}}}},"AnswerResponseDto":{"type":"object","properties":{"question":{"$ref":"#/components/schemas/ProfileQuestionResponseDto"},"answer":{"$ref":"#/components/schemas/BaseAnswerDto"}},"example":[{"questionId":1,"answer":{"type":"NAME","value":{"first":"firstName","last":"lastName"}}},{"questionId":2,"answer":{"type":"TEXT","value":"some text answer here"}},{"questionId":3,"answer":{"type":"DATE","value":"1970-01-15"}},{"questionId":4,"answer":{"type":"DROP_DOWN_SELECT","value":"first option"}},{"questionId":5,"answer":{"type":"MULTI_SELECT","value":["first option","second option"]}}]},"ProfileQuestionResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"}}},"UserResponseDto":{"type":"object","properties":{"email":{"type":"string"},"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","enum":["PLATFORM_ADMIN","PROGRAM_ADMIN","PROGRAM_MANAGER","IT_ADMIN"]}},"active":{"type":"boolean"},"loginDate":{"type":"string","format":"date-time"},"answers":{"type":"array","example":[{"questionId":1,"answer":{"type":"NAME","value":{"first":"firstName","last":"lastName"}}},{"questionId":2,"answer":{"type":"TEXT","value":"some text answer here"}},{"questionId":3,"answer":{"type":"DATE","value":"1970-01-15"}},{"questionId":4,"answer":{"type":"DROP_DOWN_SELECT","value":"first option"}},{"questionId":5,"answer":{"type":"MULTI_SELECT","value":["first option","second option"]}}],"items":{"$ref":"#/components/schemas/AnswerResponseDto"}}}},"MQApiError":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","format":"int32"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"subErrors":{"type":"array","items":{"$ref":"#/components/schemas/MQApiSubError"}}}},"MQApiSubError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"UserCreateDto":{"required":["email"],"type":"object","properties":{"password":{"type":"string","example":"password"},"email":{"type":"string","example":"e-mail@address.com"},"roles":{"uniqueItems":true,"type":"array","items":{"type":"string","enum":["PLATFORM_ADMIN","PROGRAM_ADMIN","PROGRAM_MANAGER","IT_ADMIN"]},"enum":["PLATFORM_ADMIN","PROGRAM_ADMIN","PROGRAM_MANAGER","IT_ADMIN"]},"active":{"type":"boolean"},"answers":{"type":"array","example":[{"questionId":1,"answer":{"type":"NAME","value":{"first":"firstName","last":"lastName"}}},{"questionId":2,"answer":{"type":"TEXT","value":"some text answer here"}},{"questionId":3,"answer":{"type":"DATE","value":"1970-01-15"}},{"questionId":4,"answer":{"type":"DROP_DOWN_SELECT","value":"first option"}},{"questionId":5,"answer":{"type":"MULTI_SELECT","value":["first option","second option"]}}],"items":{"$ref":"#/components/schemas/AnswerDto"}}}},"UserPageResponseDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/UserResponseDto"}},"totalElements":{"type":"integer","description":"Total number of elements across all pages","format":"int64","example":42},"totalPages":{"type":"integer","description":"Total number of pages","format":"int32","example":5},"number":{"type":"integer","description":"Zero based index of the current page","format":"int32","example":0},"first":{"type":"boolean","description":"Whether this is the first page","example":true},"last":{"type":"boolean","description":"Whether this is the last page","example":false}}},"ProfileQuestionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"type":{"type":"string","enum":["TEXT","NAME","DATE","DROP_DOWN_SELECT","MULTI_SELECT"]}}}},"securitySchemes":{"bearerAuth":{"type":"http","name":"bearerAuth","scheme":"bearer","bearerFormat":"JWT"}}}}