/peo/peos/links/persist Link PEOs to projects.

Allow to link peos by:

  1. peo and project tid

  2. peo and project id

Table 1. Details

Resource path

/peo/peos/links/persist

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

Accepts PimType with LinksType

Return Type

PimType with statuses ResponsesType about each linked peo.

Table 2. Http response codes
Code Message Datatype

200

PimType with filled ResponsesType

PimType

400

Invalid input provided

ResponseType

401

Not authorized

ResponseType

500

An unknown internal error occurred

ResponseType

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

Welcome to the AI Chat!

Write a prompt to get started...