Project Collaborator

Project Collaborator is the linking object between Projects and Collaborators. With them you define who belongs to which project and what they can do in those projects.

Attributes

project

The Project the membership is for. The full representation can be requested with expand=project.

  • Type: string
  • Required: true

collaborator

The Collaborators the membership is for. The full representation can be requested with expand=collaborator.

  • Type: string
  • Required: true

role

The role the Collaborators has directly in the Project. Possible values are master, developer and guest.

  • Type: string
  • Required: true

highest_role

The highest role the Collaborators has in the Project.

  • Type: string

Operations

GET /projects/:project_id/project_collaborators

Returns all project collaborators for a Project, with optional limit and offset parameters, as a metadata-results object.

Example Request

curl -X GET \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators

Example Response

{
  "metadata": {
    "more_results": false,
    "next_offset": 6,
    "count": 6
  },
  "results": [
    {
      "api_status": 200,
      "api_timestamp": "2014-11-25T14:18:07Z",
      "project": {
        "id": "platform"
      },
      "collaborator": {
        "id": "norris"
      },
      "role": "guest",
      "highest_role": "guest"
    },
    ...
  ]
}

GET /projects/:project_id/project_collaborators/:id

Returns a specific project collaborator in a Project.

Example Request

curl -X GET \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators/norris

Example Response

{
  "api_status": 200,
  "api_timestamp": "2014-11-25T14:18:07Z",
  "project": {
    "id": "platform"
  },
  "collaborator": {
    "id": "norris"
  },
  "role": "guest",
  "highest_role": "guest"
}

Example request with collaborator and project fields expanded

curl -X GET \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators/norris?expand=collaborator,project

Example response with collaborator and project fields expanded

{
  "api_status": 200,
  "api_timestamp": "2014-11-25T14:18:07Z",
  "project": {
    "api_status": 200,
    "api_timestamp": "2014-11-25T14:30:51Z",
    "id": "platform",
    "created_at": "2014-10-07T15:58:59Z",
    "updated_at": "2014-11-07T09:28:16Z",
    "name": "Platform",
    "description": "",
    "color": "blue",
    "visibility": "company",
    "labels": [

    ],
    "properties": {

    },
    "hook_events": [
      "repository"
    ]
  },
  "collaborator": {
    "api_status": 200,
    "api_timestamp": "2014-11-25T14:30:51Z",
    "id": "norris",
    "created_at": "2014-11-17T07:13:48Z",
    "updated_at": "2014-11-17T16:56:24Z",
    "type": "collaborator",
    "email": "norris@acme.org",
    "first_name": "Chuck",
    "last_name": "Norris",
    "display_name": "Chuck Norris",
    "company_admin": false,
    "instance_admin": false,
    "description": "",
    "phone": "",
    "title": "",
    "avatar": {
      "large": "",
      "medium": "",
      "small": ""
    },
    "synchronized_fields": [

    ],
    "locale": "en",
    "source": ""
  },
  "role": "guest",
  "highest_role": "guest"
}

POST /projects/:project_id/project_collaborators

Adds a Collaborator to a project. Returns the added project collaborator.

Example Request

curl -X POST \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  -H "Content-Type: application/json" \
  -d '{ "id": "norris", "role": "guest" }' \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators

Example Response

{
  "api_status": 201,
  "api_timestamp": "2014-11-25T14:18:07Z",
  "project": {
    "id": "platform"
  },
  "collaborator": {
    "id": "norris"
  },
  "role": "guest",
  "highest_role": "guest"
}

PUT /projects/:project_id/project_collaborators/:id

Updates a project collaborator in a project. Returns the updated project collaborator.

Example Request

curl -X PUT \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  -H "Content-Type: application/json" \
  -d '{ "role": "developer" }' \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators/norris

Example Response

{
  "api_status": 200,
  "api_timestamp": "2014-11-25T14:18:07Z",
  "project": {
    "id": "platform"
  },
  "collaborator": {
    "id": "norris"
  },
  "role": "developer",
  "highest_role": "developer"
}

DELETE /projects/:project_id/project_collaborators/:id

Removes a collaborator from a project. Returns the removed project collaborator.

Example Request

curl -X DELETE \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  https://helixteamhub.cloud/api/projects/platform/project_collaborators/norris

Example Response

{
  "api_status": 200,
  "api_timestamp": "2014-11-25T14:18:07Z",
  "project": {
    "id": "platform"
  },
  "collaborator": {
    "id": "norris"
  },
  "role": "developer",
  "highest_role": "developer"
}