source/resource/remove

Remove one or more resources from a Managed Source.

An HTTPS PUT request sent to:

https://api.datasift.com/v1.3/source/resource/remove

A successful call to this endpoint returns: 200 OK plus a JSON object. The JSON object is the same as the JSON returned by the /source/get endpoint.

Parameters

Parameter Description
id
required

The id of the source you're removing resources from.

Example values: da4f8df71a0f43698acf9240b5ad668f

resource_ids
required

An array of the resource ids that you want to remove.

Examples

  1. Here's an example of a JSON return object from a call to /source/update:

    {
        "id": "da4f8df71a0f43698acf9240b5ad668f",
        "name": "news_source",
        "source_type": "facebook_page",
        "created_at": 1391707662,
        "status": "running",
        "parameters": {
          "posts_by_others": true,
          "likes": false,
          "comments": false
        },
        "resources": [
          {
            "parameters": {
              "title": "The Guardian",
              "url": "http://www.facebook.com/theguardian",
              "id": "10513336322"
            },
            "resource_id": "7e8099d7f34f466e8bee01852243e16b"
          },
          {
            "parameters": {
              "title": "The Sun",
              "url": "http://www.facebook.com/thesun",
              "id": "161385360554578"
            },
            "resource_id": "b801b1f3a6934cf29e02d092bff9b7f1"
          }
        ],
        "auth": [
          {
            "expires_at": 2112112110,
            "parameters": {
              "value": "EZBXlFZBUgBYmjHkxc2pPmzLeJJYmAvQkwZCRdm0A1NAjidHy1h"
            },
            "identity_id": "d38e5598142746e19689ddee65ddca55"
          }
        ]
      }

    It includes two resources. To remove, say, the second one:

    curl -X PUT https://api.datasift.com/v1.3/source/resource/remove 
        -d id=da4f8df71a0f43698acf9240b5ad668f 
        -d resource_ids = ["b801b1f3a6934cf29e02d092bff9b7f1"] 
        -H Authorization:datasift-user:datasift-key

  2. Alternatively, you could remove both resources in example 1 at the same time:

curl -X PUT https://api.datasift.com/v1.3/source/resource/remove 
    -d id=da4f8df71a0f43698acf9240b5ad668f 
    -d resource_ids = ["7e8099d7f34f466e8bee01852243e16b", "b801b1f3a6934cf29e02d092bff9b7f1"] 
    -H Authorization:datasift-user:datasift-key

Notes

  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.3.

Resource information

Rate limit cost: 25

Requires authentication: Yes

Response formats: JSON, JSONP