talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Where is the contact information in the Person record?

RM
Richard Millet
Fri, Oct 16, 2015 10:11 PM

Actually, since CSIDs are unique across record types, this form of the URL should also work /cspace-services/<csid>. [😊]


From: Ray Lee rhlee@berkeley.edu
Sent: Friday, October 16, 2015 3:06 PM
To: Richard Millet
Cc: Peter Murray; CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

I've always wondered why, if I had the csid of an authority item that uniquely identifies it, I also had to know the csid/shortid of its container in order to retrieve it. But it turns out I don't. That seems like a feature, not a bug. It would just be nice to standardize on a URL, like cspace-services/personauthorities/*/items/<csid>. Or just cspace-services/persons/<csid>.

Ray

On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:
Peter,

I think you've revealed a bug (probably a know bug) in the REST API.  The resource ID can be anything the URL examples I used in my last email.  For example, these three URLs all return the same contact record:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34
http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34
http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I'm not sure what's going on here, but it might just be picking the first Person authority it finds?  Yikes!  I'll look through JIRA to see if this has already been reported.

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com>
Sent: Friday, October 16, 2015 1:51 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Oh, nuts.  I wonder where I got that syntax for retrieving Person records?  This seems to work as well:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732

(Well, except for being able to enumerate the /contact records.)

While were on the subject of importing, are there relative advantages/disadvantages to using ImportService rather than just using the RESTful CRUD+L operations on the record endpoints?

Peter

On Oct 16, 2015, at 4:40 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:

Peter,

Here is an example from the demo site for getting contact information from a person resource:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I think your URL has an incorrect resource ID for the specific Person authority (the container) you're trying to access.  My example, uses the CSID, but I think you can use a short id as well.

http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732

I hope that helps?

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com>
Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Two additions:

First, I left of the Gist URL of what I see when I pull a Person record from the CSpace services layer:

https://gist.github.com/dltj/379f98edbf67f77735b4

Second, I went looking deeper into the documentation, and I found a "Contacts CRUD+L Service" in the Person Service RESTful API documentation page:

https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices

Unfortunately, that doesn't seem to work:

GET https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts

...returns...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">
<pageNum>0</pageNum>
<pageSize>40</pageSize>
<itemsInPage>0</itemsInPage>
<totalItems>0</totalItems>
<fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned>
</ns2:abstract-common-list>

I know I've added one set of contact information to that CSID -- I can see it in the web interface.  So the contact information must be hiding somewhere else...

Peter

On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com> wrote:

I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields.  Specifically, I'm trying to add contact information.  Unfortunately, that doesn't seem to be in the person record.  If I pull a person record from the services layer:

https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084

I get everything that is directly defined in base-authority-person.xml (there is nothing being merged into it that is SDMoM-specific). See gist:

What is missing is the contact information detail.  In the base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation"> <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> </section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

Actually, since CSIDs are unique across record types, this form of the URL should also work /cspace-services/<csid>. [😊] ________________________________ From: Ray Lee <rhlee@berkeley.edu> Sent: Friday, October 16, 2015 3:06 PM To: Richard Millet Cc: Peter Murray; CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? I've always wondered why, if I had the csid of an authority item that uniquely identifies it, I also had to know the csid/shortid of its container in order to retrieve it. But it turns out I don't. That seems like a feature, not a bug. It would just be nice to standardize on a URL, like cspace-services/personauthorities/*/items/<csid>. Or just cspace-services/persons/<csid>. Ray On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: Peter, I think you've revealed a bug (probably a know bug) in the REST API. The resource ID can be *anything* the URL examples I used in my last email. For example, these three URLs all return the same contact record: http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 I'm not sure what's going on here, but it might just be picking the first Person authority it finds? Yikes! I'll look through JIRA to see if this has already been reported. -Richard ________________________________________ From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> Sent: Friday, October 16, 2015 1:51 PM To: CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? Oh, nuts. I wonder where I got that syntax for retrieving Person records? This seems to work as well: http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732 (Well, except for being able to enumerate the /contact records.) While were on the subject of importing, are there relative advantages/disadvantages to using ImportService rather than just using the RESTful CRUD+L operations on the record endpoints? Peter > On Oct 16, 2015, at 4:40 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: > > Peter, > > Here is an example from the demo site for getting contact information from a person resource: > > http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 > > I think your URL has an incorrect resource ID for the specific Person authority (the container) you're trying to access. My example, uses the CSID, but I think you can use a short id as well. > > http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732 > > I hope that helps? > > -Richard > > > ________________________________________ > From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> > Sent: Friday, October 16, 2015 1:25 PM > To: CollectionSpace Talk List > Subject: Re: [Talk] Where is the contact information in the Person record? > > Two additions: > > First, I left of the Gist URL of what I see when I pull a Person record from the CSpace services layer: > > https://gist.github.com/dltj/379f98edbf67f77735b4 > > Second, I went looking deeper into the documentation, and I found a "Contacts CRUD+L Service" in the Person Service RESTful API documentation page: > > https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices > > Unfortunately, that doesn't seem to work: > > GET https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts > > ...returns... > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb"> > <pageNum>0</pageNum> > <pageSize>40</pageSize> > <itemsInPage>0</itemsInPage> > <totalItems>0</totalItems> > <fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned> > </ns2:abstract-common-list> > > I know I've added one set of contact information to that CSID -- I can see it in the web interface. So the contact information must be hiding somewhere else... > > > Peter > >> On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> wrote: >> >> I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields. Specifically, I'm trying to add contact information. Unfortunately, that doesn't seem to be in the person record. If I pull a person record from the services layer: >> >> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 >> >> I get everything that is directly defined in `base-authority-person.xml` (there is nothing being merged into it that is SDMoM-specific). See gist: >> >> What is missing is the contact information detail. In the `base-authority-person.xml` file, that corresponds to this section: >> >> <section id="contactInformation"> >> <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> >> </section> >> >> Two questions: >> >> 1. How do I get to that information using the cspace-services layer? >> >> 2. How do I use the ImportService to get information into it? >> >> >> Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company _______________________________________________ Talk mailing list Talk@lists.collectionspace.org<mailto:Talk@lists.collectionspace.org> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org _______________________________________________ Talk mailing list Talk@lists.collectionspace.org<mailto:Talk@lists.collectionspace.org> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
JM
Jesse Martinez
Fri, Oct 16, 2015 10:14 PM

Wow, that's neat to know!

On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet richard.millet@lyrasis.org
wrote:

Actually, since CSIDs are unique across record types, this form of the URL
should also work /cspace-services/<csid>. [image: 😊]


