Customization

Prepare-Update Schemas Subtypes

Gets the new fragment IDs and fields resulting from changing a subtype.

POST
/schemas.subtypes.prepare-update
AuthorizationBearer <token>

All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN> as a header to every API request. How do I find my token?

In: header

is_custom_leaf_type?boolean

Whether the leaf type corresponds to a custom object.

leaf_typestring

Leaf type of the object.

Formattext
new_subtype?string

Name of the new subtype for the object.

Formattext
object?string

ID of the object of which subtype is to be changed. Used to fetch the object's custom schema fragments and custom fields

Formatid

Response Body

curl -X POST "https://api.devrev.ai/schemas.subtypes.prepare-update" \  -H "Content-Type: application/json" \  -d '{    "leaf_type": "string"  }'
{
  "added_fields": [
    {
      "default_value": null,
      "name": "string"
    }
  ],
  "dropped_fields": [
    {
      "conflict_type": "absent_in_new",
      "message": "string",
      "name": "string"
    }
  ],
  "new_custom_schema_fragments": [
    "string"
  ],
  "new_start_stage": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "artifact_already_attached_to_a_parent",
  "existing_parent": "string",
  "is_same": true
}
{
  "detail": "string",
  "message": "string",
  "type": "unauthenticated"
}
{
  "detail": "string",
  "message": "string",
  "type": "forbidden"
}
{
  "detail": "string",
  "message": "string",
  "type": "not_found"
}
{
  "detail": "string",
  "message": "string",
  "type": "too_many_requests",
  "retry_after": 0
}
{
  "detail": "string",
  "message": "string",
  "type": "internal_error",
  "reference_id": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "service_unavailable"
}