docs-v2/shared/text/api/cloud-serverless/auth/token-create.sh

35 lines
690 B
Bash

curl --request POST \
https://cloud2.influxdata.com/api/v2/authorizations \
--header "Authorization: Token API_TOKEN" \
--header 'Content-type: application/json' \
--data '{
"status": "active",
"description": "AUTHORIZATION_DESCRIPTION",
"orgID": "ORG_ID",
"permissions": [
{
"action": "read",
"resource": {
"orgID": "ORG_ID",
"type": "authorizations"
}
},
{
"action": "read",
"resource": {
"orgID": "ORG_ID",
"type": "buckets"
}
},
{
"action": "write",
"resource": {
"orgID": "ORG_ID",
"type": "buckets",
"name": "iot-center"
}
}
]
}'