Partnership

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

A Partnership entity represents a partnership between two partners.

  • Partnership Entity Properties

  • Create a Partnership

  • List Partnerships

  • Update a Partnership

  • Delete a Partnership

  • Link Partners with Partnerships

  • Delete Link between Partners and Partnerships

Partnership Entity Properties

Property

Type

Description

ID

Int

Specifies a unique ID for the partnership. This value is auto-generated.

Agreements

DataServiceCollection<Agreement>

A navigation property that references the agreement between two partners that are part of a partnership.

PartnerA

Partner

A navigation property that references a partner in a partnership.

PartnerB

Partner

A navigation property that references the other partner in the partnership.

Create a Partnership

You can create a partnership using a POST HTTP request.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships

HTTP/1.1

Note

You cannot create a partnership without linking it to the two partners. In the following sample request, a partnership is linked to the partners using the <link> element of the request body.

Sample Request

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/atom+xml
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?><entry xmlns="https://www.w3.org/2005/Atom" xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <category term="Microsoft.ApplicationServer.Integration.PartnerManagement.Partnership" scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/PartnerA" type="application/atom+xml;type=entry" title="PartnerA" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/Partners(1)" />
  <link rel="https://schemas.microsoft.com/ado/2007/08/dataservices/related/PartnerB" type="application/atom+xml;type=entry" title="PartnerB" href="https://integration.zurich.test.dnsdemo1.com:5446/test01/$PartnerManagement/Partners(2)" />
  <id />
  <title />
  <updated>2013-02-01T23:46:24Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:Id m:type="Edm.Int32">0</d:Id>
    </m:properties>
  </content>
</entry>

List Partnerships

You can list partnerships using a GET HTTP request.

Method

Request URI

HTTP Version

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships

This returns all the business partnerships

HTTP/1.1

GET

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(id)

This returns information about the partnership with the specified ID.

HTTP/1.1

Sample Request

Retrieve all the partnerships

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships() HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

Retrieve information about a specific partnership

GET https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446

Update a Partnership

Updating a partnership means updating the links between the Partnership and Partner entities. You can update the links by passing the URI of the partner as part of the request body and using the PUT HTTP request.

Method

Request URI

HTTP Version

PUT

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(id)

HTTP/1.1

Sample Request

PUT https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1)/$links/PartnerA HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<uri xmlns="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(3)</uri>

Note

The request message shows how to update the link to the first partner in the partnership, denoted by the PartnerA property. You can use a similar message to update the link with the second partner, using the PartnerB entity property.

Delete a Partnership

You can delete a partnership using a DELETE HTTP request.

Method

Request URI

HTTP Version

DELETE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(id)

HTTP/1.1

Sample Request

DELETE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 0

In Create a Partnership section, we saw how to create a link between a partnership and a partner while creating a partnership. In this section, we see how to create a link in the opposite direction, that is, from a partner to a partnership. To create the link, the URI of the partnership must be included in the request body.

Method

Request URI

HTTP Version

POST

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(id)/$links/PartnershipsAsA

or

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(id)/$links/PartnershipsAsB

Partner(id) denotes the ID of the partner that links to the partnership

HTTP/1.1

Note

There must always be two partners in a partnership, which means there must be two navigation properties on the Partner entity representing the two partners in the partnership. These properties are PartnershipsAsA and PartnershipsAsB. To create a partnership, you must create a link from one partner to partnership using the PartnershipsAsA property, and from the other partner to the same partnership entity using the PartnershipsAsB property. In both the cases, you must pass the URI of the partnership entity in the request body.

The following sample request message shows how to create a link between a partner and partnership using the PartnershipsAsA property.

Sample Request

POST https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(3)/$links/PartnershipsAsA HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
x-ms-version: 1.0
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 211
Expect: 100-continue

<?xml version="1.0" encoding="utf-8"?>
<uri xmlns="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partnerships(1)</uri>

You can delete a link between partner and partnerships by using the HTTP DELETE method. To completely delete the links between two partners and a partnership, you must do the following:

  • Delete the link between the first partner and partnership

  • Delete the link between the second partner and partnership

  • Delete the partnership

Method

Request URI

HTTP Version

DELETE

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(id)/$links/PartnershipsAsA(id)

or

https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(id)/$links/PartnershipsAsB(id)

HTTP/1.1

Sample Request

The following sample request deletes the link between the first partner and partnership, represented using the PartnershipsAsA navigation property. You can use a similar request to delete the link between the second partner and partnership. You should then delete the partnership entity as shown in Delete a Partnership section.

DELETE https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement/Partners(1)/$links/PartnershipsAsA(1) HTTP/1.1
Accept-Charset: UTF-8
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
x-ms-version: 1.0
Accept: application/atom+xml,application/xml
Authorization: WRAP access_token="<token>"
Content-Type: application/xml
Host: integration.zurich.test.dnsdemo1.com:5446
Content-Length: 216
Expect: 100-continue

See Also

TPM OM API: Exposed Entities and Properties