공유 연락처를 업데이트하거나 삭제하는 프로세스도 비슷합니다.
공유 연락처 업데이트하기
항목을 업데이트하는 경우 서버에서 항목을 검색할 때 있던 모든 XML을 보존해야 합니다. 그렇지 않으면 무시된 요소가 삭제됩니다. 이메일 주소 자동 완성 및 연락처 관리자에 업데이트가 반영되려면 최대 24시간이 걸릴 수 있습니다.
기존 공유 연락처를 업데이트하려면 다음 단계를 따르세요.
- 업데이트할 항목을 가져옵니다.
- 항목을 수정합니다.
메시지 본문의 업데이트된 항목과 함께
PUT
요청을 연락처의 수정 URL로 보냅니다.application/atom+xml
콘텐츠 유형을 사용하고 업데이트된 항목의<id>
값이 기존 항목의<id>
와 정확히 일치하는지 확인합니다. edit URL은 다른 소스의 업데이트 충돌을 감지하기 위해 버전 번호로 끝납니다. 자세한 내용은 버전 관리를 참조하세요.항목을 업데이트합니다.
<entry> <id>https://www.google.com/m8/feeds/contacts/DOMAIN/base/8411573</id> <updated>2008-02-28T18:47:02.303Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' /> <title type='text'>TITLE_NAME</title> <gd:name> <gd:fullName>FIRST_NAME LAST_NAME</gd:fullName> </gd:name> <content type='text'>NOTES</content> <link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION/8411573' /> <link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION/8411573/1204224422303000' /> <gd:phoneNumber rel='http://schemas.google.com/g/2005#other' primary='true'>PRIMARY_PHONE_NUMBER</gd:phoneNumber> <gd:extendedProperty name="CUSTOM_PROPERTY" value="CUSTOM_PROPRTY_VALUE" /> </entry>
다음을 바꿉니다.
DOMAIN
: 도메인의 URL(예: example.com)TITLE_NAME
: 연락처 항목의 이름(예: example.com 연락처 목록)FIRST_NAME
: 공유 연락처의 이름(예: Alex)입니다.LAST_NAME
: 공유 연락처의 성입니다(예: Kim).PROJECTION
:gd:extendedProperty
요소를 지정하는 프로젝션 값입니다. 지원되는 값 목록은 프로젝션 값을 참고하세요.PRIMARY_PHONE_NUMBER
: 공유 연락처의 기본 전화번호입니다(예: (206)555-1212).CUSTOM_PROPERTY
: 공유 연락처와 관련하여 저장하려는 맞춤 속성의 이름(예: 반려동물)CUSTOM_PROPRTY_VALUE
: 공유 연락처와 관련하여 저장하려는 맞춤 속성 값(예: 햄스터)다음은 수정 URL이 강조표시된 공유 연락처의 업데이트된 항목의 예입니다.
<entry> <id>https://www.google.com/m8/feeds/contacts/example.com/base/8411573</id> <updated>2008-02-28T18:47:02.303Z</updated> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' /> <title type='text'>Fitzgerald</title> <gd:name> <gd:fullName>Fitzgerald</gd:fullName> </gd:name> <content type='text'>Notes</content> <link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/example.com/full/8411573' /> <link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/contacts/example.com/full/8411573/1204224422303000' /> <gd:phoneNumber rel='http://schemas.google.com/g/2005#other' primary='true'>456-123-2133</gd:phoneNumber> <gd:extendedProperty name="pet" value="hamster" /> <gd:extendedProperty name="cuisine"> <italian /> </gd:extendedProperty> </entry>
공유 연락처 삭제
삭제된 공유 연락처가 이메일 주소 자동 완성 및 연락처 관리자에서 사라지는 데 최대 24시간이 걸릴 수 있습니다. 기존 연락처를 업데이트하려면 연락처 업데이트를 참조하세요. 연락처를 삭제한 다음 다시 추가하여 업데이트하지 마세요.
- 공유 연락처를 삭제하려면 연락처의 수정 URL로
DELETE
요청을 보냅니다. 이 URL은 연락처를 업데이트하는 데 사용되는 URL과 동일합니다.
Google에서는 삭제된 연락처의 자리표시자를 삭제 후 30일 동안 보관합니다.
이 시간 동안 showdeleted
쿼리 매개변수를 사용하여 자리표시자를 요청할 수 있습니다.