Add data
client.data.add(stringnamespace, DataAddParams { data, schema } body?, RequestOptionsoptions?): DataAddResponse { requestId, status }
/v1/data/{namespace}
Add data to a namespace. This method returns immediately; data is processed asynchronously.
Parameters
namespace: string
The namespace to ingest data into
Returns
Add data
import Safetykit from 'safetykit';
const client = new Safetykit({
apiKey: process.env['SAFETYKIT_API_KEY'], // This is the default and can be omitted
});
const response = await client.data.add('namespace', {
data: null,
schema: {
profile_image: { content_type: 'image_url' },
cover_photo: { content_type: 'image_url' },
website: { content_type: 'website_url' },
},
});
console.log(response.requestId);
{
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}
Returns Examples
{
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}