KnowledgeBase_Image
You need the Manage images permission to manage images.
KnowledgeBase_Images
- KnowledgeBase_Images Manage
GET kb/images
GET kb/images/{id}
POST kb/images
PUT kb/images/{id}
DELETE kb/images/{id}
Model
KnowledgeBase_Image JSON Format
KnowledgeBase_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. |
Endpoint
Get the list of KnowledgeBase_Images
GET kb/images
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
kbId |
guid | query | no | Id of the knowledage base. |
Response:
An array of KnowledgeBase_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
Get a single KnowledgeBase_Image
GET kb/images/{id}
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
Create a new KnowledgeBase_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
Update the KnowledgeBase_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
Remove the KnowledgeBase_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