Making the product display page a bit more informative than out of the box with API Endpoints, Parameters, Responses

Not applicable

Hello you,

When you drill down to the product display page on the developer portal, I know that the respective node is populated using smartdocs template. It looks quite satisfying out of the box, but just to enhance the user experience we are thinking of making the product display page more informative and elaborate.

Here's what we're thinking of implementing for the product display page and against are my thoughts on achieving the same-

1) All the API Endpoints related to the product on a sidebar ( render a block in smartdocs template which holds "Method TOC" view)

2) Documentation of the selected endpoint in the "page-content' region which holds-

a - Parameters with fields-->Name, Located in?, Description ( customize smartdocs context, template)

b - Responses with fields-->Code, Description, Schema ( customize smartdocs context, template)

c - Test Endpoint- (Out of the box)

d - Models ( customize smartdocs context, template)

3) A "Use this Product" feature which lets user register the product in a new app or any existing app (passing the product UUID via url on clicking a button ?)

I hope I made sense and myself clear. Am I thinking right/ Are the above even possible ? I do not expect a ready-to-go solution here in the comments/answers, all I need is a push in the right direction so that I don't travel far in the wrong one.

Thanks for reading patiently !

Dharma

Solved Solved
2 6 510
2 ACCEPTED SOLUTIONS

@Dharma Teja Adusumilli ,

Absolutely great ideas & It's a great way to display products, APIs associated with it. It's definitely doable within a shot span of time (May be 8 - 16 hours of effort) with relevant Drupal Expertise & Understanding Edge - Developer Portal Interaction, How smartdocs works.

Let me clarify few things,

  • There is no Product display page in Developer Portal. All we have have is individual APIs smartdoc pages which are nothing but nodes in Drupal.
  • There is no association between API Products & Smartdocs Individual APIs by default.
  • There is no association between API Products & Smartdocs by default in Developer Portal.

Here is what i will do to build a page & navigation like you mentioned in above wireframe.

  • Have different SmartDocs models for different API Products, Group all the APIs that belongs to that product in a SmartDocs model. That way we have association between API Products & APIs in a smartdoc model.
  • Each smartdocs model is a tag in Drupal Developer Portal, You can see same in "admin/structure/taxonomy/smartdocs_models" . Add any necessary fields to associate any content related to API Product by editing above tags. For example, The text below the Product can be a description of tag.
  • We will be creating a new set of blocks using the Views module in Drupal. First block will display the associated smartdocs node page tag content title & description. Enable this block in SmartDocs individual node page on top. This block will display the title & description like in your screenshot
  • Create one more block using views that displays all associated nodes that are tagged with same smartdoc model tag. This will become the side menu in individual smartdoc model page. Enable this block in the left side region of smartdocs node individual pages.
  • You can edit the SmartDocs template as you need to change the position of sample request , headers, parameters , rest endpoints etc.
  • Use this product is tricky, I will just point it to create a new app page / point it to the already existing app edit page with a query param of product name. I will alter the edit app page or create app page using form alter & preselect the product. Or, You can leverage Management APIs , Apigee Edge PHP SDK in developer portal to auto add this product to app using a custom module.

Hope it helps. Let us know how it goes.

View solution in original post

Not applicable

@Anil Sagar,

Thanks for the valuable pointers.

In case anyone's trying to achieve the above, read through.

Automated the process of creating blocks using contextual filters in the method listing view (pull NID from URL) and then published the block using context ( condition being--> node type=smart method, action--> include myblock).

View solution in original post

6 REPLIES 6

I like the ideas here, but I don't have a ready-built solution fo ryou.

Maybe @Anil Sagar or @Gitesh Koli might have some further suggestions.

Or @Cass Obregon .

@Dino Thanks for the reply. @Anil Sagar, @Gitesh Koli, @Cass Obregon To be much clearer, this is what we're trying to achieve-sample-frame.png

As I said I do not need a ready-built solution, just a few pointers would be appreciated.

@Dharma Teja Adusumilli ,

Absolutely great ideas & It's a great way to display products, APIs associated with it. It's definitely doable within a shot span of time (May be 8 - 16 hours of effort) with relevant Drupal Expertise & Understanding Edge - Developer Portal Interaction, How smartdocs works.

Let me clarify few things,

  • There is no Product display page in Developer Portal. All we have have is individual APIs smartdoc pages which are nothing but nodes in Drupal.
  • There is no association between API Products & Smartdocs Individual APIs by default.
  • There is no association between API Products & Smartdocs by default in Developer Portal.

Here is what i will do to build a page & navigation like you mentioned in above wireframe.

  • Have different SmartDocs models for different API Products, Group all the APIs that belongs to that product in a SmartDocs model. That way we have association between API Products & APIs in a smartdoc model.
  • Each smartdocs model is a tag in Drupal Developer Portal, You can see same in "admin/structure/taxonomy/smartdocs_models" . Add any necessary fields to associate any content related to API Product by editing above tags. For example, The text below the Product can be a description of tag.
  • We will be creating a new set of blocks using the Views module in Drupal. First block will display the associated smartdocs node page tag content title & description. Enable this block in SmartDocs individual node page on top. This block will display the title & description like in your screenshot
  • Create one more block using views that displays all associated nodes that are tagged with same smartdoc model tag. This will become the side menu in individual smartdoc model page. Enable this block in the left side region of smartdocs node individual pages.
  • You can edit the SmartDocs template as you need to change the position of sample request , headers, parameters , rest endpoints etc.
  • Use this product is tricky, I will just point it to create a new app page / point it to the already existing app edit page with a query param of product name. I will alter the edit app page or create app page using form alter & preselect the product. Or, You can leverage Management APIs , Apigee Edge PHP SDK in developer portal to auto add this product to app using a custom module.

Hope it helps. Let us know how it goes.

Thanks for the reply @Anil Sagar, really appreciate the time and thoughts you've put on this question.

I understand that you want me create two blocks-

1) For the top part which holds Name, Description etc..

2) Sidebar that holds "Method Listing"

And then add these blocks to the smartdocs nodes individually. Even I thought the same and this definitely a way to do it. But, I'm looking for a solution that could be better automated than this. For instance, I'm thinking of using Mini-Panels, a view on the left for the method listing and the "Content pane" on the right for the rendered smartdocs node. All I want is a way to somehow integrate the "Smartdocs Method Listing" view and the actual smartdocs node itself.

Thanks again,

Dharma

@Dharma Teja Adusumilli , No , You shouldn't add these blocks to smartdocs nodes to individually. You will enable these blocks using context module & condition where method type is smartdocs. You will dynamically read the current node id & filter the relevant smartdocs using contextual filters in views. Hope it helps. Need little bit of Drupal Views contextual filters expertise here.

Not applicable

@Anil Sagar,

Thanks for the valuable pointers.

In case anyone's trying to achieve the above, read through.

Automated the process of creating blocks using contextual filters in the method listing view (pull NID from URL) and then published the block using context ( condition being--> node type=smart method, action--> include myblock).