0

Get look and feel settings

by
Published Oct 17, 2025

Returns the look and feel settings for the site or a single space. This includes attributes such as the color scheme, padding, and border radius. The look and feel settings for a space can be inherited from the global look and feel settings or provided by a theme. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None

Script confluence
  • Submitted by hugo697 Bun
    Created 284 days ago
    1
    //native
    2
    type Confluence = {
    3
    	email: string
    4
    	apiToken: string
    5
    	domain: string
    6
    }
    7
    /**
    8
     * Get look and feel settings
    9
     * Returns the look and feel settings for the site or a single space. This
    10
    includes attributes such as the color scheme, padding, and border radius.
    11
    
    
    12
    The look and feel settings for a space can be inherited from the global
    13
    look and feel settings or provided by a theme.
    14
    
    
    15
    **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
    16
    None
    17
     */
    18
    export async function main(auth: Confluence, spaceKey: string | undefined) {
    19
    	const url = new URL(`https://${auth.domain}/wiki/rest/api/settings/lookandfeel`)
    20
    	for (const [k, v] of [['spaceKey', spaceKey]]) {
    21
    		if (v !== undefined && v !== '' && k !== undefined) {
    22
    			url.searchParams.append(k, v)
    23
    		}
    24
    	}
    25
    	const response = await fetch(url, {
    26
    		method: 'GET',
    27
    		headers: {
    28
    			Authorization: 'Basic ' + btoa(`${auth.email}:${auth.apiToken}`)
    29
    		},
    30
    		body: undefined
    31
    	})
    32
    	if (!response.ok) {
    33
    		const text = await response.text()
    34
    		throw new Error(`${response.status} ${text}`)
    35
    	}
    36
    	return await response.json()
    37
    }
    38