Skip to main content Skip to complementary content

Get an XML string of a document

Gets an XML string of a document.
Request
GET /services/rest/data/{containerName}/documents/{uniqueId}
Parameters
  • containerName: This is a String value which specifies the name of the data container from which you want to get an XML string of a document.
  • uniqueId: This is a String value which represents the unique id of the document.
  • encoding: It represents the char set of the result and defaults to UTF-8.
Headers
  • Authorization: Basic Authentication scheme
  • Accept: application/xml
Response The document of the record in the specified container.
Status
  • 200 OK: The query operation is executed successfully, and the record that matches the provided ID will be returned as a string.
  • 400 BAD REQUEST: The request contains invalid parameter, for example, invalid storage name or invalid storage type.
  • 401 UNAUTHORIZED: Login fails, invalid username or password.
  • 403 FORBIDDEN: Missing required permission, for example, no required READ permission.
  • 404 NOT FOUND: The resource does not exist, for example, invalid service URL.
  • 500 INTERNAL SERVER ERROR: Other errors.
Limitation This REST API does not support getting an XML string of a document for the Role entity in the PROVISIONING system data container.

Sample response

<ii>
    <c>Product</c>
    <dmn>Product</dmn>
    <dmr/>
    <sp/>
    <t>1531728848296</t>
    <taskId>null</taskId>
    <i>1</i>
    <p>
        <Product>
            <Id>1</Id>
            <Name>New Name</Name>
            <Description>2</Description>
            <Features>
                <Sizes>
                    <Size>Small</Size>
                    <Size>Medium</Size>
                    <Size>Large</Size>
                </Sizes>
                <Colors>
                    <Color>White</Color>
                    <Color>Light Blue</Color>
                    <Color>Light Pink</Color>
                </Colors>
            </Features>
            <Availability>true</Availability>
            <Price>3.00</Price>
            <Stores>
            </Stores>
        </Product>
    </p>
</ii>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!