You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While other fields of a file can be modified through Slate's api/v3/update-file endpoint, the "tags" field remains seemingly immutable. The following is a demonstration in Python, which fails the last contained assertion (i.e. that the returned object after a successful POST has the same number of tags as the submitted object):
import requests
import json as JSON
headers = {
"content-type": "application/json",
"Authorization": "", # API key
}
r1 = requests.get(
"https://slate.host/api/v3/get",
headers=headers,
)
data = r1.json()
objs = data["collections"][0]["objects"]
mobj = objs[0]
mobj["tags"].append({
"id": "", # Existing Tag ID
"name": "", # Existing Tag Name
"slatename": "", # Existing Tag Slate-name
})
r2 = requests.post(
"https://slate.host/api/v3/update-file",
headers=headers,
json={"data": mobj},
)
assert r2.status_code == 200, "malformatted request"
nobj = r2.json()["file"]
assert len(nobj["tags"]) == len(mobj["tags"]), "update failed"
Deliverable
The tags field should be modifiable through the api/v3/update-file endpoint like the other file fields.
Dependencies
N/A
The text was updated successfully, but these errors were encountered:
Purpose
While other fields of a file can be modified through Slate's
api/v3/update-file
endpoint, the "tags" field remains seemingly immutable. The following is a demonstration in Python, which fails the last contained assertion (i.e. that the returned object after a successful POST has the same number of tags as the submitted object):Deliverable
The tags field should be modifiable through the
api/v3/update-file
endpoint like the other file fields.Dependencies
N/A
The text was updated successfully, but these errors were encountered: