This topic describes setting up northbound API access in EFA.

Note
Do not use this process for OpenStack instance.curl -X POST 'https://10.x.x.x/v1/auth/token/access-token' \
--header 'Content-Type: application/json' \
--data '{
"username": "xxxxxx",
"password": "xxxxxx"
}'
The response contains the access token.
{
"access-token": "eyJhbGciOi… ",
"token-type": "Bearer",
"refresh-token": "eyJhbGciOi…"
}
Any request to the northbound API must have the access token in the request header.
For example, to fetch all the switches in inventory, run the following command:
curl -X GET 'https://10.x.x.x/v1/inventory/switches' \ --header 'Authorization: Bearer eyJhbGciOi…'

Note
The expiry for the access token is set to one hour by default. You can increase the expiry by using the efa auth settings token update command.