Data Sources API
The Analytics 2.0 Data Sources API endpoints provide methods for you to create, view, delete, and upload to Data Sources accounts. See the Data Sources overview for more information regarding Data Sources services and functions.
The endpoints described in this guide are routed through analytics.adobe.io. To use them, you must first create a client with access to the Adobe Developer Console. For more information, see Getting started with the Analytics API for more information.
Data Sources Accounts
These endpoints provide methods for viewing, creating, and deleting Data Sources accounts:
- GET all accounts: Retrieves all Data Sources accounts for a given rsid
- GET a single account: Retrieves a single Data Sources account by ID
- POST an account: Create a Data Sources account
- DELETE account: Deletes a Data Sources account
Data Sources Jobs
Use Data Sources Jobs endpoints to upload and view data to a Data Sources account:
- POST data: Uploads a file to a Data Sources account
- GET all jobs: Retrieves all jobs associated with a Data Sources account
- GET a single job: Retrieves a single job by ID
data-variant=info
data-slots=text
GET all accounts
Use this endpoint to list all Data Sources accounts for a given report suite ID. For more information regarding Data Sources accounts, see the Getting started with data sources guide.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/{REPORT_SUITE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'GET' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/examplersid" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
[
{
"name": "Example Location 1",
"email": "john@example.com",
"data_source_id": 2,
"type": "generic",
"date_created": "YYYY-03-19",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_4685934",
"ftp_password": "example_password"
},
{
"name": "Example Location 2",
"email": "john@example.com",
"data_source_id": 308,
"type": "generic",
"date_created": "YYYY-08-08",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_4217476",
"ftp_password": "example_password"
},
{
"name": "Example Location 3",
"email": "john@example.com",
"data_source_id": 404,
"type": "generic",
"date_created": "YYYY-04-16",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_01883528",
"ftp_password": "example_password"
},
{
"name": "Example Location 4",
"email": "john@example.com",
"data_source_id": 405,
"type": "generic",
"date_created": "YYYY-04-23",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_211487109",
"ftp_password": "example_password"
}
]
Request example details
The example above requests all Data Sources accounts for the examplersid report suite ID.
Response example details
The example above lists four Data Sources accounts with the following details:
- In this case, each account name represents a data source location.
- A
data_source_idis provided for working with specific accounts. - An email contact for the account.
- A date for the account creation.
- Each account has an
ftp_usernameandftp_passwordfor use in the Data Sources manager. By default, FTP accounts are created with each Data Sources account.
Request Parameters
The GET all accounts endpoint includes the following request parameter:
rsidResponse Parameters
The following table describes the GET all accounts response parameters:
nameemaildata_source_idtypeftp_hostnameftp_usernameftp_passwordGET a single account
Use this endpoint to retrieve information about a single Data Sources account. For more information regarding Data Sources accounts, see the Getting started with data sources guide.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/{REPORT_SUITE_ID}/{DATA_SOURCE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'GET' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/examplersid/621" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"name": "Example Location 2",
"email": "john@example.com",
"data_source_id": 621,
"type": "generic",
"date_created": "YYYY-08-08",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_4217476",
"ftp_password": "example_password"
}
Request example details
The example above requests the Data Sources account associated with the ID 621.
Response example details
The example above returns the account 621 with the following details:
- The account is named
Example Location 2. - The
data_source_idis621. - The FTP account information associated with this Data Sources account. For more information see the Data Sources manager.
Request Parameters
The following table describes the GET a single Data Sources account request parameters:
rsiddata_source_idResponse Parameters
The following table describes the GET a single Data Sources account response parameters:
nameemaildata_source_idtypeftp_hostnameftp_usernameftp_passwordPOST an account
Use this endpoint to create a Data Sources account. For more information regarding Data Sources accounts, see the Getting started with data sources guide.
POST https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/{REPORT_SUITE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'POST' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/examplersid?type=generic&name=Test_Account&email=john%40example.com" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"name": "Test_Account",
"email": "john@example.com",
"data_source_id": 741,
"type": "generic",
"date_created": "YYYY-08-08",
"ftp_hostname": "ftp4.omniture.com",
"ftp_username": "examplersid_4217476",
"ftp_password": "example_password"
}
Request example details
The account details are specified as query parameters, including the required rsid. The example above creates an account with the following details:
- The account
typeisgeneric. For more information see Data Sources manager. - The account
nameisTest_Account. - The
emailnotifications adress is specified asjohn%40example.com. Note that query parameters cannot contain true@characters, and must be replaced with%40as shown in the example.
Response example details
The successful example above responds with the following details:
- The account
nameis confirmed asTest_Account. - The
data_source_idis741. - An FTP account was created with the Data Sources account. The FTP account details include an
ftp_hostname, anftp_username, and anftp_password. For more information see the Data Sources manager.
Request Parameters
The following table describes the create a Data Sources account request parameters:
rsidtypenameemailResponse Parameters
The following table describes the create a Data Sources account response parameters:
nameemaildata_source_idtypeftp_hostnameftp_usernameftp_passwordDELETE account
Use this endpoint to delete a Data Sources account. This action cannot be undone. For more information regarding Data Sources accounts, see the Getting started with data sources guide.
DELETE https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/{REPORT_SUITE_ID}/{DATA_SOURCE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'DELETE' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/account/examplersid/741" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"success": true,
"message": "Account deleted"
}
Request example details
The example above requests to DELETE the Data Sources account with the 741 ID.
Response example details
The example above responds the deletion was successful.
Request Parameters
The following table describes the DELETE Data Sources account request parameters:
rsiddata_source_idResponse Parameters
The following table describes the DELETE Data Sources account response parameters:
successmessagePOST data
Use this endpoint to upload a data file to an existing Data Sources account. For more information on data uploads, see the Upload data sources file to Adobe guide.
POST https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/job/{REPORT_SUITE_ID}/{DATA_SOURCE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X POST \
'https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/job/examplersid/621' \
--H 'Accept: application/json' \
--H 'x-api-key: {CLIENT_ID}' \
--H 'Authorization: Bearer {ACCESS_TOKEN}' \
--F 'file="@/home/user/documents/example_upload.txt"'
Response
{
"filename": "example_upload.txt",
"rows": 3,
"job_id": 33376793,
"status": "uploaded",
"uploaded_date": "YYYY-10-25 13:22:31",
"started_processing_date": null,
"finished_processing_date": null
}
Request example details
The example above requests the following:
- To upload the file
example_upload.txtto the Data Sources account with the ID621. - The file to be uploaded is specified in the
--Fsection of the request. Afile=precedes the file path, which is specified by an@and contained within quotation marks. For more information on what files can be uploaded to Adobe, see the File Format guide.
Response example details
The example response above contains the following details:
- The file upload is associated with a
job_id:33376793. - The successful upload is indicated by
status:uploaded. - Adobe performs a processing operation associated with the
job_id. This is indicated by astarted_processing_dateand afinished_processing_date. These parameters are shown in the response asnullbecause the job may take a few minutes to commence.
Request Parameters
The following table describes the upload data request parameters:
rsiddata_source_idfile@ symbol must precede the location to ensure the request is properly sent. Certain API clients such as Postman have features that will automatically format your call to include the file upload details. In these cases, refer to the client documentation for specific formatting.Response Parameters
The following table describes the upload data response parameters:
filenamerowsjob_idstatusuploaded_datestarted_processing_datefinished_processing_dateGET all jobs
Use this endpoint to retrieve all jobs associated with a Data Sources account. Jobs are automatically created with each file upload.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/job/{REPORT_SUITE_ID}/{DATA_SOURCE_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'GET' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/job/examplersid/15?status=success" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"page": 1,
"jobs": [
{
"filename": "uploaddata_for_october.tab",
"rows": 3,
"job_id": 33376779,
"status": "success",
"uploaded_date": "YYYY-10-25 13:22:31",
"started_processing_date": "YYYY-10-25 13:23:01",
"finished_processing_date": "YYYY-10-25 13:23:03"
},
{
"filename": "uploaddata_for_november.tab",
"rows": 3,
"job_id": 33376787,
"status": "success",
"uploaded_date": "YYYY-11-25 11:41:21",
"started_processing_date": "YYYY-11-25 11:42:01",
"finished_processing_date": "YYYY-11-25 11:42:03"
}
],
"total_pages": 1
}
Request example details
The example above requests the following:
- The jobs belonging to the Data Sources account ID
15. - Return only jobs filtered for
successstatus.
Response example details
The example above returns the following:
- Two jobs have the
successstatus that belong to this account:uploaddata_for_october.tabanduploaddata_for_november.tab. - The respective
job_idfor the jobs:uploaddata_for_october.tabanduploaddata_for_november.tab.
Request Parameters
The following table describes the GET all jobs request parameters:
rsiddata_source_idstatusuploaded, processing, success, failure, and deleted.start_dateend_date. The default date is one month prior to the current date. Format as "yyyy-mm-dd hhss".end_datestart_date. It defaults to today. Format as "yyyy-mm-dd hhss".page1 is the first page. If this value exceeds the available pages, no results will be returned.Response Parameters
The following table describes the GET all jobs response parameters:
page1 is the first page.jobsfilename, rows, job_id, status, uploaded_date, started_processing_date, and finished_processing_date parameters.filenamerowsjob_idstatusuploaded_datestarted_processing_datefinished_processing_datetotal_pagesGET a single job
Use this endpoint to retrieve information regarding a single job by its job ID.
GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/datasources/job/{REPORT_SUITE_ID}/{DATA_SOURCE_ID}/{JOB_ID}
Request and Response Examples
Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.
data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON
Request
curl -X 'GET' \
"https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/job/examplersid/15/33376779" \
-H "accept: application/json" \
-H "x-api-key: {CLIENT_ID}" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
Response
{
"filename": "uploaddata_for_october.tab",
"rows": 3,
"job_id": 33376779,
"status": "success",
"uploaded_date": "YYYY-10-25 13:22:31",
"started_processing_date": "YYYY-10-25 13:23:01",
"finished_processing_date": "YYYY-10-25 13:23:03"
}
Request example details
The example above requests information regarding the job 33376779.
Response example details
The example above returns the following:
- The
filenameof the job isuploaddata_for_october.tab. - The
statusof the job issuccess.
Request Parameters
The following table describes the GET a single job request parameters:
rsiddata_source_idjob_idResponse Parameters
The following table describes the GET a single job response parameters:
filenamerowsjob_idstatusuploaded_datestarted_processing_datefinished_processing_dateStatus codes
Each API request returns an HTTP status code that reflects the result, as follows:
For more information, or for trouble-shooting help, see the following: