Explore how payload fields in the API request for creating a microservice are mapped to the corresponding meta model fields.
Early Adopter Release
This feature is currently in early adopter release and may not be available to all users.
To create a microservice through the API, you need to submit a POST
request to the following endpoint:
https://{SUBDOMAIN}.leanix.net/services/technology-discovery/v1/microservices
The request payload contains essential details about the microservice. Here's an example request payload:
{
"name": "User activity tracker service",
"externalId": "org-name/repository-name",
"description": "A service that tracks and reports user activity within applications",
"applications": [
{
"name": "My Application A",
"factSheetId": "58c433fb-1c7a-4bfb-bdd0-54afc927bbef"
},
{
"name": "My Application A",
"factSheetId": "b1fb5507-4491-43ab-af07-2e9900c54b99"
}
],
"teams": [
{
"name": "My Team A",
"factSheetId": "58c433fb-1c7a-4bfb-bdd0-54afc927bbef"
},
{
"name": "My Team B",
"factSheetId": "b1fb5507-4491-43ab-af07-2e9900c54b99"
}
],
"tags": [
{
"tagGroupName": "My Tag Group",
"tagNames": [
"tag1",
"tag2"
]
},
{
"tagGroupName": "My Tag Group 2",
"tagNames": [
"tag3",
"tag4"
]
}
],
"resources": [
{
"name": "Resource 1",
"type": "API",
"url": "http://resource1.com",
"description": "Resource 1 description"
},
{
"name": "Resource 2",
"type": "API",
"url": "http://resource2.com",
"description": "Resource 2 description"
}
],
"repository": {
"url": "http://repository.com",
"path": "/myAwesomeService",
"status": "ACTIVE",
"visibility": "INTERNAL"
},
"type": "Backend"
}
The following table lists payload fields and their mappings to the meta model fields in SAP LeanIX.
API Request Payload Field | Meta Model Field | Description |
---|---|---|
name | displayName | The name of the fact sheet. |
externalId | technologyDiscoveryId | The external ID of the fact sheet. |
description | description | The description of the fact sheet. |
applications | relMicroserviceApplicationToBusinessApplication | Field used to create a relation between the microservice and the business application. You can pass either name or factSheetId in the payload for the system to search for the respective business application. If both fields are provided, factSheetId is used. |
applications | relApplicationToOwningOrganization | Field used to create a relation between the microservice and the owning team, which is a subtype of the organization fact sheet. You can pass either name or factSheetId in the payload for the system to search for the respective team. If both fields are provided, factSheetId is used. |
tags.tagGroupName | tagGroupName | The name of the tag group from which tags are assigned to the fact sheet. Admins can create tag groups in the Tagging section of the administration area. The value must be a valid tag group name as defined in the configuration. To learn more, see Tagging. |
tags.tagName | tagName | The name of the tag to assign to the fact sheet. Admins can create tags in the Tagging section of the administration area. The value must be a valid tag name as defined in the configuration. |
resources | resources | Resources to store on the microservice fact sheet, such as links, diagrams, files, or logos. To learn how to manage resources through the GraphQL API, see Managing Resources on a Fact Sheet. |
repository.url | lxRepositoryUrl | The URL of the repository where microservice discovery is configured. |
repository.status | lxRepositoryStatus | The status of the repository where microservice discovery is configured, such as ACTIVE or ARCHIVED . |
repository.visibility | lxRepositoryVisibility | The visibility of the repository where microservice discovery is configured, such as INTERNAL , PUBLIC , or PRIVATE . |