Source configuration objects

Overview

The Config - Source - Get API returns a source document in the following response format (Config - Source - Good is similar but returns an array of source JSON objects instead):

Note that there is a separate overview of how to use these objects to ingest data into Infinit.e, covered in the Source Pipeline Documentation. These pages are reference information.

Query Response Format
{
      response: 
          "action": "Source Info"
          "success": boolean,
          "message": "string", // A human readable message (i.e. "Successfully retrieved source info")
          "time": integer // The number of milliseconds spent performing the query
      },
      data: { ... } // The JSON format below
}

JSON Format

Source Document
{
	// User-defined top level metadata:
	"title" : "string", // String, display title for source
	"description" : "string", // String, display description of documents to be harvested
	"url" : "string", // String, url/path to documents to harvest
	"mediaType" : "string", // Type of document being harvested, i.e. Record, Report, etc. Basically a free from string used to populate the corresponding field in the document

	"tags" : [ "string" ], // Array of tags that are appended to documents harvested for this source
 
	// Auto-generated top level metadata:
	"_id" : "string", // A unique ID for the document
	"key" : "string", // String, unique identifier for a source based on the url
	"created": "string", // When the source was originally created (Java date format)
	"modified" : "string", // When the source was last modified (Java date format)
 
	// Social metadata
	// User-generated:
	"isPublic" : boolean, // Described below, under source privacy (summary: if "isPublic" is true, only a restricted set of fields are visible)
	// Admin-generated:
	"isApproved" : boolean, // When a source is first added to a community, the admin (if different to the owner) must approve it. 
	// Auto-generated:
	"ownerId": "string", // The "_id" of the creating user (see person object) - only the user and admins have write privileges on the source
	"communityIds" : [ "string" ], // A list of "_id"s of communities (normally only one) across which the source is shared
	"appendTagsToDocs": boolean, // Defaults to true, if false then the "tags" array isn't copied to the document
 
	// Source pipeline configuration (see source pipeline docs for more information)
	

The sub-objects in the above JSON are described in the Source Pipeline Documentation.

Source Privacy

Anyone in a community can view all sources within that community. If the "isPublic" field is set to true, then all fields are visible.

Note this includes passwords and javascript code - anything sensitive should be protected with "isPublic": false.