SUSHI access in v51

I’m slowly beginning the process of bringing our journals into COUNTER complaince and I’ve run into an issue at the outset that I haven’t found an answer for.

We’re running a multi-journal installation on 3.4.0.3.

FYI: The OJS3 documents directs folks to the previous version of the API (5.0) but 5.1 has been released and its changed the endpoints and the documenation a bit. The 5.0 api was hosted at https://app.swaggerhub.com/apis/COUNTER/counter-sushi_5_0_api/5.0.3. But 5.1 is hosted here: https://countermetrics.stoplight.io/docs/counter-sushi-api/yc1o09env0d2a-counter-sushi-api. Among the changes include /status being replaced with /v51/status to add versioning to their API.

As directed in older documentation, the endpoint for using the OJS api to access COUNTER 5.0 data is https:///api/v1/stats/sushi

So accessing /status there gets me back a “Service_Active”: true since COUNTER is on site-wide for all journals by default.

Checking back one step, api/v1/submissions confirms I can use my bearer token to access journal data. So I’m logged in as an adminstrator and my token generates a OJSSID.

Next I need to generate reports for specific users/institutional subscribers rather than just all the data for a particular journal. So what the COUNTER 5.0+ asks for is a “customer_id”. But to what value does this correspond in OJS? I’ved tried, out of desperation and curiosity, a variety of id values from subscription_id, institution_name, institutional_subscription_id, user_id, and several more. Nothing I’ve found so far begins to break the ice and get me toward isolating specific user data to create reports using the API as directed.

Have I fundamentally misunderstood how this works or have I not found the correct corresponding value in our tables? Welcoming all advice since this seems to be in the cracks between OJS and SUSHI.

I’m giving this a bump after 9d because I’m still unable to find the value that OJS uses that the sushi api interface will recognize as a valid customer_id. The OJS docs don’t identify this value and I haven’t found the connection in the source code yet.

Is anyone at all using the api to extract COUNTER data from OJS? I’d love some advice!

Hi @dwm

We have just implemented the R 5.0.3 and then COUNTER published the new 5.1 :sweat_smile: Thus, we will need to see the differences and will then implement 5.1 too, but I do not know when – currently no exact plans about it.

“customer_id” is OJS institution ID, or 0 (for “The World”).

Will you make an application by COUNTER to get the official compliance status? I would love to hear more about the whole process of bringing your journals into COUNTER compliance – we haven’t heard from anybody else about it… and it could be useful for others as well…

Maybe one note: we assume all content is Gold Open Access and provide only those COUNTER reports. The subscription journals would need additional functionality:

  • it would be needed to implement a tracking on the submission level, e.g. if the submission is under subscription, or when the submission got OA…
  • it would be needed to implement further reporting, considering the subscriptions and closed or embargoed access…

Best,
Bozana

After your suggestion to use the global user value, I can see generic data through the API. This appears the same as what’s available in-app throug the stats endpoint such as stats/reports/report?pluginName=CounterReportPlugin. That’s good news!

But when you say subscription journals need more, does this mean the functionality doesn’t exist in OJS currently and we’d need to add it as a customization? That is, there’s no separate tracking created for other institutional ids and everyone’s access is flagged with only the global user?

The institutional subscribers we’re working on delivering COUNTER compliant data for need it parsed by their own subscribers access and not global access to subscribed content. If things haven’t natively been tagged along the way with their institutional subscriber id, then I fear I need to go back to the IP logs instead and work outside of api/OJS…

Hi @dwm

You can get the statistics for and institution by using customer_id=. The OJS institution ID is the value in the column institution_id in the DB table institutions. Also, when you select the institution title on the institutions management page, and then you use the developer tools of your browser, you can see the institution ID for that institution – you will see something like <span id="institution-1">Your institution title</span> where 1 is the institution ID (in this example).
It is not easy to see/find the institution ID, but maybe we can change it in the future.
That means the institution ID is tracked and logged together with the usage event, and statistics for an institution are compiled and then available.

However, the reports will assume that all articles were always OA – the reports contain only the OA_Gold access type. You will not be able to see the reports for Controlled or OA_Delayed access type. According to this you will also not be able to create/see e.g. TR_J1 COUNTER report. And COUNTER requires/defines it for subscription journals…

Just a note of thanks to say that when I returned to everything I got what I needed! I appreciate your help and will report back (eventually) when I finish working on our web tool to become compliant.