Jump to content

Edit History

smiley

smiley

i get APIkey 

```

API_KEY=$(curl -v -X GET \
    -H "X-Auth-Token: $auth_token" \
    http://$SERVER:8000/v2/accounts/$account_id/api_key | jq -r .data.api_key)
echo $API_KEY

```

 

but how can i get devices list with API key 

i already know how to do with token . but i want to use api key 

```

curl -v -X GET \
    -H "Content-Type: application/json" \
    -H "X-Auth-Token:$API_KEY" \
    http://$SERVER:8000/v2/accounts/$account_id/devices | jq

```

this is not working

smiley

smiley

i get APIkey 

```

API_KEY=$(curl -v -X GET \
    -H "X-Auth-Token: $auth_token" \
    http://$SERVER:8000/v2/accounts/$account_id/api_key | jq -r .data.api_key)
echo $API_KEY

```

 

but how can i get devices list with API key 

i already know how to do with token . but i want to use api key 

```

curl -v -X GET \
    -H "Content-Type: application/json" \
    -H "X-Auth-Token:$API_KEY" \
    http://kcrossbar1z1-eqix-sv5:16000/v2/accounts/$account_id/devices | jq

```

this is not working

×
×
  • Create New...