From 73998f8943ab4bb880a122341d7afb1ff8ae06c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20D=C4=85browski?=
<64841871+dabrt@users.noreply.github.com>
Date: Thu, 20 Feb 2025 00:57:01 +0100
Subject: [PATCH 1/8] IBX-9452: Describe segment and segment group endpoints
---
.../segment_groups/POST/SegmentGroup.json.example | 9 +++++++++
.../segment_groups/POST/SegmentGroup.xml.example | 6 ++++++
.../POST/SegmentGroupCreate.json.example | 6 ++++++
.../POST/SegmentGroupCreate.xml.example | 5 +++++
.../id/PATCH/SegmentGroup.json.example | 9 +++++++++
.../id/PATCH/SegmentGroup.xml.example | 6 ++++++
.../id/PATCH/SegmentGroupUpdate.json.example | 6 ++++++
.../id/PATCH/SegmentGroupUpdate.xml.example | 5 +++++
.../examples/segments/POST/Segment.json.example | 13 +++++++++++++
.../examples/segments/POST/Segment.xml.example | 7 +++++++
.../segments/POST/SegmentCreate.json.example | 7 +++++++
.../segments/POST/SegmentCreate.xml.example | 6 ++++++
.../examples/segments/id/PATCH/Segment.json.example | 13 +++++++++++++
.../examples/segments/id/PATCH/Segment.xml.example | 7 +++++++
.../segments/id/PATCH/SegmentUpdate.json.example | 7 +++++++
.../segments/id/PATCH/SegmentUpdate.xml.example | 6 ++++++
.../segments/identifier/GET/Segment.json.example | 13 +++++++++++++
.../segments/identifier/GET/Segment.xml.example | 7 +++++++
18 files changed, 138 insertions(+)
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.xml.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.json.example
create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.xml.example
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.json.example
new file mode 100644
index 0000000000..070f0d0ddb
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.json.example
@@ -0,0 +1,9 @@
+{
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/segment_group_identifier",
+ "id": 3,
+ "identifier": "segment_group_identifier",
+ "name": "Segment Group Name"
+ }
+}
\ No newline at end of file
diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.xml.example
new file mode 100644
index 0000000000..d73f2da50d
--- /dev/null
+++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroup.xml.example
@@ -0,0 +1,6 @@
+
+
- GET - /segment_groups/{identifier} + POST + /segment_groups
-Loads segment group.
+Creates a segment group.
Content-Type
+A SegmentGroupCreate schema encoded in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.SegmentGroupCreate+xml
+application/vnd.ibexa.api.SegmentGroupCreate+json
+
+ |
+
Accept
-If set, the segment group is returned in XML or JSON format.
+A segment group is returned in XML or JSON format.
| - 200 |
- OK - return the segment group. +OK - list the segment groups. |
| - 401 + + 400 + |
- Error - the user is not authorized to load this segment group. +Error - input data validation failed. |
| - 404 + + 401 + |
- Error - the identifier doesn't match any segment group. +Error - the user is not authorized to list segment groups. + |
+
| + + 406 + + | +
+ Error - input data is not acceptable. |
| + + SegmentGroupCreate + + | +This class represents a new segment group to create. | +
| + + SegmentGroupCreateWrapper + + | +JSON object with only a SegmentGroupCreate property. | +
SegmentGroup
@@ -66829,6 +66891,14 @@ Types |
JSON object with only a SegmentGroup property. | +
| + + ErrorMessage + + | +Represents an error response. Might contain additional properties depending on an error type. |
+ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroupCreate>
+ <identifier>segment_group_identifier</identifier>
+ <name>Segment Group Name</name>
+</SegmentGroupCreate>
+
+ + file_copy + +
+
+ {
+ "SegmentGroupCreate": {
+ "identifier": "segment_group_identifier",
+ "name": "Segment Group Name"
+ }
+}
+
+ + POST + Create a segment group +
+ ++ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroupCreate>
+ <identifier>segment_group_identifier</identifier>
+ <name>Segment Group Name</name>
+</SegmentGroupCreate>
+
+ + file_copy + +
+
+ {
+ "SegmentGroupCreate": {
+ "identifier": "segment_group_identifier",
+ "name": "Segment Group Name"
+ }
+}
+
+ file_copy
-
+
<?xml version="1.0" encoding="UTF-8"?>
-<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts">
- <id>1</id>
- <identifier>corporate_accounts</identifier>
- <name>Corporate Accounts</name>
-</SegmentGroup>
-
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/segment_group_identifier">
+ <id>3</id>
+ <identifier>segment_group_identifier</identifier>
+ <name>Segment Group Name</name>
+</SegmentGroup>
file_copy
-
+
{
"SegmentGroup": {
- "_media-type": "application\/vnd.ibexa.api.SegmentGroup+json",
- "_href": "\/api\/ibexa\/v2\/segment_groups\/corporate_accounts",
- "id": 1,
- "identifier": "corporate_accounts",
- "name": "Corporate Accounts"
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/segment_group_identifier",
+ "id": 3,
+ "identifier": "segment_group_identifier",
+ "name": "Segment Group Name"
}
}
- GET - Load segment group +
+ POST + Create a segment group
file_copy
-
+
<?xml version="1.0" encoding="UTF-8"?>
-<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts">
- <id>1</id>
- <identifier>corporate_accounts</identifier>
- <name>Corporate Accounts</name>
-</SegmentGroup>
-
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/segment_group_identifier">
+ <id>3</id>
+ <identifier>segment_group_identifier</identifier>
+ <name>Segment Group Name</name>
+</SegmentGroup>
file_copy
-+@@ -67032,47 +67275,978 @@{ "SegmentGroup": { - "_media-type": "application\/vnd.ibexa.api.SegmentGroup+json", - "_href": "\/api\/ibexa\/v2\/segment_groups\/corporate_accounts", - "id": 1, - "identifier": "corporate_accounts", - "name": "Corporate Accounts" + "_media-type": "application/vnd.ibexa.api.SegmentGroup+json", + "_href": "/api/ibexa/v2/segment_groups/segment_group_identifier", + "id": 3, + "identifier": "segment_group_identifier", + "name": "Segment Group Name" } }Types
- GET - /segment_groups/{identifier}/segments + PATCH + /segment_groups/{id}
-Lists segment group's segments.
+Updates the segment group's data.
Accept
-If set, the segment group is returned in XML or JSON format.
+Content-Type
+The SegmentGroupUpdate schema encoded in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.SegmentGroupUpdate+xml
+application/vnd.ibexa.api.SegmentGroupUpdate+json
+
+ |
+
Accept
+A segment group is returned in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ vnd.ibexa.api.SegmentGroup+xml
+vnd.ibexa.api.SegmentGroup+json
+
+ |
+
| Code | +Description | +
|---|---|
| + + 200 + + | +
+ OK - list the segment groups. + |
+
| Type | +Description | +
|---|---|
| + + SegmentGroupUpdate + + | +This class represents an update to an existing segment group. | +
| + + SegmentGroupUpdateWrapper + + | +JSON object with only a SegmentGroupUpdate property. | +
| + + SegmentGroup + + | +This class represents a segment group. | +
| + + SegmentGroupWrapper + + | +JSON object with only a SegmentGroup property. | +
+ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroupUpdate>
+ <identifier>modified_segment_group_identifier</identifier>
+ <name>Modified Segment Group Name</name>
+</SegmentGroupUpdate>
+
+ + file_copy + +
+
+ {
+ "SegmentGroupUpdate": {
+ "identifier": "modified_segment_group_identifier",
+ "name": "Modified Segment Group Name"
+ }
+}
+
+ + PATCH + Update segment group data +
+ ++ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroupUpdate>
+ <identifier>modified_segment_group_identifier</identifier>
+ <name>Modified Segment Group Name</name>
+</SegmentGroupUpdate>
+
+ + file_copy + +
+
+ {
+ "SegmentGroupUpdate": {
+ "identifier": "modified_segment_group_identifier",
+ "name": "Modified Segment Group Name"
+ }
+}
+
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/modified_segment_group_identifier">
+ <id>4</id>
+ <identifier>modified_segment_group_identifier</identifier>
+ <name>Modified Segment Group Name</name>
+</SegmentGroup>
+
+ + file_copy + +
+
+ {
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/modified_segment_group_identifier",
+ "id": 3,
+ "identifier": "modified_segment_group_identifier",
+ "name": "Modified Segment Group Name"
+ }
+}
+
+ + PATCH + Update segment group data +
+ +Code: 200
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/modified_segment_group_identifier">
+ <id>4</id>
+ <identifier>modified_segment_group_identifier</identifier>
+ <name>Modified Segment Group Name</name>
+</SegmentGroup>
+
+ + file_copy + +
+
+ {
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/modified_segment_group_identifier",
+ "id": 3,
+ "identifier": "modified_segment_group_identifier",
+ "name": "Modified Segment Group Name"
+ }
+}
+
+ + GET + /segment_groups/{identifier} +
+Loads segment group.
+ +Accept
+If set, the segment group is returned in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ vnd.ibexa.api.SegmentGroup+xml
+vnd.ibexa.api.SegmentGroup+json
+
+ |
+
| Code | +Description | +
|---|---|
| + + 200 + + | +
+ OK - return the segment group. + |
+
| + 401 + | +
+ Error - the user is not authorized to load this segment group. + |
+
| + 404 + | +
+ Error - the identifier doesn't match any segment group. + |
+
| Type | +Description | +
|---|---|
| + + SegmentGroup + + | +This class represents a segment group. | +
| + + SegmentGroupWrapper + + | +JSON object with only a SegmentGroup property. | +
+ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts">
+ <id>1</id>
+ <identifier>corporate_accounts</identifier>
+ <name>Corporate Accounts</name>
+</SegmentGroup>
+
+
+ + file_copy + +
+
+ {
+ "SegmentGroup": {
+ "_media-type": "application\/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "\/api\/ibexa\/v2\/segment_groups\/corporate_accounts",
+ "id": 1,
+ "identifier": "corporate_accounts",
+ "name": "Corporate Accounts"
+ }
+}
+
+ + GET + Load segment group +
+ +Code: 200
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts">
+ <id>1</id>
+ <identifier>corporate_accounts</identifier>
+ <name>Corporate Accounts</name>
+</SegmentGroup>
+
+
+ + file_copy + +
+
+ {
+ "SegmentGroup": {
+ "_media-type": "application\/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "\/api\/ibexa\/v2\/segment_groups\/corporate_accounts",
+ "id": 1,
+ "identifier": "corporate_accounts",
+ "name": "Corporate Accounts"
+ }
+}
+
+ + GET + /segment_groups/{identifier}/segments +
+Lists segment group's segments.
+ +Accept
+If set, the segment group is returned in XML or JSON format.
| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.SegmentCreate+xml
+application/vnd.ibexa.api.SegmentCreate+json
+
+ |
+
Accept
+A segment is returned in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.Segment+xml
+application/vnd.ibexa.api.Segment+json
+
+ |
+
| Type | +Description | +
|---|---|
| + + SegmentCreate + + | +This class represents a new segment to create. | +
| + + SegmentCreateWrapper + + | +JSON object with only a SegmentCreate property. | +
| + + Segment + + | +This class represents a segment. | +
| + + SegmentWrapper + + | +JSON object with only a Segment property. | +
| + + ErrorMessage + + | +Represents an error response. Might contain additional properties depending on an error type. | +
+ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentCreate>
+ <identifier>segment_identifier</identifier>
+ <name>Segment Name</name>
+ <group>corporate_accounts</group>
+</SegmentCreate>
+
+ + file_copy + +
+
+ {
+ "SegmentCreate": {
+ "identifier": "segment_identifier",
+ "name": "Segment Name",
+ "group": "corporate_accounts"
+ }
+}
+
+ + POST + Create a segment +
+ ++ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentCreate>
+ <identifier>segment_identifier</identifier>
+ <name>Segment Name</name>
+ <group>corporate_accounts</group>
+</SegmentCreate>
+
+ + file_copy + +
+
+ {
+ "SegmentCreate": {
+ "identifier": "segment_identifier",
+ "name": "Segment Name",
+ "group": "corporate_accounts"
+ }
+}
+
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Segment media-type="application/vnd.ibexa.api.Segment+xml" href="/api/ibexa/v2/segments/segment_identifier">
+ <id>3</id>
+ <identifier>segment_identifier</identifier>
+ <name>Segment Name</name>
+ <SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts"/>
+</Segment>
+
+ + file_copy + +
+
+ {
+ "Segment": {
+ "_media-type": "application/vnd.ibexa.api.Segment+json",
+ "_href": "/api/ibexa/v2/segments/segment_identifier",
+ "id": 3,
+ "identifier": "segment_identifier",
+ "name": "Segment Name",
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/corporate_accounts"
+ }
+ }
+}
+
+ + POST + Create a segment +
+ +Code: 200
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Segment media-type="application/vnd.ibexa.api.Segment+xml" href="/api/ibexa/v2/segments/segment_identifier">
+ <id>3</id>
+ <identifier>segment_identifier</identifier>
+ <name>Segment Name</name>
+ <SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/corporate_accounts"/>
+</Segment>
+
+ + file_copy + +
+
+ {
+ "Segment": {
+ "_media-type": "application/vnd.ibexa.api.Segment+json",
+ "_href": "/api/ibexa/v2/segments/segment_identifier",
+ "id": 3,
+ "identifier": "segment_identifier",
+ "name": "Segment Name",
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/corporate_accounts"
+ }
+ }
+}
+
+ OK - Return the segment.
+Error - the user is not authorized to load this segment.
+Error - the identifier doesn't match any segment.
+| Type | +Description | +
|---|---|
| + + Segment + + | +This class represents a segment. | +
| + + SegmentWrapper + + | +JSON object with only a Segment property. | +
+ PATCH + /segments/{id} +
+Updates the segment's data.
+ +Content-Type
+The SegmentUpdate schema encoded in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.SegmentUpdate+xml
+application/vnd.ibexa.api.SegmentUpdate+json
+
+ |
+
Accept
+A segment is returned in XML or JSON format.
+| Property | +Value | +
|---|---|
| Type | ++ + + string + + + + + | +
| Examples | +
+ application/vnd.ibexa.api.Segment+xml
+application/vnd.ibexa.api.Segment+json
+
+ |
+
| Code | +Description | +
|---|---|
| + 200 |
- OK - Return the segment. +OK- returns updated segment's data. |
| - 401 + + 400 + |
- Error - the user is not authorized to load this group's segments. +Error - input data validation failed. |
| - 404 + + 401 + |
- Error - the identifier doesn't match any segment group. +Error - the user is not authorized to create segments. + |
+
| + + 406 + + | +
+ Error - input data is not acceptable. |
| + + SegmentUpdate + + | +This class represents an update to an existing segment. | +
| + + SegmentUpdateWrapper + + | +JSON object with only a SegmentUpdate property. | +
Segment
@@ -66285,6 +67162,14 @@ Types |
JSON object with only a Segment property. | +
| + + ErrorMessage + + | +Represents an error response. Might contain additional properties depending on an error type. |
+ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentUpdate>
+ <identifier>modified_segment_identifier</identifier>
+ <name>Modified Segment Name</name>
+ <group>small_companies</group>
+</SegmentUpdate>
+
+ + file_copy + +
+
+ {
+ "SegmentUpdate": {
+ "identifier": "modified_segment_identifier",
+ "name": "Modified Segment Name",
+ "group": "small_companies"
+ }
+}
+
+ + PATCH + Update segment data +
+ ++ file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<SegmentUpdate>
+ <identifier>modified_segment_identifier</identifier>
+ <name>Modified Segment Name</name>
+ <group>small_companies</group>
+</SegmentUpdate>
+
+ + file_copy + +
+
+ {
+ "SegmentUpdate": {
+ "identifier": "modified_segment_identifier",
+ "name": "Modified Segment Name",
+ "group": "small_companies"
+ }
+}
+
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Segment media-type="application/vnd.ibexa.api.Segment+xml" href="/api/ibexa/v2/segments/modified_segment_identifier">
+ <id>3</id>
+ <identifier>modified_segment_identifier</identifier>
+ <name>Modified Segment Name</name>
+ <SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/small_companies"/>
+</Segment>
+
+ + file_copy + +
+
+ {
+ "Segment": {
+ "_media-type": "application/vnd.ibexa.api.Segment+json",
+ "_href": "/api/ibexa/v2/segments/modified_segment_identifier",
+ "id": 3,
+ "identifier": "modified_segment_identifier",
+ "name": "Modified Segment Name",
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/small_companies"
+ }
+ }
+}
+
+ + PATCH + Update segment data +
+ +Code: 200
+ + file_copy + +
+
+ <?xml version="1.0" encoding="UTF-8"?>
+<Segment media-type="application/vnd.ibexa.api.Segment+xml" href="/api/ibexa/v2/segments/modified_segment_identifier">
+ <id>3</id>
+ <identifier>modified_segment_identifier</identifier>
+ <name>Modified Segment Name</name>
+ <SegmentGroup media-type="application/vnd.ibexa.api.SegmentGroup+xml" href="/api/ibexa/v2/segment_groups/small_companies"/>
+</Segment>
+
+ + file_copy + +
+
+ {
+ "Segment": {
+ "_media-type": "application/vnd.ibexa.api.Segment+json",
+ "_href": "/api/ibexa/v2/segments/modified_segment_identifier",
+ "id": 3,
+ "identifier": "modified_segment_identifier",
+ "name": "Modified Segment Name",
+ "SegmentGroup": {
+ "_media-type": "application/vnd.ibexa.api.SegmentGroup+json",
+ "_href": "/api/ibexa/v2/segment_groups/small_companies"
+ }
+ }
+}
+
+ + DELETE + /segments/{id} +
+Deletes the segment.
+ + + +| Type | +Description | +
|---|---|
| + + ErrorMessage + + | +Represents an error response. Might contain additional properties depending on an error type. | +
vnd.ibexa.api.SegmentGroup+xml
-vnd.ibexa.api.SegmentGroup+json
+ application/vnd.ibexa.api.SegmentGroup+xml
+application/vnd.ibexa.api.SegmentGroup+json
vnd.ibexa.api.SegmentGroup+xml
-vnd.ibexa.api.SegmentGroup+json
+ application/vnd.ibexa.api.SegmentGroup+xml
+application/vnd.ibexa.api.SegmentGroup+json
+ DELETE + /segment_groups/{id} +
+Deletes the segment group.
+ + + +| Type | +Description | +
|---|---|
| + + ErrorMessage + + | +Represents an error response. Might contain additional properties depending on an error type. | +
vnd.ibexa.api.SegmentGroup+xml
-vnd.ibexa.api.SegmentGroup+json
+ application/vnd.ibexa.api.SegmentGroup+xml
+application/vnd.ibexa.api.SegmentGroup+json
vnd.ibexa.api.SegmentList+xml
-vnd.ibexa.api.SegmentList+json
+ application/vnd.ibexa.api.SegmentList+xml
+application/vnd.ibexa.api.SegmentList+json
SegmentCreate
+ +SegmentCreateWrapper
+ +SegmentUpdate
+ +SegmentUpdateWrapper
+ +Error - the user is not authorized to create segments.
Error - segment group with given identifier does not exist.
+Error - input data is not acceptable.
+Error - input data is not acceptable, for example segment identifier is not unique.
PATCH - /segments/{id} + /segments/{identifier}
Updates the segment's data.
@@ -67073,18 +67077,18 @@OK- returns updated segment's data.
+OK - returns updated segment's data.
Error - segment or segment group with given identifier does not exist.
+Error - input data is not acceptable.
+Error - input data is not acceptable, for example segment identifier is not unique.
+
PATCH Update segment data
@@ -67271,18 +67286,18 @@file_copy
-
+
<?xml version="1.0" encoding="UTF-8"?>
<SegmentUpdate>
<identifier>modified_segment_identifier</identifier>
@@ -67330,18 +67345,18 @@ Types
file_copy
-
+
{
"SegmentUpdate": {
"identifier": "modified_segment_identifier",
@@ -67361,28 +67376,28 @@ Types
+
PATCH Update segment data
@@ -67462,18 +67477,18 @@file_copy
-
+
<?xml version="1.0" encoding="UTF-8"?>
<Segment media-type="application/vnd.ibexa.api.Segment+xml" href="/api/ibexa/v2/segments/modified_segment_identifier">
<id>3</id>
@@ -67525,18 +67540,18 @@ Types
file_copy
-
+
{
"Segment": {
"_media-type": "application/vnd.ibexa.api.Segment+json",
@@ -67560,21 +67575,27 @@ Types
DELETE - /segments/{id} + /segments/{identifier}
Deletes the segment.
@@ -67618,12 +67639,12 @@Segment does not exist.
+Segment deleted.
Error - input data is not acceptable.
+Error - input data is not acceptable, for example, segment group identifier is not unique.
- PATCH - /segment_groups/{id} + GET + /segment_groups/{identifier}
-Updates the segment group's data.
+Loads segment group.
Content-Type
-The SegmentGroupUpdate schema encoded in XML or JSON format.
-| Property | -Value | -
|---|---|
| Type | -- - - string - - - - - | -
| Examples | -
- application/vnd.ibexa.api.SegmentGroupUpdate+xml
-application/vnd.ibexa.api.SegmentGroupUpdate+json
-
- |
-
Accept
-A segment group is returned in XML or JSON format.
+If set, the segment group is returned in XML or JSON format.