PM
Peter Murray
Fri, Oct 16, 2015 7:49 PM
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company
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
PM
Peter Murray
Fri, Oct 16, 2015 8:25 PM
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company
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
RM
Richard Millet
Fri, Oct 16, 2015 8:40 PM
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
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
PM
Peter Murray
Fri, Oct 16, 2015 8:51 PM
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company
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
RM
Richard Millet
Fri, Oct 16, 2015 9:05 PM
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
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
JB
John B. LOWE
Fri, Oct 16, 2015 9:07 PM
Peter,
Very terse answer:
IMPORT gives you an all-or-nothing upload of a set of records, so you do
have to worry about how to restart if your one-by-one "RESTful CRUD+L
operation" topples over in the middle. The response payload for IMPORT
contains all the CSIDs of the created records, and you may need these for
further uploading (e.g. making Relations). IMPORT is marginally faster
than one-by-one POSTs.
One-by-One "RESTful CRUD+L operations" are a little easier to code (if
you're using IMPORT, you will not wish to include more than a couple
thousand records in a POST lest the operation time out so you need to make
"batches" if you have more records to load than this, which is more code.
See e.g. PAHMA-378.)
We have used both approaches at Berkeley; there is some code checked in for
helping with this that you may wish to look at, e.g.
https://github.com/cspace-deployment/Tools/blob/master/devops/helpers/
esp. loadCspace.py
The Walker Art Center had the start of a more extensive suite for this, not
touched in some years:
https://github.com/jslag/Walker-Art-Center-Collectionspace-data-importer
John
On Fri, Oct 16, 2015 at 1:51 PM, Peter Murray pmurray@chillco.com wrote:
Peter,
Here is an example from the demo site for getting contact information
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.
Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person
Two additions:
First, I left of the Gist URL of what I see when I pull a Person record
from the CSpace services layer:
"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...
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
Peter,
Very terse answer:
IMPORT gives you an all-or-nothing upload of a set of records, so you do
have to worry about how to restart if your one-by-one "RESTful CRUD+L
operation" topples over in the middle. The response payload for IMPORT
contains all the CSIDs of the created records, and you may need these for
further uploading (e.g. making Relations). IMPORT is marginally faster
than one-by-one POSTs.
One-by-One "RESTful CRUD+L operations" are a little easier to code (if
you're using IMPORT, you will not wish to include more than a couple
thousand records in a POST lest the operation time out so you need to make
"batches" if you have more records to load than this, which is more code.
See e.g. PAHMA-378.)
We have used both approaches at Berkeley; there is some code checked in for
helping with this that you may wish to look at, e.g.
https://github.com/cspace-deployment/Tools/blob/master/devops/helpers/
esp. loadCspace.py
The Walker Art Center had the start of a more extensive suite for this, not
touched in some years:
https://github.com/jslag/Walker-Art-Center-Collectionspace-data-importer
John
On Fri, Oct 16, 2015 at 1:51 PM, Peter Murray <pmurray@chillco.com> wrote:
> 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
>
RM
Richard Millet
Fri, Oct 16, 2015 9:21 PM
Peter,
To avoid being bitten by this bug, you'll want to ensure you're using a correct CSID or the correct URN form for the authority in question. Here's a good page to review:
https://wiki.collectionspace.org/display/DOC/Short+Identifier#ShortIdentifier-uris
-Richard
From: Richard Millet
Sent: Friday, October 16, 2015 2:05 PM
To: Peter Murray; CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
Peter,
To avoid being bitten by this bug, you'll want to ensure you're using a correct CSID or the correct URN form for the authority in question. Here's a good page to review:
https://wiki.collectionspace.org/display/DOC/Short+Identifier#ShortIdentifier-uris
-Richard
________________________________________
From: Richard Millet
Sent: Friday, October 16, 2015 2:05 PM
To: Peter Murray; CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?
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
AR
Aron Roberts
Fri, Oct 16, 2015 9:27 PM
I think you've revealed a bug (probably a know bug) in the REST API.
The resource ID can be anything [in] the URL examples I used in my
last email ...
Peter,
To avoid being bitten by this bug, you'll want to ensure you're using a
correct CSID or the correct URN form for the authority in question. Here's
a good page to review:
https://wiki.collectionspace.org/display/DOC/Short+Identifier#ShortIdentifier-uris
-Richard
From: Richard Millet
Sent: Friday, October 16, 2015 2:05 PM
To: Peter Murray; CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person record?
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
Peter,
Here is an example from the demo site for getting contact information
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.
Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person
Two additions:
First, I left of the Gist URL of what I see when I pull a Person record
from the CSpace services layer:
"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...
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
Richard wrote:
> I think you've revealed a bug (probably a know bug) in the REST API.
> The resource ID can be *anything* [in] the URL examples I used in my
> last email ...
It's possible that bug might be captured by this JIRA:
https://issues.collectionspace.org/browse/CSPACE-2710
On Fri, Oct 16, 2015 at 2:21 PM, Richard Millet <richard.millet@lyrasis.org>
wrote:
> Peter,
>
> To avoid being bitten by this bug, you'll want to ensure you're using a
> correct CSID or the correct URN form for the authority in question. Here's
> a good page to review:
>
>
> https://wiki.collectionspace.org/display/DOC/Short+Identifier#ShortIdentifier-uris
>
> -Richard
>
> ________________________________________
> From: Richard Millet
> Sent: Friday, October 16, 2015 2:05 PM
> To: Peter Murray; CollectionSpace Talk List
> Subject: Re: [Talk] Where is the contact information in the Person record?
>
> 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
>
RM
Richard Millet
Fri, Oct 16, 2015 9:51 PM
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:
-
How do I get to that information using the cspace-services layer?
-
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,
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
RL
Ray Lee
Fri, Oct 16, 2015 10:06 PM
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,
Here is an example from the demo site for getting contact information
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.
Sent: Friday, October 16, 2015 1:25 PM
To: CollectionSpace Talk List
Subject: Re: [Talk] Where is the contact information in the Person
Two additions:
First, I left of the Gist URL of what I see when I pull a Person record
from the CSpace services layer:
"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...
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:
-
How do I get to that information using the cspace-services layer?
-
How do I use the ImportService to get information into it?
Peter
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
>