{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api-rc.quinyx.com/v2/mapping","description":""}],"paths":{"/{mappingId}":{"put":{"tags":["mapping-integration-controller"],"summary":"Update mapping","operationId":"update","parameters":[{"name":"mappingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingExternalValueRequest"}}},"required":true},"responses":{"400":{"description":"In case when externalValue is invalid","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"200":{"description":"Response for the updated mapping of quinyxValue and externalValue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"501":{"description":"Mapping type not supported"}}},"delete":{"tags":["mapping-integration-controller"],"summary":"Delete mapping","operationId":"delete","parameters":[{"name":"mappingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"204":{"description":"Response in case of successful delete"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/groups/{domainGroupId}":{"post":{"tags":["mapping-integration-controller"],"summary":"Create mapping","operationId":"save","parameters":[{"name":"domainGroupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingRequest"}}},"required":true},"responses":{"400":{"description":"In case when quinyxValue or externalValue are invalid","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"201":{"description":"Response for the created mapping of quinyxValue and externalValue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"501":{"description":"Mapping type not supported"}}}},"/domains/{domainId}/mappings/{mappingType}":{"post":{"tags":["mapping-integration-controller"],"summary":"Retrieves mapping records for the given domainId and mappingType, narrowed down by quinyxValue or/and externalValue.","operationId":"getMappings","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"mappingType","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingValues"}}},"required":true},"responses":{"400":{"description":" If the request is invalid or malformed.\n Note: body is required, if externalValue and quinyxValue is not available in the request \n the corresponding fields should be set to NULL.\n ","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"200":{"description":" Response that returns the list of mapping records for the given domainId and mappingType and quinyxValue or externalValue, or both. \n If both externalValue and quinyxValue are provided then a list of one element is returned.\n ","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MappingResponse"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}},"/mappingTypes":{"get":{"tags":["mapping-integration-controller"],"summary":"List existing mapping types that can be used in a request","operationId":"getMappingTypes","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"200":{"description":"List of all mapping types which can be used to fetch quinyxValue or externalValue","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/mappingTypes/{mappingType}/mappings":{"get":{"tags":["mapping-integration-controller"],"summary":"List mapping types response","operationId":"getMappings_1","parameters":[{"name":"mappingType","in":"path","required":true,"schema":{"type":"string"}},{"name":"quinyxValue","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalValue","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"400":{"description":"In case you send quinyxValue and externalValue at the same time.\nYou should send only one of them to retrieve the other value.\nOr if the mappingType is invalid.\n","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"200":{"description":"Response where you see the quinyxValue and externalValue","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MappingResponse"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}}}}},"components":{"schemas":{"ValidationError":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string"},"localisedMessage":{"type":"string"},"groupingMessage":{"type":"string"},"additionalErrorParameters":{"type":"object","additionalProperties":{"type":"object"}}}},"MappingExternalValueRequest":{"type":"object","properties":{"externalValue":{"type":"string","maxLength":256,"minLength":1}},"required":["externalValue"]},"MappingResponse":{"type":"object","properties":{"mappingType":{"type":"string"},"id":{"type":"string"},"quinyxValue":{"type":"string"},"externalValue":{"type":"string"},"domainId":{"type":"integer","format":"int32"}}},"MappingRequest":{"type":"object","properties":{"quinyxValue":{"type":"string","maxLength":256,"minLength":1},"externalValue":{"type":"string","maxLength":256,"minLength":1},"mappingType":{"type":"string","enum":["GROUP_ID","EMPLOYEE_ID","ABSENCE_ID","UNIT_ID","SECTION_ID","ROLE_ID","AGREEMENT_TEMPLATE_ID","AGREEMENT","DISTRICT_ID"]},"parentId":{"type":"integer","format":"int32"}},"required":["externalValue","quinyxValue"]},"MappingValues":{"type":"object","properties":{"quinyxValue":{"type":"string","maxLength":256,"minLength":1},"externalValue":{"type":"string","maxLength":256,"minLength":1}}}}}}