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

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

## Description

> Macro (excerpt)
> 
> Takes a category name and returns an array of spaces (CSpace structs) in that category.

Takes a category name and returns an array of spaces (CSpace structs) in that category.

## Return Type

**[CSpace []](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303915)**

Returns an array of CSpace structures containing the space properties.

## Example

```javascript
CSpace [] spaces = admGetSpaces("Products");
for(CSpace space in spaces) {
	print(space.name);
}
```

Prints name of each space in the Products category in the logs.

## See also

> Macro (contentbylabel)