REST Resources (Remove, Delete) [Forgetting]

Kyle Nakamoto's Avatar

Kyle Nakamoto

09 Mar, 2010 09:32 PM via web

Can you provide more detail on how this works? I have a database example where I use the remove tag to try and remove a record. It then comes back with "Resource has been accepted". It also has a location that when clicked on, shows the actual resource. Is the resource actually removed? Is it scheduled like the delete command described below?

I then use a http delete on the location and it comes back with "Resource has been scheduled for deletion". Now what exactly does this mean? When will the resource actually be deleted? Can I make a rest call that will perform the actual deletion?

Background: I have need for forgetting a record, modifying the data, and then reingesting the same record. This is obviously problematic if forgetting is not an immediate operation.

  1. Support Staff 2 Posted by Chet Patel on 10 Mar, 2010 02:36 PM

    Chet Patel's Avatar

    There are 2 ways to remove a resource from the system. I think you tried doing the HTTP POST with the payload of the resource and also the HTTP DELETE with the Location url. This is a scheduled deletion in both cases so you definitely need to check the status of the resource before you re-ingest. Also the flush flag needs to be true.

  2. 3 Posted by Kyle Nakamoto on 10 Mar, 2010 03:14 PM

    Kyle Nakamoto's Avatar

    When you say it is a scheduled deletion, what does that mean? When does the scheduled deletion occur. Is there a way to trigger the scheduled deletion?

  3. Support Staff 4 Posted by Chet Patel on 10 Mar, 2010 03:38 PM

    Chet Patel's Avatar

    The scheduled deletion will start almost immediately but there is a small delay between the HTTP POST finishing and the system actually deleting it. So before your next HTTP POST you need to be sure the resource was deleted before re-ingesting a resource with the same database id or file path.

  4. 5 Posted by Kyle Nakamoto on 10 Mar, 2010 04:40 PM

    Kyle Nakamoto's Avatar

    Can you please provide more information about the status qualifiers? Does passed mean it was successful? What is the difference between working and pending?

  5. Support Staff 6 Posted by Chet Patel on 10 Mar, 2010 06:06 PM

    Chet Patel's Avatar

    Yes...passed means it was successful. pending indicates it is waiting to be processed by the datapump . working is a state for really large resources that take time to complete.

  6. Support Staff 7 Posted by Chet Patel on 12 Mar, 2010 03:57 PM

    Chet Patel's Avatar

    Added a msg field to the JSON response that gives more information on resources that have failed.

  7. Chet Patel resolved this discussion on 12 Mar, 2010 03:57 PM.

Comments are currently closed for this discussion. You can start a new one.