Encodings of a Loader Connection ================================ .. code-block:: http /api/repositories/{repository}/loaderconnections/{loaderconnection}/encodings .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, the name of the :doc:`repository` loaderconnection, string, the ID of the loader connection The GET request can only be used retrieve encodings for loader connections that do not require login credential (i.e Delimited File or Cobol Flat Files). The POST request must be used for all loader connections that need login credentials, passing in the username and password. Get ~~~ .. http:get:: /api/repositories/(string:repository)/loaderconnections/(int:loaderconnection)/encodings :synopsis: Lists the encodings of the corresponding loader connection Lists the encodings of the :doc:`loaderconnection` .. code-block:: http GET /api/repositories/jupiter/loaderconnections/1/encodings HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error 501, Not implemented The response will be a :doc:`standard-response`, with a list of encodings for a given loader connections in the corresponding :doc:`repository`. .. code-block:: json { "encodings": [ "cp1252", "ascii", "big5", "cp1250", "cp1251", "cp1253", "cp1254", "cp1255", "cp1256", "cp1257", "cp1258", "cp437", "cp737", "cp775" ] } If there are no supported encodings for the :doc:`loaderconnection`, ``encodings`` will be an empty string. Please note that this endpoint is not supported by `Trillium Flat Files` loader connections, hence it will return 501 error for this. Post ~~~~ .. http:post:: /api/repositories/(string:repository)/loaderconnections/(int:loaderconnection)/encodings :synopsis: Lists the encodings of the corresponding loader connection Lists the encodings of the :doc:`loaderconnection` :jsonparam body: The request body .. code-block:: http POST /api/repositories/jupiter/loaderconnections/1/encodings HTTP/1.1 Content-Type: application/json { "command": "get", "data": { "username": "", "password": "" } } For loader connections that do not require login credential, you can still do the POST request as follows .. code-block:: http POST /api/repositories/jupiter/loaderconnections/1/encodings HTTP/1.1 Content-Type: application/json { "command": "get" } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error 501, Not implemented The response will be a :doc:`standard-response`, with a list of encodings for a given loader connections in the corresponding :doc:`repository`. .. code-block:: json { "encodings": [ "cp1252", "ascii", "big5", "cp1250", "cp1251", "cp1253", "cp1254", "cp1255", "cp1256", "cp1257", "cp1258", "cp437", "cp737", "cp775" ] } If there are no supported encodings for the :doc:`loaderconnection`, ``encodings`` will be an empty string. Please note that this endpoint is not supported by `Trillium Flat Files` loader connections, hence it will return 501 error for this.