Delete Genealogies Person With Preconditions
This example request illustrates how to do a conditional delete of a person. Note the use of the If-Match and the If-Unmodified-Since request headers, and the result if preconditions failed.
JSON
Request
DELETE /platform/genealogies/persons/2:2:PPPJ-MYZ
Content-Type: application/x-gedcomx-v1+json
Accept: application/x-gedcomx-v1+json
X-Reason: Reason for delete
If-Unmodified-Since: Sat Dec 01 08:11:07 MST 2018
If-Match: J8Y5VFR
Authorization: Bearer YOUR_ACCESS_TOKEN_HERE
Response
HTTP/1.1 412 Precondition Failed
Content-type: application/x-gedcomx-v1+json
X-processing-time: 3
Warning: 400 FamilySearch "Unable to check preconditions.: java.text.ParseException: Error parsing entity tag: J8Y5VFR: Error parsing entity tag: J8Y5VFR"
Vary: Accept,Accept-Language,Accept-Encoding,Expect
Content-location: /platform/genealogies/persons/2:2:PPPJ-MYZ
Date: Sun, 03 Apr 1836 10:00:00 GMT-5
Cache-control: no-cache, no-store, no-transform, must-revalidate, max-age=0
Transfer-encoding: chunked{
"errors" : [ {
"code" : 412,
"message" : "jakarta.ws.rs.WebApplicationException: java.text.ParseException: Error parsing entity tag: J8Y5VFR"
} ]
}
XML
Request
DELETE /platform/genealogies/persons/2:2:PPPJ-MYZ
Content-Type: application/x-gedcomx-v1+xml
Accept: application/x-gedcomx-v1+xml
X-Reason: Reason for delete
If-Unmodified-Since: Sat Dec 01 08:11:07 MST 2018
If-Match: J8Y5VFR
Authorization: Bearer YOUR_ACCESS_TOKEN_HERE
Response
HTTP/1.1 412 Precondition Failed
Content-type: application/x-gedcomx-v1+xml
X-processing-time: 3
Warning: 400 FamilySearch "Unable to check preconditions.: java.text.ParseException: Error parsing entity tag: J8Y5VFR: Error parsing entity tag: J8Y5VFR"
Vary: Accept,Accept-Language,Accept-Encoding,Expect
Content-location: /platform/genealogies/persons/2:2:PPPJ-MYZ
Date: Sun, 03 Apr 1836 10:00:00 GMT-5
Cache-control: no-cache, no-store, no-transform, must-revalidate, max-age=0
Transfer-encoding: chunked<?xml
version="1.0" encoding="UTF-8" standalone="yes"?>
<gedcomx xmlns:fs="http://familysearch.org/v1/" xmlns="http://gedcomx.org/v1/" xmlns:atom="http://www.w3.org/2005/Atom">
<fs:error>
<fs:code>412</fs:code>
<fs:message>jakarta.ws.rs.WebApplicationException: java.text.ParseException: Error parsing entity tag: J8Y5VFR</fs:message>
</fs:error>
</gedcomx>
Updated 5 days ago