get https://api.chartmogul.com/v1/data_sources/
Retrieves a data_source
object from your ChartMogul account.
Examples
curl -X GET "https://api.chartmogul.com/v1/data_sources/ds_fef05d54-47b4-431b-aed2-eb6b9e545430" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json"
ChartMogul::DataSource.retrieve( 'ds_fef05d54-47b4-431b-aed2-eb6b9e545430')
ChartMogul.DataSource.retrieve(config, "ds_fef05d54-47b4-431b-aed2-eb6b9e545430", function(err, res) {
// asynchronously called
});
<?php
ChartMogul\DataSource::retrieve("ds_fef05d54-47b4-431b-aed2-eb6b9e545430");
?>
api.RetrieveDataSource("ds_fef05d54-47b4-431b-aed2-eb6b9e545430")
chartmogul.DataSource.retrieve(config, uuid='ds_fef05d54-47b4-431b-aed2-eb6b9e545430')
Result Format
{
"uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
"name": "In-house billing",
"system": "Custom",
"created_at": "2016-01-10 15:34:05",
"status": "idle"
}
#<ChartMogul::DataSource:0x007ff9f127d628
@uuid="ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
@name="In-house billing",
@system="Custom",
@status="idle",
@created_at=2016-06-27 11:27:37 UTC
>
{
"uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
"name": "In-house billing",
"system": "Custom",
"created_at": "2016-01-10 15:34:05",
"status": "idle"
}
ChartMogul\DataSource::__set_state(array(
"uuid" => "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
"status" => "idle",
"system" => "Custom",
"created_at" => "2016-12-27T07:55:08.585Z",
"name" => "In-house billing"
));
(*chartmogul.DataSource)(0xc042048380)({
UUID: (string) (len=39) "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
Name: (string) (len=16) "In-house billing",
CreatedAt: (string) (len=24) "2017-02-08T12:19:18.346Z",
Status: (string) (len=4) "idle",
System: (string) (len=10) "Custom"
})
<DataSource{
created_at=datetime.datetime(2017, 2, 8, 11, 50, 40),
name='abc',
status='idle',
uuid='ds_fef05d54-47b4-431b-aed2-eb6b9e545430',
system='Custom'}>
In the response, data_sources
contains an array of data_source
objects that you've created, with the following data:
uuid
- The UUID of thedata_source
object generated by ChartMogul.name
- The name of the data source as specified by you.system
- The type of system from which customer billing data is imported using this data source. For example,Stripe
,Recurly
,GoCardless
,Chargify
,Custom
, and so on.created_at
- The time when this data source was created in the ChartMogul system.status
- The current status of the data import into ChartMogul. For data sources based on integrations maintained by ChartMogul (ie.Stripe
,Braintree
, etc.), if there is no data then status will benever_imported
. If there is data that is being processed then status will beimporting
. If all data has been processed then status will beimport_complete
. For data sources based on ourCustom
data source, if data is currently being processed then status will beworking
and if there's no data being processed then status will beidle
.