Back to Collection Items
void ChilkatSample(void)
{
queryParams.UpdateString(L"spaceKey",L"<string>"); queryParams.UpdateString(L"spaceKey",L"<string>"); queryParams.UpdateString(L"spaceId",L"<long>"); queryParams.UpdateString(L"spaceId",L"<long>"); queryParams.UpdateString(L"type",L"<string>"); queryParams.UpdateString(L"status",L"<string>"); queryParams.UpdateString(L"label",L"<string>"); queryParams.UpdateString(L"label",L"<string>"); queryParams.UpdateString(L"favourite",L"<boolean>"); queryParams.UpdateString(L"favouriteUserKey",L"<string>"); queryParams.UpdateString(L"expand",L"<string>"); queryParams.UpdateString(L"expand",L"<string>"); queryParams.UpdateInt(L"start",0); queryParams.UpdateInt(L"limit",25); http.put_AuthToken(L"<access_token>"); success = http.HttpParams(L"GET",L"https://your-domain.atlassian.net/wiki/rest/api/space",queryParams,resp); resp.GetBodySb(sbResponseBody); jResp.LoadSb(sbResponseBody); jResp.put_EmitCompact(false); jResp.put_I(i); id = jResp.IntOf(L"results[i].id"); key = jResp.stringOf(L"results[i].key"); name = jResp.stringOf(L"results[i].name"); v_type = jResp.stringOf(L"results[i].type"); status = jResp.stringOf(L"results[i].status"); Settings = jResp.stringOf(L"results[i]._expandable.settings"); Metadata = jResp.stringOf(L"results[i]._expandable.metadata"); Operations = jResp.stringOf(L"results[i]._expandable.operations"); LookAndFeel = jResp.stringOf(L"results[i]._expandable.lookAndFeel"); Permissions = jResp.stringOf(L"results[i]._expandable.permissions"); Icon = jResp.stringOf(L"results[i]._expandable.icon"); Description = jResp.stringOf(L"results[i]._expandable.description"); Theme = jResp.stringOf(L"results[i]._expandable.theme"); History = jResp.stringOf(L"results[i]._expandable.history"); Homepage = jResp.stringOf(L"results[i]._expandable.homepage"); Path = jResp.stringOf(L"results[i].icon.path"); Width = jResp.IntOf(L"results[i].icon.width"); Height = jResp.IntOf(L"results[i].icon.height"); IsDefault = jResp.BoolOf(L"results[i].icon.isDefault"); Value = jResp.stringOf(L"results[i].description.plain.value"); Representation = jResp.stringOf(L"results[i].description.plain.representation"); ViewValue = jResp.stringOf(L"results[i].description.view.value"); ViewRepresentation = jResp.stringOf(L"results[i].description.view.representation"); homepageValue = jResp.stringOf(L"results[i].homepage.value"); Start = jResp.IntOf(L"results[i].metadata.labels.start"); Limit = jResp.IntOf(L"results[i].metadata.labels.limit"); Size = jResp.IntOf(L"results[i].metadata.labels.size"); RouteOverrideEnabled = jResp.BoolOf(L"results[i].settings.routeOverrideEnabled"); Color = jResp.stringOf(L"results[i].lookAndFeel.headings.color"); LinksColor = jResp.stringOf(L"results[i].lookAndFeel.links.color"); HoverOrFocusValue = jResp.stringOf(L"results[i].lookAndFeel.menus.hoverOrFocus.value"); ColorValue = jResp.stringOf(L"results[i].lookAndFeel.menus.color.value"); BackgroundColorValue = jResp.stringOf(L"results[i].lookAndFeel.header.backgroundColor.value"); ButtonValue = jResp.stringOf(L"results[i].lookAndFeel.header.button.value"); PrimaryNavigationValue = jResp.stringOf(L"results[i].lookAndFeel.header.primaryNavigation.value"); SecondaryNavigationValue = jResp.stringOf(L"results[i].lookAndFeel.header.secondaryNavigation.value"); SearchValue = jResp.stringOf(L"results[i].lookAndFeel.header.search.value"); ScreenValue = jResp.stringOf(L"results[i].lookAndFeel.content.screen.value"); ContainerValue = jResp.stringOf(L"results[i].lookAndFeel.content.container.value"); HeaderValue = jResp.stringOf(L"results[i].lookAndFeel.content.header.value"); BodyValue = jResp.stringOf(L"results[i].lookAndFeel.content.body.value"); BordersAndDividersColor = jResp.stringOf(L"results[i].lookAndFeel.bordersAndDividers.color"); CreatedDate = jResp.stringOf(L"results[i].history.createdDate"); j = 0; count_j = jResp.SizeOfArray(L"results[i].description.plain.embeddedContent"); jResp.put_J(j); value = jResp.stringOf(L"results[i].description.plain.embeddedContent[j].value"); j = j + 1; j = 0; count_j = jResp.SizeOfArray(L"results[i].description.view.embeddedContent"); jResp.put_J(j); value = jResp.stringOf(L"results[i].description.view.embeddedContent[j].value"); j = j + 1; j = 0; count_j = jResp.SizeOfArray(L"results[i].metadata.labels.results"); jResp.put_J(j); value = jResp.stringOf(L"results[i].metadata.labels.results[j].value"); j = j + 1; j = 0; count_j = jResp.SizeOfArray(L"results[i].operations"); jResp.put_J(j); operation = jResp.stringOf(L"results[i].operations[j].operation"); targetType = jResp.stringOf(L"results[i].operations[j].targetType"); j = j + 1; j = 0; count_j = jResp.SizeOfArray(L"results[i].permissions"); jResp.put_J(j); v_expandableValue = jResp.stringOf(L"results[i].permissions[j].subjects._expandable.value"); UserValue = jResp.stringOf(L"results[i].permissions[j].subjects.user.value"); GroupValue = jResp.stringOf(L"results[i].permissions[j].subjects.group.value"); Operation = jResp.stringOf(L"results[i].permissions[j].operation.operation"); TargetType = jResp.stringOf(L"results[i].permissions[j].operation.targetType"); anonymousAccess = jResp.BoolOf(L"results[i].permissions[j].anonymousAccess"); unlicensedAccess = jResp.BoolOf(L"results[i].permissions[j].unlicensedAccess"); j = j + 1; i = i + 1;
}
Curl Command
curl -G -d "spaceKey=%3Cstring%3E"
-d "spaceKey=%3Cstring%3E"
-d "spaceId=%3Clong%3E"
-d "spaceId=%3Clong%3E"
-d "type=%3Cstring%3E"
-d "status=%3Cstring%3E"
-d "label=%3Cstring%3E"
-d "label=%3Cstring%3E"
-d "favourite=%3Cboolean%3E"
-d "favouriteUserKey=%3Cstring%3E"
-d "expand=%3Cstring%3E"
-d "expand=%3Cstring%3E"
-d "start=0"
-d "limit=25"
-H "Authorization: Bearer <access_token>"
https://your-domain.atlassian.net/wiki/rest/api/space
Postman Collection Item JSON
{
"name": "Get spaces",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/space?spaceKey=<string>&spaceKey=<string>&spaceId=<long>&spaceId=<long>&type=<string>&status=<string>&label=<string>&label=<string>&favourite=<boolean>&favouriteUserKey=<string>&expand=<string>&expand=<string>&start=0&limit=25",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"space"
],
"query": [
{
"key": "spaceKey",
"value": "<string>",
"description": "The key of the space to be returned. To return multiple spaces,\nspecify this parameter multiple times with different values."
},
{
"key": "spaceKey",
"value": "<string>",
"description": "The key of the space to be returned. To return multiple spaces,\nspecify this parameter multiple times with different values."
},
{
"key": "spaceId",
"value": "<long>",
"description": "The id of the space to be returned. To return multiple spaces,\nspecify this parameter multiple times with different values."
},
{
"key": "spaceId",
"value": "<long>",
"description": "The id of the space to be returned. To return multiple spaces,\nspecify this parameter multiple times with different values."
},
{
"key": "type",
"value": "<string>",
"description": "Filter the results to spaces based on their type."
},
{
"key": "status",
"value": "<string>",
"description": "Filter the results to spaces based on their status."
},
{
"key": "label",
"value": "<string>",
"description": "Filter the results to spaces based on their label."
},
{
"key": "label",
"value": "<string>",
"description": "Filter the results to spaces based on their label."
},
{
"key": "favourite",
"value": "<boolean>",
"description": "Filter the results to the favourite spaces of the user specified by\n`favouriteUserKey`. Note, 'favourite' spaces are also\nknown as 'saved for later' spaces."
},
{
"key": "favouriteUserKey",
"value": "<string>",
"description": "The userKey of the user, whose favourite spaces are used to filter\nthe results when using the `favourite` parameter.\n\nLeave blank for the current user. Use [Get user](#api-user-get) to\nget the userKey for a user."
},
{
"key": "expand",
"value": "<string>",
"description": "A multi-value parameter indicating which properties of the spaces to\nexpand, where:\n\n - `settings` returns the settings for the space, similar to [Get space settings](#api-space-spaceKey-settings-get).\n - `metadata.labels` returns the space labels, which are used to categorize the space.\n - `operations` returns the operations for a space, which are used when setting permissions.\n - `lookAndFeel` returns information about the look and feel of the space, including the color scheme.\n - `permissions` returns the permissions for the space. Note that this may return permissions for deleted groups,\n because deleting a group doesn't remove associated space permissions.\n - `icon` returns information about space icon.\n - `description.plain` returns the description of the space.\n - `description.view` returns the description of the space.\n - `theme` returns information about the space theme.\n - `homepage` returns information about the space homepage."
},
{
"key": "expand",
"value": "<string>",
"description": "A multi-value parameter indicating which properties of the spaces to\nexpand, where:\n\n - `settings` returns the settings for the space, similar to [Get space settings](#api-space-spaceKey-settings-get).\n - `metadata.labels` returns the space labels, which are used to categorize the space.\n - `operations` returns the operations for a space, which are used when setting permissions.\n - `lookAndFeel` returns information about the look and feel of the space, including the color scheme.\n - `permissions` returns the permissions for the space. Note that this may return permissions for deleted groups,\n because deleting a group doesn't remove associated space permissions.\n - `icon` returns information about space icon.\n - `description.plain` returns the description of the space.\n - `description.view` returns the description of the space.\n - `theme` returns information about the space theme.\n - `homepage` returns information about the space homepage."
},
{
"key": "start",
"value": "0",
"description": "The starting index of the returned spaces."
},
{
"key": "limit",
"value": "25",
"description": "The maximum number of spaces to return per page. Note, this may be\nrestricted by fixed system limits."
}
]
},
"description": "Returns all spaces. The returned spaces are ordered alphabetically in\nascending order by space key.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to access the Confluence site ('Can use' global permission).\nNote, the returned list will only contain spaces that the current user\nhas permission to view."
},
"response": [
{
"name": "Returned if the requested spaces are 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/space?spaceKey=<string>&spaceKey=<string>&spaceId=<long>&spaceId=<long>&type=<string>&status=<string>&label=<string>&label=<string>&favourite=<boolean>&favouriteUserKey=<string>&expand=<string>&expand=<string>&start=0&limit=25",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"space"
],
"query": [
{
"key": "spaceKey",
"value": "<string>"
},
{
"key": "spaceKey",
"value": "<string>"
},
{
"key": "spaceId",
"value": "<long>"
},
{
"key": "spaceId",
"value": "<long>"
},
{
"key": "type",
"value": "<string>"
},
{
"key": "status",
"value": "<string>"
},
{
"key": "label",
"value": "<string>"
},
{
"key": "label",
"value": "<string>"
},
{
"key": "favourite",
"value": "<boolean>"
},
{
"key": "favouriteUserKey",
"value": "<string>"
},
{
"key": "expand",
"value": "<string>"
},
{
"key": "expand",
"value": "<string>"
},
{
"key": "start",
"value": "0"
},
{
"key": "limit",
"value": "25"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"results\": [\n {\n \"id\": 26764331,\n \"key\": \"laborum\",\n \"name\": \"in adipisicing nisi\",\n \"type\": \"sunt\",\n \"status\": \"laborum voluptate\",\n \"_expandable\": {\n \"settings\": \"sit occaecat\",\n \"metadata\": \"\",\n \"operations\": \"sunt do culpa ullamco\",\n \"lookAndFeel\": \"Lorem occaecat\",\n \"permissions\": \"cupidatat dolore elit et\",\n \"icon\": \"occaecat Excepteur\",\n \"description\": \"consectetur id Excepteur mollit\",\n \"theme\": \"volupt\",\n \"history\": \"est laboris adipisicing occaecat non\",\n \"homepage\": \"in laboris\"\n },\n \"_links\": {},\n \"icon\": {\n \"path\": \"irure ut\",\n \"width\": 74794118,\n \"height\": 55813977,\n \"isDefault\": false\n },\n \"description\": {\n \"plain\": {\n \"value\": \"Lorem\",\n \"representation\": \"plain\",\n \"embeddedContent\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ]\n },\n \"view\": {\n \"value\": \"officia sunt velit\",\n \"representation\": \"plain\",\n \"embeddedContent\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ]\n }\n },\n \"homepage\": {\n \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n },\n \"metadata\": {\n \"labels\": {\n \"results\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"start\": -83054779,\n \"limit\": 97968975,\n \"size\": -70611604,\n \"_links\": {}\n }\n },\n \"operations\": [\n {\n \"operation\": \"copy\",\n \"targetType\": \"blogpost\"\n },\n {\n \"operation\": \"update\",\n \"targetType\": \"blogpost\"\n }\n ],\n \"permissions\": [\n {\n \"subjects\": {\n \"_expandable\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"user\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"group\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"operation\": {\n \"operation\": \"administer\",\n \"targetType\": \"application\"\n },\n \"anonymousAccess\": false,\n \"unlicensedAccess\": false\n },\n {\n \"subjects\": {\n \"_expandable\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"user\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"group\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"operation\": {\n \"operation\": \"move\",\n \"targetType\": \"comment\"\n },\n \"anonymousAccess\": false,\n \"unlicensedAccess\": false\n }\n ],\n \"settings\": {\n \"routeOverrideEnabled\": false,\n \"_links\": {}\n },\n \"theme\": {},\n \"lookAndFeel\": {\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 \"history\": {\n \"createdDate\": \"1999-07-22T04:19:16.365Z\"\n }\n },\n {\n \"id\": -19509015,\n \"key\": \"tempor veniam commodo aute pariatur\",\n \"name\": \"id velit ex sit\",\n \"type\": \"quis officia cillum\",\n \"status\": \"officia ipsum proident irure culpa\",\n \"_expandable\": {\n \"settings\": \"aute non\",\n \"metadata\": \"laborum do deserunt\",\n \"operations\": \"Duis occaecat Excepteur\",\n \"lookAndFeel\": \"esse\",\n \"permissions\": \"mollit id in Excepteur\",\n \"icon\": \"elit velit m\",\n \"description\": \"magna ipsum dolor nisi\",\n \"theme\": \"cupidatat ex \",\n \"history\": \"ipsum esse\",\n \"homepage\": \"ipsum commodo officia\"\n },\n \"_links\": {},\n \"icon\": {\n \"path\": \"occaecat enim mollit\",\n \"width\": 28738893,\n \"height\": 88604543,\n \"isDefault\": true\n },\n \"description\": {\n \"plain\": {\n \"value\": \"amet Excepteur aliquip qui\",\n \"representation\": \"plain\",\n \"embeddedContent\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ]\n },\n \"view\": {\n \"value\": \"in tempor\",\n \"representation\": \"plain\",\n \"embeddedContent\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ]\n }\n },\n \"homepage\": {\n \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n },\n \"metadata\": {\n \"labels\": {\n \"results\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"start\": 33084561,\n \"limit\": -91985267,\n \"size\": -56212284,\n \"_links\": {}\n }\n },\n \"operations\": [\n {\n \"operation\": \"move\",\n \"targetType\": \"space\"\n },\n {\n \"operation\": \"administer\",\n \"targetType\": \"space\"\n }\n ],\n \"permissions\": [\n {\n \"subjects\": {\n \"_expandable\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"user\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"group\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"operation\": {\n \"operation\": \"restore\",\n \"targetType\": \"attachment\"\n },\n \"anonymousAccess\": false,\n \"unlicensedAccess\": false\n },\n {\n \"subjects\": {\n \"_expandable\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"user\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"group\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"operation\": {\n \"operation\": \"purge\",\n \"targetType\": \"blogpost\"\n },\n \"anonymousAccess\": false,\n \"unlicensedAccess\": false\n }\n ],\n \"settings\": {\n \"routeOverrideEnabled\": false,\n \"_links\": {}\n },\n \"theme\": {},\n \"lookAndFeel\": {\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 \"history\": {\n \"createdDate\": \"1988-11-10T03:26:30.943Z\"\n }\n }\n ],\n \"start\": -704604,\n \"limit\": 17139756,\n \"size\": 86679250,\n \"_links\": {}\n}"
},
{
"name": "Returned if the authentication credentials are incorrect or missing\nfrom the request.",
"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/space?spaceKey=<string>&spaceKey=<string>&spaceId=<long>&spaceId=<long>&type=<string>&status=<string>&label=<string>&label=<string>&favourite=<boolean>&favouriteUserKey=<string>&expand=<string>&expand=<string>&start=0&limit=25",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"space"
],
"query": [
{
"key": "spaceKey",
"value": "<string>"
},
{
"key": "spaceKey",
"value": "<string>"
},
{
"key": "spaceId",
"value": "<long>"
},
{
"key": "spaceId",
"value": "<long>"
},
{
"key": "type",
"value": "<string>"
},
{
"key": "status",
"value": "<string>"
},
{
"key": "label",
"value": "<string>"
},
{
"key": "label",
"value": "<string>"
},
{
"key": "favourite",
"value": "<boolean>"
},
{
"key": "favouriteUserKey",
"value": "<string>"
},
{
"key": "expand",
"value": "<string>"
},
{
"key": "expand",
"value": "<string>"
},
{
"key": "start",
"value": "0"
},
{
"key": "limit",
"value": "25"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}