About pier-cloud
pier-cloud provides scripts and a reusable Python client for accessing Pier Cloud's API. It supports authenticated workflows for listing and retrieving contexts, workspaces, views, and workspace groups.
Key features
- 01Authenticate with JWT credentials
- 02List contexts and paginated workspaces
- 03Retrieve workspace and view details
- 04Query view data with filters
- 05Access workspace groups
Use cases
- 01List all workspaces with automatic pagination
- 02Retrieve filtered data for a workspace view
- 03Renew JWT tokens during longer sessions
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ fabricioctelles/ skills --skill pier-cloudAfter installing, type/pier-cloudin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.env.examplereferences/REFERENCE.mdTROUBLESHOOTING.mdscripts/pier_cloud_client.pypier-cloud-auth.pypier-cloud-get-all-workspaces.pypier-cloud-get-view-data.pypier-cloud-get-view.pypier-cloud-get-workspace-group.pypier-cloud-get-workspace.pypier-cloud-list-contexts.pypier-cloud-list-views.pypier-cloud-list-workspace-groups.pypier-cloud-list-workspaces.pyREADME.mdDetails
From the project READMEPier Cloud API
Prerequisites
Credentials
Locate the .env file in the skill directory with the following variables:
PIERCLOUD_CLIENT_ID=your_client_id
PIERCLOUD_CLIENT_SECRET=your_client_secret
PIERCLOUD_TENANCY_ID=your_tenancy_id
If the .env file does not exist, inform the user that credentials must be obtained from the Pier Cloud platform before proceeding. Do not proceed without the .env file.
Note:
PIERCLOUD_TENANCY_IDis equivalent to the formerPIERCLOUD_BUSINESS_ID. Scripts accept both as fallback.
Python Dependencies
pip install requests python-dotenv
Basic Configuration
The API uses JWT authentication. Required flow:
- Authenticate via
POST /authwithclient_idandclient_secretto obtain a JWT token - Include the token in all requests:
Authorization: Bearer {token} - Renew the token upon expiration (default validity: 1 hour)
Base URL: https://api.piercloud.io
Workspace groups live at
/lighthouse/tenancies/{tenancy_id}/workspaces-groups(note the plural workspaces).
Verify the connection by running:
python scripts/pier-cloud-auth.py
Available Scripts
Ready-to-use scripts in scripts/. See scripts/README.md for detailed instructions.
| Script | Description |
|---|---|
pier-cloud-auth.py | Authenticate and obtain JWT token |
pier-cloud-list-contexts.py | List available contexts |
pier-cloud-list-workspaces.py | List workspaces with pagination |
pier-cloud-get-workspace.py | Get specific workspace details |
pier-cloud-get-all-workspaces.py | Get all workspaces (automatic pagination) |
pier-cloud-list-views.py | List views for a workspace |
pier-cloud-get-view.py | Get specific view information |
pier-cloud-get-view-data.py | Get view data with filters |
pier-cloud-list-workspace-groups.py | List workspace groups (/workspaces-groups) |
pier-cloud-get-workspace-group.py | Get workspace group by id |
pier_cloud_client.py | Robust client with CLI and reusable library |
Workflows
Follow the detailed workflows with request and response examples in references/REFERENCE.md:
- Workflow 1 — Authentication and Token Retrieval
- Workflow 2 — List Contexts
- Workflow 3 — List Workspaces
- Workflow 4 — Get Workspace Details
- Workflow 5 — Get All Workspaces (Automatic Pagination)
- Workflow 6 — Robust Client with Retry and Token Renewal
- Workflow 9 — List Workspace Views
- Workflow 10 — Get View Information
- Workflow 11 — Get View Data with Filters
- Workflow 12 — List Workspace Groups (
/workspaces-groups) - Workflow 13 — Get Workspace Group Details
For endpoint reference, parameters, response structures, and cURL examples, see references/REFERENCE.md.
For error diagnosis (401, 403, 404, timeout, rate limiting), see references/TROUBLESHOOTING.md.
Additional Resources
- API Docs: https://docs.piercloud.com/api-docs-pier-cloud
- Public routes (EN): https://docs.piercloud.com/api-docs-pier-cloud/api-pier-cloud/public-routes-en-us
- Pier Cloud Platform: https://piercloud.com/en/
Quality Checklist
-
.envfile present withPIERCLOUD_CLIENT_ID,PIERCLOUD_CLIENT_SECRET, andPIERCLOUD_TENANCY_ID - Python dependencies installed (
requests,python-dotenv) - Authentication successful (JWT token obtained without errors)
- Correct endpoint being used (
/lighthouse/tenancies/{tenancy_id}/...; groups →workspaces-groups) - Token being renewed before expiration in long sessions
- Workspace/view IDs confirmed via listing before using directly
- Errors handled per
references/TROUBLESHOOTING.md