You are here: API Foundations > Use Cases > Reading Usages

Reading Usages

In this use case, you want to programmatically look at what usages were created in the system.

 Note  

The RbeStatus field does not indicate whether the usage was processed.

To read usages,

  1. Query usages on an account using a ZOQL statement like the following:
  2. SELECT Id, AccountId, SourceType, UOM, Quantity, RbeStatus, StartDateTime, EndDateTime, SourceName, SubmissionDateTime FROM Usage WHERE AccountId = 'someAccountId'

Sample Code

Usage[] usages = query("select Id, AccountId, SourceType, UOM, Quantity, RbeStatus, StartDateTime, EndDateTime, SourceName, SubmissionDateTime from Usage where AccountId = 'someAccountId'");

Copyright © 2008-2009 Zuora, Inc.