Topics

Help! I'm confused on how to migrate via the api

sierragamers@...
 

I can successfully use the Rest API, but now need help going the next step

I want to move over forum messages, but in order to do so I need to create USERS and subscriptions for the original posters. When I add a USER it won't let me add subscriptions to their user object or post messages on their behalf, until the User account is confirmed. 

How can I add users that are already confirmed?

-Ken W

Andrew Schaefer
 

Have you looked at directadd? It adds the users and subscribes them. 

-Andrew

On Fri, Nov 22, 2019 at 12:05 PM sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:

I can successfully use the Rest API, but now need help going the next step

I want to move over forum messages, but in order to do so I need to create USERS and subscriptions for the original posters. When I add a USER it won't let me add subscriptions to their user object or post messages on their behalf, until the User account is confirmed. 

How can I add users that are already confirmed?

-Ken W



--

sierragamers@...
 

Thank you! I saw that, and am happy to upgrade the site to premium. (The rest API says the site needs to be upgraded to use the directadd call)

The parameters to Directadd only are email address -- it doesn't have a password. So .. I was confused about what would happen to the user account. Does it generate them a fake password? Or what happens?

As soon as I get your subscription I'll upgrade to premium and give it a try.

-Ken W

Duane
 

On Fri, Nov 22, 2019 at 11:28 AM, <sierragamers@...> wrote:
Does it generate them a fake password? Or what happens?
It just creates the account.  No password needed to log in, but one can be set if wanted.  See https://groups.io/g/GroupManagersForum/wiki/Logging-In

Duane

Andrew Schaefer
 

The users get an email stating that they have been added, and it lets them finish setting up their account.

BTW I'm just a customer like you.

On Fri, Nov 22, 2019 at 12:28 PM sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:
Thank you! I saw that, and am happy to upgrade the site to premium. (The rest API says the site needs to be upgraded to use the directadd call)

The parameters to Directadd only are email address -- it doesn't have a password. So .. I was confused about what would happen to the user account. Does it generate them a fake password? Or what happens?

As soon as I get your subscription I'll upgrade to premium and give it a try.

-Ken W


sierragamers@...
 

Hmmm ... So .. I have several sites I'm migrating. They have thousands of posts and thousands of users. I wanted to migrate everything over and then let the users know. The problem will be that if it sends them all an email before I am ready to "go live" they are going to be confused. 

Oh well .. never a dull moment. I'll experiment and see what I can do.

Thank you! Much appreciated! Hopefully I can return the favor someday.

-Ken W

sierragamers@...
 

I upgraded and tried the DirectAdd API. 

It works fine, and is what I'll use for migration. It did do one thing I don't love ... 

It sends an email to users that I can't stop. It means I can't get everything imported and THEN alert everyone. It will alert all the users immediately when I add them to the group and start the message import. Oh well ... I just hate spamming people when it can be avoided.

Thank you! This is looking very possible... 

Gilbert Coville
 

When you import your messages, I’ll be very interested to know if they are entered (and placed into the message count matrix on the group’s home page) as the date/time that you perform the operation, or whether they take the date/time from the “Date:” lines in the messages.

The experiments I’ve tried by sending messages to the group (spoofed as original owners) took on the date/time of when they were received, not from the “Date:” header.

The Yahoo group transfers are using the original date/time info. That might be something that’s not available via the api.

Gilbert

On Nov 22, 2019, at 10:22 AM, sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:

I upgraded and tried the DirectAdd API.

It works fine, and is what I'll use for migration. It did do one thing I don't love ...

It sends an email to users that I can't stop. It means I can't get everything imported and THEN alert everyone. It will alert all the users immediately when I add them to the group and start the message import. Oh well ... I just hate spamming people when it can be avoided.

Thank you! This is looking very possible...

sierragamers@...
 

Gilbert: 

I should have that answer for you in the next couple of hours... I will post here what I learn.

-Ken W

sierragamers@...
 

Darn!! I am stuck again.

I tried to post a message on behalf of a user who I registered via DIRECTADD

Unfortunately I need to log them in first before they can post. 

The login interface requires a username and password. I can't obtain a CSRF token without logging them in. And, I can't get a draft posting without a CSRF for the user.

Any ideas anyone?

-Ken Williams

Duane
 

On Fri, Nov 22, 2019 at 01:02 PM, <sierragamers@...> wrote:
Unfortunately I need to log them in first before they can post.
If it's an email address you own, use the Email Link to Log In button.  Otherwise there's no way to do it.

Duane

sierragamers@...
 

In this case I was testing, so .. yes. I could use the login link. But ...

I am writing code to migrate an existing discussion board with thousands of users and posts. I need to insert all the existing messages via the API and can't do so so without having a registered user to post them under. If I post them under my userid -- then it will appear that I posted thousands of messages. And, if I post them as the users who originally wrote the messages -- they can't be posted until the user registers. 

I'm at a roadblock until I figure this out.

-Ken W

 

Ken,

On Fri, Nov 22, 2019 at 11:23 AM sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:

I am writing code to migrate an existing discussion board with thousands of users and posts. I need to insert all the existing messages via the API and can't do so so without having a registered user to post them under. If I post them under my userid -- then it will appear that I posted thousands of messages. And, if I post them as the users who originally wrote the messages -- they can't be posted until the user registers. 


The API is not designed for that and there is no way for you to do that using the API. If you can convert the messages into an mbox format, I can import them into your group, along with your users, like we do with Yahoo groups. For that, I ask that you pre-pay for a year of premium service for your group. Contact me off list if/when you're ready to go ahead with that.

Cheers,
Mark

sierragamers@...
 

Gilbert -- a frustrating day. 

I could not find a way to post a message with a date. And .. then I couldn't find a way to post a message and know the message id I posted .. The getdraft call is supposed to return a draft object with a message_id in it, but it always returns zero. 

You probably saw Mark Fletcher's comment that the API can't do what I wanted it to do. Darn! I thought I could work around it by just posting all the old messages under the single user name "Imported message from old board" .. but ..even that isn't working.

Mark suggested converting to a format he could import. I'll investigate that route tomorrow...

-Ken W

Gilbert Coville
 

That does sound like the best bet. The yahoo group transfers that have been occurring are all imported very nicely, so I imagine that a user list and mail corpus in mbox format will import very nicely as well.

Gilbert

On Nov 22, 2019, at 3:22 PM, sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:

Gilbert -- a frustrating day.

I could not find a way to post a message with a date. And .. then I couldn't find a way to post a message and know the message id I posted .. The getdraft call is supposed to return a draft object with a message_id in it, but it always returns zero.

You probably saw Mark Fletcher's comment that the API can't do what I wanted it to do. Darn! I thought I could work around it by just posting all the old messages under the single user name "Imported message from old board" .. but ..even that isn't working.

Mark suggested converting to a format he could import. I'll investigate that route tomorrow...

-Ken W

sierragamers@...
 

You wouldn't happen to have an example of mbox format would you? 

I've found a few articles, like this one:

https://www.jagwaresoftware.com/blog/what-is-a-mbox-file.html

But they don't seem to address what to do for replies to a message. Let's say I have an original posting and 10 replies... 

Do I just assume that if the subject line is the same the groups.io import will see anything after the first one as a reply?

I'll keep googling...

-Ken W

sierragamers@...
 

Mark:

I pre-paid a year of premium service and sent you (via private email) a test MBOX file. I'm not sure I have the format correct. Specifically, I didn't know how to tie replies to the original posting. 

Can you take a look and let me know if what I sent will work for you?

Thank you,
Ken Williams