Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 6.42 KB

DescribeApi.md

File metadata and controls

59 lines (40 loc) · 6.42 KB

zuora_client.DescribeApi

All URIs are relative to https://rest.zuora.com

Method HTTP request Description
g_et_describe GET /v1/describe/{object} Describe object

g_et_describe

str g_et_describe(object, zuora_entity_ids=zuora_entity_ids)

Describe object

Provides a reference listing of each object that is available in your Zuora tenant. The information returned by this call is useful if you are using CRUD: Create Export or the AQuA API to create a data source export. See Export ZOQL for more information. ## Response The response contains an XML document that lists the fields of the specified object. Each of the object's fields is represented by a <field> element in the XML document. Each <field> element contains the following elements: | Element | Description | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | <name> | API name of the field. | | <label> | Name of the field in the Zuora user interface. | | <type> | Data type of the field. The possible data types are: boolean, date, datetime, decimal, integer, picklist, text, timestamp, and ZOQL. If the data type is picklist, the <field> element contains an <options> element that lists the possible values of the field. | | <contexts> | Specifies the availability of the field. If the <contexts> element lists the export context, the field is available for use in data source exports. | The <field> element contains other elements that provide legacy information about the field. This information is not directly related to the REST API. Response sample: xml <?xml version=\"1.0\" encoding=\"UTF-8\"?> <object> <name>ProductRatePlanCharge</name> <label>Product Rate Plan Charge</label> <fields> ... <field> <name>TaxMode</name> <label>Tax Mode</label> <type>picklist</type> <options> <option>TaxExclusive</option> <option>TaxInclusive</option> </options> <contexts> <context>export</context> </contexts> ... </field> ... </fields> </object> It is strongly recommended that your integration checks <contexts> elements in the response. If your integration does not check <contexts> elements, your integration may process fields that are not available for use in data source exports. See Changes to the Describe API for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.DescribeApi()
object = 'object_example' # str | API name of an object in your Zuora tenant. For example, `InvoiceItem`. See [Zuora Object Model](https://www.zuora.com/developer/api-reference/#section/Zuora-Object-Model) for the list of valid object names.  Depending on the features enabled in your Zuora tenant, you may not be able to list the fields of some objects. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Describe object
    api_response = api_instance.g_et_describe(object, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DescribeApi->g_et_describe: %s\n" % e)

Parameters

Name Type Description Notes
object str API name of an object in your Zuora tenant. For example, `InvoiceItem`. See Zuora Object Model for the list of valid object names. Depending on the features enabled in your Zuora tenant, you may not be able to list the fields of some objects.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

str

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: text/xml; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]