diff --git a/mint.json b/mint.json index 2f9b4e3..2a05a2f 100644 --- a/mint.json +++ b/mint.json @@ -455,9 +455,23 @@ ] }, { - "group": "User endpoints", + "group": "Annotation endpoints", "pages": [ - "restapi/endpoints/getCurrentUser" + "restapi/endpoints/getAnnotations", + "restapi/endpoints/getAnnotation", + "restapi/endpoints/createAnnotation", + "restapi/endpoints/updateAnnotation", + "restapi/endpoints/deleteAnnotation" + ] + }, + { + "group": "API token endpoints", + "pages": [ + "restapi/endpoints/getTokens", + "restapi/endpoints/getToken", + "restapi/endpoints/createToken", + "restapi/endpoints/regenerateToken", + "restapi/endpoints/deleteToken" ] }, { @@ -475,23 +489,14 @@ ] }, { - "group": "Annotation endpoints", - "pages": [ - "restapi/endpoints/getAnnotations", - "restapi/endpoints/getAnnotation", - "restapi/endpoints/createAnnotation", - "restapi/endpoints/updateAnnotation", - "restapi/endpoints/deleteAnnotation" - ] - }, - { - "group": "API token endpoints", + "group": "User endpoints", "pages": [ - "restapi/endpoints/getTokens", - "restapi/endpoints/getToken", - "restapi/endpoints/createToken", - "restapi/endpoints/regenerateToken", - "restapi/endpoints/deleteToken" + "restapi/endpoints/getCurrentUser", + "restapi/endpoints/getUsers", + "restapi/endpoints/getUser", + "restapi/endpoints/createUser", + "restapi/endpoints/updateUser", + "restapi/endpoints/deleteUser" ] } ], diff --git a/restapi/endpoints/createUser.mdx b/restapi/endpoints/createUser.mdx new file mode 100644 index 0000000..33f5bc9 --- /dev/null +++ b/restapi/endpoints/createUser.mdx @@ -0,0 +1,4 @@ +--- +title: Create user +openapi: "v2 post /users" +--- \ No newline at end of file diff --git a/restapi/endpoints/deleteUser.mdx b/restapi/endpoints/deleteUser.mdx new file mode 100644 index 0000000..b6825a7 --- /dev/null +++ b/restapi/endpoints/deleteUser.mdx @@ -0,0 +1,4 @@ +--- +title: Delete user +openapi: "v2 delete /users/{id}" +--- \ No newline at end of file diff --git a/restapi/endpoints/getCurrentUser.mdx b/restapi/endpoints/getCurrentUser.mdx index a260992..08a1e80 100644 --- a/restapi/endpoints/getCurrentUser.mdx +++ b/restapi/endpoints/getCurrentUser.mdx @@ -1,4 +1,4 @@ --- title: Retrieve current user -openapi: "v1 get /user" +openapi: "v2 get /user" --- \ No newline at end of file diff --git a/restapi/endpoints/getUser.mdx b/restapi/endpoints/getUser.mdx new file mode 100644 index 0000000..59c60be --- /dev/null +++ b/restapi/endpoints/getUser.mdx @@ -0,0 +1,4 @@ +--- +title: Retrieve user +openapi: "v2 get /users/{id}" +--- \ No newline at end of file diff --git a/restapi/endpoints/getUsers.mdx b/restapi/endpoints/getUsers.mdx new file mode 100644 index 0000000..b049f00 --- /dev/null +++ b/restapi/endpoints/getUsers.mdx @@ -0,0 +1,4 @@ +--- +title: List all users +openapi: "v2 get /users" +--- \ No newline at end of file diff --git a/restapi/endpoints/updateUser.mdx b/restapi/endpoints/updateUser.mdx new file mode 100644 index 0000000..0ca09c7 --- /dev/null +++ b/restapi/endpoints/updateUser.mdx @@ -0,0 +1,10 @@ +--- +title: Update user +openapi: "v2 put /users/{id}" +--- + + +Using this endpoint, you can change the name of your own user. Authorize the request with a [personal access token (PAT)](/reference/tokens). + +You cannot change the names of other users, you cannot change properties other than your name, and you cannot use an API token to authorize the request. + \ No newline at end of file diff --git a/restapi/versions/v2.json b/restapi/versions/v2.json index ecba7e5..77e73be 100644 --- a/restapi/versions/v2.json +++ b/restapi/versions/v2.json @@ -217,6 +217,214 @@ } } }, + "/user": { + "get": { + "description": "Get current user", + "tags": [ + "Users" + ], + "operationId": "getCurrentUser", + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-axiom-preview": true + } + }, + "/users": { + "get": { + "security": [ + { + "Auth": [ + "users|read" + ] + } + ], + "description": "Get users", + "tags": [ + "Users" + ], + "operationId": "getUsers", + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + }, + "x-axiom-preview": true + }, + "post": { + "security": [ + { + "Auth": [ + "users|create" + ] + } + ], + "description": "Create user", + "tags": [ + "Users" + ], + "operationId": "createUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-axiom-not-suspended": true, + "x-axiom-preview": true + } + }, + "/users/{id}": { + "get": { + "security": [ + { + "Auth": [ + "users|read" + ] + } + ], + "description": "Get user by ID", + "tags": [ + "Users" + ], + "operationId": "getUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-axiom-preview": true + }, + "put": { + "security": [ + { + "Auth": [ + "users|update" + ] + } + ], + "description": "Update user", + "tags": [ + "Users" + ], + "operationId": "updateUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "x-axiom-preview": true + }, + "delete": { + "security": [ + { + "Auth": [ + "users|delete" + ] + } + ], + "description": "Delete user", + "tags": [ + "Users" + ], + "operationId": "deleteUser", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "(empty)" + } + }, + "x-axiom-preview": true + } + }, "/tokens": { "get": { "security": [ @@ -482,6 +690,16 @@ } }, "requestBodies": { + "PostOrg": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostOrg" + } + } + }, + "required": true + }, "Monitor": { "content": { "application/json": { @@ -554,6 +772,9 @@ }, "orgCapabilities": { "$ref": "#/components/schemas/orgCapabilities" + }, + "samlAuthenticated": { + "type": "boolean" } } }, @@ -695,7 +916,7 @@ ], "properties": { "Modules": { - "description": "Modules is an optional set of module names => module sources that will be available to this query", + "description": "Key-value pairs of module names and module sources. Axiom will make modules available for this query later.", "type": "object", "additionalProperties": { "type": "string" @@ -1033,6 +1254,54 @@ } } }, + "ExternalPlan": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "endingBefore": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "nextBillingDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "planID": { + "type": "string" + }, + "planInstanceID": { + "type": "string" + }, + "startingOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "state": { + "type": "string", + "enum": [ + "active", + "inTrial", + "incubation", + "sunset", + "migration", + "empty" + ] + }, + "trialEndingBefore": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "trialed": { + "type": "boolean" + } + } + }, "FieldInfo": { "type": "object", "title": "FieldInfo captures information about a field used in the tabular result format. See Table.", @@ -1057,6 +1326,131 @@ } } }, + "License": { + "type": "object", + "required": [ + "id", + "tier", + "issuer", + "issuedTo", + "issuedAt", + "validFrom", + "monthlyIngestGb", + "monthlyQueryGbHours", + "apiRateLimitPerSecond", + "maxUsers", + "maxTeams", + "maxDatasets", + "maxMonitors", + "maxFields", + "maxEndpoints", + "maxQueryWindowSeconds", + "maxAuditWindowSeconds", + "withRBAC", + "withAuths", + "features" + ], + "properties": { + "apiRateLimitPerSecond": { + "type": "integer", + "format": "uint64" + }, + "expiresAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "features": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "id": { + "type": "string" + }, + "issuedAt": { + "type": "string", + "format": "date-time" + }, + "issuedTo": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "maxAuditWindowSeconds": { + "type": "integer", + "format": "uint64" + }, + "maxDatasets": { + "type": "integer", + "format": "uint64" + }, + "maxEndpoints": { + "type": "integer", + "format": "uint64" + }, + "maxFields": { + "type": "integer", + "format": "uint64" + }, + "maxMonitors": { + "type": "integer", + "format": "uint64" + }, + "maxQueryWindowSeconds": { + "type": "integer", + "format": "uint64" + }, + "maxTeams": { + "type": "integer", + "format": "uint64" + }, + "maxUsers": { + "type": "integer", + "format": "uint64" + }, + "monthlyIngestGb": { + "type": "integer", + "format": "uint64" + }, + "monthlyQueryGbHours": { + "type": "integer", + "format": "uint64" + }, + "monthlyStorageGb": { + "type": "integer", + "format": "uint64" + }, + "tier": { + "type": "string", + "enum": [ + "personal", + "basicDirect", + "teamMonthlyDirect", + "teamMonthlyAws", + "growth", + "teamPlus", + "enterprise", + "comped" + ] + }, + "validFrom": { + "type": "string", + "format": "date-time" + }, + "withAuths": { + "type": "array", + "items": { + "type": "string" + } + }, + "withRBAC": { + "type": "boolean" + } + } + }, "Message": { "type": "object", "required": [ @@ -1337,6 +1731,81 @@ } } }, + "Org": { + "type": "object", + "required": [ + "id", + "name", + "plan", + "planCreated", + "lastUsageSync", + "paymentStatus", + "role", + "primaryEmail", + "license", + "externalPlan" + ], + "properties": { + "externalPlan": { + "$ref": "#/components/schemas/ExternalPlan" + }, + "firstFailedPayment": { + "type": "string" + }, + "id": { + "type": "string" + }, + "lastUsageSync": { + "type": "string" + }, + "license": { + "$ref": "#/components/schemas/License" + }, + "metaCreated": { + "type": "string" + }, + "metaModified": { + "type": "string" + }, + "metaVersion": { + "type": "string" + }, + "name": { + "type": "string" + }, + "paymentStatus": { + "type": "string", + "enum": [ + "na", + "failed", + "success", + "blocked" + ] + }, + "plan": { + "type": "string", + "enum": [ + "personal", + "basicDirect", + "teamMonthlyDirect", + "teamMonthlyAws", + "growth", + "teamPlus", + "enterprise", + "comped" + ] + }, + "planCreated": { + "type": "string" + }, + "primaryEmail": { + "type": "string" + }, + "role": { + "type": "string" + } + } + }, "PagerDutyConfig": { "properties": { "routingKey": { @@ -1347,6 +1816,17 @@ } } }, + "PostOrg": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, "RangeInfo": { "type": "object", "title": "RangeInfo specifies the window a query was restricted to.",