The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content

RESTful API for creating and managing various objects in the Lifecycle Twin.

Document new version

The Lifecycle Twin API does not create a new version automatically when you upload a file with the same name. Instead, you follow a two-step process:

  • Check if a document with the same file name already exists.
  • Upload the new file to the existing document.

Check if the document exists

Use a standard GET query with a filter for the file name.

GET /{entityName}/tabs

HeaderValue
filter{"equals":{"Files.Name":"Screenshot 2022-12-20 180429.png"}}

Output example:

[
    {
        "Name": "Screenshot 2022-12-20 180429.png1",
        "Files": [
            {
                "Name": "Screenshot 2022-12-20 180429.png",
                "Size": 0,
                "SourceType": 0,
                "CreatedOn": "0001-01-01T00:00:00Z",
                "Version": 0,
                "TotalFileParts": 0,
                "FilePart": 0,
                "Id": "9eae91b1-0c89-8777-5d70-dcc238af074e"
            }
        ],
        "Version": 0,        
        "Parent": {
            "Name": "RME_basic_sample_project",
            "Version": 0,
            "IsFolder": false,
            "SubFoldersCount": 0,
            "ChildrenCount": 0,
            "IsAutoName": false,
            "CheckedOut": false,
            "Id": "2320efac-0214-49ad-ae5d-a1a99eb5b6c6"
        },        
        "Id": "9c5dc8bd-57c9-4196-adc6-9ec2369df975"
    }
]

Upload new version

PUT /documents/{documentId}/upload

HeaderValue
select{"Files": {"Id", "ContentType"}, "Version"}

Body - Multipart

First part:

{
"Id": "{documentId}",
"Files": [
{
"Name": "Screenshot 2022-12-20 180429.png",
"ContentType": "image/png",
"FilePart": 1
}
]
}

Second part - file stream

Note

  • Files.Name must match the existing file name exactly. Otherwise, the API does not create a new version.
  • ContentType is mandatory and must match the file's media type.
  • FilePart is mandatory and must equal 1.