Documentation (2024.2 Enterprise)

# Project

A project is where most of the collaboration happens in Helix TeamHub. A company can have 0 to n projects, and each project belongs to exactly one company. Most of the other objects are handled in the scope of projects.

- Operations
  - `GET /projects/:project-id/project-bots`
  - `GET /projects/:project-id/project-bots/:id`
  - `POST /projects/:project-id/project-bots`
  - `PUT/PATCH /projects/:project-id/project-bots/:id`
  - `DELETE /projects/:project-id/project-bots/:id`

## Operations

### GET /projects/:project-id/project-bots

Returns all bots added to the project as project-bot objects.

### GET /projects/:project-id/project-bots/:id

Returns the bot added to the project as a project-bot object.

### POST /projects/:project-id/project-bots

Adds a bot to the project. Does not create a new bot. Returns the project-bot object.

Supported roles are `guest`, `developer`, and `master`.

#### Example Request

    curl -X POST \
      -H "Accept: application/vnd.api+json" \
      -H "Content-Type: application/vnd.api+json" \
      -d '{ "data": { "attributes": { "role": "developer" }, "relationships": { "bot": { "data": { "id": "public-hth-bot" } } } } }' \
      http://dev.helixteamhub.com/api/v2/projects/bungie-studios/project-bots?account_key=$ACCOUNT_KEY

#### Example Response

    {
      "data": {
        "id": "f5ea54ee-46d0-43f4-8f93-9f1948d261db_61daa045-2ce7-42bb-8d30-c89b736090c1",
        "type": "project-bots",
        "attributes": {
          "role": "developer"
        },
        "relationships": {
          "project": {
            "data": {
              "id": "f5ea54ee-46d0-43f4-8f93-9f1948d261db",
              "type": "projects"
            }
          },
          "bot": {
            "data": {
              "id": "61daa045-2ce7-42bb-8d30-c89b736090c1",
              "type": "bots"
            }
          }
        }
      }
    }

### PUT/PATCH /projects/:project-id/project-bots/:id

Updates the existing project-bot. Returns the updated project-bot object.

#### Example Request

    curl -X PUT \
      -H "Accept: application/vnd.api+json" \
      -H "Content-Type: application/vnd.api+json" \
      -d '{ "data": { "attributes": { "role": "master" } } }' \
      http://dev.helixteamhub.com/api/v2/projects/bungie-studios/project-bots/f5ea54ee-46d0-43f4-8f93-9f1948d261db_61daa045-2ce7-42bb-8d30-c89b736090c1?account_key=$ACCOUNT_KEY

#### Example Response

    {
      "data": {
        "id": "f5ea54ee-46d0-43f4-8f93-9f1948d261db_61daa045-2ce7-42bb-8d30-c89b736090c1",
        "type": "project-bots",
        "attributes": {
          "role": "master"
        },
        "relationships": {
          "project": {
            "data": {
              "id": "f5ea54ee-46d0-43f4-8f93-9f1948d261db",
              "type": "projects"
            }
          },
          "bot": {
            "data": {
              "id": "61daa045-2ce7-42bb-8d30-c89b736090c1",
              "type": "bots"
            }
          }
        }
      }
    }

### DELETE /projects/:project-id/project-bots/:id

Removes the bot from the project. Returns a 204 status code and blank response.

Your search for returned results

Your search for returned results