Call Product API

After completing this page, you will use a personal access token to list the workspaces visible to the current account and save a workspace ID for later requests.

1. Prepare connection information

Obtain the complete Product API base URL from the developer connection information for the current environment, and prepare a UC personal access token:

export PRODUCT_API_BASE_URL='<Product API Base URL ending in /newmoi>'
export PRODUCT_API_KEY='<your-personal-access-token>'

The Product API base URL must include /newmoi. Product API uses X-API-Key; do not substitute a Genesis base URL or Authorization: Bearer.

2. List workspaces

curl "$PRODUCT_API_BASE_URL/workspaces" \
  -H "X-API-Key: $PRODUCT_API_KEY" \
  -H "Accept: application/json"

The workspace-discovery request does not send X-Workspace-ID. In a successful response, data.workspaces lists the workspaces visible to the current identity.

3. Save a workspace ID

Select the target workspace from data.workspaces[].id:

export WORKSPACE_ID='<workspace-id-from-response>'

Subsequent workspace-resource requests must send both headers:

X-API-Key: <PERSONAL_ACCESS_TOKEN>
X-Workspace-ID: <WORKSPACE_ID>

If the list is empty, confirm that the current account has created, joined, or accepted an invitation to the target workspace. Do not construct an ID from a workspace name.

Next steps

Last updated on