0 people focusing right now

GET /api/team-projects

Get team projects accessible to the current user

Projects System Overview

RegardingWork has three project types:

Retrieve all team projects that the authenticated user has access to across their team memberships.

Team Access Required: Only returns projects from teams where the user is an active member.
Endpoint URL
GET https://game.regardingwork.com/api/team-projects
Authentication
JWT Bearer token required

📤 Request

Headers
Authorization: Bearer <your_jwt_token>
No Query Parameters

This endpoint returns all accessible team projects without filters.

✅ Response (200 OK)

{
  "success": true,
  "team_projects": [
    {
      "id": 6,
      "name": "Innovemind",
      "team_name": "Development Team",
      "team_id": 3
    },
    {
      "id": 12,
      "name": "Marketing Campaign Q1",
      "team_name": "Marketing Team",
      "team_id": 5
    }
  ]
}
Response Fields
Field Type Description
success boolean Request success status
team_projects[] array List of accessible team projects
id integer Unique team project ID
name string Team project name
team_name string Name of the parent team
team_id integer Parent team ID

🔍 Get Specific Team Project

Endpoint
GET https://game.regardingwork.com/api/team-projects/{id}
Example Response
{
  "id": 6,
  "name": "Innovemind",
  "description": "Core product development project",
  "team_name": "Development Team",
  "team_id": 3,
  "is_public": true,
  "slack_channel": "#dev-innovemind",
  "created_at": "2024-01-15T10:30:00Z"
}

❌ Error Responses

401 Unauthorized
{"error": "Authentication required"}
403 Forbidden (for specific project)
{"error": "Not authorized to access this team project"}
404 Not Found (for specific project)
{"error": "Team project not found"}

💡 Usage Examples

JavaScript (Mac/Windows App)
// Get all team projects for dropdown
const response = await fetch('https://game.regardingwork.com/api/team-projects', {
  headers: {
    'Authorization': 'Bearer ' + localStorage.getItem('jwt_token')
  }
});

const data = await response.json();
console.log('Team projects:', data.team_projects);

// Get specific team project details
const projectResponse = await fetch('https://game.regardingwork.com/api/team-projects/6', {
  headers: {
    'Authorization': 'Bearer ' + localStorage.getItem('jwt_token')
  }
});

const project = await projectResponse.json();
console.log('Project details:', project);
curl
# Get all team projects
curl -X GET "https://game.regardingwork.com/api/team-projects" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

# Get specific team project
curl -X GET "https://game.regardingwork.com/api/team-projects/6" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

🔗 Related Endpoints