Image
- 16 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
Image
- Updated on 16 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Image
You need the Manage images permission to manage images.
Images
- Images ManageGET kb/images
- Get the list of ImagesGET kb/images/{id}
- Get a single ImagePOST kb/images
- Create a new ImagePUT kb/images/{id}
- Update the ImageDELETE kb/images/{id}
- Remove the Image
Image JSON Format
Image is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
fileName | string | Name of the file. |
extType | string | Type of the file. |
height | integer | Height of the image. |
width | integer | Width of the image. |
size | integer | Size of the image. |
uploadTime | datetime | Time when the image was uploaded. |
modified | datetime | Time when the image was last modified. |
id | guid | Id of the image. |
kbId | guid | Id of the knowledage base. |
fileKey | string | Url of the file. |
Get the list of Images
GET kb/images
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
kbId | guid | query | no | Id of the knowledage base. |
Response:
An array of Image
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/images \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"fileName": "height.png",
"extType": "image/png",
"height": 136,
"width": 32,
"size": 1530,
"uploadTime": "2021-05-08T06:37:54.273Z",
"modified": "2021-05-08T06:37:54.273Z",
"id": "56829117-8206-41dc-a9f9-50032b6366b1",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"fileKey": "3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"
}
]
Get a single Image
GET kb/images/{id}
Parameters:
No Parameters
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/images/56829117-8206-41dc-a9f9-50032b6366b1 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"fileName": "height.png",
"extType": "image/png",
"height": 136,
"width": 32,
"size": 1530,
"uploadTime": "2021-05-08T06:37:54.273Z",
"modified": "2021-05-08T06:37:54.273Z",
"id": "56829117-8206-41dc-a9f9-50032b6366b1",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"fileKey": "3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"
}
Create a new Image
POST kb/images
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
fileName | string | body | yes | Name of the file. |
extType | string | body | yes | Type of the file. |
height | integer | body | yes | Height of the image. |
width | integer | body | yes | Width of the image. |
size | integer | body | yes | Size of the image. |
kbId | guid | body | yes | Id of the knowledage base. |
fileKey | string | body | no | Url of the file. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/images \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"fileName":"height.png","extType":"image/png","height":136,"width":32,"size":1530,"kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","fileKey":"3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"}'
Response:
HTTP/1.1 201 Created
{
"fileName": "height.png",
"extType": "image/png",
"height": 136,
"width": 32,
"size": 1530,
"uploadTime": "2021-05-08T06:37:54.273Z",
"modified": "2021-05-08T06:37:54.273Z",
"id": "56829117-8206-41dc-a9f9-50032b6366b1",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"fileKey": "3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"
}
Update the Image
PUT kb/images/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
fileName | string | body | yes | Name of the file. |
extType | string | body | yes | Type of the file. |
height | integer | body | yes | Height of the image. |
width | integer | body | yes | Width of the image. |
size | integer | body | yes | Size of the image. |
kbId | guid | body | yes | Id of the knowledage base. |
fileKey | string | body | no | Url of the file. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/images/56829117-8206-41dc-a9f9-50032b6366b1 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"fileName":"height.png","extType":"image/png","height":136,"width":32,"size":1530,"kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","fileKey":"3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"}'
Response:
HTTP/1.1 200 OK
{
"fileName": "height.png",
"extType": "image/png",
"height": 136,
"width": 32,
"size": 1530,
"uploadTime": "2021-05-08T06:37:54.273Z",
"modified": "2021-05-08T06:37:54.273Z",
"id": "56829117-8206-41dc-a9f9-50032b6366b1",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"fileKey": "3kBif0FlgG838F3WlbsDc0Q5mmk5DGZ8aFeeWnz0xfugMsKJ06m56ZshYmyxwPEPCJy2YW-XEX9ZHIQCAtoorQSF6Lf2jUVPR6ok9LcXY4_mnhM1WxRO0uEO48ZT-FKxUyJW8hmpHoWyd82VrrjdJdc-mhT96EZZPGy2YNF7rD4Q"
}
Remove the Image
DELETE kb/images/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/images/56829117-8206-41dc-a9f9-50032b6366b1 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?