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

Perso REST: ezp -> ibexa #2346

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Perso REST: ezp -> ibexa #2346

wants to merge 7 commits into from

Conversation

reithor
Copy link
Contributor

@reithor reithor commented Mar 27, 2024

PR Fixes wrong namings (REST API)
See https://github.com/ibexa/personalization/blob/main/src/bundle/Resources/config/routing_rest.yaml for correct REST routes

Section about contenttypes endpoint needs to reevaluated - the endpoint does not exist in current release!

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@reithor
Copy link
Contributor Author

reithor commented Mar 28, 2024

Hi @ciastektk ,
Docs mention a contenttypes endpoint for the REST API (see
https://doc.ibexa.co/en/latest/personalization/enable_personalization/#check-whether-the-bundle-provides-rest-data) - which is not defined in https://github.com/ibexa/personalization/blob/main/src/bundle/Resources/config/routing_rest.yaml.

Was the endpoint removed at some point or is /personalization/v1/content/list/{contentIds} a replacement ?

Copy link
Contributor

@mnocon mnocon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

docs/personalization/enable_personalization.md Outdated Show resolved Hide resolved
@mnocon
Copy link
Contributor

mnocon commented Jul 1, 2024

@reithor About:

Hi @ciastektk , Docs mention a contenttypes endpoint for the REST API (see https://doc.ibexa.co/en/latest/personalization/enable_personalization/#check-whether-the-bundle-provides-rest-data) - which is not defined in https://github.com/ibexa/personalization/blob/main/src/bundle/Resources/config/routing_rest.yaml.

Was the endpoint removed at some point or is /personalization/v1/content/list/{contentIds} a replacement ?

I see these endpoint was removed in ezsystems/ezrecommendation-client#102 (cross-merged in https://github.com/ibexa/personalization/pull/117) and there is no replacement mentioned - it's described as useless code.

Could you please remove mentions of this endpoint and then we could merge this?

@reithor
Copy link
Contributor Author

reithor commented Sep 20, 2024

@mnocon @nkostiv :
changes:

  • details about token authorization
  • the export command part (export command always needs siteaccess, customer-id and license-key)
  • added information about where exported files ares stored locally (see also: Update enable_personalization.md #2499)

@reithor reithor marked this pull request as ready for review September 20, 2024 10:04
@adriendupuis adriendupuis changed the title ezp -> ibexa Perso REST: ezp -> ibexa Sep 20, 2024
Copy link
Contributor

@adriendupuis adriendupuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview: https://ez-systems-developer-documentation--2346.com.readthedocs.build/en/2346/personalization/enable_personalization/#check-whether-the-bundle-provides-rest-data

Thank you @reithor for the update and enhencement.

I'm not sure about the examples using curl format instead of HTTP format. I would have fix and update the HTTP request examples. At list, the new curl example is correct while previous HTTP syntax was wrong (wrong regarding HTTP syntax even before being outdated regarding perso REST).

```

Additionally, check whether the `contenttypes` endpoint is working with the following request:
Additionally, check whether the `contentlist` endpoint is working with the following request:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```bash


To check whether the `content` endpoint is working as expected, perform the following request:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```bash

Comment on lines +184 to 189

curl --location '{PERSONALIZATION_HOST_URI}/api/ibexa/v2/personalization/v1/contentlist/{comma_separated_content_ids}?lang={comma_separated_languages}' \
--header 'Accept: application/vnd.ibexa.api.ContentList+json' \
--header 'Authorization: Bearer {BEARER_TOKEN}'

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl --location '{PERSONALIZATION_HOST_URI}/api/ibexa/v2/personalization/v1/contentlist/{comma_separated_content_ids}?lang={comma_separated_languages}' \
--header 'Accept: application/vnd.ibexa.api.ContentList+json' \
--header 'Authorization: Bearer {BEARER_TOKEN}'
```
curl --location '{PERSONALIZATION_HOST_URI}/api/ibexa/v2/personalization/v1/contentlist/{comma_separated_content_ids}?lang={comma_separated_languages}' \
--header 'Accept: application/vnd.ibexa.api.ContentList+json' \
--header 'Authorization: Bearer {BEARER_TOKEN}'
```

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

Successfully merging this pull request may close these issues.

6 participants