From: Ray Lee rhlee@berkeley.edu
Sent: Friday, October 16, 2015 3:06 PM
To: Richard Millet
Cc: Peter Murray; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person
record?

I've always wondered why, if I had the csid of an authority item that
uniquely identifies it, I also had to know the csid/shortid of its
container in order to retrieve it. But it turns out I don't. That seems
like a feature, not a bug. It would just be nice to standardize on a URL,
like cspace-services/personauthorities/*/items/<csid>. Or just
cspace-services/persons/<csid>.

Ray

On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Peter,

I think you've revealed a bug (probably a know bug) in the REST API.  The
resource ID can be anything the URL examples I used in my last email.
For example, these three URLs all return the same contact record:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I'm not sure what's going on here, but it might just be picking the first
Person authority it finds?  Yikes!  I'll look through JIRA to see if this
has already been reported.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter
Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 1:51 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Oh, nuts.  I wonder where I got that syntax for retrieving Person
records?  This seems to work as well:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732

(Well, except for being able to enumerate the /contact records.)

While were on the subject of importing, are there relative
advantages/disadvantages to using ImportService rather than just using the
RESTful CRUD+L operations on the record endpoints?

Peter

On Oct 16, 2015, at 4:40 PM, Richard Millet richard.millet@lyrasis.org

wrote:

Peter,

Here is an example from the demo site for getting contact information

from a person resource:

I think your URL has an incorrect resource ID for the specific Person

authority (the container) you're trying to access.  My example, uses the
CSID, but I think you can use a short id as well.

I hope that helps?

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter

Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person

record?

Two additions:

First, I left of the Gist URL of what I see when I pull a Person record

from the CSpace services layer:

https://gist.github.com/dltj/379f98edbf67f77735b4

Second, I went looking deeper into the documentation, and I found a

"Contacts CRUD+L Service" in the Person Service RESTful API documentation
page:

Unfortunately, that doesn't seem to work:

GET

...returns...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns2:abstract-common-list xmlns:ns2="

<pageNum>0</pageNum>
<pageSize>40</pageSize>
<itemsInPage>0</itemsInPage>
<totalItems>0</totalItems>

<fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned>

</ns2:abstract-common-list>

I know I've added one set of contact information to that CSID -- I can

see it in the web interface.  So the contact information must be hiding
somewhere else...

Peter

On Oct 16, 2015, at 3:49 PM, Peter Murray pmurray@chillco.com wrote:

I'm back to uploading Person records, and I'm at the stage where I'm

populating more than just the basic fields.  Specifically, I'm trying to
add contact information.  Unfortunately, that doesn't seem to be in the
person record.  If I pull a person record from the services layer:

I get everything that is directly defined in

base-authority-person.xml (there is nothing being merged into it that is
SDMoM-specific). See gist:

What is missing is the contact information detail.  In the

base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation"> <group id="contact" userecord="contact" ui-spec-inherit="false"

ui-spec-prefix="contact"  exists-in-services="false"></group>

</section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

Wow, that's neat to know! On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > Actually, since CSIDs are unique across record types, this form of the URL > should also work /cspace-services/<csid>. [image: 😊] > > > ------------------------------ > *From:* Ray Lee <rhlee@berkeley.edu> > *Sent:* Friday, October 16, 2015 3:06 PM > *To:* Richard Millet > *Cc:* Peter Murray; CollectionSpace Talk List > > *Subject:* Re: [Talk] Where is the contact information in the Person > record? > > I've always wondered why, if I had the csid of an authority item that > uniquely identifies it, I also had to know the csid/shortid of its > container in order to retrieve it. But it turns out I don't. That seems > like a feature, not a bug. It would just be nice to standardize on a URL, > like cspace-services/personauthorities/*/items/<csid>. Or just > cspace-services/persons/<csid>. > > Ray > > On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet < > richard.millet@lyrasis.org> wrote: > >> Peter, >> >> I think you've revealed a bug (probably a know bug) in the REST API. The >> resource ID can be *anything* the URL examples I used in my last email. >> For example, these three URLs all return the same contact record: >> >> >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >> >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >> >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >> >> I'm not sure what's going on here, but it might just be picking the first >> Person authority it finds? Yikes! I'll look through JIRA to see if this >> has already been reported. >> >> -Richard >> >> ________________________________________ >> From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter >> Murray <pmurray@chillco.com> >> Sent: Friday, October 16, 2015 1:51 PM >> To: CollectionSpace Talk List >> Subject: Re: [Talk] Where is the contact information in the Person record? >> >> Oh, nuts. I wonder where I got that syntax for retrieving Person >> records? This seems to work as well: >> >> >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732 >> >> (Well, except for being able to enumerate the /contact records.) >> >> While were on the subject of importing, are there relative >> advantages/disadvantages to using ImportService rather than just using the >> RESTful CRUD+L operations on the record endpoints? >> >> >> Peter >> >> > On Oct 16, 2015, at 4:40 PM, Richard Millet <richard.millet@lyrasis.org> >> wrote: >> > >> > Peter, >> > >> > Here is an example from the demo site for getting contact information >> from a person resource: >> > >> > >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >> > >> > I think your URL has an incorrect resource ID for the specific Person >> authority (the container) you're trying to access. My example, uses the >> CSID, but I think you can use a short id as well. >> > >> > >> http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732 >> > >> > I hope that helps? >> > >> > -Richard >> > >> > >> > ________________________________________ >> > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter >> Murray <pmurray@chillco.com> >> > Sent: Friday, October 16, 2015 1:25 PM >> > To: CollectionSpace Talk List >> > Subject: Re: [Talk] Where is the contact information in the Person >> record? >> > >> > Two additions: >> > >> > First, I left of the Gist URL of what I see when I pull a Person record >> from the CSpace services layer: >> > >> > https://gist.github.com/dltj/379f98edbf67f77735b4 >> > >> > Second, I went looking deeper into the documentation, and I found a >> "Contacts CRUD+L Service" in the Person Service RESTful API documentation >> page: >> > >> > >> https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices >> > >> > Unfortunately, that doesn't seem to work: >> > >> > GET >> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts >> > >> > ...returns... >> > >> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >> > <ns2:abstract-common-list xmlns:ns2=" >> http://collectionspace.org/services/jaxb"> >> > <pageNum>0</pageNum> >> > <pageSize>40</pageSize> >> > <itemsInPage>0</itemsInPage> >> > <totalItems>0</totalItems> >> > >> <fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned> >> > </ns2:abstract-common-list> >> > >> > I know I've added one set of contact information to that CSID -- I can >> see it in the web interface. So the contact information must be hiding >> somewhere else... >> > >> > >> > Peter >> > >> >> On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.com> wrote: >> >> >> >> I'm back to uploading Person records, and I'm at the stage where I'm >> populating more than just the basic fields. Specifically, I'm trying to >> add contact information. Unfortunately, that doesn't seem to be in the >> person record. If I pull a person record from the services layer: >> >> >> >> >> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 >> >> >> >> I get everything that is directly defined in >> `base-authority-person.xml` (there is nothing being merged into it that is >> SDMoM-specific). See gist: >> >> >> >> What is missing is the contact information detail. In the >> `base-authority-person.xml` file, that corresponds to this section: >> >> >> >> <section id="contactInformation"> >> >> <group id="contact" userecord="contact" ui-spec-inherit="false" >> ui-spec-prefix="contact" exists-in-services="false"></group> >> >> </section> >> >> >> >> Two questions: >> >> >> >> 1. How do I get to that information using the cspace-services layer? >> >> >> >> 2. How do I use the ImportService to get information into it? >> >> >> >> >> >> Peter >> >> >> -- >> Peter Murray >> Dev/Ops Lead and Project Manager >> Cherry Hill Company >> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > >
RM
Richard Millet
Fri, Oct 16, 2015 10:17 PM

