Back to Collection Items
<?php
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Http')
$http = new COM("Chilkat.Http");
// Adds the "Authorization: Bearer <access_token>" header.
$http->AuthToken = '<access_token>';
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.StringBuilder')
$sbResponseBody = new COM("Chilkat.StringBuilder");
$success = $http->QuickGetSb('https://your-domain.atlassian.net/wiki/rest/api/settings/theme/:themeKey',$sbResponseBody);
if ($success == 0) {
print $http->LastErrorText . "\n";
exit;
}
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.JsonObject')
$jResp = new COM("Chilkat.JsonObject");
$jResp->LoadSb($sbResponseBody);
$jResp->EmitCompact = 0;
print 'Response Body:' . "\n";
print $jResp->emit() . "\n";
$respStatusCode = $http->LastStatus;
print 'Response Status Code = ' . $respStatusCode . "\n";
if ($respStatusCode >= 400) {
print 'Response Header:' . "\n";
print $http->LastHeader . "\n";
print 'Failed.' . "\n";
exit;
}
?>
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
https://your-domain.atlassian.net/wiki/rest/api/settings/theme/:themeKey
Postman Collection Item JSON
{
"name": "Get theme",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/settings/theme/:themeKey",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"settings",
"theme",
":themeKey"
],
"variable": [
{
"key": "themeKey",
"value": "<string>",
"type": "string",
"description": "(Required) The key of the theme to be returned."
}
]
},
"description": "Returns a theme. This includes information about the theme name,\ndescription, and icon.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None"
},
"response": [
{
"name": "Returned if the requested theme is returned.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": {
"content": "Added as a part of security scheme: oauth2",
"type": "text/plain"
},
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/api/settings/theme/:themeKey",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"settings",
"theme",
":themeKey"
],
"variable": [
{
"key": "themeKey"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"name": "Returned if there is no theme with the given key.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": {
"content": "Added as a part of security scheme: oauth2",
"type": "text/plain"
},
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/api/settings/theme/:themeKey",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"settings",
"theme",
":themeKey"
],
"variable": [
{
"key": "themeKey"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}