How to create a meshCustomer via API
This how-to guide is targeted at Cloud Foundation Partners. You need meshObject API user to run through the steps below.
Step 1: Install Postman
First install postman. While any tool will do, in this how-to will use Postman.
Step 2: Import existing Customer Owners into the meshObjectCollection
Import the existing meshCustomerUserBindings for the Customer Owners into the meshObjectCollection. Importing is done by specifying the meshObjectCollection in the request URL.
curl --location --request PUT 'https://backend-url/api/meshobjects?meshObjectCollection=collection-my-customer-customer-owners&owner=partner@meshcloud.io' \
--header 'Content-Type: application/vnd.meshcloud.api.meshobjects.v1+yaml;charset=UTF-8' \
--header 'Accept: application/vnd.meshcloud.api.meshobjects.v1+json' \
--header 'Authorization: Basic xyz' \
--data-raw 'apiVersion: v1
kind: meshCustomerUserBinding
roleRef:
name: Customer Owner
targetRef: my-customer
name:
subjects:
- name: partner@meshcloud.io'