Commit 948292a0 authored by Jacob Rougeau's avatar Jacob Rougeau
Browse files

Add Workflow ingestion method

parent ccb43296
......@@ -78,3 +78,17 @@ class RecordClient(BaseClient):
def query_records(self, query_records_request: QueryRecordsRequest, bearer_token = None):
return self.make_request(method=HttpMethod.POST, url='{}{}'.format(self.storage_url, '/query/records'),
data=query_records_request.to_JSON(), bearer_token=bearer_token)
#ingest bulk records which is coming as JSON response -- Start
def ingest_records(self, records, bearer_token = None):
Calls storage's api endpoint createOrUpdateRecords taking a list of record objects and constructing
the body of the request
Returns the response object for the call
Example of code to new up a record:
return self.make_request(method=HttpMethod.POST, url='{}{}'.format(self.data_workflow_url, '/workflowRun'), data=records, bearer_token=bearer_token)
def query_record(self, recordId: str, bearer_token = None):
return self.make_request(method=HttpMethod.GET, url=('{}{}/{}'.format(self.storage_url, '/records', recordId)), bearer_token=bearer_token)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment