Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 28 Current »

Oppsummert

Vi har i lengre tid skrevet oss ut av en gammel platform for metadata. Dagens løsning har en absolutt sluttdato som gjør at vi må skru av gamle tjenester i mai 2024. Ifm. denne moderniseringen bytter vi også løsning for pålogging, og går over til OAuth 2.0 standarden for både API-klienter og sluttbrukere.

Noen tjenester vil slutte å fungere på gammel URL (metadata), mens andre vil man kunne bruke som før (DDS, Bokskya, Ordre).

Men for å slippe å forholde seg til ulike påloggingsløsninger og API-generasjoner, så anbefaler vi at man skriver om all API-bruk til disse nye endepunktene.

Datoer for utfasing

Utfasingsdato er nært forestående: 21.05.2024

  • Forhandlere:

    • Onix Export (prod) ikke lenger mulig å nå med gamle URLer: 21.05.2024

    • Object Export (prod) ikke lenger mulig å nå med gamle URLer: 21.05.2024

  • Forlag og distributører:

    • Onix Import (prod) ikke lenger mulig å nå med gamle URLer: 21.05.2024

    • Object Import (prod) ikke lenger mulig å nå med gamle URLer: 21.05.2024

Når er nye endepunkter tilgjengelige?

  • Nye URLer i test, tilgjengelig fra 20.03.2024

    • Vi sender ut påloggingsinformasjon fortløpende fra denne dato

  • Nye URLer i prod, tilgjengelig fra 22.03.2024

    • Forhandlere har allerede fått nye URLer og påloggingsinformasjon for Onix Export (november 2023)

    • Vi sender ut påloggingsinformasjon fortløpende

Berørte APIer

Vi anbefaler å bytte alle APIer, men det er metadata (Onix og Object) som haster

Forhandlere

  • (warning) Må bytte:

    • Onix Export API (nåværende URLer: api.boknett.no/metadata/export/onix/*)

    • Object Export API (nåværende URLer: api.boknett.no/metadata/export/object/*)

  • Anbefaler å bytte:

    • Digital Distribution System (nåværende URLer: api.dds.boknett.no/*, idp.dds.boknett.no/*)

    • Order API (nåværende URLer: api.order.boknett.no)

Utgivere og distributører

  • (warning) Må bytte:

    • Onix Import API (nåværende URLer: api.boknett.no/metadata/import/onix/*)

    • Object Import API (nåværende URLer: api.boknett.no/metadata/import/object/*)


Technical Guide (in english)

What do I need to do?

Some old API-endpoints will be turned of in May - implementing those are high priority

General

  • Change the authentication to Authentication Service

    • Each service has it’s own audience needed when fetching token

  • Change the URL for each API

    • No need for the previously required Date-header

  • Response-headers are considered to be case-insensitive

    • I.e. don’t only look for Location, the header might be called location

  • If you are getting 413 errors try to reduce pagesize in the call, we will have a period with reduced payload-capabilities (both request and response)

  • Onix/Object: The returned next-token will be a much longer string than before (around 200 characters), this is a string you should persist, so ensure your column is wide enough

Audiences

The APIs are divided into several audiences (groups). Each API needs an access-token for the corresponding audience. So be sure to use the appropriate audience when fetching the token or you will get 403.

Audience-value to use with Auth, see Use of Audience

metadata

https://api.bokbasen.io/metadata/

dds

https://api.bokbasen.io/dds/

bokskya

https://api.bokbasen.io/bokskya/

orders

https://api.bokbasen.io/orders/

reporting

https://api.bokbasen.io/reporting/

Production -vs- Test/stage

  • Login/auth → auth.bokbasen.io -vs- auth.stage.bokbasen.io

  • Audience → api.bokbasen.io -vs- api.stage.bokbasen.io

  • API-endpoints → api.bokbasen.io -vs- api.stage.bokbasen.io

Endpoints for Retailers

Each API has gotten a new URL. Here you can see a overview of the new URLs as well as the corresponding audience to use.

Auth
Audience

API

Method

New endpoint URL

metadata

(warning) ONIX (warning)

GET

https://api.bokbasen.io/metadata/export/onix/v1

(warning) Objects (warning)

GET

https://api.bokbasen.io/metadata/export/object/v1

dds

Inventory

GET

https://api.bokbasen.io/dds/inventory/v2

https://api.bokbasen.io/dds/inventory/v2/{isbn}

Orders and reporting

POST

https://api.bokbasen.io/dds/order/v1

Bokbasen distributes binaries to the end user

POST

https://api.bokbasen.io/dds/order/subscription/v1

Content download

GET

GET

GET

GET

https://api.bokbasen.io/dds/content/v1/{fulfillmentId}

https://api.bokbasen.io/dds/content/v1/raw/{resourceId}

https://api.bokbasen.io/dds/content/v1/library/{resourceId}

https://api.bokbasen.io/dds/content/v1/{resourceId}/sample

bokskya

Bookshelf / OPDS

GET

https://api.bokbasen.io/bokskya/content/v1/{id}

IDM

POST

GET

GET

https://api.bokbasen.io/bokskya/account/v1

https://api.bokbasen.io/bokskya/account/v1/{id}

https://api.bokbasen.io/bokskya/account/v1/{email}

orders

Send Order NEW REQUIRED HEADER

POST

https://api.bokbasen.io/orders/v1

Update order line

POST

https://api.bokbasen.io/orders/v1/{id}/update

Update order line status

POST

https://api.bokbasen.io/orders/v1/{id}/lines/{lineId}

Get Order data

GET

GET

GET

https://api.bokbasen.io/orders/v1

https://api.bokbasen.io/orders/v1/{id}

https://api.bokbasen.io/orders/v1/{id}/editx

reporting

Reporting from subscription services

POST

https://api.bokbasen.io/reporting/streaming/v1

Endpoints for Publishers & Distributors

Each API has gotten a new URL. Here you can see a overview of the new URLs as well as the corresponding audience to use.

The Object Import API will be limited to 4.5MB payload UPDATED

Previously we assumed 6MB was the limit, but binary payloads are base64 encoded, and therefore the limit is reduced.

Contact us if this is a problem for you, so we can talk about alternatives.

Auth
Audience

API

Method

New endpoint URL

metadata

(warning) Import Service (warning)

POST

GET

GET

POST

https://api.bokbasen.io/metadata/import/onix/v1

https://api.bokbasen.io/metadata/import/onix/v1/status/{id}

https://api.bokbasen.io/metadata/import/onix/v1/status/all

https://api.bokbasen.io/metadata/import/object/v1/{id}/{type}

orders

Update order line

POST

https://api.bokbasen.io/orders/v1/{id}/update

Update order line status

POST

https://api.bokbasen.io/orders/v1/{id}/lines/{lineId}

Get Order data

GET

GET

GET

https://api.bokbasen.io/orders/v1

https://api.bokbasen.io/orders/v1/{id}

https://api.bokbasen.io/orders/v1/{id}/editx

How can I test?

When you have gotten credentials (clientId + clientSecret) from Bokbasen.

  • No labels