POST /schema/<Type>/fields/<field>
post_schema_type_fields_field
Revive a retired field, at 204. It is the only way to get a burnt name back, and it returns at its original data_type whatever the site wants now.
API
A field name is taken forever once created. Recreating it is
400 schema_field_create() failed, there is a retired field with the same field_name. This is the way
back.
Params
| part | value |
|---|---|
<field> |
the retired programmatic name |
revive |
true. The only key, and it is required |
Sample requests
r = c.post("/schema/Version/fields/sg_zzprobe_040_revive", json={"revive": True})
204, no body. Read the field back to see what came back:
c.get("/schema/Version/fields/sg_zzprobe_040_revive").json()["data"]["data_type"]["value"]
# 'text', the type it was created at, whatever the site wants now
An empty body, which is how the parameter was found:
r = c.post("/schema/Version/fields/sg_zzprobe_040_revive", json={})
{"errors": [{"status": 400, "code": 103, "source": {"revive": ["revive is missing"]}}]}
Response codes
| status | when |
|---|---|
| 204 | revived, empty body |
| 400 | source: {"revive": ["revive is missing"]} on a body without it |
Edge cases
- The revived field keeps its original
data_type. A name burnt astextcannot come back asnumber, and thePUTthat would change it is a 200 that does nothing. - The API named this parameter itself, in the 400 for an empty body. Nothing in the documentation does.