setBrowserType

put

/ccadmin/v1/browserTypes/{id}

Update the properties of a browser type. Fails if the browser type does not exist. The {createIfMissing} query parameter gives an option to create a new entry in database.

Request

Supported Media Types
Path Parameters
  • ID of the browser type. ID of the browser type. Must be 'snapshot' for user agents that should be served the desktop version of static snapshots, or 'mobileSnapshot' for user agents that should be served the mobile version of static snapshots.
Body ()
Root Schema : setBrowserType_request
Type: object
Show Source
Example:
{
    "call":"curl -H 'Content-type: application/json' -H 'Authorization: Bearer {Access-Token}' -H PUT https://{www.example.com}/ccadmin/v1/browserTypes/snapshot -d '{sampleRequestData}'",
    "data":{
        "viewport":"lg",
        "patterns":[
            ".*[Yy]ahoo.*[Cc]rawler",
            ".*[Ss]lurp"
        ]
    }
}
Nested Schema : patterns
Type: array
List of user agent string patterns
Show Source
Nested Schema : regexPatterns
Type: array
List of user agent string regular expression patterns
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : setBrowserType_response
Type: object
Show Source
Nested Schema : patterns
Type: array
List of user agent string patterns
Show Source
Nested Schema : regexPatterns
Type: array
List of user agent string regular expression patterns
Show Source
Example Response (application/json)
{
    "regexPatterns":[
        "[Mm]obile.*[Gg]ooglebot",
        "[Mm]obile.*[Bb]ing[Bb]ot"
    ],
    "viewport":"xs",
    "patterns":[
    ],
    "links":[
        {
            "rel":"self",
            "href":"/ccadminui/v1/browserTypes/mobileSnapshot"
        }
    ],
    "id":"snapshot"
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |17001|Browser type is invalid or non-existent| |17004|Browser Type Id passed is null or empty| |17005|Invalid property value for browser type| |17006|Internal error occurred updating the browser type| |17008|Invalid input for viewport property|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top