curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-identity/auth/local/login \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"accountId": 4781348886,
"username": "john@fabric.inc",
"password": "joHn@123456789!"
}'
{
"_id": "60c3a2c476f9c21239d836ca",
"account": {
"accountId": 8739392294
},
"roles": [
"Admin"
],
"permissions": [
"read:user"
],
"refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0....",
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0...."
}
Generates an authorization token using which you can access fabric APIs. Ensure that you provide valid credentials to get an authorization token.
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-identity/auth/local/login \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"accountId": 4781348886,
"username": "john@fabric.inc",
"password": "joHn@123456789!"
}'
{
"_id": "60c3a2c476f9c21239d836ca",
"account": {
"accountId": 8739392294
},
"roles": [
"Admin"
],
"permissions": [
"read:user"
],
"refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0....",
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0...."
}
The x-site-context is a JSON object that must contain date, and channel attributes. eg - {"date":"2020-12-12T08:00:00.000Z","channel":12}
OK
The response is of type object
.