Sorry, I did not mean to imply that works in the current code, but we could support it if we wanted to.  I'm not sure what the valid use case(s) would be?


From: Jesse Martinez mjesse@gmail.com
Sent: Friday, October 16, 2015 3:14 PM
To: Richard Millet
Cc: Ray Lee; CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Wow, that's neat to know!

On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:

Actually, since CSIDs are unique across record types, this form of the URL should also work /cspace-services/<csid>. [😊]


From: Ray Lee <rhlee@berkeley.edumailto:rhlee@berkeley.edu>
Sent: Friday, October 16, 2015 3:06 PM
To: Richard Millet
Cc: Peter Murray; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person record?

I've always wondered why, if I had the csid of an authority item that uniquely identifies it, I also had to know the csid/shortid of its container in order to retrieve it. But it turns out I don't. That seems like a feature, not a bug. It would just be nice to standardize on a URL, like cspace-services/personauthorities/*/items/<csid>. Or just cspace-services/persons/<csid>.

Ray

On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:
Peter,

I think you've revealed a bug (probably a know bug) in the REST API.  The resource ID can be anything the URL examples I used in my last email.  For example, these three URLs all return the same contact record:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34
http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34
http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I'm not sure what's going on here, but it might just be picking the first Person authority it finds?  Yikes!  I'll look through JIRA to see if this has already been reported.

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com>
Sent: Friday, October 16, 2015 1:51 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Oh, nuts.  I wonder where I got that syntax for retrieving Person records?  This seems to work as well:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732

(Well, except for being able to enumerate the /contact records.)

While were on the subject of importing, are there relative advantages/disadvantages to using ImportService rather than just using the RESTful CRUD+L operations on the record endpoints?

Peter

On Oct 16, 2015, at 4:40 PM, Richard Millet <richard.millet@lyrasis.orgmailto:richard.millet@lyrasis.org> wrote:

Peter,

Here is an example from the demo site for getting contact information from a person resource:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I think your URL has an incorrect resource ID for the specific Person authority (the container) you're trying to access.  My example, uses the CSID, but I think you can use a short id as well.

http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732

I hope that helps?

-Richard


From: Talk <talk-bounces@lists.collectionspace.orgmailto:talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com>
Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Two additions:

First, I left of the Gist URL of what I see when I pull a Person record from the CSpace services layer:

https://gist.github.com/dltj/379f98edbf67f77735b4

Second, I went looking deeper into the documentation, and I found a "Contacts CRUD+L Service" in the Person Service RESTful API documentation page:

https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices

Unfortunately, that doesn't seem to work:

GET https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts

...returns...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb">
<pageNum>0</pageNum>
<pageSize>40</pageSize>
<itemsInPage>0</itemsInPage>
<totalItems>0</totalItems>
<fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned>
</ns2:abstract-common-list>

I know I've added one set of contact information to that CSID -- I can see it in the web interface.  So the contact information must be hiding somewhere else...

Peter

On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com> wrote:

I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields.  Specifically, I'm trying to add contact information.  Unfortunately, that doesn't seem to be in the person record.  If I pull a person record from the services layer:

https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084

I get everything that is directly defined in base-authority-person.xml (there is nothing being merged into it that is SDMoM-specific). See gist:

What is missing is the contact information detail.  In the base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation"> <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> </section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

Sorry, I did not mean to imply that works in the current code, but we could support it if we wanted to. I'm not sure what the valid use case(s) would be? ________________________________ From: Jesse Martinez <mjesse@gmail.com> Sent: Friday, October 16, 2015 3:14 PM To: Richard Millet Cc: Ray Lee; CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? Wow, that's neat to know! On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: Actually, since CSIDs are unique across record types, this form of the URL should also work /cspace-services/<csid>. [😊] ________________________________ From: Ray Lee <rhlee@berkeley.edu<mailto:rhlee@berkeley.edu>> Sent: Friday, October 16, 2015 3:06 PM To: Richard Millet Cc: Peter Murray; CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? I've always wondered why, if I had the csid of an authority item that uniquely identifies it, I also had to know the csid/shortid of its container in order to retrieve it. But it turns out I don't. That seems like a feature, not a bug. It would just be nice to standardize on a URL, like cspace-services/personauthorities/*/items/<csid>. Or just cspace-services/persons/<csid>. Ray On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: Peter, I think you've revealed a bug (probably a know bug) in the REST API. The resource ID can be *anything* the URL examples I used in my last email. For example, these three URLs all return the same contact record: http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 I'm not sure what's going on here, but it might just be picking the first Person authority it finds? Yikes! I'll look through JIRA to see if this has already been reported. -Richard ________________________________________ From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> Sent: Friday, October 16, 2015 1:51 PM To: CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? Oh, nuts. I wonder where I got that syntax for retrieving Person records? This seems to work as well: http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732 (Well, except for being able to enumerate the /contact records.) While were on the subject of importing, are there relative advantages/disadvantages to using ImportService rather than just using the RESTful CRUD+L operations on the record endpoints? Peter > On Oct 16, 2015, at 4:40 PM, Richard Millet <richard.millet@lyrasis.org<mailto:richard.millet@lyrasis.org>> wrote: > > Peter, > > Here is an example from the demo site for getting contact information from a person resource: > > http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 > > I think your URL has an incorrect resource ID for the specific Person authority (the container) you're trying to access. My example, uses the CSID, but I think you can use a short id as well. > > http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732 > > I hope that helps? > > -Richard > > > ________________________________________ > From: Talk <talk-bounces@lists.collectionspace.org<mailto:talk-bounces@lists.collectionspace.org>> on behalf of Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> > Sent: Friday, October 16, 2015 1:25 PM > To: CollectionSpace Talk List > Subject: Re: [Talk] Where is the contact information in the Person record? > > Two additions: > > First, I left of the Gist URL of what I see when I pull a Person record from the CSpace services layer: > > https://gist.github.com/dltj/379f98edbf67f77735b4 > > Second, I went looking deeper into the documentation, and I found a "Contacts CRUD+L Service" in the Person Service RESTful API documentation page: > > https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices > > Unfortunately, that doesn't seem to work: > > GET https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts > > ...returns... > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <ns2:abstract-common-list xmlns:ns2="http://collectionspace.org/services/jaxb"> > <pageNum>0</pageNum> > <pageSize>40</pageSize> > <itemsInPage>0</itemsInPage> > <totalItems>0</totalItems> > <fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned> > </ns2:abstract-common-list> > > I know I've added one set of contact information to that CSID -- I can see it in the web interface. So the contact information must be hiding somewhere else... > > > Peter > >> On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> wrote: >> >> I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields. Specifically, I'm trying to add contact information. Unfortunately, that doesn't seem to be in the person record. If I pull a person record from the services layer: >> >> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 >> >> I get everything that is directly defined in `base-authority-person.xml` (there is nothing being merged into it that is SDMoM-specific). See gist: >> >> What is missing is the contact information detail. In the `base-authority-person.xml` file, that corresponds to this section: >> >> <section id="contactInformation"> >> <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> >> </section> >> >> Two questions: >> >> 1. How do I get to that information using the cspace-services layer? >> >> 2. How do I use the ImportService to get information into it? >> >> >> Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company _______________________________________________ Talk mailing list Talk@lists.collectionspace.org<mailto:Talk@lists.collectionspace.org> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org _______________________________________________ Talk mailing list Talk@lists.collectionspace.org<mailto:Talk@lists.collectionspace.org> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org _______________________________________________ Talk mailing list Talk@lists.collectionspace.org<mailto:Talk@lists.collectionspace.org> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
JB
John B. LOWE
Fri, Oct 16, 2015 10:26 PM

