This is not going to work I'm afraid. There are a couple significant issues I'll explain.
First, the barbs. These are shoaling fish, and they absolutely need a group; it is not something you can ignore because it affects the fish in several ways. Shoaling fish that are not kept in adequately-sized groups will react, normally by becoming much more aggressive; less often they react by becoming seriously withdrawn and they simply waste away. There must be at least six of these, but this is a very active species and eighty is recommended. They are active so a 4-foot length tank is preferred. As you don't have the space for a group of six or more you must leave them out.
Second, the cichlids. Combining more than one species of dwarf cichlid in small tanks (a 30g is small to these fish) rarely if ever works. The individual fish can make a bit of a difference, but not usually. Male cichlids of every species are territorial and a ram will see this tank as "his" space, and so will a male apistogramma. If you have only females they might co-exist.
Then there is the issue with a male/female pair. Cichlids must select their own mates; rams especially, and if not the male (usually) will kill the female before too many months have passed. Another issue is temperature; rams are warm water, with 80F the minimum; many other tropical fish cannot manage at this warm a temperature...the gold barbs for example need it no warmer than the mid 70's. And speaking of the barbs, being an active fish, sedate fish like all cichlids are not good tankmates as the sedate fish will be annoyed by the constant activity of the active fish. All of this causes stress, and this weakens fish; stress is the direct cause of 95% of fish disease.
Byron.