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 @@ + + + 3 + segment_group_identifier + Segment Group Name + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.json.example new file mode 100644 index 0000000000..f676f8bb13 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.json.example @@ -0,0 +1,6 @@ +{ + "SegmentGroupCreate": { + "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/SegmentGroupCreate.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.xml.example new file mode 100644 index 0000000000..0978bfe780 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/POST/SegmentGroupCreate.xml.example @@ -0,0 +1,5 @@ + + + segment_group_identifier + Segment Group Name + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.json.example new file mode 100644 index 0000000000..84312fecc0 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.json.example @@ -0,0 +1,9 @@ +{ + "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" + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.xml.example new file mode 100644 index 0000000000..cd7435fc97 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroup.xml.example @@ -0,0 +1,6 @@ + + + 4 + modified_segment_group_identifier + Modified Segment Group Name + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example new file mode 100644 index 0000000000..cc4d7c8382 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example @@ -0,0 +1,6 @@ +{ + "SegmentGroupUpdate": { + "identifier": "modified_segment_group_identifier", + "name": "Modified Segment Group Name" + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.xml.example new file mode 100644 index 0000000000..3d5fad8466 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segment_groups/id/PATCH/SegmentGroupUpdate.xml.example @@ -0,0 +1,5 @@ + + + modified_segment_group_identifier + Modified Segment Group Name + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.json.example new file mode 100644 index 0000000000..7835db2f1e --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.json.example @@ -0,0 +1,13 @@ +{ + "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" + } + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.xml.example new file mode 100644 index 0000000000..67de28cfa3 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/Segment.xml.example @@ -0,0 +1,7 @@ + + + 3 + segment_identifier + Segment Name + + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.json.example new file mode 100644 index 0000000000..fc47b977c9 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.json.example @@ -0,0 +1,7 @@ +{ + "SegmentCreate": { + "identifier": "segment_identifier", + "name": "Segment Name", + "group": "corporate_accounts" + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.xml.example new file mode 100644 index 0000000000..d8d747fc22 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/POST/SegmentCreate.xml.example @@ -0,0 +1,6 @@ + + + segment_identifier + Segment Name + corporate_accounts + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.json.example new file mode 100644 index 0000000000..c23675aeb1 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.json.example @@ -0,0 +1,13 @@ +{ + "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" + } + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.xml.example new file mode 100644 index 0000000000..511f5d2cf6 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/Segment.xml.example @@ -0,0 +1,7 @@ + + + 3 + modified_segment_identifier + Modified Segment Name + + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.json.example new file mode 100644 index 0000000000..a099e27666 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.json.example @@ -0,0 +1,7 @@ +{ + "SegmentUpdate": { + "identifier": "modified_segment_identifier", + "name": "Modified Segment Name", + "group": "small_companies" + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.xml.example new file mode 100644 index 0000000000..a5bbc94eef --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/id/PATCH/SegmentUpdate.xml.example @@ -0,0 +1,6 @@ + + + modified_segment_identifier + Modified Segment Name + small_companies + \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.json.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.json.example new file mode 100644 index 0000000000..7835db2f1e --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.json.example @@ -0,0 +1,13 @@ +{ + "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" + } + } +} \ No newline at end of file diff --git a/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.xml.example new file mode 100644 index 0000000000..67de28cfa3 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/segments/identifier/GET/Segment.xml.example @@ -0,0 +1,7 @@ + + + 3 + segment_identifier + Segment Name + + \ No newline at end of file From 71b57ed050d2583f54de665a14625a5f07718132 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 16:20:40 +0100 Subject: [PATCH 2/8] POST and PATCH segment group methods added --- .../input/ibexa-segment-groups.raml | 84 + .../rest_api_reference/input/ibexa-types.raml | 38 + .../rest_api_reference.html | 1585 +++++++++++++++-- 3 files changed, 1596 insertions(+), 111 deletions(-) diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml index 1c5f223ee4..7bb1cdc979 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml @@ -25,6 +25,90 @@ get: type: ErrorMessage application/vnd.ibexa.api.ErrorMessage+json: type: ErrorMessage +post: + displayName: Create a segment group + description: Creates a segment group. + headers: + Content-Type: + description: A SegmentGroupCreate schema encoded in XML or JSON format. + example: | + application/vnd.ibexa.api.SegmentGroupCreate+xml + application/vnd.ibexa.api.SegmentGroupCreate+json + Accept: + description: A segment group is returned in XML or JSON format. + example: | + vnd.ibexa.api.SegmentGroup+xml + vnd.ibexa.api.SegmentGroup+json + body: + application/vnd.ibexa.api.SegmentGroupCreate+xml: + type: SegmentGroupCreate + example: !include examples/segment_groups/POST/SegmentGroupCreate.xml.example + application/vnd.ibexa.api.SegmentGroupCreate+json: + type: SegmentGroupCreateWrapper + example: !include examples/segment_groups/POST/SegmentGroupCreate.json.example + responses: + 200: + description: OK - list the segment groups. + body: + application/vnd.ibexa.api.SegmentGroup+xml: + type: SegmentGroup + example: !include examples/segment_groups/POST/SegmentGroup.xml.example + application/vnd.ibexa.api.SegmentGroup+json: + type: SegmentGroupWrapper + example: !include examples/segment_groups/POST/SegmentGroup.json.example + 400: + description: Error - input data validation failed. + body: + application/vnd.ibexa.api.ErrorMessage+xml: + type: ErrorMessage + application/vnd.ibexa.api.ErrorMessage+json: + type: ErrorMessage + 401: + description: Error - the user is not authorized to list segment groups. + body: + application/vnd.ibexa.api.ErrorMessage+xml: + type: ErrorMessage + application/vnd.ibexa.api.ErrorMessage+json: + type: ErrorMessage + 406: + description: Error - input data is not acceptable. + body: + application/vnd.ibexa.api.ErrorMessage+xml: + type: ErrorMessage + application/vnd.ibexa.api.ErrorMessage+json: + type: ErrorMessage +/{id}: + patch: + displayName: Update segment group data + description: Updates the segment group's data. + headers: + Content-Type: + description: The SegmentGroupUpdate schema encoded in XML or JSON format. + example: | + application/vnd.ibexa.api.SegmentGroupUpdate+xml + application/vnd.ibexa.api.SegmentGroupUpdate+json + Accept: + description: A segment group is returned in XML or JSON format. + example: | + vnd.ibexa.api.SegmentGroup+xml + vnd.ibexa.api.SegmentGroup+json + body: + application/vnd.ibexa.api.SegmentGroupUpdate+xml: + type: SegmentGroupUpdate + example: !include examples/segment_groups/id/PATCH/SegmentGroupUpdate.xml.example + application/vnd.ibexa.api.SegmentGroupUpdate+json: + type: SegmentGroupUpdateWrapper + example: !include examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example + responses: + 200: + description: OK - list the segment groups. + body: + application/vnd.ibexa.api.SegmentGroup+xml: + type: SegmentGroup + example: !include examples/segment_groups/id/PATCH/SegmentGroup.xml.example + application/vnd.ibexa.api.SegmentGroup+json: + type: SegmentGroupWrapper + example: !include examples/segment_groups/id/PATCH/SegmentGroup.json.example /{identifier}: get: displayName: Load segment group 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 bc9d3398af..56460f8973 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 @@ -2147,6 +2147,44 @@ Session: description: 'User.' type: BaseObject +SegmentGroupCreate: + description: 'This class represents a new segment group to create.' + type: object + properties: + identifier: + description: 'A unique identifier for the segment group.' + type: string + required: true + name: + description: 'A name of the segment group.' + type: string + required: true + +SegmentGroupCreateWrapper: + description: 'JSON object with only a SegmentGroupCreate property.' + type: object + properties: + SegmentGroupCreate: SegmentGroupCreate + +SegmentGroupUpdate: + description: 'This class represents an update to an existing segment group.' + type: object + properties: + identifier: + description: 'A unique identifier for the segment group.' + type: string + required: true + name: + description: 'The updated name of the segment group.' + type: string + required: true + +SegmentGroupUpdateWrapper: + description: 'JSON object with only a SegmentGroupUpdate property.' + type: object + properties: + SegmentGroupUpdate: SegmentGroupUpdate + SegmentGroupListWrapper: description: 'JSON object with only a SegmentGroupList property.' type: object 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 0426f217d6..6487a2ef14 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 @@ -66323,6 +66323,13 @@

/segment_groups

GET + +
  • + + + POST + +
  • @@ -66687,43 +66694,65 @@
    Types
    -
    -
    -

    /segment_groups/{identifier}

    - -
    -
    -
    +
    -
    - Load segment group - + data-search="create-a-segment-group"> + Create a segment group +

    - GET - /segment_groups/{identifier} + POST + /segment_groups

    -

    Loads segment group.

    +

    Creates a segment group.

    Header parameters
    +

    Content-Type

    +

    A SegmentGroupCreate schema encoded in XML or JSON format.

    +
    + + + + + + + + + + + + + + + + + +
    PropertyValue
    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.

    @@ -66773,29 +66802,46 @@
    Possible responses
    + + + + @@ -66815,6 +66861,22 @@
    Types
    + + + + + + + + + + + +
    - 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.
    @@ -66839,30 +66909,205 @@
    Types
    +
    +
    + +
    +
    +
    +
    +
    +

    + file_copy + +

    +
    +                                <?xml version="1.0" encoding="UTF-8"?>
    +<SegmentGroupCreate>
    +    <identifier>segment_group_identifier</identifier>
    +    <name>Segment Group Name</name>
    +</SegmentGroupCreate>
    +                            
    +
    + View more +
    +
    +
    +

    + file_copy + +

    +
    +                                {
    +    "SegmentGroupCreate": {
    +        "identifier": "segment_group_identifier",
    +        "name": "Segment Group Name"
    +    }
    +}
    +                            
    +
    + View more +
    +
    +
    + +
    -
    +
    -
    -
    -
    +
    +

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

    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"
         }
     }
                                 
    - View more + View more
    - +
    +

    /segments/{id}

    +
    +
    +
    +

    /segments/{id}

    + +
    +
    +
    +
    +
    +
    + Update segment data + +
    +
    +
    +

    + PATCH + /segments/{id} +

    +

    Updates the segment's data.

    +

    +
    +
    Header parameters
    +
    +

    Content-Type

    +

    The SegmentUpdate schema encoded in XML or JSON format.

    +
    + + + + + + + + + + + + + + + + + +
    PropertyValue
    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.

    +
    + + + + + + + + + + + + + + + + + +
    PropertyValue
    Type + + + string + + + + +
    Examples + application/vnd.ibexa.api.Segment+xml +application/vnd.ibexa.api.Segment+json + +
    +
    +
    +
    + + +
    +
    Possible responses
    +
    + + + + + + + + + + + + + + @@ -66271,6 +67132,22 @@
    Types
    + + + + + + + + + + + +
    CodeDescription
    + 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.
    @@ -66295,15 +67180,515 @@
    Types
    +
    +
    + +
    +
    +
    +
    +
    +

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

    + file_copy + +

    +
    +                                {
    +    "SegmentUpdate": {
    +        "identifier": "modified_segment_identifier",
    +        "name": "Modified Segment Name",
    +        "group": "small_companies"
    +    }
    +}
    +                            
    +
    + View more +
    +
    +
    + +
    -
    +
    -
    +
    +
    +
    +
    +

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

    + 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"
    +        }
    +    }
    +}
    +                            
    +
    + View more +
    +
    +
    + +
    +
    +
    +
    -
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + Delete a segment + +
    +
    +
    +

    + DELETE + /segments/{id} +

    +

    Deletes the segment.

    +

    + + +
    +
    Possible responses
    +
    + + + + + + + + + + + + + + + + + + + + + +
    CodeDescription
    + 204 + +

    Segment does not exist.

    +
    + + 401 + + +

    Error - the user is not authorized to delete segments.

    +
    + + 404 + + +

    Error - the identifier doesn't match any segment.

    +
    +
    +
    + +
    +
    Types
    +
    + + + + + + + + + + + + + +
    TypeDescription
    + + ErrorMessage + + Represents an error response. Might contain additional properties depending on an error type.
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    @@ -66777,8 +68162,8 @@
    Header parameters
    Examples - vnd.ibexa.api.SegmentGroup+xml -vnd.ibexa.api.SegmentGroup+json + application/vnd.ibexa.api.SegmentGroup+xml +application/vnd.ibexa.api.SegmentGroup+json @@ -67310,6 +68695,13 @@

    /segment_groups/{id}

    + +
  • + + + DELETE + +
  • @@ -67397,8 +68789,8 @@
    Header parameters
    Examples - vnd.ibexa.api.SegmentGroup+xml -vnd.ibexa.api.SegmentGroup+json + application/vnd.ibexa.api.SegmentGroup+xml +application/vnd.ibexa.api.SegmentGroup+json @@ -67857,6 +69249,116 @@
    Types
    +
    +
    +
    +
    +
    + Delete a segment group + +
    +
    +
    +

    + DELETE + /segment_groups/{id} +

    +

    Deletes the segment group.

    +

    + + +
    +
    Possible responses
    +
    + + + + + + + + + + + + + + + + + + + + + +
    CodeDescription
    + 204 + +

    Segment group does not exist.

    +
    + + 401 + + +

    Error - the user is not authorized to delete segment groups.

    +
    + + 404 + + +

    Error - the identifier doesn't match any segment group.

    +
    +
    +
    + +
    +
    Types
    +
    + + + + + + + + + + + + + +
    TypeDescription
    + + ErrorMessage + + Represents an error response. Might contain additional properties depending on an error type.
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +

    /segment_groups/{identifier}

    @@ -67922,8 +69424,8 @@
    Header parameters
    Examples - vnd.ibexa.api.SegmentGroup+xml -vnd.ibexa.api.SegmentGroup+json + application/vnd.ibexa.api.SegmentGroup+xml +application/vnd.ibexa.api.SegmentGroup+json @@ -68271,8 +69773,8 @@
    Header parameters
    Examples - vnd.ibexa.api.SegmentList+xml -vnd.ibexa.api.SegmentList+json + application/vnd.ibexa.api.SegmentList+xml +application/vnd.ibexa.api.SegmentList+json @@ -143914,7 +145416,7 @@
    Types
    (string) - - The updated name of the segment group. + A name of the segment group. @@ -144119,7 +145621,7 @@
    Types
    (integer) - - + A unique numeric identifier for the segment group. @@ -144131,7 +145633,7 @@
    Types
    (string) - - + A unique string identifier for the segment group. @@ -144143,7 +145645,7 @@
    Types
    (string) - - + A name of the segment group. @@ -144304,7 +145806,7 @@
    Types
    (integer) - - + A unique numeric identifier for the segment. @@ -144316,7 +145818,7 @@
    Types
    (string) - - + A unique numeric identifier for the segment. @@ -144328,7 +145830,7 @@
    Types
    (string) - - + A name of the segment. @@ -144337,12 +145839,256 @@
    Types
    * -(SegmentGroup) +(object) + - + + A reference to the segment group to which this segment belongs. + + +
    +
      +
    • + media-type + + * + +(string) + - + + Mmedia type of the segment group resource. + + +
    • +
    • + href + + * + +(string) + - + + A URL reference to the segment group resource. + + +
    • +
    +
    + + +
    +
    +
    +
    +
    + + + + -
    -

    /segments/{id}

    -
    -
    -
    -

    /segments/{id}

    - -
    -
    @@ -66979,7 +66983,7 @@

    /segments/{id}

    PATCH - /segments/{id} + /segments/{identifier}

    Updates the segment's data.

    @@ -67073,18 +67077,18 @@
    Possible responses
    - 200 -

    OK- returns updated segment's data.

    +

    OK - returns updated segment's data.

    - 400 @@ -67095,7 +67099,7 @@
    Possible responses
    - 401 @@ -67106,13 +67110,24 @@
    Possible responses
    - + 404 + + + +

    Error - segment or segment group with given identifier does not exist.

    + + + + + 406 -

    Error - input data is not acceptable.

    +

    Error - input data is not acceptable, for example segment identifier is not unique.

    @@ -67180,28 +67195,28 @@
    Types
    -
    +
    -
    -
    -
    +
    +

    file_copy

    -
    +                            
                                     <?xml version="1.0" encoding="UTF-8"?>
     <SegmentUpdate>
       <identifier>modified_segment_identifier</identifier>
    @@ -67230,20 +67245,20 @@ 
    Types
    </SegmentUpdate>
    - View more + View more
    -
    +

    file_copy

    -
    +                            
                                     {
         "SegmentUpdate": {
             "identifier": "modified_segment_identifier",
    @@ -67253,15 +67268,15 @@ 
    Types
    }
    - View more + View more
    -