Description
Uploads and assigns an image in the format of jpg, png, gif to a segment group. Last upload will remain in the subsequent uploads to the same segment.
In case update fails or is aborted, old image stay in the segment group.
The maximum size of an image is 150kb.
-
The user must be authenticated and have write permissions to the segment's siteGroup.
Request
The request object has multipart-form-data type and has the following part fields.
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
Identifier for the segment category to be assigned with image. |
|
|
String |
Yes |
Identifier for the segment group to be assigned with image. |
|
|
String |
No |
Identifier for the segment group item to be assigned with image. |
|
|
Binary |
Yes |
Image file to be assigned to the specified segment. |
Response
The response for a successful query is an empty object: {"status":"ok"}
Examples
$ curl -X POST -H 'X-cXense-Authentication: ...' -F category=Custom -F group=Sport -F img=@Sport.jpg https://api.cxense.com/segment/group/image/upload
{"status":"ok"}