Valid use case:

A million times easier to find something via the REST API once you know its
CSID...

;-)

On Fri, Oct 16, 2015 at 3:17 PM, Richard Millet richard.millet@lyrasis.org
wrote:

Sorry, I did not mean to imply that works in the current code, but we
could support it if we wanted to.  I'm not sure what the valid use case(s)
would be?


From: Jesse Martinez mjesse@gmail.com
Sent: Friday, October 16, 2015 3:14 PM
To: Richard Millet
Cc: Ray Lee; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person
record?

Wow, that's neat to know!

On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Actually, since CSIDs are unique across record types, this form of the
URL should also work /cspace-services/<csid>. [image: 😊]


From: Ray Lee rhlee@berkeley.edu
Sent: Friday, October 16, 2015 3:06 PM
To: Richard Millet
Cc: Peter Murray; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person
record?

I've always wondered why, if I had the csid of an authority item that
uniquely identifies it, I also had to know the csid/shortid of its
container in order to retrieve it. But it turns out I don't. That seems
like a feature, not a bug. It would just be nice to standardize on a URL,
like cspace-services/personauthorities/*/items/<csid>. Or just
cspace-services/persons/<csid>.

Ray

On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Peter,

I think you've revealed a bug (probably a know bug) in the REST API.
The resource ID can be anything the URL examples I used in my last
email.  For example, these three URLs all return the same contact record:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I'm not sure what's going on here, but it might just be picking the
first Person authority it finds?  Yikes!  I'll look through JIRA to see if
this has already been reported.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter
Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 1:51 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person
record?

Oh, nuts.  I wonder where I got that syntax for retrieving Person
records?  This seems to work as well:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732

(Well, except for being able to enumerate the /contact records.)

While were on the subject of importing, are there relative
advantages/disadvantages to using ImportService rather than just using the
RESTful CRUD+L operations on the record endpoints?

Peter

On Oct 16, 2015, at 4:40 PM, Richard Millet <

Peter,

Here is an example from the demo site for getting contact information

from a person resource:

I think your URL has an incorrect resource ID for the specific Person

authority (the container) you're trying to access.  My example, uses the
CSID, but I think you can use a short id as well.

I hope that helps?

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of

Peter Murray pmurray@chillco.com

Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person

record?

Two additions:

First, I left of the Gist URL of what I see when I pull a Person

record from the CSpace services layer:

https://gist.github.com/dltj/379f98edbf67f77735b4

Second, I went looking deeper into the documentation, and I found a

"Contacts CRUD+L Service" in the Person Service RESTful API documentation
page:

Unfortunately, that doesn't seem to work:

GET

...returns...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns2:abstract-common-list xmlns:ns2="

<pageNum>0</pageNum>
<pageSize>40</pageSize>
<itemsInPage>0</itemsInPage>
<totalItems>0</totalItems>

<fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned>

</ns2:abstract-common-list>

I know I've added one set of contact information to that CSID -- I can

see it in the web interface.  So the contact information must be hiding
somewhere else...

Peter

On Oct 16, 2015, at 3:49 PM, Peter Murray pmurray@chillco.com

wrote:

I'm back to uploading Person records, and I'm at the stage where I'm

populating more than just the basic fields.  Specifically, I'm trying to
add contact information.  Unfortunately, that doesn't seem to be in the
person record.  If I pull a person record from the services layer:

I get everything that is directly defined in

base-authority-person.xml (there is nothing being merged into it that is
SDMoM-specific). See gist:

What is missing is the contact information detail.  In the

base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation"> <group id="contact" userecord="contact"

ui-spec-inherit="false"  ui-spec-prefix="contact"
exists-in-services="false"></group>

</section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

Valid use case: A million times easier to find something via the REST API once you know its CSID... ;-) On Fri, Oct 16, 2015 at 3:17 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > Sorry, I did not mean to imply that works in the current code, but we > could support it if we wanted to. I'm not sure what the valid use case(s) > would be? > > > ------------------------------ > *From:* Jesse Martinez <mjesse@gmail.com> > *Sent:* Friday, October 16, 2015 3:14 PM > *To:* Richard Millet > *Cc:* Ray Lee; CollectionSpace Talk List > > *Subject:* Re: [Talk] Where is the contact information in the Person > record? > > Wow, that's neat to know! > > On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet < > richard.millet@lyrasis.org> wrote: > >> Actually, since CSIDs are unique across record types, this form of the >> URL should also work /cspace-services/<csid>. [image: 😊] >> >> >> ------------------------------ >> *From:* Ray Lee <rhlee@berkeley.edu> >> *Sent:* Friday, October 16, 2015 3:06 PM >> *To:* Richard Millet >> *Cc:* Peter Murray; CollectionSpace Talk List >> >> *Subject:* Re: [Talk] Where is the contact information in the Person >> record? >> >> I've always wondered why, if I had the csid of an authority item that >> uniquely identifies it, I also had to know the csid/shortid of its >> container in order to retrieve it. But it turns out I don't. That seems >> like a feature, not a bug. It would just be nice to standardize on a URL, >> like cspace-services/personauthorities/*/items/<csid>. Or just >> cspace-services/persons/<csid>. >> >> Ray >> >> On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet < >> richard.millet@lyrasis.org> wrote: >> >>> Peter, >>> >>> I think you've revealed a bug (probably a know bug) in the REST API. >>> The resource ID can be *anything* the URL examples I used in my last >>> email. For example, these three URLs all return the same contact record: >>> >>> >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>> >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>> >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>> >>> I'm not sure what's going on here, but it might just be picking the >>> first Person authority it finds? Yikes! I'll look through JIRA to see if >>> this has already been reported. >>> >>> -Richard >>> >>> ________________________________________ >>> From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter >>> Murray <pmurray@chillco.com> >>> Sent: Friday, October 16, 2015 1:51 PM >>> To: CollectionSpace Talk List >>> Subject: Re: [Talk] Where is the contact information in the Person >>> record? >>> >>> Oh, nuts. I wonder where I got that syntax for retrieving Person >>> records? This seems to work as well: >>> >>> >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732 >>> >>> (Well, except for being able to enumerate the /contact records.) >>> >>> While were on the subject of importing, are there relative >>> advantages/disadvantages to using ImportService rather than just using the >>> RESTful CRUD+L operations on the record endpoints? >>> >>> >>> Peter >>> >>> > On Oct 16, 2015, at 4:40 PM, Richard Millet < >>> richard.millet@lyrasis.org> wrote: >>> > >>> > Peter, >>> > >>> > Here is an example from the demo site for getting contact information >>> from a person resource: >>> > >>> > >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>> > >>> > I think your URL has an incorrect resource ID for the specific Person >>> authority (the container) you're trying to access. My example, uses the >>> CSID, but I think you can use a short id as well. >>> > >>> > >>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732 >>> > >>> > I hope that helps? >>> > >>> > -Richard >>> > >>> > >>> > ________________________________________ >>> > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of >>> Peter Murray <pmurray@chillco.com> >>> > Sent: Friday, October 16, 2015 1:25 PM >>> > To: CollectionSpace Talk List >>> > Subject: Re: [Talk] Where is the contact information in the Person >>> record? >>> > >>> > Two additions: >>> > >>> > First, I left of the Gist URL of what I see when I pull a Person >>> record from the CSpace services layer: >>> > >>> > https://gist.github.com/dltj/379f98edbf67f77735b4 >>> > >>> > Second, I went looking deeper into the documentation, and I found a >>> "Contacts CRUD+L Service" in the Person Service RESTful API documentation >>> page: >>> > >>> > >>> https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices >>> > >>> > Unfortunately, that doesn't seem to work: >>> > >>> > GET >>> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts >>> > >>> > ...returns... >>> > >>> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >>> > <ns2:abstract-common-list xmlns:ns2=" >>> http://collectionspace.org/services/jaxb"> >>> > <pageNum>0</pageNum> >>> > <pageSize>40</pageSize> >>> > <itemsInPage>0</itemsInPage> >>> > <totalItems>0</totalItems> >>> > >>> <fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned> >>> > </ns2:abstract-common-list> >>> > >>> > I know I've added one set of contact information to that CSID -- I can >>> see it in the web interface. So the contact information must be hiding >>> somewhere else... >>> > >>> > >>> > Peter >>> > >>> >> On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.com> >>> wrote: >>> >> >>> >> I'm back to uploading Person records, and I'm at the stage where I'm >>> populating more than just the basic fields. Specifically, I'm trying to >>> add contact information. Unfortunately, that doesn't seem to be in the >>> person record. If I pull a person record from the services layer: >>> >> >>> >> >>> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 >>> >> >>> >> I get everything that is directly defined in >>> `base-authority-person.xml` (there is nothing being merged into it that is >>> SDMoM-specific). See gist: >>> >> >>> >> What is missing is the contact information detail. In the >>> `base-authority-person.xml` file, that corresponds to this section: >>> >> >>> >> <section id="contactInformation"> >>> >> <group id="contact" userecord="contact" >>> ui-spec-inherit="false" ui-spec-prefix="contact" >>> exists-in-services="false"></group> >>> >> </section> >>> >> >>> >> Two questions: >>> >> >>> >> 1. How do I get to that information using the cspace-services layer? >>> >> >>> >> 2. How do I use the ImportService to get information into it? >>> >> >>> >> >>> >> Peter >>> >>> >>> -- >>> Peter Murray >>> Dev/Ops Lead and Project Manager >>> Cherry Hill Company >>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > >
JM
Jesse Martinez
Fri, Oct 16, 2015 10:31 PM

