Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API - Request Child Pages && Request Files with PageKey #1177

Closed
ghost opened this issue Apr 22, 2020 · 2 comments
Closed

API - Request Child Pages && Request Files with PageKey #1177

ghost opened this issue Apr 22, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 22, 2020

Describe your problem

I've 2 issues using the API core plugin.

  1. How do I request child pages?

I'm not able to request a particular child page, because the additional slash of the page key doesn't get past on the respective API function. For example: If I'm using /api/pages/parent_page/child_page, it only uses parent_page. I also tried to use a - instead, but this doesn't work either.

Is there any special character, which I need to use?

  1. The new API endpoint does only work with SymLinks.

I tried the new API endpoint /api/files/<page_key>, but it doesn't work really well. Some requests didn't return a list of files, even if files were available. I checked the behaviour and the problem seems to be the static symlink path.

I'm not sure why, but at least on Windows some of these symlinks are not created with the page key, just the folder with the UUID as name does exist. Would be really cool, if the respective API function would turn the page key into the UUID.

PS.: Again, I don't know how to get the files from child pages too.

Steps to reproduce the problem

  1. How do I request child pages?
jQuery.ajax({
    url: "http://bludit.ls/3.12.0/api/pages/<parent_page>/<child_page>", // <-- Doesn't work
    type: "GET",
    data: {
        token: "<api_key>"
    }
});
  1. The new API endpoint does only work with SymLinks.
jQuery.ajax({
    url: "http://bludit.ls/3.12.0/api/files/<page_key>", // <-- Doesn't work sometimes
    type: "GET",
    data: {
        token: "<api_key>"
    }
});

Bludit version

3.12.0

PHP version

7.2.9 (Windows 64-Bit)

@dignajar
Copy link
Member

dignajar commented May 12, 2020

Hi,
I just uploaded a fix for the first issue.
a5dc0ad

You can get the child page with the key such as: /api/pages/parent_page/child_page

@dignajar
Copy link
Member

Hello, with the new version of Bludit v4.0 rc1, I would like to close the old Github issues. If you feel that your issue is not resolved in the latest version, create a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant