NOTE
This article covers the basic process of creating a Pulsar job. Typically, this is done in the context of setting up private or custom data ingestion. To learn more, refer to the following articles:
This article covers the basic process of creating a Pulsar job. Typically, this is done in the context of setting up private or custom data ingestion. To learn more, refer to the following articles:
- Configuring private data (via JS tag)
- Configuring custom data (via beaconing)
After creating a Pulsar application, you will create Pulsar jobs and associate the job(s) with the application (using the appID). A job corresponds to a specific resource (CDN, data center, cloud, etc.) being measured. The resource hosts an asset used to measure availability and latency when the JavaScript tag is run by users. The jobID is applied to an answer within the DNS resource record. Use the PUT request below to create a Puslar job within your app—auto-generating a jobID.
curl -X PUT -H 'X-NSONE-Key: $API_KEY' -d '{"name": "{JOB_NAME}", "typeid": "latency", "active": true}' https://api.nsone.net/v1/pulsar/apps/<appId>/jobs
where
- name is the name of the job (typically, the CDN or endpoint).
- typeid is the type of Pulsar job—either latency or custom.
- <appID> is the unique identifier generated in the response after creating an application (ex. x4f12h0).
Example response:
{
"customer": 0,
"appid": "x4f12h0",
"jobid": "d45ma0",
"name": "CDN A",
"typeid": "latency",
"active": true,
"community": true,
"shared": true,
"config": {
"host": "string",
"url_path": "string",
"http": true,
"https": true,
"request_timeout_millis": 0,
"job_timeout_millis": 0,
"use_xhr": true,
"blend_metric_weights": {
"timestamp": 0,
"weights": [
{
"name": "string",
"weight": 0,
"default_value": 0,
"maximize": false
}
]
}
}
}
Note the jobID value (ex. d45ma0) in the response. If you plan to apply the jobID to the answer metadata via API, you will need the jobID. If using the NS1 portal, you will only need the job name.