PEO API
PEO API provides access to peos management resources of OMN and operations on them.
DAM API provides access to PEO resources. PEO is an abbreviation for "Product Export Option". This refers to filters on articles or products of the OMN, e.g. to be able to define different prices or texts for an advertising material or for a web shop.
Main resources:
| Resource | Description |
|---|---|
PEO |
Product Export Options. |
Links |
Represent references between PEOs and Projects |
Peos API
Provides operations on OMN peos.
Query peos
| /peo/peos/query Get lost of PEO tids by allowed criteria. |
Allows to get peos tids by:
-
By modification date (from/until)
-
By project tid
-
By peos names
| When project tid is set the peos linked to child projects are exported as well by default. withChildren boolean parameter is responsible for this functionality. By default, this parameters value is true. |
Tip: Request can be performed by one parameter or by many at once. Criteria combined with AND operator.
Resource path |
/api/core/v1/peo/peos/query |
HTTP method |
POST |
Request content type |
application/json; |
Response content type |
application/json; |
Body parameters
Accepts PeoQuery
Return Type
Filled with peos tids PeoRequest
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Found products tids |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
404 |
Not found |
|
500 |
An unknown internal error occurred |
Samples
Query by product tid, modified date interval, peo names and project tid with child projects peos
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/peo/peos/query' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"tidProduct": "ec98dde6-4064-465d-a1fb-237e2f10a336",
"modifiedFrom": "2018-02-25T01:00:00.000",
"modifiedUntil": "2023-02-24T01:00:00.000",
"names": ["PEO name", "PEO other name"],
"tidProject": "t0t8de6-9874-46a1-f11t-ec98dde6"
}'
{
"tidProduct": "ec98dde6-4064-465d-a1fb-237e2f10a336",
"modifiedFrom": "2018-02-25T01:00:00.000",
"modifiedUntil": "2023-02-24T01:00:00.000",
"names": ["PEO name", "PEO other name"],
"tidProject": "t0t8de6-9874-46a1-f11t-ec98dde6"
}
{
"tids": [
"55beafb6-a80b-48ab-8a7b-9e1a98d67b24",
"38b42b94-ffca-445c-b395-fa6ee612cbb3",
"8d4e6770-67d2-49db-874c-bf4d5dfa315b"
]
}
Query by product tid, modified date interval, peo names and project tid without child projects peos
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/peo/peos/query' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"tidProduct": "ec98dde6-4064-465d-a1fb-237e2f10a336",
"modifiedFrom": "2018-02-25T01:00:00.000",
"modifiedUntil": "2023-02-24T01:00:00.000",
"names": ["PEO name", "PEO other name"],
"tidProject": "t0t8de6-9874-46a1-f11t-ec98dde6",
"withChildren": false
}'
{
"tidProduct": "ec98dde6-4064-465d-a1fb-237e2f10a336",
"modifiedFrom": "2018-02-25T01:00:00.000",
"modifiedUntil": "2023-02-24T01:00:00.000",
"names": ["PEO name", "PEO other name"],
"tidProject": "t0t8de6-9874-46a1-f11t-ec98dde6",
"withChildren": false
}
{
"tids": [
"55beafb6-a80b-48ab-8a7b-9e1a98d67b24",
"38b42b94-ffca-445c-b395-fa6ee612cbb3"
]
}
Retrieve peos
| /peo/peos/retrieve Retrieves information about PEOs. |
Resource path |
/api/core/v1/peo/peos/retrieve |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
|
Body parameters
Specified by PeoRequest
-
ids: it might be used to get peos by id's
-
tids: it might be used to get peos by tid's
| Boolean withMetadata parameter indicates to return peos with metadata or not. By default, this parameter is false. |
| Boolean namesOnly parameter indicates to return peos with names only for performance reasons. By default, this parameter is false. |
| Peos are retrieved by tids OR ids. ids are ignored if the request contains tids and ids. |
Return Type
PimType with peos as String
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with peos as String |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
404 |
Not found |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Retrieve peo with metadata by peo tids
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/peos/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"tids": ["55beafb6-a80b-48ab-8a7b-9e1a98d67b24", "38b42b94-ffca-445c-b395-fa6ee612cbb3"],
"withMetadata" : true
}'
{
"tids": ["55beafb6-a80b-48ab-8a7b-9e1a98d67b24", "38b42b94-ffca-445c-b395-fa6ee612cbb3"],
"withMetadata" : true
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T07:20:20.659Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">peo</itm>
</meta>
<peos>
<peo default="false"
product="ec98dde6-4064-465d-a1fb-237e2f10a336"
template="PeoTemplate1"
tid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<meta>
<itm key="id">47230</itm>
<itm key="creationDate">2023-02-24T07:54:45.523Z</itm>
<itm key="modificationDate">2023-02-24T07:54:45.523Z</itm>
</meta>
<name>PEO name</name>
<nodes/>
</peo>
<peo default="false"
product="ec98dde6-4064-465d-a1fb-237e2f10a336"
template="PeoTemplate1"
tid="38b42b94-ffca-445c-b395-fa6ee612cbb3">
<meta>
<itm key="id">47231</itm>
<itm key="creationDate">2023-02-24T07:57:29.386Z</itm>
<itm key="modificationDate">2023-02-24T07:57:29.386Z</itm>
</meta>
<name>PEO name</name>
<nodes/>
</peo>
</peos>
</pim>
Retrieve peo without metadata by peo ids
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/peos/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"ids": [47230, 47231]
}'
{
"ids": [47230, 47231]
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T07:22:00.004Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">peo</itm>
</meta>
<peos>
<peo default="false"
product="ec98dde6-4064-465d-a1fb-237e2f10a336"
template="PeoTemplate1"
tid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<name>PEO name</name>
<nodes/>
</peo>
<peo default="false"
product="ec98dde6-4064-465d-a1fb-237e2f10a336"
template="PeoTemplate1"
tid="38b42b94-ffca-445c-b395-fa6ee612cbb3">
<name>PEO name</name>
<nodes/>
</peo>
</peos>
</pim>
Retrieve peo without metadata with name only by peo id
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/peos/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"ids": [46560],
"withMetadata": false,
"namesOnly": true
}'
{
"ids": [
46560
],
"withMetadata": false,
"namesOnly": true
}
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2024-03-06T12:13:32.763Z</itm>
<itm key="sourceEnv">ocd_dev</itm>
<itm key="itemInformationType">peo</itm>
</meta>
<peos>
<peo default="true" product="56606a59-3b13-4693-8354-6e4a04263869" template="Print" tid="cc896f41-d73b-432b-9e92-4d88c3e99702">
<name>Project_Print_06.03.2024_10:19:25</name>
</peo>
</peos>
</pim>
Persist peos
| /peo/peos/persist Creates or updates PEOs. |
Allow to
-
Create peo
-
Update peo
Resource path |
/api/core/v1/peo/peos/persist |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Return Type
PimType with statuses ResponsesType about each persisted peo.
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
1. Create peo linked to product
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/persist \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="ec98dde6-4064-465d-a1fb-237e2f10a336" templateId="47220">
<name>PEO name3</name>
</peo>
</peos>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="ec98dde6-4064-465d-a1fb-237e2f10a336" templateId="47220">
<name>PEO name</name>
</peo>
</peos>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T12:23:02.746Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" id="52730">
<status>SUCCESS</status>
<description>PEO has been saved successfully</description>
</response>
</responses>
</pim>
2. Create peo linked to product and projects
During creation peo can be linked to several projects, which tids and ids contains in request.
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/persist \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="tid1" templateId="1">
<name>PEO name</name>
<nodes>
<node>projectTid1</node>
<node>projectTid2</node>
<node tid="projectTid3"/>
<node id="1"/>
</nodes>
</peo>
</peos>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="ec98dde6-4064-465d-a1fb-237e2f10a336" templateId="47220">
<name>PEO name</name>
<nodes>
<node>projectTid1</node>
<node>projectTid2</node>
<node tid="projectTid3"/>
<node id="1"/>
</nodes>
</peo>
</peos>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T12:23:02.746Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" id="52730">
<status>SUCCESS</status>
<description>PEO has been saved successfully</description>
</response>
</responses>
</pim>
3. Update peo
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/persist \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<name>PEO new name</name>
</peo>
</peos>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<peos>
<peo productTid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<name>PEO new name</name>
</peo>
</peos>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T13:50:44.539Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo">
<description>Peo has been saved successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-07-06T11:49:25.214Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" action="update">
<status>ERROR</status>
<description>Product not found</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-07-06T11:49:25.214Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" action="update">
<status>ERROR</status>
<description>PEO template has not been found</description>
</response>
</responses>
</pim>
Perform actions on peos
| /peo/peos/perform Perform different types of actions on peos (delete/copy) |
Available action types:
-
Delete
-
Copy
Resource path |
/api/core/v1/peo/peos/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
PimType with ActionsType
Some actions require additional info that should be provided in MetaType in key/value way.
ActionType's type
is required and must be provided.
Possible values:
-
delete
-
copy
ActionType's dataType is - peo
Tip: .Tables legend "As <action> attribute" describes, that parameter is in the xml attribute of <action> tag. Otherwise, parameter should be in ItemType.
"Required groups" - one of parameter in the one group is required e.g. entity identifier (tid or id)
| Parameter Name | As <action> attribute | Required | Type | Description | Format |
|---|---|---|---|---|---|
id |
X |
X G1 |
Long |
id of the peo that should be deleted or copied |
|
tid |
X |
X G1 |
string |
tid of the peo that should be deleted or copied |
Return Type
PimType with filled ResponsesType
Response types contains status information about each action passed to perform.
Responses
| Actions are processed separately. Exceptions thrown during the execution of actions will be reported in ResponseType. |
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType. |
|
400 |
Invalid input provided |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Delete
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/products/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" tid="7D534991-B623-418C-A7CB-A273C877A37D" type="delete"/>
</actions>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" tid="7d534991-b623-418c-a7cb-a273c877a37d" type="delete"/>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" id="2364684" type="delete"/>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:24:53.286Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" tid="7d534991-b623-418c-a7cb-a273c877a37d" action="delete">
<status>SUCCESS</status>
<description>PEO has been deleted successfully</description>
</response>
</responses>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:36:54.983Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo"
tid="7d534991-b623-418c-a7cb-a273c877a37d"
action="delete">
<status>ERROR</status>
<description>There is no peo with the given tid</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:38:16.444Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo"
tid="7d534991-b623-418c-a7cb-a273c877a37d"
action="delete">
<status>ERROR</status>
<description>PEO is not available by access rights</description>
</response>
</responses>
</pim>
Copy
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/products/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" tid="ab6492-bc76439a-aaaa-aaaaa" type="copy">
<meta>
<itm key="name">PEO copy name</itm>
</meta>
</action>
</actions>
</pim>'
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" tid="ab6492-bc76439a-aaaa-aaaaa" type="copy">
<meta>
<itm key="name">PEO copy name</itm>
</meta>
</action>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peo" id="2364684" type="copy">
<meta>
<itm key="name">PEO copy name</itm>
</meta>
</action>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-08-15T13:37:04.635Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo"
tid="64467fe8-863a-4fcd-ba4e-82914affb3f8"
id="76890"
action="copy">
<status>SUCCESS</status>
<description>peo has been copied</description>
</response>
</responses>
</pim>
Error responses
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-08-15T13:37:53.018Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo"
tid="64467fe8-863a-4fcd-ba4e-82914affb3f8"
id="76890"
action="copy">
<status>ERROR</status>
<description>PEO does not exist</description>
</response>
</responses>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T13:38:16.444Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" tid="7D534991-B623-418C-A7CB-A273C877A37D" action="copy">
<status>ERROR</status>
<description>PEO is not available by access rights</description>
</response>
</responses>
</pim>
Link peos
| /peo/peos/links/persist Link PEOs to projects. |
Allow to link peos by:
-
peo and project tid
-
peo and project id
Resource path |
/peo/peos/links/persist |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Return Type
PimType with statuses ResponsesType about each linked peo.
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
1. Link peo to project by tids
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/links/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<links>
<itms type="peoToProject">
<itms>
<itm key="peoTid">55beafb6-a80b-48ab-8a7b-9e1a98d67b24</itm>
<itm key="projectTid">acc0000232</itm>
</itms>
</itms>
</links>
</pim>'
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<links>
<itms type="peoToProject">
<itms>
<itm key="peoTid">55beafb6-a80b-48ab-8a7b-9e1a98d67b24</itm>
<itm key="projectTid">acc0000232</itm>
</itms>
</itms>
</links>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T08:29:14.678Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink">
<description>The link has been saved successfully</description>
<details mode="delta">
<itm key="peoTid">55beafb6-a80b-48ab-8a7b-9e1a98d67b24</itm>
<itm key="projectTid">acc0000232</itm>
</details>
<status>SUCCESS</status>
</response>
</responses>
</pim>
2. Link peo to project by ids
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/links/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<links>
<itms type="peoToProject">
<itms>
<itm key="peoId">47230</itm>
<itm key="projectId">23488</itm>
</itms>
</itms>
</links>
</pim>'
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<links>
<itms type="peoToProject">
<itms>
<itm key="peoId">47230</itm>
<itm key="projectId">23488</itm>
</itms>
</itms>
</links>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T08:29:14.678Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink">
<description>The link has been saved successfully</description>
<details mode="delta">
<itm key="peoId">47230</itm>
<itm key="projectId">23488</itm>
</details>
<status>SUCCESS</status>
</response>
</responses>
</pim>
Error responses
Peo not found
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T08:55:39.051Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink" id="475230">
<description>PEO not found</description>
<status>ERROR</status>
</response>
</responses>
</pim>
Peo is not available by access rights
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-07-06T11:49:25.214Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" action="unlink" path="/111">
<status>ERROR</status>
<description>PEO is not available by access rights</description>
</response>
</responses>
</pim>
Project not found
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T09:02:48.326Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink" id="754545">
<description>Project not found</description>
<status>ERROR</status>
</response>
</responses>
</pim>
Perform actions on peos links
| /peo/peos/links/perform Unlinks PEOs from projects. |
Available action types:
-
Unlink
Allow to unlink peos by:
-
peo and project tid
-
peo and project id
Resource path |
/api/core/v1/peo/peos/links/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
PimType with ActionsType
Some actions require additional info that should be provided in MetaType in key/value way.
ActionType's type
is required and must be provided.
Possible values:
-
unlink
ActionType's dataType is - peoToProjectLink
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
500 |
An unknown internal error occurred |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
1. Unlink peo from project by tid
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/links/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peoToProjectLink" type="unlink">
<meta>
<itm key="peoTid">55beafb6-a80b-48ab-8a7b-9e1a98d67b24</itm>
<itm key="projectTid">acc0000232</itm>
</meta>
</action>
</actions>
</pim>'
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peoToProjectLink" type="unlink">
<meta>
<itm key="peoTid">55beafb6-a80b-48ab-8a7b-9e1a98d67b24</itm>
<itm key="projectTid">acc0000232</itm>
</meta>
</action>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T11:19:26.180Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="unlink" dataType="peo" tid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<description>PEO has been unlinked successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
2. Unlink peo from project by id
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/peo/peos/links/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peoToProjectLink" type="unlink">
<meta>
<itm key="peoId">47230</itm>
<itm key="projectId">23488</itm>
</meta>
</action>
</actions>
</pim>'
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<actions>
<action dataType="peoToProjectLink" type="unlink">
<meta>
<itm key="peoId">47230</itm>
<itm key="projectId">23488</itm>
</meta>
</action>
</actions>
</pim>
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T11:21:28.539Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="unlink" dataType="peo" tid="55beafb6-a80b-48ab-8a7b-9e1a98d67b24">
<description>PEO has been unlinked successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
Error responses
Peo not found
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T08:55:39.051Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink" id="475230">
<description>PEO not found</description>
<status>ERROR</status>
</response>
</responses>
</pim>
Peo is not available by access rights
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-07-06T11:49:25.214Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="peo" action="unlink" path="/111">
<status>ERROR</status>
<description>PEO is not available by access rights</description>
</response>
</responses>
</pim>
Project not found
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-27T09:02:48.326Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="link" dataType="peoToProjectLink" id="754545">
<description>Project not found</description>
<status>ERROR</status>
</response>
</responses>
</pim>