-
Type:
Story
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: 7.3.0 CE GA1, Master
-
Component/s: Headless Delivery API, Segments Editor
-
Epic/Theme:
-
Epic Link:
-
Sprint:SP | Sprint 10 | Mar18 - Mar29, TANGO | SP_24 | Nov13-Nov27
Without Context (--):LPS-92803
curl -u [email protected]:test -D - http://localhost:8080/o/headless-delivery/v1.0/content-sets/{content-set-id}/content-set-elements
curl -u [email protected]:test -D - http://localhost:8080/o/headless-delivery/v1.0/content-sets/{content-set-id}/content-set-elements?page=2&pageSize=1
To try this with context (--), you should add the headers you want to the request:LPS-92804
curl -X GET \ http://localhost:8080/o/headless-delivery/v1.0/content-sets/37551/content-set-elements \ -u '[email protected]:test' \ -H 'X-Device-Brand: LG' \ -H 'X-Device-Model: G7'
You can add a new header with
-H '<header-name>: <header-value>'
These are the available headers:
- Host (internal note: this is going to map with Context.URL)
- Accept-Language (internal note: this is going to map with Context.LANGUAGE_ID)
- User-Agent (internal note: this is going to map with Context.USER_AGENT)
- X-Browser (internal note: this is going to map with Context.BROWSER)
- X-Cookies (internal note: this is going to map with Context.COOKIES)
- X-Device-Brand (internal note: this is going to map with Context.DEVICE_BRAND)
- X-Device-Model (internal note: this is going to map with Context.DEVICE_MODEL)
- X-Device-Screen-Resolution-Height (internal note: this is going to map with Context.DEVICE_SCREEN_RESOLUTION_HEIGHT)
- X-Device-Screen-Resolution-Width (internal note: this is going to map with Context.DEVICE_SCREEN_RESOLUTION_WIDTH)
- X-Last-Sign-In-Date-Time (internal note: this is going to map with Context.LAST_SIGN_IN_DATE_TIME)
- X-Signed-In (internal note: this is going to map with Context.SIGNED_IN)
- (internal note: Context.LOCAL_DATE is always present in the context)
Tests
Acceptance Criteria
- If the user introduces the wrong endpoint, 404 error shows up.
- If the user introduces the wrong credentials to the request, 403 error shows up.
- If the user introduces a wrong contentSetId, 404 error shows up with this message: No AssetListEntry exists with the primary key 37002.
- If the user does not belong to any segment, the default variation should be retrieved.
- If the user belongs to a segment, and there is no variation for that segment, default variation should be retrieved.
- If the user belongs to several segments, the API should retrieve the first variation that conforms the request.