Upload Graphic

POST {{baseUrl}}/libraries/:libraryId/graphics

Upload a new graphic to a library. <!--From Readme--> The content type for this API call must be multipart/form-data.

The following table shows the allowed content-types for the graphics file:

File TypeContent Type
jpegimage/jpeg
gifimage/gif
pngimage/png

Use of Graphic in Product

Notice: Uploaded files may be attached to surveys and can be accessed by anyone who has the corresponding URL. This feature should only be used for non-confidential files.

Try It Out Feature Limitation

Unfortunately, this feature will not let you upload files. To test this feature, it's suggested you run the cURL example.

You can upload a file from a remote host, or you can upload a file from your local drive.

Example request body for uploading file from a remote host: JSON { "name": "imageName", "fileUrl": "https://fileLocation.com/imageName.png", "contentType": "contentType", "folder": "libraryFolderName" }

Example request body for uploading file from a local drive: ```JSON { file: @/home/images/imageName.png, folder: libraryFolderName }

Request Body

[{"name"=>"name", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"fileUrl", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"contentType", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"folder", "value"=>"<string>", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;result&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;},&quot;meta&quot;:{&quot;httpStatus&quot;:&quot;\u003cstring\u003e&quot;,&quot;requestId&quot;:&quot;\u003cstring\u003e&quot;,&quot;notice&quot;:&quot;\u003cstring\u003e&quot;}}