And maybe an easy way for metadata harvesting?

On Fri, Oct 16, 2015 at 6:26 PM, John B. LOWE jblowe@berkeley.edu wrote:

Valid use case:

A million times easier to find something via the REST API once you know
its CSID...

;-)

On Fri, Oct 16, 2015 at 3:17 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Sorry, I did not mean to imply that works in the current code, but we
could support it if we wanted to.  I'm not sure what the valid use case(s)
would be?


From: Jesse Martinez mjesse@gmail.com
Sent: Friday, October 16, 2015 3:14 PM
To: Richard Millet
Cc: Ray Lee; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person
record?

Wow, that's neat to know!

On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Actually, since CSIDs are unique across record types, this form of the
URL should also work /cspace-services/<csid>. [image: 😊]


From: Ray Lee rhlee@berkeley.edu
Sent: Friday, October 16, 2015 3:06 PM
To: Richard Millet
Cc: Peter Murray; CollectionSpace Talk List

Subject: Re: [Talk] Where is the contact information in the Person
record?

I've always wondered why, if I had the csid of an authority item that
uniquely identifies it, I also had to know the csid/shortid of its
container in order to retrieve it. But it turns out I don't. That seems
like a feature, not a bug. It would just be nice to standardize on a URL,
like cspace-services/personauthorities/*/items/<csid>. Or just
cspace-services/persons/<csid>.

Ray

On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet <
richard.millet@lyrasis.org> wrote:

Peter,

I think you've revealed a bug (probably a know bug) in the REST API.
The resource ID can be anything the URL examples I used in my last
email.  For example, these three URLs all return the same contact record:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34

I'm not sure what's going on here, but it might just be picking the
first Person authority it finds?  Yikes!  I'll look through JIRA to see if
this has already been reported.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter
Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 1:51 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person
record?

Oh, nuts.  I wonder where I got that syntax for retrieving Person
records?  This seems to work as well:

http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732

(Well, except for being able to enumerate the /contact records.)

While were on the subject of importing, are there relative
advantages/disadvantages to using ImportService rather than just using the
RESTful CRUD+L operations on the record endpoints?

Peter

On Oct 16, 2015, at 4:40 PM, Richard Millet <

Peter,

Here is an example from the demo site for getting contact information

from a person resource:

I think your URL has an incorrect resource ID for the specific Person

authority (the container) you're trying to access.  My example, uses the
CSID, but I think you can use a short id as well.

I hope that helps?

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of

Peter Murray pmurray@chillco.com

Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person

record?

Two additions:

First, I left of the Gist URL of what I see when I pull a Person

record from the CSpace services layer:

https://gist.github.com/dltj/379f98edbf67f77735b4

Second, I went looking deeper into the documentation, and I found a

"Contacts CRUD+L Service" in the Person Service RESTful API documentation
page:

Unfortunately, that doesn't seem to work:

GET

...returns...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns2:abstract-common-list xmlns:ns2="

<pageNum>0</pageNum>
<pageSize>40</pageSize>
<itemsInPage>0</itemsInPage>
<totalItems>0</totalItems>

<fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned>

</ns2:abstract-common-list>

I know I've added one set of contact information to that CSID -- I

can see it in the web interface.  So the contact information must be hiding
somewhere else...

Peter

On Oct 16, 2015, at 3:49 PM, Peter Murray pmurray@chillco.com

wrote:

I'm back to uploading Person records, and I'm at the stage where I'm

populating more than just the basic fields.  Specifically, I'm trying to
add contact information.  Unfortunately, that doesn't seem to be in the
person record.  If I pull a person record from the services layer:

I get everything that is directly defined in

base-authority-person.xml (there is nothing being merged into it that is
SDMoM-specific). See gist:

What is missing is the contact information detail.  In the

base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation"> <group id="contact" userecord="contact"

ui-spec-inherit="false"  ui-spec-prefix="contact"
exists-in-services="false"></group>

</section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

And maybe an easy way for metadata harvesting? On Fri, Oct 16, 2015 at 6:26 PM, John B. LOWE <jblowe@berkeley.edu> wrote: > Valid use case: > > A million times easier to find something via the REST API once you know > its CSID... > > ;-) > > On Fri, Oct 16, 2015 at 3:17 PM, Richard Millet < > richard.millet@lyrasis.org> wrote: > >> Sorry, I did not mean to imply that works in the current code, but we >> could support it if we wanted to. I'm not sure what the valid use case(s) >> would be? >> >> >> ------------------------------ >> *From:* Jesse Martinez <mjesse@gmail.com> >> *Sent:* Friday, October 16, 2015 3:14 PM >> *To:* Richard Millet >> *Cc:* Ray Lee; CollectionSpace Talk List >> >> *Subject:* Re: [Talk] Where is the contact information in the Person >> record? >> >> Wow, that's neat to know! >> >> On Fri, Oct 16, 2015 at 6:11 PM, Richard Millet < >> richard.millet@lyrasis.org> wrote: >> >>> Actually, since CSIDs are unique across record types, this form of the >>> URL should also work /cspace-services/<csid>. [image: 😊] >>> >>> >>> ------------------------------ >>> *From:* Ray Lee <rhlee@berkeley.edu> >>> *Sent:* Friday, October 16, 2015 3:06 PM >>> *To:* Richard Millet >>> *Cc:* Peter Murray; CollectionSpace Talk List >>> >>> *Subject:* Re: [Talk] Where is the contact information in the Person >>> record? >>> >>> I've always wondered why, if I had the csid of an authority item that >>> uniquely identifies it, I also had to know the csid/shortid of its >>> container in order to retrieve it. But it turns out I don't. That seems >>> like a feature, not a bug. It would just be nice to standardize on a URL, >>> like cspace-services/personauthorities/*/items/<csid>. Or just >>> cspace-services/persons/<csid>. >>> >>> Ray >>> >>> On Fri, Oct 16, 2015 at 2:05 PM, Richard Millet < >>> richard.millet@lyrasis.org> wrote: >>> >>>> Peter, >>>> >>>> I think you've revealed a bug (probably a know bug) in the REST API. >>>> The resource ID can be *anything* the URL examples I used in my last >>>> email. For example, these three URLs all return the same contact record: >>>> >>>> >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/foo/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>>> >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bar/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>>> >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/bat/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>>> >>>> I'm not sure what's going on here, but it might just be picking the >>>> first Person authority it finds? Yikes! I'll look through JIRA to see if >>>> this has already been reported. >>>> >>>> -Richard >>>> >>>> ________________________________________ >>>> From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter >>>> Murray <pmurray@chillco.com> >>>> Sent: Friday, October 16, 2015 1:51 PM >>>> To: CollectionSpace Talk List >>>> Subject: Re: [Talk] Where is the contact information in the Person >>>> record? >>>> >>>> Oh, nuts. I wonder where I got that syntax for retrieving Person >>>> records? This seems to work as well: >>>> >>>> >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/persons/items/835d4034-e370-49a4-9732 >>>> >>>> (Well, except for being able to enumerate the /contact records.) >>>> >>>> While were on the subject of importing, are there relative >>>> advantages/disadvantages to using ImportService rather than just using the >>>> RESTful CRUD+L operations on the record endpoints? >>>> >>>> >>>> Peter >>>> >>>> > On Oct 16, 2015, at 4:40 PM, Richard Millet < >>>> richard.millet@lyrasis.org> wrote: >>>> > >>>> > Peter, >>>> > >>>> > Here is an example from the demo site for getting contact information >>>> from a person resource: >>>> > >>>> > >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/114d77f9-fc17-40e0-aa71/items/835d4034-e370-49a4-9732/contacts/ebaa3342-76b8-4272-af34 >>>> > >>>> > I think your URL has an incorrect resource ID for the specific Person >>>> authority (the container) you're trying to access. My example, uses the >>>> CSID, but I think you can use a short id as well. >>>> > >>>> > >>>> http://demo.collectionspace.org:8180/cspace-services/personauthorities/urn:cspace:name(person)/items/835d4034-e370-49a4-9732 >>>> > >>>> > I hope that helps? >>>> > >>>> > -Richard >>>> > >>>> > >>>> > ________________________________________ >>>> > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of >>>> Peter Murray <pmurray@chillco.com> >>>> > Sent: Friday, October 16, 2015 1:25 PM >>>> > To: CollectionSpace Talk List >>>> > Subject: Re: [Talk] Where is the contact information in the Person >>>> record? >>>> > >>>> > Two additions: >>>> > >>>> > First, I left of the Gist URL of what I see when I pull a Person >>>> record from the CSpace services layer: >>>> > >>>> > https://gist.github.com/dltj/379f98edbf67f77735b4 >>>> > >>>> > Second, I went looking deeper into the documentation, and I found a >>>> "Contacts CRUD+L Service" in the Person Service RESTful API documentation >>>> page: >>>> > >>>> > >>>> https://wiki.collectionspace.org/display/DOC/Person+Service+REST+APIs#PersonServiceRESTAPIs-ContactCRUD+Lservices >>>> > >>>> > Unfortunately, that doesn't seem to work: >>>> > >>>> > GET >>>> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084/contacts >>>> > >>>> > ...returns... >>>> > >>>> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >>>> > <ns2:abstract-common-list xmlns:ns2=" >>>> http://collectionspace.org/services/jaxb"> >>>> > <pageNum>0</pageNum> >>>> > <pageSize>40</pageSize> >>>> > <itemsInPage>0</itemsInPage> >>>> > <totalItems>0</totalItems> >>>> > >>>> <fieldsReturned>csid|uri|refName|updatedAt|workflowState|displayName</fieldsReturned> >>>> > </ns2:abstract-common-list> >>>> > >>>> > I know I've added one set of contact information to that CSID -- I >>>> can see it in the web interface. So the contact information must be hiding >>>> somewhere else... >>>> > >>>> > >>>> > Peter >>>> > >>>> >> On Oct 16, 2015, at 3:49 PM, Peter Murray <pmurray@chillco.com> >>>> wrote: >>>> >> >>>> >> I'm back to uploading Person records, and I'm at the stage where I'm >>>> populating more than just the basic fields. Specifically, I'm trying to >>>> add contact information. Unfortunately, that doesn't seem to be in the >>>> person record. If I pull a person record from the services layer: >>>> >> >>>> >> >>>> https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 >>>> >> >>>> >> I get everything that is directly defined in >>>> `base-authority-person.xml` (there is nothing being merged into it that is >>>> SDMoM-specific). See gist: >>>> >> >>>> >> What is missing is the contact information detail. In the >>>> `base-authority-person.xml` file, that corresponds to this section: >>>> >> >>>> >> <section id="contactInformation"> >>>> >> <group id="contact" userecord="contact" >>>> ui-spec-inherit="false" ui-spec-prefix="contact" >>>> exists-in-services="false"></group> >>>> >> </section> >>>> >> >>>> >> Two questions: >>>> >> >>>> >> 1. How do I get to that information using the cspace-services layer? >>>> >> >>>> >> 2. How do I use the ImportService to get information into it? >>>> >> >>>> >> >>>> >> Peter >>>> >>>> >>>> -- >>>> Peter Murray >>>> Dev/Ops Lead and Project Manager >>>> Cherry Hill Company >>>> >>>> >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> >
PM
Peter Murray
Sat, Oct 17, 2015 12:18 AM

