Beispiel #1
0
def get_active_session_request(request_handler):
    '''
        GET /[email protected]&password=force&org_type=developer
    '''
    request_id = util.generate_request_id()
    params, json_body = get_request_params(request_handler)
    worker = BackgroundWorker('get_active_session', params, False, request_id, json_body)
    response = worker.run()
    respond(request_handler, response)
Beispiel #2
0
def metadata_list_request(request_handler):
    '''
        GET /metadata/list
        {
            "sid"             : "",
            "metadata_type"   : "",
            "murl"            : ""
        }
        call to get a list of metadata of a certain type
    '''
    request_id = util.generate_request_id()
    params, json_body = get_request_params(request_handler)
    worker = BackgroundWorker('list_metadata', params, False, request_id, json_body)
    response = worker.run()
    respond(request_handler, response)
Beispiel #3
0
def update_credentials_request(request_handler):
    '''
        POST /project/creds
        {
            "project_name"  : "my project name"
            "username"      : "*****@*****.**",
            "password"      : "force",
            "org_type"      : "developer",
        }
        NOTE: project name should not be updated, as it is used to find the project in question
        TODO: maybe we assign a unique ID to each project which will give users the flexibility
              to change the project name??
        TODO: we may need to implement a "clean" flag which will clean the project after creds
              have been updated
    '''
    request_id = util.generate_request_id()
    params, raw_post_body = get_request_params(request_handler)
    worker = BackgroundWorker('update_credentials', params, False, request_id, raw_post_body)
    response = worker.run()
    respond(request_handler, response)
Beispiel #4
0
def connections_delete_request(request_handler):
    request_id = util.generate_request_id()
    params, raw_post_body = get_request_params(request_handler)
    worker = BackgroundWorker('delete_connection', params, False, request_id, raw_post_body)
    response = worker.run()
    respond(request_handler, response)