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 @@ + + corporate_account + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.json.example b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.json.example new file mode 100644 index 0000000000..8aca1a9847 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.json.example @@ -0,0 +1,22 @@ +{ + "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" + } + } + ] + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.xml.example new file mode 100644 index 0000000000..91a660eab4 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/user/users/user_id/segments/UserSegmentList.xml.example @@ -0,0 +1,10 @@ + + + + 1 + corporate_account + Corporate Account + + + + diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml index 1868a4391a..fd93604609 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa-cart.raml @@ -85,7 +85,7 @@ post: 401: description: Error - the user is not authorized to get this cart. 404: - description: Error - The identifier do not match any Cart. + description: Error - the identifier do not match any cart. delete: displayName: Delete Cart description: Deletes Cart by its identifier. @@ -98,11 +98,30 @@ post: example: | application/vnd.ibexa.api.CartMetadataUpdate+xml application/vnd.ibexa.api.CartMetadataUpdate+json + Accept: + description: The updated Cart is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.Cart+xml + application/vnd.ibexa.api.Cart+json body: application/vnd.ibexa.api.CartMetadataUpdate+xml: type: CartMetadataUpdate application/vnd.ibexa.api.CartMetadataUpdate+json: type: CartMetadataUpdateWrapper + responses: + 200: + description: OK - return the updated cart + body: + application/vnd.ibexa.api.Cart+xml: + type: Cart + application/vnd.ibexa.api.Cart+json: + type: CartWrapper + 400: + description: Error - the input doesn't match the input schema definition. + 401: + description: Error - the user is not authorized to update this cart. + 404: + description: Error - the identifier doesn't match any cart. /entry: post: displayName: Add Entry to Cart @@ -113,16 +132,58 @@ post: example: | application/vnd.ibexa.api.CartEntryAdd+xml application/vnd.ibexa.api.CartEntryAdd+json + Accept: + description: The updated Cart is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.Cart+xml + application/vnd.ibexa.api.Cart+json body: application/vnd.ibexa.api.CartEntryAdd+xml: type: CartEntryAdd application/vnd.ibexa.api.CartEntryAdd+json: type: CartEntryAddWrapper example: !include examples/cart/entry/POST/CartEntryAdd.json.example + responses: + 200: + description: OK - return the updated cart + body: + application/vnd.ibexa.api.Cart+xml: + type: Cart + application/vnd.ibexa.api.Cart+json: + type: CartWrapper + 400: + description: Error - the input doesn't match the input schema definition. + 401: + description: Error - the user is not authorized to add an entry to this cart. + 404: + description: Error - the identifier doesn't match any cart. /{entryId}: delete: displayName: Remove Entry from Cart description: Removes the given entry from the given Cart. + headers: + Accept: + description: The updated Cart is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.Cart+xml + application/vnd.ibexa.api.Cart+json + body: + application/vnd.ibexa.api.CartEntryUpdate+xml: + type: CartEntryUpdate + application/vnd.ibexa.api.CartEntryUpdate+json: + type: CartEntryUpdateWrapper + responses: + 200: + description: OK - return the updated cart + body: + application/vnd.ibexa.api.Cart+xml: + type: Cart + application/vnd.ibexa.api.Cart+json: + type: CartWrapper + 401: + description: Error - the user is not authorized to remove an entry from this cart. + 404: + description: Error - the identifiers don't match any cart or entry. patch: displayName: Update Entry from Cart description: Updates the given entry from the given Cart. @@ -132,11 +193,30 @@ post: example: | application/vnd.ibexa.api.CartEntryUpdate+xml application/vnd.ibexa.api.CartEntryUpdate+json + Accept: + description: The updated Cart is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.Cart+xml + application/vnd.ibexa.api.Cart+json body: application/vnd.ibexa.api.CartEntryUpdate+xml: type: CartEntryUpdate application/vnd.ibexa.api.CartEntryUpdate+json: type: CartEntryUpdateWrapper + responses: + 200: + description: OK - return the updated cart + body: + application/vnd.ibexa.api.Cart+xml: + type: Cart + application/vnd.ibexa.api.Cart+json: + type: CartWrapper + 400: + description: Error - the input doesn't match the input schema definition. + 401: + description: Error - the user is not authorized to update an entry of this cart. + 404: + description: Error - the identifiers don't match any cart or entry. /empty: post: displayName: Empty Cart diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-corporate.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-corporate.raml index 571472c53e..ea018ed151 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa-corporate.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa-corporate.raml @@ -235,10 +235,10 @@ get: type: MemberListWrapper example: !include examples/corporate/companies/company_id/members/GET/MemberList.json.example 400: + description: Returned when invalid Criterion or Sort clause is used. body: application/vnd.ibexa.api.ErrorMessage: type: ErrorMessage - description: Returned when invalid Criterion or Sort clause is used. post: displayName: Create a company member description: Creates a company member. 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..8a03f70a40 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 @@ -1388,7 +1388,7 @@ LocationList: LocationQuery: description: 'This class is used to perform a Location query.' - type: object + type: Query LocationUpdateWrapper: description: 'JSON object with only a LocationUpdate property.' @@ -2305,6 +2305,45 @@ SegmentUpdateWrapper: properties: SegmentCreate: SegmentUpdate +UserSegmentList: + description: 'This class lists segment assignements.' + type: object + properties: + UserSegment: + type: UserSegment[] + +UserSegmentListWrapper: + description: 'JSON object with only a UserSegmentList property' + type: object + properties: + UserSegmentList: UserSegmentList + +UserSegment: + description: 'This class reprensents a segment assigned to a user' + type: object + properties: + id: integer + identifier: string + name: string + SegmentGroup: + type: Ref + User: + type: Ref + +UserSegmentAssignInput: + description: 'This class represents a segment assignment input.' + type: object + properties: + segments: + type: array + items: string + +UserSegmentAssignInputWrapper: + description: 'JSON object with only a UserSegmentAssignInput property.' + type: object + properties: + UserSegmentAssignInput: UserSegmentAssignInput + SortClause: description: 'This class is the base for SortClause classes, used to set sorting of content queries.' type: object @@ -6274,4 +6313,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..38e2adf19c 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. @@ -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 @@ -330,13 +330,24 @@ 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 + example: !include examples/user/users/user_id/segments/UserSegmentList.xml.example + application/vnd.ibexa.api.UserSegmentList+json: + type: UserSegmentListWrapper + example: !include examples/user/users/user_id/segments/UserSegmentList.json.example + 404: + description: Error - the user doesn't exist. post: displayName: Assign Segments to User description: Assigns Segments from payload to User given by ID. @@ -346,10 +357,31 @@ head: example: | application/vnd.ibexa.api.UserSegmentAssignInput+xml application/vnd.ibexa.api.UserSegmentAssignInput+json + body: + application/vnd.ibexa.api.UserSegmentAssignInput+xml: + type: UserSegmentAssignInput + example: !include examples/user/users/user_id/segments/UserSegmentAssignInput.xml.example + application/vnd.ibexa.api.UserSegmentAssignInput+json: + type: UserSegmentAssignInputWrapper + example: !include examples/user/users/user_id/segments/UserSegmentAssignInput.json.example + responses: + 204: + description: No Content - segments assigned to user. + 401: + description: Error - the requesting user is not authorized to assign this segment to the given user. + 404: + description: Error - the user doesn't exist. /{segmentIdentifier}: delete: displayName: Unassign Segment from User description: The Segment designated by its identifier is unassigned from the User given by ID. + responses: + 204: + description: No Content - segments unassigned from user. + 401: + description: Error - the requesting user is not authorized to unassign this segment from the given user. + 404: + description: Error - the segment or the user doesn't exist. /drafts: get: displayName: Load user drafts diff --git a/docs/api/rest_api/rest_api_reference/rest_api_reference.html b/docs/api/rest_api/rest_api_reference/rest_api_reference.html index 4d204f3de2..1f473e28c1 100644 --- a/docs/api/rest_api/rest_api_reference/rest_api_reference.html +++ b/docs/api/rest_api/rest_api_reference/rest_api_reference.html @@ -51942,7 +51942,7 @@
Possible responses
404 -

