URL のセグメントは次のようになります。
api = Controller
example = Resource
パラメータはキーと値のペアにする必要があります。
id = Key
1234 = Value
あなたの 1234 はキーとして扱われているようですが、その価値はありません。URL を次のように変更してみてください:mydomain.com/api/example/id/1234/
に変換すると、次のようになります。mydomain.com/controller/resource/key/value/
ここにも非常に詳細なチュートリアルがあります: http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
編集:
コントローラーはサブフォルダーにあるため、URL のセグメントは次のように構成する必要があります。
api/example = Controller
user = Resource // basically the method name + the http method e.g. user_get(), or user_post(). I just made 'user' up, for your app can be whatever it is that people will access via your api
パラメータはキーと値のペアとして指定する必要があります。
id = Key
1234 = Value
したがって、URL は次のようになります。mydomain.com/api/example/user/id/1234/