Skip to main content

 Services

Web services from /about to /webhooks

uri fragment

/members/{member}/groups/{group}/uris/{uri}/fragments/{+fragment} [PUT]

Description

Fragment's Content.

Create new edit on fragment provided.

The new content of the fragment must be in the enclosed entity body of the request.

Parameters

NameDescriptionRequiredTypeDefault
contentNew fragment content. DEPRECATED, use enclosed
entity body of the request
maybestring
draftA flag to save edit as a draftnobooleanfalse
htmlA flag to specify if content is HTMLnobooleanfalse
labelsThe label values for the editnolabels
lastmodifiedThe last modified date/time (ISO-8601) of the fragment (prevents edit clashes)nodate
noteContent for edit notes (if exists, creates a note)nostring
note-labelsComma-separated list of label values for the note (if exists, creates a note)nolabelsfalse
note-titleTitle for edit notenostringEdit Note
positionThe position (instance number) of this document in the publication (requires publicationid)nointeger1
publicationidThe ID of the publication context for this document to return numbering (requires transclude=true)nopublicationid
transcludeA flag to resolve transclusions when outputting resultnobooleanfalse

Permission

This service requires contributor or higher.

Response

When successful, the new fragment is returned as a <document-fragment> wrapped in a <fragment-creation> element with the following optional attributes:

  • unresolved-xrefs="true" – if their are unresolved cross references in the fragment.

Example:


<fragment-creation [unresolved-xrefs="true"]>
  <document-fragment [draft="true"]>
    <locator  id="325"
              fragment="example"
              editid="6340"
              modified="2015-03-24T13:21:57">
      <notes>
        <note id="6342"
              modified="2015-03-24T13:21:57"
              title="Typography">
          <content>Fixed typographical error.</content>
        </note>
      </notes>
    </locator>
    <fragment id="example">
      <para>This is the fragment content</para>
    </fragment>
  </document-fragment>
</fragment-creation>

Error Handling

CodeCause / Description
0x120BError processing XRefs
0x120CError creating fragment
0x120DContent validation error
0x120Elastmodified date is invalid
0x120FSomeone has modified the fragment while you were editing
0x122DThe fragment is invalid
Created on , last edited on