# Project Channel

> **Package : spaceone.api.notification.v1**

## ProjectChannel

{% hint style="info" %}
**ProjectChannel Methods:**
{% endhint %}

| NO | Method                                     | Request Type                                                                        | Response Type                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -- | ------------------------------------------ | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1  | [**create**](#create)                      | [CreateProjectChannelRequest](#createprojectchannelrequest)                         | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Creates a new Project Channel.Project channel is the definition of the channel that delivers the notification to the project when the notification is created.When creating a Project Channel, one of the protocols must be selected, and an notification is dispatched through the selected protocol.                                                                                                                                                                                                            |
| 2  | [**update**](#update)                      | [UpdateProjectChannelRequest](#updateprojectchannelrequest)                         | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Updates a Project Channel information.Protocol that has already been set cannot be changed. Instead, the data required to be dispatched notification for project channel is can be updated.                                                                                                                                                                                                                                                                                                                       |
| 3  | [**set\_schedule**](#set_schedule)         | [UpdateProjectChannelScheduleRequest](#updateprojectchannelschedulerequest)         | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Schedule settings for project channels.When a notification is created, you can set the day and time you want to receive it through the schedule.When you set the day of the week in the schedule, you can receive a notification only on the set day of the week.If you also set the start time and end time with day of the week, you can receive a notification only at the set time on the set day of the week.If there is no schedule, notifications will be dispatched at all times through project channel. |
| 4  | [**set\_subscription**](#set_subscription) | [UpdateProjectChannelSubscriptionRequest](#updateprojectchannelsubscriptionrequest) | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Subscription settings for project channelsIf the project channel have subscriptions, notification is dispatched only if the topic of the notification is the same as the one set in the subscriptions.If no subscriptions in project channel, notifications will be dispatched all.                                                                                                                                                                                                                               |
| 5  | [**enable**](#enable)                      | [ProjectChannelRequest](#projectchannelrequest)                                     | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Enables a Project Channel.If the disabled project channel is enabled, the project channel can be used again and the notification can be dispatched.Even if the project channel is enabled, if the protocol being used in the project channel is disabled, the notification is not dispatched.                                                                                                                                                                                                                     |
| 6  | [**disable**](#disable)                    | [ProjectChannelRequest](#projectchannelrequest)                                     | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Disables a Project Channel.If you disable the project channel, the notification will not be dispatched, even if they are created.                                                                                                                                                                                                                                                                                                                                                                                 |
| 7  | [**delete**](#delete)                      | [ProjectChannelRequest](#projectchannelrequest)                                     | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   | Delete the Project Channel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 8  | [**get**](#get)                            | [GetProjectChannelRequest](#getprojectchannelrequest)                               | [ProjectChannelInfo](#projectchannelinfo)                                                                          | Gets a single Project Channel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 9  | [**list**](#list)                          | [ProjectChannelQuery](#projectchannelquery)                                         | [ProjectChannelsInfo](#projectchannelsinfo)                                                                        | Lists the specified Project Channel.Can search information using the query format provided by SpaceONE.Detailed information about Query format can be checked in the Search Query pages.                                                                                                                                                                                                                                                                                                                          |
| 10 | [**stat**](#stat)                          | [ProjectChannelStatQuery](#projectchannelstatquery)                                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

### create

> **POST** /notification/v1/project-channels
>
> Creates a new Project Channel.Project channel is the definition of the channel that delivers the notification to the project when the notification is created.When creating a Project Channel, one of the protocols must be selected, and an notification is dispatched through the selected protocol.

| Type     | Message                                                     |
| -------- | ----------------------------------------------------------- |
| Request  | [CreateProjectChannelRequest](#createprojectchannelrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)                   |

### update

> **PUT** /notification/v1/project-channel/{project\_channel\_id}
>
> Updates a Project Channel information.Protocol that has already been set cannot be changed. Instead, the data required to be dispatched notification for project channel is can be updated.

| Type     | Message                                                     |
| -------- | ----------------------------------------------------------- |
| Request  | [UpdateProjectChannelRequest](#updateprojectchannelrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)                   |

### set\_schedule

> **PUT** /notification/v1/project-channel/{project\_channel\_id}/schedule
>
> Schedule settings for project channels.When a notification is created, you can set the day and time you want to receive it through the schedule.When you set the day of the week in the schedule, you can receive a notification only on the set day of the week.If you also set the start time and end time with day of the week, you can receive a notification only at the set time on the set day of the week.If there is no schedule, notifications will be dispatched at all times through project channel.

| Type     | Message                                                                     |
| -------- | --------------------------------------------------------------------------- |
| Request  | [UpdateProjectChannelScheduleRequest](#updateprojectchannelschedulerequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)                                   |

### set\_subscription

> **PUT** /notification/v1/project-channel/{project\_channel\_id}/subscription
>
> Subscription settings for project channelsIf the project channel have subscriptions, notification is dispatched only if the topic of the notification is the same as the one set in the subscriptions.If no subscriptions in project channel, notifications will be dispatched all.

| Type     | Message                                                                             |
| -------- | ----------------------------------------------------------------------------------- |
| Request  | [UpdateProjectChannelSubscriptionRequest](#updateprojectchannelsubscriptionrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)                                           |

### enable

> **PUT** /notification/v1/project-channel/{project\_channel\_id}/enable
>
> Enables a Project Channel.If the disabled project channel is enabled, the project channel can be used again and the notification can be dispatched.Even if the project channel is enabled, if the protocol being used in the project channel is disabled, the notification is not dispatched.

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [ProjectChannelRequest](#projectchannelrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)       |

### disable

> **PUT** /notification/v1/project-channel/{project\_channel\_id}/disable
>
> Disables a Project Channel.If you disable the project channel, the notification will not be dispatched, even if they are created.

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [ProjectChannelRequest](#projectchannelrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)       |

### delete

> **DELETE** /notification/v1/project-channel/{project\_channel\_id}
>
> Delete the Project Channel.

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [ProjectChannelRequest](#projectchannelrequest)                                                                  |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### get

> **GET** /notification/v1/project-channel/{project\_channel\_id}
>
> Gets a single Project Channel.

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [GetProjectChannelRequest](#getprojectchannelrequest) |
| Response | [ProjectChannelInfo](#projectchannelinfo)             |

### list

> **GET** /notification/v1/project-channels
>
> **POST** /notification/v1/project-channels/search
>
> Lists the specified Project Channel.Can search information using the query format provided by SpaceONE.Detailed information about Query format can be checked in the Search Query pages.

| Type     | Message                                     |
| -------- | ------------------------------------------- |
| Request  | [ProjectChannelQuery](#projectchannelquery) |
| Response | [ProjectChannelsInfo](#projectchannelsinfo) |

### stat

> **POST** /notification/v1/project-channels/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [ProjectChannelStatQuery](#projectchannelstatquery)                                                                |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

## Message

### CreateProjectChannelRequest

| No | Field               | Type                                                                                                               | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                     |
| -- | ------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1  | protocol\_id        | string                                                                                                             | ✅        | The ID of protocol that will be set in project channel.                                                                                                                                                                                                                                                                                                                                                         |
| 2  | name                | string                                                                                                             | ✅        | The name of Project Channel. It can have a maximum of 255 characters.                                                                                                                                                                                                                                                                                                                                           |
| 3  | data                | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✅        | The data for using project channel.This data is encrypted and stored in the Secret service if JSON schema in the protocol's metadata is set to SECRET type.In this case, the secret ID that is stored in the security service will be returned and the data value will be empty.if JSON schema in the protocol's metadata is set to PLAIN\_TEXT type, This data is not encrypted and stored directly in the DB. |
| 4  | is\_subscribe       | bool                                                                                                               | ❌        | Indicates whether subscriptions will be used.                                                                                                                                                                                                                                                                                                                                                                   |
| 5  | subscriptions       | list of string                                                                                                     | ✅        | When using subscriptions, it indicates the topic list to subscription.If is\_subscribe is set to false, this value is ignored.                                                                                                                                                                                                                                                                                  |
| 6  | notification\_level | <ul><li>NONE</li><li>LV1</li><li>LV2</li><li>LV3</li><li>LV4</li><li>LV5</li></ul>                                 | ✅        | Set the level of notification.If a notification has a level and a notification level that this channel can receive is set, a notification is dispatched only if the notification level is the same.                                                                                                                                                                                                             |
| 7  | is\_scheduled       | bool                                                                                                               | ❌        | Indicates whether schedule will be used.                                                                                                                                                                                                                                                                                                                                                                        |
| 8  | schedule            | [ProjectChannelSchedule](#projectchannelschedule)                                                                  | ❌        | Schedule for which you want to receive notifications through the project channel.                                                                                                                                                                                                                                                                                                                               |
| 9  | tags                | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        | The tags for project channel.                                                                                                                                                                                                                                                                                                                                                                                   |
| 10 | project\_id         | string                                                                                                             | ✅        | The ID of project to which the project channel belongs.                                                                                                                                                                                                                                                                                                                                                         |
| 11 | domain\_id          | string                                                                                                             | ✅        | The ID of domain.                                                                                                                                                                                                                                                                                                                                                                                               |

### GetProjectChannelRequest

| No | Field                | Type           | Required | Description                                                                                                                 |
| -- | -------------------- | -------------- | :------: | --------------------------------------------------------------------------------------------------------------------------- |
| 1  | project\_channel\_id | string         |     ✅    | The ID of project channel.                                                                                                  |
| 2  | domain\_id           | string         |     ✅    | The ID of domain.                                                                                                           |
| 3  | only                 | list of string |     ❌    | The list of the project channel information column you want to be returned. It must be specified in the ProjectChannelInfo. |

### ProjectChannelInfo

| No | Field                | Type                                                                                                               | Description                                                                       |
| -- | -------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| 1  | project\_channel\_id | string                                                                                                             | The ID of project channel.                                                        |
| 2  | name                 | string                                                                                                             | The name of project channel                                                       |
| 3  | state                | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                                            | The state of project channel. ENABLED or DISABLED only.                           |
| 4  | data                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | The data for using project channel.                                               |
| 5  | secret\_id           | string                                                                                                             | The ID of secret encrypted data in the security service                           |
| 6  | is\_subscribe        | bool                                                                                                               | Indicates whether subscriptions will be used.                                     |
| 7  | subscriptions        | list of string                                                                                                     | The topic list to subscription.                                                   |
| 8  | notification\_level  | <ul><li>NONE</li><li>LV1</li><li>LV2</li><li>LV3</li><li>LV4</li><li>LV5</li></ul>                                 | Set the level of notification.                                                    |
| 9  | is\_scheduled        | bool                                                                                                               | Indicates whether schedule will be used.                                          |
| 10 | schedule             | [ProjectChannelSchedule](#projectchannelschedule)                                                                  | Schedule for which you want to receive notifications through the project channel. |
| 11 | tags                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | The tags for project channel.                                                     |
| 12 | protocol\_id         | string                                                                                                             | The ID of protocol set in the project channel.                                    |
| 13 | project\_id          | string                                                                                                             | The ID of project to which the project channel belongs.                           |
| 14 | domain\_id           | string                                                                                                             | The ID of domain.                                                                 |
| 15 | created\_at          | string                                                                                                             | Project channel creation time.                                                    |

### ProjectChannelQuery

| No | Field                | Type                                                                                               | Required | Description                                                                    |
| -- | -------------------- | -------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| 1  | query                | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ❌        | Query format provided by SpaceONE. Please check the link for more information. |
| 2  | project\_channel\_id | string                                                                                             | ❌        | The ID of project channel.                                                     |
| 3  | name                 | string                                                                                             | ❌        | The name of project channel.                                                   |
| 4  | state                | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                            | ❌        | The state of project channel. ENABLED or DISABLED only.                        |
| 5  | secret\_id           | string                                                                                             | ✅        |                                                                                |
| 6  | notification\_level  | <ul><li>NONE</li><li>LV1</li><li>LV2</li><li>LV3</li><li>LV4</li><li>LV5</li></ul>                 | ❌        | The level of notification.                                                     |
| 7  | protocol\_id         | string                                                                                             | ❌        | The ID of protocol set in the project channel.                                 |
| 8  | project\_id          | string                                                                                             | ❌        | The ID of project to which the project channel belongs.                        |
| 9  | domain\_id           | string                                                                                             | ✅        | The ID of domain.                                                              |

### ProjectChannelRequest

| No | Field                | Type   | Required | Description                |
| -- | -------------------- | ------ | :------: | -------------------------- |
| 1  | project\_channel\_id | string |     ✅    | The ID of project channel. |
| 2  | domain\_id           | string |     ✅    | The ID of domain.          |

### ProjectChannelSchedule

| No | Field         | Type                                                                                                       | Description                                                                                                 |
| -- | ------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| 1  | day\_of\_week | <ul><li>NONE</li><li>MON</li><li>TUE</li><li>WED</li><li>THU</li><li>FRI</li><li>SAT</li><li>SUN</li></ul> | Day of the week to be notified.As a list type, only types that can be specified from MON to SUN can be set. |
| 2  | start\_hour   | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)            | Start time to receive notifications.Only integer type can be set, and 0 to 23 can be.                       |
| 3  | end\_hour     | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)            | End time to receive notifications.Only integer type can be set, and 1 to 24 can be.                         |

### ProjectChannelStatQuery

| No | Field      | Type                                                                                                             | Required | Description                                                                               |
| -- | ---------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------------------------------------------------------------------------------------- |
| 1  | query      | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✅    | Statistics Query format provided by SpaceONE. Please check the link for more information. |
| 2  | domain\_id | string                                                                                                           |     ✅    | The ID of domain.                                                                         |

### ProjectChannelsInfo

| No | Field        | Type                                                                                            | Description                               |
| -- | ------------ | ----------------------------------------------------------------------------------------------- | ----------------------------------------- |
| 1  | results      | [list of ProjectChannelInfo](#projectchannelinfo)                                               | List of queried project channels.         |
| 2  | total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) | Total counts of queried project channels. |

### UpdateProjectChannelRequest

| No | Field                | Type                                                                                                               | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                     |
| -- | -------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1  | project\_channel\_id | string                                                                                                             | ✅        | The ID of project channel.                                                                                                                                                                                                                                                                                                                                                                                      |
| 2  | name                 | string                                                                                                             | ❌        | The name of Project Channel. It can have a maximum of 255 characters.                                                                                                                                                                                                                                                                                                                                           |
| 3  | data                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ✅        | The data for using project channel.This data is encrypted and stored in the Secret service if JSON schema in the protocol's metadata is set to SECRET type.In this case, the secret ID that is stored in the security service will be returned and the data value will be empty.if JSON schema in the protocol's metadata is set to PLAIN\_TEXT type, This data is not encrypted and stored directly in the DB. |
| 4  | notification\_level  | <ul><li>NONE</li><li>LV1</li><li>LV2</li><li>LV3</li><li>LV4</li><li>LV5</li></ul>                                 | ✅        | Set the level of notification.If a notification has a level and a notification level that this channel can receive is set, a notification is dispatched only if the notification level is the same.                                                                                                                                                                                                             |
| 5  | tags                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | ❌        | The tags for project channel.                                                                                                                                                                                                                                                                                                                                                                                   |
| 6  | domain\_id           | string                                                                                                             | ✅        | The ID of domain.                                                                                                                                                                                                                                                                                                                                                                                               |

### UpdateProjectChannelScheduleRequest

| No | Field                | Type                                              | Required | Description                                                                       |
| -- | -------------------- | ------------------------------------------------- | :------: | --------------------------------------------------------------------------------- |
| 1  | project\_channel\_id | string                                            |     ✅    | The ID of project channel.                                                        |
| 2  | is\_scheduled        | bool                                              |     ✅    | Indicates whether schedule will be used.                                          |
| 3  | schedule             | [ProjectChannelSchedule](#projectchannelschedule) |     ❌    | Schedule for which you want to receive notifications through the project channel. |
| 4  | domain\_id           | string                                            |     ✅    | The ID of domain.                                                                 |

### UpdateProjectChannelSubscriptionRequest

| No | Field                | Type           | Required | Description                                                                                                                    |
| -- | -------------------- | -------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------ |
| 1  | project\_channel\_id | string         |     ✅    | The ID of project channel.                                                                                                     |
| 2  | is\_subscribe        | bool           |     ✅    | Indicates whether subscriptions will be used.                                                                                  |
| 3  | subscriptions        | list of string |     ✅    | When using subscriptions, it indicates the topic list to subscription.If is\_subscribe is set to false, this value is ignored. |
| 4  | domain\_id           | string         |     ✅    | The ID of domain.                                                                                                              |
