Chilkat Online Tools

PureBasic / Atlassian Confluence Cloud / Set look and feel settings

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    ; Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    ; The following JSON is sent in the request body.

    ; {
    ;   "selected": "<string>",
    ;   "global": {
    ;     "headings": {
    ;       "color": "<string>"
    ;     },
    ;     "links": {
    ;       "color": "<string>"
    ;     },
    ;     "menus": {
    ;       "hoverOrFocus": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "color": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "header": {
    ;       "backgroundColor": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "button": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "primaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "secondaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "search": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "content": {
    ;       "screen": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "container": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "header": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "body": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "bordersAndDividers": {
    ;       "color": "<string>"
    ;     }
    ;   },
    ;   "custom": {
    ;     "headings": {
    ;       "color": "<string>"
    ;     },
    ;     "links": {
    ;       "color": "<string>"
    ;     },
    ;     "menus": {
    ;       "hoverOrFocus": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "color": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "header": {
    ;       "backgroundColor": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "button": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "primaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "secondaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "search": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "content": {
    ;       "screen": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "container": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "header": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "body": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "bordersAndDividers": {
    ;       "color": "<string>"
    ;     }
    ;   }
    ; }

    json.i = CkJsonObject::ckCreate()
    If json.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(json,"selected","<string>")
    CkJsonObject::ckUpdateString(json,"global.headings.color","<string>")
    CkJsonObject::ckUpdateString(json,"global.links.color","<string>")
    CkJsonObject::ckUpdateString(json,"global.menus.hoverOrFocus.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.menus.color.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.header.backgroundColor.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.header.button.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.header.primaryNavigation.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.header.secondaryNavigation.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.header.search.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.content.screen.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.content.container.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.content.header.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.content.body.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"global.bordersAndDividers.color","<string>")
    CkJsonObject::ckUpdateString(json,"custom.headings.color","<string>")
    CkJsonObject::ckUpdateString(json,"custom.links.color","<string>")
    CkJsonObject::ckUpdateString(json,"custom.menus.hoverOrFocus.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.menus.color.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.header.backgroundColor.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.header.button.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.header.primaryNavigation.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.header.secondaryNavigation.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.header.search.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.content.screen.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.content.container.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.content.header.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.content.body.value","<Error: Too many levels of nesting to fake this schema>")
    CkJsonObject::ckUpdateString(json,"custom.bordersAndDividers.color","<string>")

    ; Adds the "Authorization: Bearer <access_token>" header.
    CkHttp::setCkAuthToken(http, "<access_token>")
    CkHttp::ckSetRequestHeader(http,"Content-Type","application/json")

    sbRequestBody.i = CkStringBuilder::ckCreate()
    If sbRequestBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckEmitSb(json,sbRequestBody)

    resp.i = CkHttp::ckPTextSb(http,"PUT","https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/selected?spaceKey=<string>",sbRequestBody,"utf-8","application/json",0,0)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        ProcedureReturn
    EndIf

    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttpResponse::ckGetBodySb(resp,sbResponseBody)

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(jResp,sbResponseBody)
    CkJsonObject::setCkEmitCompact(jResp, 0)

    Debug "Response Body:"
    Debug CkJsonObject::ckEmit(jResp)

    respStatusCode.i = CkHttpResponse::ckStatusCode(resp)
    Debug "Response Status Code = " + Str(respStatusCode)
    If respStatusCode >= 400
        Debug "Response Header:"
        Debug CkHttpResponse::ckHeader(resp)
        Debug "Failed."
        CkHttpResponse::ckDispose(resp)

        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        CkJsonObject::ckDispose(jResp)
        ProcedureReturn
    EndIf

    CkHttpResponse::ckDispose(resp)

    ; Sample JSON response:
    ; (Sample code for parsing the JSON response is shown below)

    ; {
    ;   "selected": "global",
    ;   "global": {
    ;     "headings": {
    ;       "color": "<string>"
    ;     },
    ;     "links": {
    ;       "color": "<string>"
    ;     },
    ;     "menus": {
    ;       "hoverOrFocus": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "color": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "header": {
    ;       "backgroundColor": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "button": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "primaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "secondaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "search": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "content": {
    ;       "screen": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "container": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "header": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "body": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "bordersAndDividers": {
    ;       "color": "<string>"
    ;     }
    ;   },
    ;   "custom": {
    ;     "headings": {
    ;       "color": "<string>"
    ;     },
    ;     "links": {
    ;       "color": "<string>"
    ;     },
    ;     "menus": {
    ;       "hoverOrFocus": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "color": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "header": {
    ;       "backgroundColor": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "button": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "primaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "secondaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "search": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "content": {
    ;       "screen": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "container": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "header": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "body": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "bordersAndDividers": {
    ;       "color": "<string>"
    ;     }
    ;   },
    ;   "theme": {
    ;     "headings": {
    ;       "color": "<string>"
    ;     },
    ;     "links": {
    ;       "color": "<string>"
    ;     },
    ;     "menus": {
    ;       "hoverOrFocus": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "color": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "header": {
    ;       "backgroundColor": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "button": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "primaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "secondaryNavigation": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "search": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "content": {
    ;       "screen": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "container": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "header": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       },
    ;       "body": {
    ;         "value": "<Error: Too many levels of nesting to fake this schema>"
    ;       }
    ;     },
    ;     "bordersAndDividers": {
    ;       "color": "<string>"
    ;     }
    ;   }
    ; }

    ; Sample code for parsing the JSON response...
    ; Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    selected.s = CkJsonObject::ckStringOf(jResp,"selected")
    Color.s = CkJsonObject::ckStringOf(jResp,"global.headings.color")
    LinksColor.s = CkJsonObject::ckStringOf(jResp,"global.links.color")
    Value.s = CkJsonObject::ckStringOf(jResp,"global.menus.hoverOrFocus.value")
    ColorValue.s = CkJsonObject::ckStringOf(jResp,"global.menus.color.value")
    BackgroundColorValue.s = CkJsonObject::ckStringOf(jResp,"global.header.backgroundColor.value")
    ButtonValue.s = CkJsonObject::ckStringOf(jResp,"global.header.button.value")
    PrimaryNavigationValue.s = CkJsonObject::ckStringOf(jResp,"global.header.primaryNavigation.value")
    SecondaryNavigationValue.s = CkJsonObject::ckStringOf(jResp,"global.header.secondaryNavigation.value")
    SearchValue.s = CkJsonObject::ckStringOf(jResp,"global.header.search.value")
    ScreenValue.s = CkJsonObject::ckStringOf(jResp,"global.content.screen.value")
    ContainerValue.s = CkJsonObject::ckStringOf(jResp,"global.content.container.value")
    HeaderValue.s = CkJsonObject::ckStringOf(jResp,"global.content.header.value")
    BodyValue.s = CkJsonObject::ckStringOf(jResp,"global.content.body.value")
    BordersAndDividersColor.s = CkJsonObject::ckStringOf(jResp,"global.bordersAndDividers.color")
    HeadingsColor.s = CkJsonObject::ckStringOf(jResp,"custom.headings.color")
    LinksColor = CkJsonObject::ckStringOf(jResp,"custom.links.color")
    HoverOrFocusValue.s = CkJsonObject::ckStringOf(jResp,"custom.menus.hoverOrFocus.value")
    ColorValue = CkJsonObject::ckStringOf(jResp,"custom.menus.color.value")
    BackgroundColorValue = CkJsonObject::ckStringOf(jResp,"custom.header.backgroundColor.value")
    ButtonValue = CkJsonObject::ckStringOf(jResp,"custom.header.button.value")
    PrimaryNavigationValue = CkJsonObject::ckStringOf(jResp,"custom.header.primaryNavigation.value")
    SecondaryNavigationValue = CkJsonObject::ckStringOf(jResp,"custom.header.secondaryNavigation.value")
    SearchValue = CkJsonObject::ckStringOf(jResp,"custom.header.search.value")
    ScreenValue = CkJsonObject::ckStringOf(jResp,"custom.content.screen.value")
    ContainerValue = CkJsonObject::ckStringOf(jResp,"custom.content.container.value")
    HeaderValue = CkJsonObject::ckStringOf(jResp,"custom.content.header.value")
    BodyValue = CkJsonObject::ckStringOf(jResp,"custom.content.body.value")
    BordersAndDividersColor = CkJsonObject::ckStringOf(jResp,"custom.bordersAndDividers.color")
    HeadingsColor = CkJsonObject::ckStringOf(jResp,"theme.headings.color")
    LinksColor = CkJsonObject::ckStringOf(jResp,"theme.links.color")
    HoverOrFocusValue = CkJsonObject::ckStringOf(jResp,"theme.menus.hoverOrFocus.value")
    ColorValue = CkJsonObject::ckStringOf(jResp,"theme.menus.color.value")
    BackgroundColorValue = CkJsonObject::ckStringOf(jResp,"theme.header.backgroundColor.value")
    ButtonValue = CkJsonObject::ckStringOf(jResp,"theme.header.button.value")
    PrimaryNavigationValue = CkJsonObject::ckStringOf(jResp,"theme.header.primaryNavigation.value")
    SecondaryNavigationValue = CkJsonObject::ckStringOf(jResp,"theme.header.secondaryNavigation.value")
    SearchValue = CkJsonObject::ckStringOf(jResp,"theme.header.search.value")
    ScreenValue = CkJsonObject::ckStringOf(jResp,"theme.content.screen.value")
    ContainerValue = CkJsonObject::ckStringOf(jResp,"theme.content.container.value")
    HeaderValue = CkJsonObject::ckStringOf(jResp,"theme.content.header.value")
    BodyValue = CkJsonObject::ckStringOf(jResp,"theme.content.body.value")
    BordersAndDividersColor = CkJsonObject::ckStringOf(jResp,"theme.bordersAndDividers.color")


    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(json)
    CkStringBuilder::ckDispose(sbRequestBody)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure

Curl Command

curl -X PUT
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "selected": "<string>",
    "global": {
        "headings": {
            "color": "<string>"
        },
        "links": {
            "color": "<string>"
        },
        "menus": {
            "hoverOrFocus": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "color": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "header": {
            "backgroundColor": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "button": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "primaryNavigation": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "secondaryNavigation": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "search": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "content": {
            "screen": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "container": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "header": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "body": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "bordersAndDividers": {
            "color": "<string>"
        }
    },
    "custom": {
        "headings": {
            "color": "<string>"
        },
        "links": {
            "color": "<string>"
        },
        "menus": {
            "hoverOrFocus": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "color": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "header": {
            "backgroundColor": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "button": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "primaryNavigation": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "secondaryNavigation": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "search": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "content": {
            "screen": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "container": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "header": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            },
            "body": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
            }
        },
        "bordersAndDividers": {
            "color": "<string>"
        }
    }
}'
https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/selected?spaceKey=<string>

Postman Collection Item JSON

{
  "name": "Set look and feel settings",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "PUT",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"selected\": \"<string>\",\n    \"global\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    },\n    \"custom\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    }\n}"
    },
    "url": {
      "raw": "{{baseUrl}}/api/settings/lookandfeel/selected?spaceKey=<string>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "settings",
        "lookandfeel",
        "selected"
      ],
      "query": [
        {
          "key": "spaceKey",
          "value": "<string>",
          "description": "The key of the space for which the look and feel settings will be\nset. If this is not set, the global look and feel settings will be\nset."
        }
      ]
    },
    "description": "Sets the look and feel settings to either the default settings or the\ncustom settings, for the site or a single space. Note, the default\nspace settings are inherited from the current global settings.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\n'Admin' permission for the space."
  },
  "response": [
    {
      "name": "Returned if the look and feel settings were set.",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"selected\": \"<string>\",\n    \"global\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    },\n    \"custom\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    }\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/settings/lookandfeel/selected?spaceKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "settings",
            "lookandfeel",
            "selected"
          ],
          "query": [
            {
              "key": "spaceKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"selected\": \"global\",\n \"global\": {\n  \"headings\": {\n   \"color\": \"<string>\"\n  },\n  \"links\": {\n   \"color\": \"<string>\"\n  },\n  \"menus\": {\n   \"hoverOrFocus\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"color\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"header\": {\n   \"backgroundColor\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"button\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"primaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"secondaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"search\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"content\": {\n   \"screen\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"container\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"header\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"body\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"bordersAndDividers\": {\n   \"color\": \"<string>\"\n  }\n },\n \"custom\": {\n  \"headings\": {\n   \"color\": \"<string>\"\n  },\n  \"links\": {\n   \"color\": \"<string>\"\n  },\n  \"menus\": {\n   \"hoverOrFocus\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"color\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"header\": {\n   \"backgroundColor\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"button\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"primaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"secondaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"search\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"content\": {\n   \"screen\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"container\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"header\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"body\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"bordersAndDividers\": {\n   \"color\": \"<string>\"\n  }\n },\n \"theme\": {\n  \"headings\": {\n   \"color\": \"<string>\"\n  },\n  \"links\": {\n   \"color\": \"<string>\"\n  },\n  \"menus\": {\n   \"hoverOrFocus\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"color\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"header\": {\n   \"backgroundColor\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"button\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"primaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"secondaryNavigation\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"search\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"content\": {\n   \"screen\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"container\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"header\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   },\n   \"body\": {\n    \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n   }\n  },\n  \"bordersAndDividers\": {\n   \"color\": \"<string>\"\n  }\n }\n}"
    },
    {
      "name": "Returned if;\n\n- The `spaceKey` is invalid.\n- The look and feel type is invalid.",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"selected\": \"<string>\",\n    \"global\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    },\n    \"custom\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    }\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/settings/lookandfeel/selected?spaceKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "settings",
            "lookandfeel",
            "selected"
          ],
          "query": [
            {
              "key": "spaceKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Returned if the look and feel type is set to 'theme' but the\nspace/site doesn't have a theme assigned.",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"selected\": \"<string>\",\n    \"global\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    },\n    \"custom\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    }\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/settings/lookandfeel/selected?spaceKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "settings",
            "lookandfeel",
            "selected"
          ],
          "query": [
            {
              "key": "spaceKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Returned if there is no space with the given `spaceKey`.",
      "originalRequest": {
        "method": "PUT",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"selected\": \"<string>\",\n    \"global\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    },\n    \"custom\": {\n        \"headings\": {\n            \"color\": \"<string>\"\n        },\n        \"links\": {\n            \"color\": \"<string>\"\n        },\n        \"menus\": {\n            \"hoverOrFocus\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"color\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"header\": {\n            \"backgroundColor\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"button\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"primaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"secondaryNavigation\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"search\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"content\": {\n            \"screen\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"container\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"header\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            },\n            \"body\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n            }\n        },\n        \"bordersAndDividers\": {\n            \"color\": \"<string>\"\n        }\n    }\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/settings/lookandfeel/selected?spaceKey=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "settings",
            "lookandfeel",
            "selected"
          ],
          "query": [
            {
              "key": "spaceKey",
              "value": "<string>"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}