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.

Quick start

Get the API key

Contact Lifecycle Twin support to retrieve your CLIENT_ID and CLIENT_SECRET. These two keys are required for API authentication.

Authenticate

Before making any calls to the Lifecycle Twin API, you need to authenticate and retrieve an access_token.

Request

POST /api/token HTTP/1.1
Host: eu-ecodomus-services.siemens.com
Content-Type: application/x-www-form-urlencoded

client_id=your_id&client_secret=your_secret&username=username&password=pwd&grant_type=password

Response

{
    "access_token": "PELPIm2Mn1-JzbZRqrUxa.............ICGvNGR-Y",
    "token_type": "bearer",
    "expires_in": 604799,
    "refresh_token": "2a66b5d105e141d.....2b80a8b7b35ea5bc91",
    "user_sid": "8b6c047f-0000-0000-0000-1ceb7331eaf7"
}

Use the access_token for all subsequent API calls. See the Authentication page for details.

curl -X POST \
  https://eu-ecodomus-services.siemens.com/api/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&grant_type=password&username=[LOGIN]&password=[PASSWORD]'

Fetch the data

The Lifecycle Twin API provides endpoints to retrieve lists of resources by type, or a single resource by its unique ID.

Include the following custom HTTP headers in your requests:

Select – specifies which fields to include in the response

{"Id", "Name", "CustomFields" : {"Id", "Value"}}

This request returns entities with the fields Id, Name, and a list of custom fields (CustomFields), where each custom field includes Id and Value.

Note

The API does not guarantee that only the fields you specify are returned. In some cases, additional fields may also appear in the response. However, the fields you specify in the header are always populated.

Filter – restricts the list of objects returned. You can only use this header when requesting a list of objects of a particular type.

{"Contains" : {"Name" : "100W - 277V"}}

This request returns objects where the Name field contains the value “100W – 277V”. The available filter fields are defined by the object schema. Sample

{"equals":{"CustomFields[4be891a7-58c8-4f14-8b5b-e878fe3016f3].Value":3}}

This request returns objects where the Value field equals “3” for the custom field with identifier 4be891a7-58c8-4f14-8b5b-e878fe3016f3.