If there are no visibile Users matching the filter.

+

If there are no visible Users matching the filter.

@@ -52488,7 +52488,7 @@
Possible responses
404 -

Error - there are no visibile Users matching the filter.

+

Error - there are no visible Users matching the filter.

@@ -57129,7 +57129,7 @@

/user/users/{us GET /user/users/{userId}/segments

-

TODO

+

Return user's segment list.

Header parameters
@@ -57172,14 +57172,308 @@
Header parameters
- - +
+
Possible responses
+
+ + + + + + + + + + + + + + + + + +
CodeDescription
+ + 200 + + +

+
+ 404 + +

Error - the user doesn't exist.

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + + + + + +
TypeDescription
+ + 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>
+
+                            
+
+ View more +
+
+
+

+ 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"
+                }
+            }
+        ]
+    }
+}
+
+                            
+
+ View more +
+
+
+ +
+
+
@@ -57241,14 +57535,259 @@
Header parameters
- - +
+
Possible responses
+
+ + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ 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.

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + + + + + +
TypeDescription
+ + UserSegmentAssignInput + + This class represents a segment assignment input.
+ + UserSegmentAssignInputWrapper + + JSON object with only a UserSegmentAssignInput property.
+
+
+
+
+
+ +
+
+
+
+
+

+ file_copy + +

