Skip to content

Update Draft

  • Endpoint Path: /api/v2/editor/{type}/{draftId}
  • Method: PUT
  • Request: Rest + application/json

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidrequiredrequired
X-Fresns-Uid-Tokenrequiredrequired

Rest Params

Parameter NameTypeRequiredDescription
typeStringrequiredpost or comment
draftIdNumberrequiredDraft ID

Body Params

Parameter NameTypeRequiredPost DescriptionComment Description
editorFskeyStringoptionalIs it an editor plugin
Passing Fresns will reset to the default editor
postQuotePidStringoptionalQuoted post PID
Not required
Post-specific
postGidStringoptionalGroupPost-specific
postTitleStringoptionalTitlePost-specific
postIsCommentDisabledBooleanNOWhether comments are disabledPost-specific
postIsCommentPrivateBooleanNOWhether the comment is private
Visible only to the comment author and post author
Post-specific
contentStringoptionalContent
Insert the file in the content in the format [file:{fid}]
isMarkdownBooleanoptionalIs content in MD format
isAnonymousBooleanoptionalIs it anonymous
mapObjectoptionalLocation information
extendsArrayoptionalExtended content
archivesArrayoptionalExtended parameters
deleteMapBooleanoptionalDelete location information
deleteFileStringoptionalDelete file, pass fid as parameter
deleteExtendStringoptionalDelete extended content, pass eid as parameter
deleteArchiveStringoptionalDelete extended parameters, pass code as parameter

Request Description

  • For file functionality, use the File Upload Interface to upload files, with the following parameter examples:
    • usageType = Post 7 Comment 8
    • tableName = Post post_logs Comment comment_logs
    • tableColumn = id
    • tableId = Current draft ID {draftId}
  • Location information map parameter example:
    • Location information mapId, latitude, longitude, poi are required, others are optional
    • mapId is from the data dictionary, Map Service Provider Number
    • To delete (clear) location information, use the deleteMap parameter.

Example Parameters

json
{
    "mapId": 2,
    "latitude": 37.3185039,
    "longitude": -122.0288017,
    "scale": 14,
    "continent": "North America",
    "continentCode": "NA",
    "country": "United States",
    "countryCode": "US",
    "region": "California",
    "regionCode": "CA",
    "city": "Santa Clara",
    "cityCode": "SC",
    "district": "Cupertino",
    "address": "10800 Torre Ave, Cupertino, CA 95014",
    "zip": "95014",
    "poi": "Cupertino Library",
    "poiId": "TRDucfBPkhuzzR9a7",
}
json
[
    {
        "eid": "eid",
        "canDelete": true, // Can user delete
        "rating": 9, // Sort by
        "fskey": null
    }
]
json
[
    {
        "code": "code",
        "value": "value",
        "isPrivate": false, // Private or not (public display or not)
        "fskey": null
    }
]

Return

json
{
    "code": 0,
    "message": "ok",
    "data": null
}

Released under the Apache-2.0 License