- Print
- PDF
Channel
- Print
- PDF
Provides information about the APIs for creating, editing, and deleting channels.
View-all-channels API
You can view all channels.
Request URL
GET https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels
Request headers
Header | Description |
---|---|
x-project-id | - Dashboard > Settings > Project settings > Project ID |
x-api-key | - Dashboard > Settings > Project settings > API Key |
Request query parameters
Parameter | Type | Required | Description |
---|---|---|---|
filter | String | O | Please use {} as the default method of entry. The filter can be used to search some of the fields. |
sort | String | X | Define the filter for the fields you want to sort. e.g., Descending order {"createdAt":"-1"} / ascending order {"createdAt":"1"} |
option | String | X | Refer to the following when there are options. ex) {"offset":0,"per_page":20} |
Request examples
curl -X 'GET' \
'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels?filter=%7B%22state%22%3A%221%22%7D' \
-H 'accept: application/json' \
-H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
-H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx'
Response examples (normal)
[
{
"id": "5498fee1-bfdf-4d50-8017-xxxxxxxxxxxxx",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
"name": "Channel-1",
"user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
"user": {
"id": "xxxxxxxxxx",
"name": "Woody",
"profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
},
"unique_id": null,
"type": "PUBLIC",
"translation": false,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg",
"created_at": "2023-03-14T18:07:14+09:00",
"updated_at": "2023-03-16T16:18:42+09:00"
},
{
"id": "14f11d8e-a092-4274-a6ba-e2a8ce4d77fb",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
"name": "Channel-2",
"user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
"user": {
"id": "xxxxxxxxxx",
"name": "Woody",
"profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
},
"unique_id": null,
"type": "PUBLIC",
"translation": true,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": "https://cloudchat.gcdn.ntruss.com/samples/1.jpeg",
"created_at": "2023-03-08T07:09:26+09:00",
"updated_at": "2023-03-16T08:19:02+09:00"
}
]
Responses
Returned as HTTP status codes in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General successful request |
400 | Bad Request | Used for general request failure (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for common server errors - 4XX error codes are used to represent client-side errors - 5XX error codes represent server-side errors |
Individual-view API
You can view Individual channels.
Request URL
GET https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
Request headers
Header | Description |
---|---|
x-project-id | - Dashboard > Settings > Project settings > Project ID |
x-api-key | - Dashboard > Settings > Project settings > API Key |
Request path parameters
Parameter | Type | Required | Description |
---|---|---|---|
channelId | String | Y | Channel ID |
Request examples
curl -X 'GET' \
'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId' \
-H 'accept: application/json' \
-H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
-H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx'
Response examples (normal)
{
"id": "5498fee1-bfdf-4d50-8017-xxxxxxxxxxxxx",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
"name": "CLOVA GreenEye",
"user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
"user": {
"id": "xxxxxxxxxx",
"name": "User",
"profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
},
"unique_id": null,
"type": "PUBLIC",
"translation": false,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg",
"created_at": "2023-03-14T18:07:14+09:00",
"updated_at": "2023-03-16T16:18:42+09:00"
}
Responses
Returned as HTTP status codes in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General successful request |
400 | Bad Request | Used for general request failure (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for common server errors - 4XX error codes are used to represent client-side errors - 5XX error codes represent server-side errors |
Channel creation API
Channels can be created.
Request URL
POST https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels
Request headers
Header | Description |
---|---|
x-project-id | - Dashboard > Settings > Project settings > Project ID |
x-api-key | - Dashboard > Settings > Project settings > API Key |
Request body parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | String | Y | Channel name (Max: 90 bytes) |
type | String | Y | Channel type (PUBLIC, PRIVATE) |
translation | Boolean | N | Automatic translation (True/False) |
members | Object | N | List of IDs that can join when the channel type is PRIVATE |
disabled | Boolean | N | Use channel (True/False) |
mutes | Boolean | N | Channel mute (True/False) |
push | Boolean | N | Push channel (True/False) |
limit | Integer | N | Limitation on number of channel users (0: unlimited) |
linkUrl | String | N | Channel link URL |
imageUrl | String | N | Channel image URL |
uniqueId | String | N | Unique ID that can be arbitrarily specified |
linkUrl rule defined
- Not allowed if only the domain is provided.
- Return status should be set to 200 in the target server.
- A header value should be provided.
- A content-type must be provided.
imageUrl
- Not allowed if only the domain is provided.
- Return status should be set to 200 in the target server.
- A header value should be provided.
- A content-type must be provided and returned as image type.
Example:
https://www.gitbook.com/cdn-cgi/image/width=40,dpr=2,height=40,fit=contain,format=auto/https://2238982255-files.gitbook.io/ ~ /files/v0/b/gitbook-legacy-files/o/spaces%2F-LNAM8Kjj1jpQoidHTej%2Favatar-1592576907682.png?generation=1592576908144636&alt=media
Request examples
curl -X 'POST' \
'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels' \
-H 'accept: application/json' \
-H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
-H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"name": "Name",
"uniqueId": "unique Id",
"type": "PUBLIC",
"translation": true,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 20,
"linkUrl": "http://link_url",
"imageUrl": "http://image_url"
}'
Response examples (normal)
{
"channel": {
"id": "464d7a5d-1074-47da-9e6c-xxxxxxxxx",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
"name": "Name",
"user_id": "demo@itsb.io",
"user": {
"id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
"name": "User",
"profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
},
"unique_id": "unique Id",
"type": "PUBLIC",
"translation": true,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": null,
"created_at": "2023-04-24T11:39:52+09:00",
"updated_at": "2023-04-24T11:39:52+09:00"
},
"status": 1
}
Responses
Returned as HTTP status codes in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General successful request |
400 | Bad Request | Used for general request failure (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for common server errors - 4XX error codes are used to represent client-side errors - 5XX error codes represent server-side errors |
Channel Edit API
You can edit channel details.
Request URL
PUT https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
Request headers
Header | Description |
---|---|
x-project-id | - Dashboard > Settings > Project settings > Project ID |
x-api-key | - Dashboard > Settings > Project settings > API Key |
Request path parameters
Parameter | Type | Required | Description |
---|---|---|---|
channelId | String | Y | Channel ID |
Request body parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | String | N | Channel name |
type | String | N | Channel type (PUBLIC, PRIVATE) |
translation | Boolean | N | Automatic translation (True/False) |
members | Object | N | List of IDs that can join when the channel type is PRIVATE |
disabled | Boolean | N | Use channel (True/False) |
mutes | Boolean | N | Channel mute (True/False) |
push | Boolean | N | Push channel (True/False) |
limit | Integer | N | Limitation on number of channel users (0: unlimited) |
linkUrl | String | N | Channel link URL |
imageUrl | String | N | Channel image URL |
uniqueId | String | N | Unique ID that can be arbitrarily specified |
linkUrl rule defined
- Not allowed if only the domain is provided.
- Return status should be set to 200 in the target server.
- A header value should be provided.
- A content-type must be provided.
imageUrl
- Not allowed if only the domain is provided.
- Return status should be set to 200 in the target server.
- A header value should be provided.
- A content-type must be provided and returned as image type.
Example:
https://www.gitbook.com/cdn-cgi/image/width=40,dpr=2,height=40,fit=contain,format=auto/https://2238982255-files.gitbook.io/ ~ /files/v0/b/gitbook-legacy-files/o/spaces%2F-LNAM8Kjj1jpQoidHTej%2Favatar-1592576907682.png?generation=1592576908144636&alt=media
Request examples
curl -X 'PUT' \
'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx' \
-H 'accept: */*' \
-H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx' \
-H 'x-api-key: 4302925661f70ce7c1406c59543f2546d261dxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"name": "Name(Edit)",
"uniqueId": "unique Id(Edit)",
"type": "PUBLIC",
"translation": true,
"members": ["user001","user002"],
"disabled": false,
"mutes": false,
"push": false,
"limit": 20,
"linkUrl": "http://link_url",
"imageUrl": "http://image_url"
}'
Response examples (normal)
{
"channel": {
"id": "464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx",
"name": "Name(Edit)",
"user_id": "demo@itsb.io",
"user": {
"id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
"name": "User",
"profile": "https://profile_image_url"
},
"unique_id": "unique Id(Edit)",
"type": "PUBLIC",
"translation": true,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": null,
"created_at": "2023-04-24T11:39:52+09:00",
"updated_at": "2023-04-24T13:38:57+09:00"
},
"status": 1
}
Responses
Returned as HTTP status codes in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General successful request |
400 | Bad Request | Used for general request failure (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for common server errors - 4XX error codes are used to represent client-side errors - 5XX error codes represent server-side errors |
Channel Deletion API
Specify the distribution Delete.
Request URL
DELETE https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
Request headers
Header | Description |
---|---|
x-project-id | - Dashboard > Settings > Project settings > Project ID |
x-api-key | - Dashboard > Settings > Project settings > API Key |
Request path parameters
Parameter | Type | Required | Description |
---|---|---|---|
channelId | String | Y | Channel ID |
Request examples
curl -X 'DELETE' \
'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx' \
-H 'accept: */*' \
-H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx' \
-H 'x-api-key: 4302925661f70ce7c1406c59543f2546d261dxxxxxxxxxxxx'
Response examples (normal)
{
"channel": {
"id": "464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx",
"project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx",
"name": "Name(Edit)",
"user_id": "demo@itsb.io",
"user": {
"id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
"name": "User",
"profile": "https://profile_image_url"
},
"unique_id": "unique Id(Edit)",
"type": "PUBLIC",
"translation": true,
"members": [],
"disabled": false,
"mutes": false,
"push": false,
"limit": 0,
"link_url": null,
"image_url": null,
"created_at": "2023-04-24T11:39:52+09:00",
"updated_at": "2023-04-24T13:38:57+09:00"
},
"status": 1
}
Responses
Returned as HTTP status codes in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General successful request |
400 | Bad Request | Used for general request failure (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for common server errors - 4XX error codes are used to represent client-side errors - 5XX error codes represent server-side errors |