Skip to content

Listing Projects

This document highlights different use cases to list projects and their applications, and then you can manage other operations. For a basic project deployment using the IEM APIs, the following HTTP request you may need related api documentation:

  1. a POST request with your username and password and receive a lightweight token that will enable you as a user to authenticate future requests.
  2. a POST request to create a new company.
  3. a GET request to receive the ID of the company that you would like to create a new project in.
  4. a POST request to create a new project with the specific company ID.
  5. a GET request to receive the ID of the project that you would like to get applications.
  6. a GET request to receive all the applications of the project to get the ID of the application.
  7. a GET request to receive the details of a specific developer application.
  8. a DELETE request to delete a specific project.
  9. a DELETE request to delete a specific company.

Get authentication token for IEM API

See Authentication guide.

Create A New Company

Use this request to create a new company:

curl -i -X POST \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/companies' \
--data-raw '{
  "name": "testz",
  "address": "string",
  "city": "string",
  "state": "string",
  "country": "string",
  "postalCode": "string",
  "webAddress": "http://j6kqdu-75clfkpzty8xvztmko-su2npqvwfphwg7fyr-kzjl4hcebx3x4-ypnab72l0cz599f7q0mzwe6mlohdxj3udbk",
  "phone": "1231231",
  "email": "test@siemens.com"
}'

A successful response looks like this:

{
    "companyId": "c536d7f53d144978a4b1020c418f2008",
    "userId": "88b0d08729b94a949ad8f4ae1abf60c7",
    "name": "testz",
    "address": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postalCode": "string",
    "webAddress": "http://j6kqdu-75clfkpzty8xvztmko-su2npqvwfphwg7fyr-kzjl4hcebx3x4-ypnab72l0cz599f7q0mzwe6mlohdxj3udbk",
    "phone": "1231231",
    "email": "test@siemens.com"
}

Get Company ID

Use this request to list all the companies owned by a user:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/companies'

A successful response looks like this:

{
    "companies": [
        {
            "companyId": "c536d7f53d144978a4b1020c418f2008",
            "userId": "88b0d08729b94a949ad8f4ae1abf60c7",
            "name": "testz",
            "address": "string",
            "city": "string",
            "state": "string",
            "country": "string",
            "postalCode": "string",
            "webAddress": "http://j6kqdu-75clfkpzty8xvztmko-su2npqvwfphwg7fyr-kzjl4hcebx3x4-ypnab72l0cz599f7q0mzwe6mlohdxj3udbk",
            "phone": "1231231",
            "email": "test@siemens.com"
        }
    ]
}

Create A New Project

Use this request to create a new project:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/projects' \
--data-raw '{
    "name": "test",
    "description": "test",
    "companyId": "c536d7f53d144978a4b1020c418f2008"
}'

A successful response looks like this:

{
    "id": "4eac3c5dfb13448e923874bb5354de7b",
    "name": "test",
    "description": "test",
    "userId": "88b0d08729b94a949ad8f4ae1abf60c7",
    "companyId": "c536d7f53d144978a4b1020c418f2008"
}

Get Project ID

Use this request to list all the projects owned by a user:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/projects'

A successful response looks like this:

{
    "projects": [
        {
            "id": "4eac3c5dfb13448e923874bb5354de7b",
            "name": "newProject",
            "description": "test",
            "icon": "",
            "userId": "88b0d08729b94a949ad8f4ae1abf60c7"
        }
    ]
}

List Project Applications

Use this request to list all applications of a specific project, you need the project ID of the project as a unique identifier:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/projects/<your-app-id>/apps'

A successful response looks like this:

{
    "applications": [
        {
            "id": "6807df8753a2426c9fc9559345289421",
            "userId": "df72cc033e75458b86bd13b612406477",
            "title": "test",
            "iconUrl": "https://localhost:443/pp/PortalCache/app/6807df8753a2426c9fc9559345289421/4.png"
        }
    ]
}

List Application Details

To list the details of a specific application you need the application ID of the application as a unique identifier:

curl -i -X GET \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/developer-applications/<your-app-id>'

A successful response looks like this:

{
    "projectId": "161fe7016b694f77abd9ade9c9491b82",
    "description": "tetttt",
    "appStatus": "ACTIVE",
    "appLabels": [],
    "id": "6807df8753a2426c9fc9559345289421",
    "title": "test",
    "iconUrl": "https://localhost:443/pp/PortalCache/app/6807df8753a2426c9fc9559345289421/4.png"
}

Delete A Project

Use this request to delete a specific project, you need the project ID as a unique identifier:

curl -i -X DELETE \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/projects/<your-project-id>'

A successful response may return 204 as the HTTP Status Code.

Delete A Company

Use this request to delete a specific company, you need the company ID as a unique identifier:

curl -i -X DELETE \
-H "Authorization:<your-authorization-token>" \
'https://<your-iem-url>/portal/api/v1/companies/<your-company-id>'

A successful response may return 204 as the HTTP Status Code.