Wow -- go off to dinner and come back to a very interesting thread.

Richard: thanks for confirming this.  I don't know if that <group ... userecord=""...> construct is in any of the other record types (I suppose I'll find out), but presumably I'll get to them the same way.

As an aside, I don't seem to need to put the <inAuthority> and <inItem> elements in the POSTed XML -- those elements seem to be added just fine by the system.  Should I count on that behavior continuing?

This construct brings up another question, though.  It is theoretically possible to add multiple Contact records to a Person...the RESTful API docs even describe how to get to multiple records.  Yet the UI for Person doesn't seem to allow for "Contact Information" to be repeated.  (The individual field groups are repeated in the Contact record, but I'm talking about having more than one contact record.)  What happens in the UI if I add more than one Contact record to a Person?

I'll echo the desire to turn the get-arbitrary-record-using-CSID bug into a feature, if it isn't already supported.  That is a very handy thing to have, although implemented properly the service layer should arguably issue a 304 redirect its true URI.  Either way, I'll take it, though!

Peter

On Oct 16, 2015, at 5:51 PM, Richard Millet richard.millet@lyrasis.org wrote:

Peter,

Despite looking unified in the user interface, Contact and Person/Org records are separate.  Contact records need to be created after their corresponding Person/Org records are created.

The Contact payload needs to contain an <inAuthority> element and an <inItem> element.  The <inAuthority> element value should be the containing Authority's CSID and the <inItem> element should be the containing item's (Person/Org term) CSID.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 12:49 PM
To: CollectionSpace Talk List
Subject: [Talk] Where is the contact information in the Person record?

