Create a Source

Creates a data_source object for importing data into ChartMogul.


curl -X POST "" \
     -u YOUR_API_KEY: \
     -H "Content-Type: application/json" \
     -d '{ 
          "name": "In-house billing"
ChartMogul::DataSource.create!(name: 'In-house billing')
ChartMogul.DataSource.create(config, {
  name: 'In-house billing'
  "name" => "In-house billing"
api.CreateDataSource("In-house billing")
chartmogul.DataSource.create(config, data={
    'name': 'In-house billing'
Result Format
  "uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "name": "In-house billing",
  "system": "Custom",
  "created_at": "2023-01-10T15:34:05.918Z",
  "status": "idle"
  @name="In-house billing", 
  @created_at=2023-01-10 15:34:05 UTC,
  uuid: 'ds_fef05d54-47b4-431b-aed2-eb6b9e545430',
  name: 'In-house billing',
  system: 'Custom',
  created_at: '2023-01-10T15:34:05Z',
  status: 'idle',
  "uuid" => "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "name" => "In-house billing",
  "system" => "Custom",
  "created_at" => "2023-01-10T15:34:05.585Z",
  "status" => "idle",
  UUID: (string) (len=39) "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  Name: (string) (len=16) "In-house billing",
  System: (string) (len=10) "Custom",
  CreatedAt: (string) (len=24) "2023-01-10T15:34:05.346Z",
  Status: (string) (len=4) "idle",
    name='In-house billing',
    created_at=datetime.datetime(2023, 1, 10, 15, 34, 5, 513000, tzinfo=datetime.timezone.utc),

The response object contains the following data:

uuidThe generated ChartMogul UUID for the created source.
nameThe name of the source, as specified.
systemThe system type. This is always Custom, since this endpoint only creates custom endpoints. The key exists to be consistent with the "Retrieving a Source" endpoint.
created_atThe time when this source was created in ChartMogul.
statusThe current data import status. Since the source created using the endpoint is always of type Custom, and the source has just been created, this will be idle. If data is currently being processed, then this would be working. See the "Retrieving a Source" endpoint for values for other types of sources.


Creating sources for integrations

To create a source for one or more integrations maintained by ChartMogul, such as Stripe, Braintree, Recurly, or PayPal, use the ChartMogul UI. To do so, choose "Data & Config", then "Sources", and then click "ADD SOURCE".