Cannot retrieve mobiledoc format via content API

#1

I’m having trouble getting access to the mobiledoc format for posts and pages using the content-api.

If I send a get request, to posts or a single post by slug, I get the format shown without the mobile doc.

I can get both html and plaintext fine.

Am I trying to use the following formats field as described in the content API documentation.
Conent API Documentation

My site is is running ghost 2.18.1.

I get this problem using both the Javascript API Client and issuing posts in postman. I use “formats” as shown below.

const page = await ghostAPI().pages.read({
        slug,
        include: 'tags,authors',
        formats: 'mobiledoc'
      })

Please let me know if I’m doing something wrong or something is broken.

Thanks in advance!

0 Likes

#2

See https://github.com/TryGhost/Ghost/issues/10097

The Content API v2 does not return mobiledoc currently.

2 Likes

#3

@Kate think our docs are a bit misleading in this case :sweat_smile: Will change it now.

@jacobgoodwin0 you would need to use Admin API in case you want to operate on mobiledoc

1 Like

#4

Thanks for the reference to the github issue, tip, and updating the docs!

1 Like

#5

@jacobgoodwin0 what is your use-case for needing the mobiledoc content?

0 Likes

#6

@Kevin, I don’t have a critical use case. I’m generating a static site template with Nuxt and just saw the feature in the documentation and wanted to play around with it. So the HTML will work fine for this case.

0 Likes

closed #7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

0 Likes