Spaces

A space is a separate Personas environment. Consider the two main reasons you might use spaces:

  • To separate your development and production environments (highly recommended)
  • To separate environments for distinct teams or geographical regions

Get Space

Returns the Space by id.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.spaces.getSpace('9aQ1Lj62S4bomZKLF4DPqW'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

List Spaces

List Spaces.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

Securitytoken
Request
query Parameters
object (PaginationInput)

Pagination params

This parameter exists in alpha.

Example: pagination=pagination.count=200
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.spaces.listSpaces())
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}