Is there an API call to find guides with no steps?

Hello,

This is a long-shot question for the community. I am doing some housekeeping on previously-created documentation. One thing that I am trying to do is delete any guides that do not have steps. That might sound crazy, but at some point some "shell" guides were created.

I know that the API provides a method to retrieve categories that are "empty." Is there a method to find empty guides?

Answer this question I have this problem too

Is this a good question?

Score 1
Add a comment

1 Answer

Most Helpful Answer

Hi Bryan,

Understandable question. This isn't the most direct route, but it is something you can do using your Dozuki site's API with the current release (2.0). Here is the process I'd recommend to delete all the guides with no steps:

  1. Use the /guides endpoint to get all your guide ids
  2. Use the /guides/{guideid}endpoint to get the details (including step data) for all the guide ids you pulled down in step 1.
  3. Delete all the guides with no steps and no prerequisite guides using the /guides/{guideid} endpoint.

Was this answer helpful?

Score 2

Comments:

Makes perfect sense. Thank you!

by

Follow-up question: Can I enter multiple {guideid} in a single query? If, for example, my "/guide" query returns 500 guide ids - can I then enter all 500 into a single query? I'm thinking something like {guideid, guideid, guideid}. Etc.

by

Sorry, that's not currently possible for that endpoint (/guides). You can filter down your results based on guide type, sort order or if it's public / private though. If you have more than 200 (the maximum returned in one response, this is determined by the "limit" parameter) you'll have to "page" through them by using the [code]offset[/code] parameter. So, you'd include "?offset=201" in the 2nd request for 200 results in the response.

by

Add a comment

Add your answer

Bryan Rothwell will be eternally grateful.