From 9750d1158fd363047e967e571d9b9e4889ccd122 Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Fri, 14 Mar 2025 14:49:10 +0100
Subject: [PATCH 01/18] REST API: Continue user/users/{userId}/segments
---
.../rest_api_reference/input/ibexa-types.raml | 24 ++++++++++++++++++-
.../input/ibexa-user-users.raml | 10 +++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
index 20ae546d32..10632ac400 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml
@@ -2305,6 +2305,29 @@ SegmentUpdateWrapper:
properties:
SegmentCreate: SegmentUpdate
+UserSegmentList:
+ type: object
+ properties:
+ UserSegment:
+ type: UserSegment[]
+
+UserSegmentListWrapper:
+ description: 'JSON object with only a UserSegmentList property'
+ type: object
+ properties:
+ UserSegmentList: UserSegmentList
+
+UserSegment:
+ type: object
+ properties:
+ id: integer
+ identifier: string
+ name: string
+ SegmentGroup:
+ type: Ref
+ User:
+ type: Ref
+
SortClause:
description: 'This class is the base for SortClause classes, used to set sorting of content queries.'
type: object
@@ -6274,4 +6297,3 @@ ActionConfiguration:
updatedAt:
type: datetime
description: 'Timestamp indicating when the action configuration was last updated.'
-
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
index 674b939dd3..9b3b5f300a 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
@@ -330,13 +330,21 @@ head:
/segments:
get:
displayName: View user segments
- description: TODO
+ description: Return user's segment list.
headers:
Accept:
description: If set, the user's segment list is returned in XML or JSON format.
example: |
application/vnd.ibexa.api.UserSegmentList+xml
application/vnd.ibexa.api.UserSegmentList+json
+ responses:
+ 200:
+ body:
+ application/vnd.ibexa.api.UserSegmentList+xml:
+ type: UserSegmentList
+ application/vnd.ibexa.api.UserSegmentList+json:
+ type: UserSegmentListWrapper
+ #TODO: 404, 401, …?
post:
displayName: Assign Segments to User
description: Assigns Segments from payload to User given by ID.
From fef7031a1c7160596ffa6bcc1ced810128e4d7e3 Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Fri, 14 Mar 2025 15:57:32 +0100
Subject: [PATCH 02/18] ibexa-user-users.raml: Fix typo
---
.../api/rest_api/rest_api_reference/input/ibexa-user-users.raml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
index 9b3b5f300a..b1be0355e1 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
@@ -33,7 +33,7 @@ get:
application/vnd.ibexa.api.UserRefList+json:
type: UserRefListWrapper
404:
- description: If there are no visibile Users matching the filter.
+ description: If there are no visible Users matching the filter.
head:
displayName: Verify Users
description: Verifies if there are Users matching given filter.
From 9634e500f121d4f6f813b4c537c5f802d7d429cf Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Fri, 14 Mar 2025 15:59:54 +0100
Subject: [PATCH 03/18] ibexa-user-users.raml: Fix typo
---
.../api/rest_api/rest_api_reference/input/ibexa-user-users.raml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
index b1be0355e1..aa447063c9 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
@@ -50,7 +50,7 @@ head:
200:
description: OK - verifies if there are Users matching the given filter.
404:
- description: Error - there are no visibile Users matching the filter.
+ description: Error - there are no visible Users matching the filter.
/current:
get:
displayName: Load current User
From 6f9daa78998bd6e377434bcb67033b29c10f6a7f Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Fri, 14 Mar 2025 16:04:23 +0100
Subject: [PATCH 04/18] REST API: Continue user/users/{userId}/segments
responses
---
.../rest_api/rest_api_reference/input/ibexa-user-users.raml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
index aa447063c9..6e93bb3ada 100644
--- a/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
+++ b/docs/api/rest_api/rest_api_reference/input/ibexa-user-users.raml
@@ -344,7 +344,8 @@ head:
type: UserSegmentList
application/vnd.ibexa.api.UserSegmentList+json:
type: UserSegmentListWrapper
- #TODO: 404, 401, …?
+ 404:
+ description: Error - the user doesn't exist.
post:
displayName: Assign Segments to User
description: Assigns Segments from payload to User given by ID.
From f7fb81d7604b5fe49704125f84ad3a3c5cc25ae9 Mon Sep 17 00:00:00 2001
From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Date: Mon, 17 Mar 2025 14:57:30 +0100
Subject: [PATCH 05/18] REST API: Continue user/users/{userId}/segments
responses
---
.../UserSegmentAssignInput.json.example | 5 ++++
.../UserSegmentAssignInput.xml.example | 3 +++
.../segments/UserSegmentList.json.example | 22 ++++++++++++++++++
.../segments/UserSegmentList.xml.example | 10 ++++++++
.../rest_api_reference/input/ibexa-types.raml | 16 +++++++++++++
.../input/ibexa-user-users.raml | 23 +++++++++++++++++++
6 files changed, 79 insertions(+)
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.xml.example
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.json.example b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.json.example
new file mode 100644
index 0000000000..43e685fdf4
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.json.example
@@ -0,0 +1,5 @@
+{
+ "UserSegmentAssignInput": {
+ "segments": ["corporate_account"]
+ }
+}
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.xml.example
new file mode 100644
index 0000000000..bc3f970a01
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentAssignInput.xml.example
@@ -0,0 +1,3 @@
+
If there are no visibile Users matching the filter.
+If there are no visible Users matching the filter.
Error - there are no visibile Users matching the filter.
+Error - there are no visible Users matching the filter.
TODO
+Return user's segment list.
Code | +Description | +
---|---|
+ + 200 + + | ++ + | +
+ 404 + | +
+ Error - the user doesn't exist. + |
+
Type | +Description | +
---|---|
+ + UserSegmentList + + | +This class lists segment assignements. | +
+ + UserSegmentListWrapper + + | +JSON object with only a UserSegmentList property | +
Code: 200
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<UserSegmentList media-type="application/vnd.ibexa.api.UserSegmentList+xml" href="/api/ibexa/v2/user/users/14/segments">
+ <UserSegment media-type="application/vnd.ibexa.api.UserSegment+xml">
+ <id>1</id>
+ <identifier>corporate_account</identifier>
+ <name>Corporate Account</name>
+ <SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts"/>
+ <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/>
+ </UserSegment>
+</UserSegmentList>
+
+
+ + file_copy + +
+
+ {
+ "UserSegmentList": {
+ "_media-type": "application\/vnd.ibexa.api.UserSegmentList+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/14\/segments",
+ "UserSegment": [
+ {
+ "_media-type": "application\/vnd.ibexa.api.UserSegment+json",
+ "id": 1,
+ "identifier": "corporate_account",
+ "name": "Corporate Account",
+ "SegmentGroup": {
+ "_media-type": "application\/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "\/api\/ibexa\/v2\/segment_groups\/corporate_accounts"
+ },
+ "User": {
+ "_media-type": "application\/vnd.ibexa.api.User+json",
+ "_href": "\/api\/ibexa\/v2\/user\/users\/14"
+ }
+ }
+ ]
+ }
+}
+
+ Code | +Description | +
---|---|
+ 204 + | +
+ No Content - segments assigned to user. + |
+
+ 401 + | +
+ Error - the requesting user is not authorized to assign this segment to the given user. + |
+
+ 404 + | +
+ Error - the user doesn't exist. + |
+
Type | +Description | +
---|---|
+ + UserSegmentAssignInput + + | +This class represents a segment assignment input. | +
+ + UserSegmentAssignInputWrapper + + | +JSON object with only a UserSegmentAssignInput property. | +
Code | +Description | +
---|---|
+ 204 + | +
+ No Content - segments unassigned from user. + |
+
+ 401 + | +
+ Error - the requesting user is not authorized to unassign this segment from the given user. + |
+
+ 404 + | +
+ Error - the segment or the user doesn't exist. + |
+
action
, parameter: value
(the action)logged_at
, parameters: value
and operator
logged_at
value
value can be anything accepted by DateTimeImmutable
logged_at
operator
value can be one of the following:logged_at
value
value can be anything accepted by DateTimeImmutable
+logged_at
operator
value can be one of the following:application/vnd.ibexa.api.CartEntryAdd+xml
application/vnd.ibexa.api.CartEntryAdd+json
+
+ Accept
+The updated Cart is returned in XML or JSON format.
+Property | +Value | +
---|---|
Type | ++ + + string + + + + + | +
Examples | +
+ application/vnd.ibexa.api.Cart+xml
+application/vnd.ibexa.api.Cart+json
|
Code | +Description | +
---|---|
+ + 200 + + | +
+ OK - return the updated cart + |
+
+ 400 + | +
+ Error - the input doesn't match the input schema definition. + |
+
+ 401 + | +
+ Error - the user is not authorized to add an entry to this cart. + |
+
+ 404 + | +
+ Error - the identifier doesn't match any cart. + |
+
application/vnd.ibexa.api.CartEntryUpdate+xml
application/vnd.ibexa.api.CartEntryUpdate+json
+
+ Accept
+The updated Cart is returned in XML or JSON format.
+Property | +Value | +
---|---|
Type | ++ + + string + + + + + | +
Examples | +
+ application/vnd.ibexa.api.Cart+xml
+application/vnd.ibexa.api.Cart+json
|
Code | +Description | +
---|---|
+ + 200 + + | +
+ OK - return the updated cart + |
+
+ 401 + | +
+ Error - the user is not authorized to remove an entry from this cart. + |
+
+ 404 + | +
+ Error - the identifier doesn't match any cart. + |
+
Removes the given entry from the given Cart.
+Accept
+The updated Cart is returned in XML or JSON format.
+Property | +Value | +
---|---|
Type | ++ + + string + + + | +
Examples | +
+ application/vnd.ibexa.api.Cart+xml
+application/vnd.ibexa.api.Cart+json
+
+ |
+
Code | +Description | +
---|---|
+ + 200 + + | +
+ OK - return the updated cart + |
+
+ 401 + | +
+ Error - the user is not authorized to remove an entry from this cart. + |
+
+ 404 + | +
+ Error - the identifiers don't match any cart or entry. + |
+
Type | +Description | +
---|---|
+ + CartEntryUpdate + + | ++ |
+ + CartEntryUpdateWrapper + + | +JSON object with only a CartEntryUpdate property. | +
+ + Cart + + | +This class represents a Cart | +
+ + CartWrapper + + | +JSON object with only a Cart property. | +
OK - return the updated cart
Error - the input doesn't match the input schema definition.
+Error - the user is not authorized to remove an entry from this cart.
+Error - the user is not authorized to update an entry of this cart.
Error - the identifier doesn't match any cart.
+Error - the identifiers don't match any cart or entry.
Accept
-Use CartSummary only if you need additional product info (Product type, Content). If set, the Cart Summary is returned in XML or JSON format.
+Use CartSummary only if you require additional product information (such as Product type or Content). Depending on the suffix set, the Cart Summary is returned in XML or JSON format.
-
+ Returned when invalid Criterion or Sort clause is used. |
@@ -140357,11 +140357,8 @@