APIs for uploading OpenAPI spec definitions to devportal?

Not applicable

There’s lot of documentation about APIs for Edge itself but I can’t find anything about APIs to allow scripting of changes to the portal. In particular, are there APIs for uploading Swagger definitions to SmartDocs and set permissions on pages?

Solved Solved
1 6 915
1 ACCEPTED SOLUTION

There is a REST module for Drupal, which, if enabled, allows you to script updates to Drupal.

Getting this to work is described in three parts, starting here: https://www.dinochiesa.net/?p=1297

This REST module is completely independent of Apigee technologies, but works with everything that Apigee puts into the Drupal system.

Just today I used this to populate a FAQ list for a production portal. As for specifically how you would upload an OpenAPI Spec...that I do not know. I have never done that.

*EDIT*: see also, this github repo, which contains a script that actually uses the Drupal REST API.

View solution in original post

6 REPLIES 6

There is a REST module for Drupal, which, if enabled, allows you to script updates to Drupal.

Getting this to work is described in three parts, starting here: https://www.dinochiesa.net/?p=1297

This REST module is completely independent of Apigee technologies, but works with everything that Apigee puts into the Drupal system.

Just today I used this to populate a FAQ list for a production portal. As for specifically how you would upload an OpenAPI Spec...that I do not know. I have never done that.

*EDIT*: see also, this github repo, which contains a script that actually uses the Drupal REST API.

@Dino I think that's exactly what I'm after too.. however your link does not appear to work..

Give this link another try? - https://www.dinochiesa.net/?p=1297

Works fine for me

Thanks that does work (corporate network blocked it)

Hey Simon - I should have also posted this link: https://github.com/DinoChiesa/EdgeTools/tree/master/contriveDevPortalContent.

That is a github repo containing a nodejs script that uses the REST API for Drupal to

  • remove all existing {forums, faqs}
  • insert new forum posts and faqs

The data for these new records is provided in a JSON-formatted data file.

Using this script requires that you set up the REST server for Drupal as described in that blog post I referenced earlier.

I think some folks under corporate network block have trouble accessing link with different text and hyperlink. Maybe as a best practice we should just post links as they are instead of hyperlinking text. I edited your post commented