Information regarding the Rest API response [OJS3.2.X]

Hey guys,

Hope you guys are doing well.

I was going through the API documentation and need help with some information.

When querying the “submissions” endpoint, which are the submissions that are made in the OJS installation, we get all the submissions made. Following that “path” we have the “publication” endpoint which is only accessible with the same ID as the publication.

Is it possible to have more that 1 publication for submission?
The publication ID and the submission ID are always the same right?

Thank you for you help
Regards

Hi @k457,

Starting with version 3.2.0, PKP applications (including OJS) support the concept of versioning, whereby multiple versions of a submission can be created with metadata changes preserved. A submission (article) might have several revisions. These are called publications. So it’s not safe to rely on submission IDs being the same as publication IDs, and a single submission may have several publications (if it has been revised).

Regards,
Alec Smecher
Public Knowledge Project Team

If I get this right, even if we have multiple publications, we can assume only one of the publications will be “the published one” right?

Hi @k457,

No, OJS 3.2.0 (and newer) allow multiple versions of the publication to be published, and the reader can review older versions to see what has changed.

Regards,
Alec Smecher
Public Knowledge Project Team

I get it now, thank you

1 Like

@asmecher

I have one more question and since this is already here…

Shouldn’t galley files for a publication download direct link be accessible right through the API, instead of the urlPublished?

The urlPublished isn’t “curl-able” due to redirects, even setting to follow I am not able to get the file.

I’ve got a workaround, generating the download link based on prev info, but its not pretty.

Thank you.

Hi @k457,

We’re gradually moving more of the application over to making use of the API for its own purposes – but some feature are likely to be left out of the API, because we want a friendlier URL structure (or at least to maintain consistency with historical URLs). I’m hesitant to duplicate features in the API that are heavily used and advertised outside of it, as this would likely lead to confusion and complications for statistics, plugins, and other areas that expect to be able to intervene in a single place to capture an activity. But that’s a general response; maybe you’ve got a specific tweak in mind?

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

In my case, my objective resolves in using OJS back-end only, where the articles are published there only for consuming via API and not using OJS front-end.
OJS already provides the option for hiding its content via the Distribution Settings > Access and setting “OJS will not be used to publish the journal’s contents online” to true. I understand that some functionalities may be lost using it this way.

My only suggestion would be that this option allowed for downloads links to be visible via the API. Since the user is not publishing the articles, allow a way to download them in more programmable/systematic way.

Thank you for all of your help :slight_smile: