Happy Business Starts Here

Metadata Retreival

Highlighted
New Student

Metadata Retreival

Hi 

 

When I look at the API (for account), it has "POST CREATE ACCOUNT" and "POST CRUD:CREATE ACCOUNT". After reading the documentation, it was not clear why we need 2 API's for the same. However it became clear after reading one of the post.

 

Now my question is on the metadata

 

For "POST CRUD:CREATE ACCOUNT", I can get the metadata using the following relative URL
/apps/api/describe/Account

 

I could not get an equivalent URL for the "POST CREATE ACCOUNT". What ever documentation for this request type is in the form of examples. Where can I find documentation - metadata url like the one we have for the other request?

 

Sanket Pattekar

2 REPLIES
Zuora Moderator

Re: Metadata Retreival

Hi @sanketpattekar,

 

The endpoint /v1/describe/{object} (Describe object) returns metadata about individual Zuora objects such as Account, Subscription, and Invoice objects. As you noticed, this metadata sometimes matches the request/response body of a REST API endpoint - as in the case of CRUD: Create Account - but it's not always the case.

 

Most REST API endpoints have request and response bodies that don't exactly correspond to individual Zuora objects. Typically the request and response bodies are more complex, to allow for more powerful functionality.

 

If you want to see metadata for a REST API endpoint, you can find this in the documentation along with the examples. For instance, here's the metadata for the Create account request body (you will need to scroll down in the documentation to view it):

 

Screen Shot 2018-10-12 at 9.49.18 AM.png

 

And here's the metadata for the Create account response body (you will need to scroll down further and click "200 OK" to expand it):

 

Screen Shot 2018-10-12 at 9.50.41 AM.png

 

Do you require this metadata in a structured format that you can work with programatically? We provide our REST API documentation in format called Swagger (also called OpenAPI), which contains all of this metadata. You can access our Swagger specification by clicking Download at the very top of the documentation:

 

Screen Shot 2018-10-12 at 9.53.40 AM.png

 

If you think this may be helpful for you, please let us know more details about your use case. Very happy to discuss it further.

 

Many thanks, and hope this helps!

New Student

Re: Metadata Retreival

Thanks for the response.

 

Yes I was looking for metadata so that I can use it in my program. This OpenAPI specification really helps

 

Sanket