CREATE ideaAttachment {#create}
Create an idea attachment object.
Requester must have the correct permission to the idea in order to create attachment in it.
Parameters
Parameters | Detail
----------------------------------------| -----------------------------------
idea_id
required |This is the ID of the idea the attachment belongs to
Sample value: "11111111-1111-1111-1111-111111111111"
attachment
required |This is the attachment. Value must be file object. File size is restrictd to 7MB maximum. To create multiple attachments in the same request, pass parameter name: attachment1, attachment2...
Accepted Format: jpg, gif, bmp, png, jpeg, doc, docx, xls, xlsx, ppt, pptx, pdf, avi, wmv, mov, flv, csv, zip.
Resource Information
Authentication
: Required. See Authentication for details on authentication.
HTTP Methods
: POST
Request URL Format
: https://{api_domain}/api3/ideaAttachment
Access Permission
Idea submitter can create attachment for his own idea. Admin can create attachments for others ideas.
Idea submitter and Admin must have access to the idea in order to create attachments for it.
Errors
- Invalid GUID received
- Attachment must be in JPG,GIF,BMP,PNG,JPEG,DOC,DOCX,XLS,XLSX,PPT,PPTX,PDF,AVI,WMV,MOV,SWF,ZIP,RAR,CSV,FLV,7Z,WAV,TIFF,M4V,MOV,MP4,MPG format
- Upload Error: file too large
- Missing required parameter
Example Request
- Method: POST
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/ideaAttachment
Form data:
- idea_id=D0B723EB-4C9E-48D5-A227-A092D4B7C932
- Attachment: {File}
~~~ { "attachments": [ { "id": "983B2462-AFF3-4824-8BC7-7637D7DD4CFB", "referenceid": "D0B723EB-4C9E-48D5-A227-A092D4B7C932", "extension": "jpg", "originalfilename": "sample.JPG", "grouping": "IDEA", "url": "https://example.brightideatest.com/api3/file/983B2462-AFF3-4824-8BC7-7637D7DD4CFB?format=binary", "type": "image/jpeg" } ] } ~~~
DELETE ideaAttachment {#delete}
Delete a ideaAttachment object. Requester must have the correct permission to the idea in order to delete attachment from it.
Parameters
Parameters | Detail
----------------------------------------| -----------------------------------
format
optional |Specifies returned data format
Accepted value: "json", "xml"
Resource Information
Authentication
: RequiredHTTP Methods
: DELETERequest URL Format
: https://{api_domain}/api3/ideaAttachment/{id}
Access Permission
Idea submitter can delete attachment for his own idea. Admin can delete attachments for others ideas.
Idea submitter and Admin must have access to the idea in order to delete attachments from it.
Errors
- Invalid GUID received
Example Request
- Method: DELETE
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/ideaAttachment/8B3E8DFF-83B3-403D-BB69-28223F418676
~~~ { "message": "success", "code": 200 } ~~~