List all spaces

get

/swm/rs/v1/sites/{siteId}/spaces

Get the list of spaces (for a site) of which the API user is a member.

Response includes creator information for each space.

Adding the optional expand query parameter with a value of "products" or "all" will include the list of product IDs under products for each space resource in the response.

Request

Supported Media Types
  • application/json
Path Parameters
siteId
Type: string
Required: true
The ID of the site
Query Parameters
expand
Type: string
The expand value (e.g. "all" or "products")

Response

Supported Media Types
  • application/json; charset=UTF-8
200 Response
space resource found empty

Examples

Sample Request:

       GET swm/rs/v1/sites/RoGcM7ZB1dwMgzI6/spaces    

Sample Response:

       {"response":{"code":"200.0","developerMessage":"space resource found"},
        "siteName":"Our Site Name",
        "items":
         [
           {
              "spaceId": "k63vRjBbEud91V8ZBzEsO2Y5",
              "spaceName": "Outside Patio",
              "accessLevel": "1",
              "creatorId": "4NoPbTtpr3aODIBj",
              "creatorFirstName": "John",
              "creatorLastName": "Doe",
              "products":
                [
                  {
                     "links":
                       [
                         {
                            "rel": "self",
                            "href": "http://swm-host/swm/rs/v1/spaces/k63vRjBbEud91V8ZBzEsO2Y5/products"
                         }
                       ]
                  }
                ]
           },
           {
              "spaceId": "PU8ftnV3nqIfIo7MLRUE36Vc",
              "spaceName": "Office Decor",
              "accessLevel": "0",
              "creatorId": "4NoPbTtpr3aODIBj",
              "creatorFirstName": "John",
              "creatorLastName": "Doe",
              "products":
                [
                  {
                     "links":
                        [
                          {
                             "rel": "self",
                             "href": "http://swm-host/swm/rs/v1/spaces/PU8ftnV3nqIfIo7MLRUE36Vc/products"
                          }
                        ]
                  }
                ]
           }
          ]
        }
    

Possible Error Codes:

       {
          "code":"404.0","developerMessage":"site resource not found"
       }