Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Get started

IntroductionSend dataQuery dataPaginationAPI limits

Annotations

List all annotationsGETRetrieve annotationGETCreate annotationPOSTUpdate annotationPUTDelete annotationDELETE

API tokens

List all API tokensGETRetrieve API tokenGETCreate API tokenPOSTRegenerate API tokenPOSTDelete API tokenDELETE

Dashboards

Dashboard JSONList all dashboardsGETRetrieve dashboardGETCreate dashboardPOSTUpdate dashboardPUTPatch dashboard elementPATCHDelete dashboardDELETE

Datasets

List all datasetsGETRetrieve datasetGETList all fields in datasetGETRetrieve field in datasetGETCreate datasetPOSTIngest data (legacy)POSTRun queryPOSTRun query (legacy)POSTTrim datasetPOSTUpdate datasetPUTUpdate fieldPUTVacuum datasetPOSTDelete fieldsPOSTDelete fieldDELETEDelete datasetDELETE

Edge

Ingest data to edge deploymentIngest Splunk HEC eventsIngest raw Splunk HEC eventsCheck Splunk HEC healthRun APL query to edge deploymentRun batch query to edge deploymentRun MPL query to edge deploymentGet metrics for a datasetGet metric tags for a datasetGet metric tag values for a datasetGet tags for a datasetGet tag values for a dataset

Map fields

List all map fieldsGETCreate map fieldPOSTUpdate list of map fieldsPUTDelete map fieldsDELETE

Monitors

List all monitorsGETRetrieve monitorGETRetrieve monitor notification historyGETCreate monitorPOSTUpdate monitorPUTDelete monitorDELETE

Notifiers

List all notifiersGETRetrieve notifierGETCreate notifierPOSTUpdate notifierPUTDelete notifierDELETE

Organizations

List all orgsGETRetrieve orgGETCreate orgPOSTUpdate orgPUTProvision orgPOST

Role-based access control

List all rolesGETRetrieve roleGETList all groupsGETRetrieve groupGETCreate rolePOSTCreate groupPOSTUpdate rolePUTUpdate groupPUTDelete roleDELETEDelete groupDELETE

Saved queries

List all saved queriesGETRetrieve saved queryGETCreate saved queryPOSTUpdate saved queryPUTDelete saved queryDELETE

Users

Retrieve current userGETList all usersGETRetrieve userGETCreate userPOSTUpdate current userPUTUpdate user rolePUTDelete user from orgDELETE

Views

List all viewsGETRetrieve viewGETCreate viewPOSTUpdate viewPUTDelete viewDELETE

Virtual fields

List all virtual fieldsGETRetrieve virtual fieldGETCreate virtual fieldPOSTUpdate virtual fieldPUTDelete virtual fieldDELETE
Views

Create view

POST/v2/views

Creates a view, a named APL query that you can query like a dataset. Axiom derives datasets from aplQuery. The name can't match an existing dataset or view, and the query can't reference views or use wildcards.

Body

application/json
PropertyTypeDescription
aplQuerystringRequiredAPL query that defines the view
datasetsstring[]Datasets the view queries. Axiom derives this from aplQuery and ignores it in requests.
descriptionstring—
namestringRequiredName of the view. Use it as the view ID and to query the view like a dataset.
sharedByOrgstringID of the org that shared this resource, if it's shared
sharedByOrgNamestringThe name of the org that shared this resource, if it's shared

Request

curl -X POST 'https://api.axiom.co/v2/views' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"aplQuery":"string","datasets":["string"],"description":"string","name":"string","sharedByOrg":"string","sharedByOrgName":"string"}'
Try itRun this request against your Axiom organization

Credentials stay in this browser tab and are only sent to Axiom when you run the request.

Response

200Created view.
application/json
400Invalid view, for example an APL parse error, a name that's already in use, or a query that references a view or datasets in different regions.
403You don't have query access to a dataset that `aplQuery` references.
PropertyTypeDescription
aplQuerystringRequiredAPL query that defines the view
datasetsstring[]Datasets the view queries. Axiom derives this from aplQuery and ignores it in requests.
descriptionstring—
namestringRequiredName of the view. Use it as the view ID and to query the view like a dataset.
sharedByOrgstringID of the org that shared this resource, if it's shared
sharedByOrgNamestringThe name of the org that shared this resource, if it's shared
Was this page helpful?
Suggest edits on GitHub
PreviousRetrieve viewNextUpdate view
On this page
BodyRequestResponse