POST /v1/datamarts//documents_imports
. Let's create a document import for user activities that we will call "My user activity document import". You will need to replace <DATAMART_ID>
with your datamart id (which can be found in the UI in Settings > Datamart > Datamarts) and <YOUR_API_TOKEN>
with your authentication token.document_type
we have chosen USER_ACTIVITY
in order to send user activities. Other valid values would be USER_SEGMENT
, USER_PROFILE
, USER_IDENTIFIERS_ASSOCIATION_DECLARATIONS
mime_type
should match the type of format you will use for your data. Valid values are APPLICATION_X_NDJSON
(if you will send data in a NDJSON
format) or TEXT_CSV
(if you format your data as comma-separated values). In the case of USER_ACTIVITY
, only NDJSON
is validencoding
is the encoding of the data that will be importedname
is the name you want to give this document import<DOCUMENT_IMPORT_ID>
.JSON
file:JSON
file to NDJSON
and send in the body of the following request. If you want to learn more about the NDJSON format, check out this site.<DATAMART_ID>
with your datamart id, <DOCUMENT_IMPORT_ID>
with the document import id you got in the previous request and <YOUR_API_TOKEN>
with your authentication token.Content-Type
header must match the mime_type
you set when creating the document import earlier.<DOCUMENTATION_IMPORT_EXECUTION_ID>
here, you will need it if you want to check the status of your execution.PENDING
status: after a while, the execution will be processed and if you check again, status will be changed to RUNNING
then to SUCCEEDED
.