Site A – https://Site-A.example.com | ||
1. | Retrieve the ID of the organization to be associated. | |
è | GET https://Site-A.example.com/api/org | |
ç | <OrgList … > <Org href="https://Site-A.example.com/api/org/{ID}" name="TestOrg" … "/> … </OrgList> | |
2. | Retrieve the organization association URL from the Org object. | |
è | GET https://Site-A.example.com/api/admin/org/{ID} | |
ç | <AdminOrg name="TestOrg" ... > ... <Link rel="down" href="https://Site-A.example.com/api/admin/org/{ID}/associations" ... /> ... </AdminOrg> | |
3. | Retrieve the organization association data URL from the Org Associations object. | |
è | GET https://Site-A.example.com/api/admin/org/{ID}/associations | |
ç | <OrgAssociations … <Link rel="down" href="Site-A.example.com/api/admin/org/{ID}/associations/localAssociationData"… /> </OrgAssociations> | |
4. | Retrieve the organization association data from the OrgAssociationMember element. | |
è | GET https://Site-A.example.com/api/admin/org/{ID}/associations/localAssociationData | |
ç | <OrgAssociationMember …> <Link … /> <SiteId>urn:vcloud:site:79423eb2-0983-454e-88b2-71c9ffcd4c5e</SiteId> <OrgId>urn:vcloud:org:93a6def0-85ba-447c-b4be-453cf60854e1</OrgId> <OrgName>TestOrg</OrgName> <OrgPublicKey>-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhki…VybCa7wIDAQAB -----END PUBLIC KEY-----</OrgPublicKey> </OrgAssociationMember> | |
Site B – https://Site-B.example.com | ||
5. | Repeat steps 1 and 2 using the Site-B URL to establish an authenticated session and retrieve the org ID and its association URL from the Org object | |
6. | Retrieve the “add associations” URL from the Org Associations object. | |
è | GET https://Site-B.example.com/api/admin/org/{ID}/associations | |
ç | <OrgAssociations …> <Link rel="add" type="application/vnd.vmware.admin.organizationAssociation+xml"/> </OrgAssociations> | |
7. | Post the OrgAssociationMember response body received in Step 4 to the “add associations” URL from step 6. | |
è | Content-Type: application/vnd.vmware.admin.organizationAssociation+xml <OrgAssociationMember …> <Link … /> <SiteId>urn:vcloud:site:79423eb2-0983-454e-88b2-71c9ffcd4c5e</SiteId> <OrgId>urn:vcloud:org:93a6def0-85ba-447c-b4be-453cf60854e1</OrgId> <OrgName>TestOrg</OrgName> <OrgPublicKey>-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhki…VybCa7wIDAQAB -----END PUBLIC KEY-----</OrgPublicKey> </OrgAssociationMember> | |
ç | <Task … operation="Creating association Organization TestOrg ... " operationName="orgAddAssociation" … > <Owner href="https://Site-B.example.com/api/admin/org/{ID}" name="STFTestOrg" … /> <User href="https://Site-B.example.com/api/admin/user/{ID}" name="administrator" … /> <Organization href="https://Site-B.example.com/api/org/{ID} " name="System" … /> … </Task> |