I'm building a Azure DevOps Pipeline Task to deploy my functions to Appwrite using REST APIs. How can I set project global variables via REST? This endpoint does not work with project API Key.
TypeScript
POST /project/variables HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.7.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <API_KEY>
{
"key": "test",
"value": "test"
}
Im getting this return:
TypeScript
{
"message": "app.xxxxxx@service.nyc.cloud.appwrite.io (role: applications) missing scope (projects.write)",
"code": 401,
"type": "general_unauthorized_scope",
"version": "1.7.4"
}
TL;DR
Developers want to set project global variables in Appwrite using REST APIs, but are facing authorization issues. The error message indicates a missing "projects.write" scope for the specified role. To resolve this, grant the necessary scope to the API Key in order to successfully set project global variables.Recommended threads
- Cloud function deployment failures
When I run appwrite push functions, select the function I want to deploy, confirm with a YES, is starts deploying but goes into error. I need to repeat the ste...
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...