+
+                                <UserSegmentAssignInput>
+    <segments>corporate_account</segments>
+</UserSegmentAssignInput>
+
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                {
+    "UserSegmentAssignInput": {
+        "segments": ["corporate_account"]
+    }
+}
+
+                            
+
+ View more +
+
+
+ +
-
+
+
+
@@ -57285,12 +57824,53 @@

+

Possible responses
+
+ + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ 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.

+
+
+
+
-
+
+
+
@@ -74075,7 +74655,7 @@
Possible responses
404 -

Error - The identifier do not match any Cart.

+

Error - the identifier do not match any cart.

@@ -74445,6 +75025,42 @@
Header parameters
application/vnd.ibexa.api.CartMetadataUpdate+xml application/vnd.ibexa.api.CartMetadataUpdate+json + + + + + +
+ +
+

Accept

+

The updated Cart is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + @@ -74455,7 +75071,57 @@
Header parameters
- +
+
Possible responses
+
+
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.Cart+xml +application/vnd.ibexa.api.Cart+json
+ + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ + 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 update this cart.

+
+ 404 + +

Error - the identifier doesn't match any cart.

+
+
+
+
Types
@@ -74482,6 +75148,22 @@
Types
JSON object with only a CartMetadataUpdate property. + + + + + Cart + + + This class represents a Cart + + + + + CartWrapper + + + JSON object with only a Cart property. @@ -74499,7 +75181,15 @@
Types
- +
+
+
+ +
+
+
+
@@ -74565,6 +75255,42 @@
Header parameters
application/vnd.ibexa.api.CartEntryAdd+xml application/vnd.ibexa.api.CartEntryAdd+json + + + + + +
+ +
+

Accept

+

The updated Cart is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + @@ -74575,7 +75301,57 @@
Header parameters
- +
+
Possible responses
+
+
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.Cart+xml +application/vnd.ibexa.api.Cart+json
+ + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ + 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.

+
+
+
+
Types
@@ -74602,6 +75378,22 @@
Types
JSON object with only a CartEntryAdd property. + + + + + Cart + + + This class represents a Cart + + + + + CartWrapper + + + JSON object with only a Cart property. @@ -74735,7 +75527,15 @@
Types
- +
+
+
+
    +
+
+
+
+
@@ -74777,14 +75577,158 @@

/cart/{ide

Removes the given entry from the given Cart.

+
+
Header parameters
+
+

Accept

+

The updated Cart is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + +
Examples + application/vnd.ibexa.api.Cart+xml +application/vnd.ibexa.api.Cart+json + +
+
+
+
+ - +
+
Possible responses
+
+ + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ + 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.

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ + CartEntryUpdate + +
+ + CartEntryUpdateWrapper + + JSON object with only a CartEntryUpdate property.
+ + Cart + + This class represents a Cart
+ + CartWrapper + + JSON object with only a Cart property.
+
+
+

-
+
+
+
+
    +
+
+
+
+
+
+
+
    +
+
+
+
+
@@ -74836,6 +75780,42 @@
Header parameters
application/vnd.ibexa.api.CartEntryUpdate+xml application/vnd.ibexa.api.CartEntryUpdate+json + + + + + +
+ +
+

Accept

+

The updated Cart is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + @@ -74846,7 +75826,57 @@
Header parameters
- +
+
Possible responses
+
+
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.Cart+xml +application/vnd.ibexa.api.Cart+json
+ + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescription
+ + 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 update an entry of this cart.

+
+ 404 + +

Error - the identifiers don't match any cart or entry.

+
+
+
+
Types
@@ -74873,6 +75903,22 @@
Types
JSON object with only a CartEntryUpdate property. + + + + + Cart + + + This class represents a Cart + + + + + CartWrapper + + + JSON object with only a Cart property. @@ -74890,7 +75936,15 @@
Types
- +
+
+
+
    +
+
+
+
+
@@ -75012,7 +76066,7 @@

/cart/{identifier}

Header parameters

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.

@@ -105769,7 +106823,7 @@
Possible responses
@@ -139303,11 +140357,8 @@
Query parameters
  • type: action, parameter: value (the action)
  • type: 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:
  • @@ -150646,7 +151697,7 @@
    Types
    * -(object) +(Query) - This class is used to perform a Location query. @@ -155432,6 +156483,264 @@
    Types
    +
    +
      +
    +
    + + + + + + + + + + + +
    -

    +

    Returned when invalid Criterion or Sort clause is used.