MTimJones
1 Copper

Create/Update Object Question

Jump to solution

Hello.

I'm curious if there's a way to create an object that will succeed whether the object currently exists or not.  In my use-case, I don't keep track of which objects are stored in Atmos.  This means that prior to creating an object, I delete it first so that the create operation will succeed.  Currently, CreateObject returns 1016 (object already exists), and UpdateObject returns 1003 (object not found).  Is there a way through the API to "force" the operation (create if it exists or replace whether it exists or not)?

Thanks,

Tim.

[Note that I've developed my own C++ Atmos API, so I'm not bound to the interfaces of the publically available APIs, if that helps.]

0 Kudos
1 Solution

Accepted Solutions
Highlighted
David_Oswill
1 Copper

Re: Create/Update Object Question

Jump to solution

Tim,

At this time there is no "force create" option in the API for the CreateObject method which will force an object to be overwritten if it's present. I would say that if this was available this would need to be used with great care in most situations.

As you indicated Utilizing the UpdateObject method with no range header will overwrite the object but only if it's already present.

Regards,

Dave

0 Kudos
1 Reply
Highlighted
David_Oswill
1 Copper

Re: Create/Update Object Question

Jump to solution

Tim,

At this time there is no "force create" option in the API for the CreateObject method which will force an object to be overwritten if it's present. I would say that if this was available this would need to be used with great care in most situations.

As you indicated Utilizing the UpdateObject method with no range header will overwrite the object but only if it's already present.

Regards,

Dave

0 Kudos