https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users
List all projects users for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new().basic_auth("<email>", "<password>"); let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users".to_string()) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Query
name | type | required | description |
---|---|---|---|
project_ids | string | false | Numeric IDs of projects, comma-separated |
user_id | string | false | Numeric ID of user, if passed returns only project users for this user’s projects |
with_group_members | boolean | false | Include group members |
Response
200
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
at | string | When was last modified |
gid | integer | Group ID, legacy field |
group_id | integer | Group ID |
id | integer | Project User ID |
labor_cost | number | null |
labor_cost_last_updated | string | Date for labor cost last updated |
manager | boolean | Whether the user is manager of the project |
project_id | integer | Project ID |
rate | number | null |
rate_last_updated | string | Date for rate last updated |
user_id | integer | User ID |
workspace_id | integer | Workspace ID |
400
Possible error messages:
- Workspace not found
- project_ids cannot exceed 200 elements.
- Invalid user_id
403
User does not have access to this resource.
500
Internal Server Error