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>'
Request body
<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>
Response body
<?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>'
Request body
<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>
Response body
<?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>