'GET /api/request_types/{encoded_request_type_id}
Displays information about a request_type.'

@web.expose_api
def show(self, trans, id, **kwd):

    request_type_id = id
    try:
        decoded_request_type_id = trans.security.decode_id(request_type_id)
    except TypeError:
        trans.response.status = 400
        return ('Malformed    request    type    id    (    %s    )    specified,    unable    to    decode.' % str(request_type_id))
    try:
        request_type = trans.sa_session.query(trans.app.model.RequestType).get(decoded_request_type_id)
    except:
        request_type = None
    if (not request_type):
        trans.response.status = 400
        return ('Invalid    request_type    id    (    %s    )    specified.' % str(request_type_id))
    if (not trans.app.security_agent.can_access_request_type(trans.user.all_roles(), request_type)):
        trans.response.status = 400
        return ('No    permission    to    access    request_type    (    %s    ).' % str(request_type_id))
    item = request_type.to_dict(view='element', value_mapper={'id': trans.security.encode_id, 'request_form_id': trans.security.encode_id, 'sample_form_id': trans.security.encode_id})
    item['url'] = url_for('request_type', id=request_type_id)
    return item
