Sirdata API
Semantic APISirdata CMP - APIAbout Sirdata
  • Sirdata API
  • Overview
    • API Access
    • Sandbox
    • API Updates
  • Authentification
    • Get Token
  • Taxonomy
    • Sirdata Taxonomy
    • IAB Taxonomy
    • 3rd Party Taxonomy
  • A.D.S API
    • About A.D.S
    • Tag integration V1
    • Tag integration V2
    • Test method
    • Segment Access
  • Notification API
    • About Notification API
    • Audience
    • Campaign
    • Webhook endpoint
  • 😎Customer API
    • About Customer API
    • Create storage
    • Create Filter (counting)
    • Create order
    • Segment list
  • Semantic API
  • Sirdata CMP
  • About Sirdata
  • Sirdata API SLA
Powered by GitBook
On this page

Was this helpful?

  1. Customer API

Create storage

Upload your database

PreviousAbout Customer APINextCreate Filter (counting)

Last updated 3 years ago

Was this helpful?

In dev contact please avoid to create multiple Storage with 10000 lines maximum

API Reference:

A Storage can be created using an multipart POST

const form = new FormData();
form.append("name", "my first storage");
form.append("content_type", "text/csv");
// csv separator
form.append("csv_separator", ",");
// column name inside the file
form.append("csv_column_names", "[\"SHA256\",\"POSTAL_CODE\"]");
form.append("file", "/path/to/file");
// indicate if csv contains a header to remove
form.append("csv_has_header", "1");
// indicate column position containing the hash (position start at 1, index at 0)
form.append("csv_mapping_column_position", "1");

fetch("https://gateway.sirdata.io/api/v1/public/customer/storage?=", {
  "method": "POST",
  "headers": {
    "x-api-token": "XXXXX-XXXXX-XXXXX-XXXXX",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});

Check the status code, if 200 then it's ok. Now you must iterate on Storage to obtains the loading status until you got OK or ERROR.

Get Storage data (and status) If status is OK you will have some important information on your storage. For example in table_intersect.segment.distinct_mapping_column_values you can see the unique hash count Sirdata has data on. When this part is done you'll be able to create a Filter, allowing you to get statistics on selected segments for your Storage, keep Storage id.

😎
https://openapi.sirdata.io/customer/#tag/storage/paths/~1customer~1storage/post
https://openapi.sirdata.io/customer/#tag/storage/paths/~1customer~1storage~1{id}/get