Gets a list of one/all stage objects in a pipeline. Performs a single GET.
		Args:
			pipeline_key	key for pipeline
			stage_key 		key for stage (default: None i.e. ALL)
			sort_by			in desc order by 'creationTimestamp' or 'lastUpdatedTimestamp'
							may or may not be supported
			returns 		(status code for the GET request, dict of stages)
							It is not a list hence the .values() before return

def get_pipeline_stage(self, pipeline_key, stage_key = None, sort_by = None):
		'''Gets a list of one/all stage objects in a pipeline. Performs a single GET.
		Args:
			pipeline_key	key for pipeline
			stage_key 		key for stage (default: None i.e. ALL)
			sort_by			in desc order by 'creationTimestamp' or 'lastUpdatedTimestamp'
							may or may not be supported
			returns 		(status code for the GET request, dict of stages)
							It is not a list hence the .values() before return
		'''
		if not pipeline_key:
			return requests.codes.bad_request, None

		uri = '/'.join([
						self.api_uri,
						self.pipelines_suffix,
						pipeline_key,
						self.stages_suffix
						])
		if stage_key:
			uri = '/'.join([
							uri,
							stage_key
							])
		
		if sort_by:
				if sort_by in ['creationTimestamp', 'lastUpdatedTimestamp']:
					uri += self.sort_by_postfix + sort_by
				else:		
					return requests.codes.bad_request, {'success' : 'False', 
												'error': 'sortBy needs to be \'creationTimestamp\', or \'lastUpdatedTimestamp\''}

		code, data = self._req('get', uri)
		
		#format is ambigious so we need to rely on user input
		if stage_key:
			data = list(data.values())
		
		return code, data