I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields.  Specifically, I'm trying to add contact information.  Unfortunately, that doesn't seem to be in the person record.  If I pull a person record from the services layer:

https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084

I get everything that is directly defined in base-authority-person.xml (there is nothing being merged into it that is SDMoM-specific). See gist:

What is missing is the contact information detail.  In the base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation">
    <group id="contact" userecord="contact" ui-spec-inherit="false"  ui-spec-prefix="contact"  exists-in-services="false"></group>
</section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Wow -- go off to dinner and come back to a very interesting thread. Richard: thanks for confirming this. I don't know if that <group ... userecord=""...> construct is in any of the other record types (I suppose I'll find out), but presumably I'll get to them the same way. As an aside, I don't seem to need to put the <inAuthority> and <inItem> elements in the POSTed XML -- those elements seem to be added just fine by the system. Should I count on that behavior continuing? This construct brings up another question, though. It is theoretically possible to add multiple Contact records to a Person...the RESTful API docs even describe how to get to multiple records. Yet the UI for Person doesn't seem to allow for "Contact Information" to be repeated. (The individual field groups are repeated in the Contact record, but I'm talking about having more than one contact record.) What happens in the UI if I add more than one Contact record to a Person? I'll echo the desire to turn the get-arbitrary-record-using-CSID bug into a feature, if it isn't already supported. That is a very handy thing to have, although implemented properly the service layer should arguably issue a 304 redirect its true URI. Either way, I'll take it, though! Peter > On Oct 16, 2015, at 5:51 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > > Peter, > > Despite looking unified in the user interface, Contact and Person/Org records are separate. Contact records need to be created *after* their corresponding Person/Org records are created. > > The Contact payload needs to contain an <inAuthority> element and an <inItem> element. The <inAuthority> element value should be the containing Authority's CSID and the <inItem> element should be the containing item's (Person/Org term) CSID. > > -Richard > > ________________________________________ > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> > Sent: Friday, October 16, 2015 12:49 PM > To: CollectionSpace Talk List > Subject: [Talk] Where is the contact information in the Person record? > > I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields. Specifically, I'm trying to add contact information. Unfortunately, that doesn't seem to be in the person record. If I pull a person record from the services layer: > > https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 > > I get everything that is directly defined in `base-authority-person.xml` (there is nothing being merged into it that is SDMoM-specific). See gist: > > What is missing is the contact information detail. In the `base-authority-person.xml` file, that corresponds to this section: > > <section id="contactInformation"> > <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> > </section> > > Two questions: > > 1. How do I get to that information using the cspace-services layer? > > 2. How do I use the ImportService to get information into it? > > > Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
RM
Richard Millet
Sat, Oct 17, 2015 2:22 AM

