
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
- Attributes Problem - Cloud
I am not able to see the attribute columns and their context on cloud. Can you help?
- Authorization header not working in Appw...
I have an Appwrite function that takes a custom bearer token as authentication. The function works fine locally when I test it with `appwrite run functions`, bu...
- How do I format an array in a CSV file t...
I want to import a CSV file to create a document on it on the AppWrite website. I have an attribute "name" of type String and "ingredients" which is of type St...
