Making your first API request

When making calls to fabric APIs, you must use the following HTTP headers to provide context.

  • --header: This flag is used to include headers in the request. The most commonly used headers in fabric APIs are:
    • x-fabric-tenant-id: This is a custom header used by the API to identify the tenant making the request. You can find the tenant-id in the Copilot application.
    • Content-Type: application/json: This tells the server that the data being sent in the request is in JSON format.
    • Authorization: Bearer: This is the authorization token used to authenticate the request. You are required to pass the access token generated from the system app.
    • x-fabric-channel-id: This is a custom header, used to identify the channel through which the request is being made. This is primarily used for a multichannel use case. And in most cases, the default value is 12 (US).

fabric API responses are in JSON format.


Before you can start using fabric APIs:


  1. Set the following headers:
    • Content-Type: application/json
    • Authorization: Bearer
  2. Run the following command by replacing the <Tenant-Id> and <Generated-access-token>:
       curl --location '<sku>?locale=<locale>' \
       --header 'x-fabric-tenant-id: <Tenant-Id>' \
       --header 'Authorization: Bearer <Generated-access-token>'
    In this request the baseURL is followed by one of the requests from the Products APIs, Product Operations by ID.

Related Resources