Mixing SRAM X01 and Apex components
SRAM 11 speed road and mountain shifters and and rear derailers are not cross compatible. They work on different actuation ratios. A Jtek Shiftmate 9 can be used to convert them in the road shifter on mountain derailer direction.

SRAM says there is no compatibility between road and mountain hydraulic brakes. I believe they're probably right because the road levers push way less fluid, but I haven't actually tried it.