---
title: "getAllSpaces"
canonical: "https://support.appfire.com/space/PSCONF/15306809/getAllSpaces"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getAllSpace() | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns a string array with the keys of all spaces in Confluence.

Returns a string array with the keys of all spaces in Confluence.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |

## Return Type

**string []**

Returns a list of keys for all spaces in Confluence.

## Example

```javascript
string [] spaces = getAllSpaces();
print(spaces);
```

Results: prints a list with all the space keys in Confluence. If we have 2 spaces PRJ and TST, the logs will show PRJ|TST

## See also

> Macro (contentbylabel)