Peter,

Correct, you won't need them for RESTful POSTs, but you will for the Import service payloads.

-Richard

Sent using OWA for iPad


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 5:18:20 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?

Wow -- go off to dinner and come back to a very interesting thread.

Richard: thanks for confirming this.  I don't know if that <group ... userecord=""...> construct is in any of the other record types (I suppose I'll find out), but presumably I'll get to them the same way.

As an aside, I don't seem to need to put the <inAuthority> and <inItem> elements in the POSTed XML -- those elements seem to be added just fine by the system.  Should I count on that behavior continuing?

This construct brings up another question, though.  It is theoretically possible to add multiple Contact records to a Person...the RESTful API docs even describe how to get to multiple records.  Yet the UI for Person doesn't seem to allow for "Contact Information" to be repeated.  (The individual field groups are repeated in the Contact record, but I'm talking about having more than one contact record.)  What happens in the UI if I add more than one Contact record to a Person?

I'll echo the desire to turn the get-arbitrary-record-using-CSID bug into a feature, if it isn't already supported.  That is a very handy thing to have, although implemented properly the service layer should arguably issue a 304 redirect its true URI.  Either way, I'll take it, though!

Peter

On Oct 16, 2015, at 5:51 PM, Richard Millet richard.millet@lyrasis.org wrote:

Peter,

Despite looking unified in the user interface, Contact and Person/Org records are separate.  Contact records need to be created after their corresponding Person/Org records are created.

The Contact payload needs to contain an <inAuthority> element and an <inItem> element.  The <inAuthority> element value should be the containing Authority's CSID and the <inItem> element should be the containing item's (Person/Org term) CSID.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Friday, October 16, 2015 12:49 PM
To: CollectionSpace Talk List
Subject: [Talk] Where is the contact information in the Person record?

I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields.  Specifically, I'm trying to add contact information.  Unfortunately, that doesn't seem to be in the person record.  If I pull a person record from the services layer:

https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084

I get everything that is directly defined in base-authority-person.xml (there is nothing being merged into it that is SDMoM-specific). See gist:

What is missing is the contact information detail.  In the base-authority-person.xml file, that corresponds to this section:

<section id="contactInformation">
    <group id="contact" userecord="contact" ui-spec-inherit="false"  ui-spec-prefix="contact"  exists-in-services="false"></group>
</section>

Two questions:

  1. How do I get to that information using the cspace-services layer?

  2. How do I use the ImportService to get information into it?

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Peter, Correct, you won't need them for RESTful POSTs, but you will for the Import service payloads. -Richard Sent using OWA for iPad ________________________________________ From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> Sent: Friday, October 16, 2015 5:18:20 PM To: CollectionSpace Talk List Subject: Re: [Talk] Where is the contact information in the Person record? Wow -- go off to dinner and come back to a very interesting thread. Richard: thanks for confirming this. I don't know if that <group ... userecord=""...> construct is in any of the other record types (I suppose I'll find out), but presumably I'll get to them the same way. As an aside, I don't seem to need to put the <inAuthority> and <inItem> elements in the POSTed XML -- those elements seem to be added just fine by the system. Should I count on that behavior continuing? This construct brings up another question, though. It is theoretically possible to add multiple Contact records to a Person...the RESTful API docs even describe how to get to multiple records. Yet the UI for Person doesn't seem to allow for "Contact Information" to be repeated. (The individual field groups are repeated in the Contact record, but I'm talking about having more than one contact record.) What happens in the UI if I add more than one Contact record to a Person? I'll echo the desire to turn the get-arbitrary-record-using-CSID bug into a feature, if it isn't already supported. That is a very handy thing to have, although implemented properly the service layer should arguably issue a 304 redirect its true URI. Either way, I'll take it, though! Peter > On Oct 16, 2015, at 5:51 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > > Peter, > > Despite looking unified in the user interface, Contact and Person/Org records are separate. Contact records need to be created *after* their corresponding Person/Org records are created. > > The Contact payload needs to contain an <inAuthority> element and an <inItem> element. The <inAuthority> element value should be the containing Authority's CSID and the <inItem> element should be the containing item's (Person/Org term) CSID. > > -Richard > > ________________________________________ > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> > Sent: Friday, October 16, 2015 12:49 PM > To: CollectionSpace Talk List > Subject: [Talk] Where is the contact information in the Person record? > > I'm back to uploading Person records, and I'm at the stage where I'm populating more than just the basic fields. Specifically, I'm trying to add contact information. Unfortunately, that doesn't seem to be in the person record. If I pull a person record from the services layer: > > https://cspace.vagrant/cspace-services/personauthorities/persons/items/f1a2fd11-ecdd-4655-b084 > > I get everything that is directly defined in `base-authority-person.xml` (there is nothing being merged into it that is SDMoM-specific). See gist: > > What is missing is the contact information detail. In the `base-authority-person.xml` file, that corresponds to this section: > > <section id="contactInformation"> > <group id="contact" userecord="contact" ui-spec-inherit="false" ui-spec-prefix="contact" exists-in-services="false"></group> > </section> > > Two questions: > > 1. How do I get to that information using the cspace-services layer? > > 2. How do I use the ImportService to get information into it? > > > Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company _______________________________________________ Talk mailing list Talk@lists.collectionspace.org http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org