Update an Input

Change the information of an existing input.

Endpoint

PUT https://api.crowdynews.com/collection/inputs

Request Parameters

HEADER FIELD VALUE DESCRIPTION
Content-Type The content type of the request body, must be set to application/json.
URL PARAMETER VALUE DESCRIPTION
id The resource ID of the input. The consumer that wants to update the input must have access to the contract said input belongs to, otherwise this action is forbidden.
QUERY PARAMETER VALUE DESCRIPTION
access_token A valid OAuth access token with the correct permission(s).
REQUEST BODY DATA VALUE TYPE VALUE DESCRIPTION
service String The service from which content will be collected. Supported services are:
  • twitter
  • facebook
  • instagram
  • youtube
  • tumblr
  • vimeo
  • flickr
  • vk
    type String The type of content that will be collected. This depends on the service that is being used. Supported types per service are:
    • Twitter:
      • user
      • keyword
      • location
    • Facebook:
      • page
    • Instagram:
      • user
      • tag
      • location
    • Youtube:
      • user
      • keyword
      • location
      • channel
      • playlist
    • Tumblr:
      • user
      • tag
    • Vimeo:
      • user
      • album
    • Flickr:
      • tag
    • VK:
      • user
      • tag
      • group
    input String The value to query on to collect content, but as plain text. For example:
    • If you'd like to query for content of the user @crowdynews on Twitter, the value of the input property will be crowdynews.
    • If you'd like to query for content on Instagram with the tag #summer, the value of the input property will be summer.
    collectionId String Optional. The resource ID that specifies which collection this input belongs. The collection must belong to the same contract that is referenced in the contractId property and the consumer that wants to create this input must have access to said contract, otherwise this action is forbidden.
    filterId String Optional. The resource ID that specifies which filter to use to control content automatically. The filter must belong to the same contract that is referenced in the contractId property and the consumer that wants to create this input must have access to said contract, otherwise this action is forbidden.
    latitude Number Only required for type location. A coordinate, must be between -90 and 90, for example 38.887533.
    longitude Number Only required for type location. A coordinate, must be between -180 and 180, for example 1.407564.
    radius Number Only required for type location. The radius for the location circle (determined by the latitude and longitude properties) in meters, for example 45.
    display Boolean Optional. Specifies if the collected content resulting from this input must be displayed in the publication content feed by default. For example, if set to false, all collected content resulting from this input will not be displayed in a publication content feed. A user will then have to manually select the content items in the content queue (i.e. moderate) which may be displayed when publishing said content. This property defaults to true when omitted.
    active Boolean Optional. Specifies if this input will be processed by the platform. This property defaults to true when omitted.

    Response Format

    On success, the HTTP status code in the response header is 200 OK and the response body will contain an input object in JSON format. On error, the header status code is an error code and the response body contains an error object.

    Example Request

    Request:

    PUT https://api.crowdynews.com/collection/inputs/565d4de40f6e5595f6e68111?access_token={your access token}
    
    {
        "collectionId": "565d4de4046e659546e62151",
        "active": true,
        "display": true,
        "service": "twitter",
        "type": "tag",
        "input": "javascript"
    }
    

    Response:

    HTTP/1.1 200
    
    {
        "_id": "565d4de40f6e5595f6e68111",
        "created": "2016-03-22T15:01:49.081Z",
        "createdBy": "John Doe",
        "lastModified": "2016-03-22T15:01:49.081Z",
        "lastModifiedBy": "John Doe",
        "contractId": "565c4df4056e859526e62257",
        "collectionId": "565d4de4046e659546e62151",
        "active": true,
        "display": true,
        "service": "twitter",
        "type": "tag",
        "input": "javascript"
    }
    

    Additional Resources