Creating a new property with the CMF REST API - Your channel header

Article Index


Your channel header

All further communications sent to the server will need to include your channel name in the headers, so we'll run a test now to ensure that we've set this up right.

Create a new Request again in the left panel. Set the method to GET and the url to /cmf/versions  ( http://localhost/channelmanagement_rentals_united/jomres/api/cmf/versions ). From here onwards I will refer just to the shortened part of the endpoint for brevity.

Click Send. You should receive a response message that looks like

{"meta":{"code":204,"error_message":"Channel not set"}}

All other messages sent to the CMF REST API must include your channel name (not the friendly name). This allows the channel's manager to create a new key pair, and still have access to their properties. With this extra layer of security they can then also allow different channels to create their own unique properties within the system where each channel can only modify their own properties.

Ok, so how do we do that?

In the tabs under the URL click on the Headers tab. Set the key to X-JOMRES-channel-name and the value to your channel's name test_channel

the header

Now when you click Send you should see the system's versions for relevant plugins

versions