mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-15 23:16:36 +00:00
3153 lines
87 KiB
JSON
3153 lines
87 KiB
JSON
{
|
|
"openapi" : "3.0.1",
|
|
"info" : {
|
|
"title" : "NetBird REST API",
|
|
"description" : "API to manipulate groups, rules, policies and retrieve information about peers and users",
|
|
"version" : "0.0.1"
|
|
},
|
|
"servers" : [ {
|
|
"url" : "https://netbird.io",
|
|
"description" : "Default server"
|
|
} ],
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ],
|
|
"tags" : [ {
|
|
"name" : "Users",
|
|
"description" : "Interact with and view information about users."
|
|
}, {
|
|
"name" : "Tokens",
|
|
"description" : "Interact with and view information about tokens."
|
|
}, {
|
|
"name" : "Peers",
|
|
"description" : "Interact with and view information about peers."
|
|
}, {
|
|
"name" : "Setup Keys",
|
|
"description" : "Interact with and view information about setup keys."
|
|
}, {
|
|
"name" : "Groups",
|
|
"description" : "Interact with and view information about groups."
|
|
}, {
|
|
"name" : "Rules",
|
|
"description" : "Interact with and view information about rules."
|
|
}, {
|
|
"name" : "Policies",
|
|
"description" : "Interact with and view information about policies."
|
|
}, {
|
|
"name" : "Routes",
|
|
"description" : "Interact with and view information about routes."
|
|
}, {
|
|
"name" : "DNS",
|
|
"description" : "Interact with and view information about DNS configuration."
|
|
}, {
|
|
"name" : "Events",
|
|
"description" : "View information about the account and network events."
|
|
}, {
|
|
"name" : "Accounts",
|
|
"description" : "View information about the accounts."
|
|
} ],
|
|
"paths" : {
|
|
"/api/accounts" : {
|
|
"get" : {
|
|
"tags" : [ "Accounts" ],
|
|
"summary" : "List all Accounts",
|
|
"description" : "Returns a list of accounts of a user. Always returns a list of one account.",
|
|
"operationId" : "getAccounts",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON array of accounts",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Account"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/accounts/{accountId}" : {
|
|
"put" : {
|
|
"tags" : [ "Accounts" ],
|
|
"summary" : "Update an Account",
|
|
"description" : "Update information about an account",
|
|
"operationId" : "updateAccount",
|
|
"parameters" : [ {
|
|
"name" : "accountId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of an account",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "update an account",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/AccountSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "An Account object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Account"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/users" : {
|
|
"get" : {
|
|
"tags" : [ "Users" ],
|
|
"summary" : "Retrieve Users",
|
|
"description" : "Returns a list of all users",
|
|
"operationId" : "getUsers",
|
|
"parameters" : [ {
|
|
"name" : "service_user",
|
|
"in" : "query",
|
|
"description" : "Filters users and returns either regular users or service users",
|
|
"required" : false,
|
|
"style" : "form",
|
|
"explode" : true,
|
|
"schema" : {
|
|
"type" : "boolean"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON array of Users",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Users" ],
|
|
"summary" : "Create a User",
|
|
"description" : "Creates a new service user or sends an invite to a regular user",
|
|
"operationId" : "createUser",
|
|
"requestBody" : {
|
|
"description" : "User invite information",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/UserCreateRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A User object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/users/{userId}" : {
|
|
"put" : {
|
|
"tags" : [ "Users" ],
|
|
"summary" : "Update a User",
|
|
"description" : "Update information about a User",
|
|
"operationId" : "updateUser",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "User update",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/UserRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A User object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Users" ],
|
|
"summary" : "Delete a User",
|
|
"description" : "Delete a User",
|
|
"operationId" : "deleteUser",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/users/{userId}/tokens" : {
|
|
"get" : {
|
|
"tags" : [ "Tokens" ],
|
|
"summary" : "List all Tokens",
|
|
"description" : "Returns a list of all tokens for a user",
|
|
"operationId" : "getTokens",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of PersonalAccessTokens",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/PersonalAccessToken"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Tokens" ],
|
|
"summary" : "Create a Token",
|
|
"description" : "Create a new token for a user",
|
|
"operationId" : "createToken",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "PersonalAccessToken create parameters",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PersonalAccessTokenRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "The token in plain text",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PersonalAccessTokenGenerated"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/users/{userId}/tokens/{tokenId}" : {
|
|
"get" : {
|
|
"tags" : [ "Tokens" ],
|
|
"summary" : "Retrieve a Token",
|
|
"description" : "Returns a specific token for a user",
|
|
"operationId" : "getToken",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
}, {
|
|
"name" : "tokenId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a token",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A PersonalAccessTokens Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PersonalAccessToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Tokens" ],
|
|
"summary" : "Delete a Token",
|
|
"description" : "Delete a token for a user",
|
|
"operationId" : "deleteToken",
|
|
"parameters" : [ {
|
|
"name" : "userId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a user",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
}, {
|
|
"name" : "tokenId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a token",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/peers" : {
|
|
"get" : {
|
|
"tags" : [ "Peers" ],
|
|
"summary" : "List all Peers",
|
|
"description" : "Returns a list of all peers",
|
|
"operationId" : "getPeers",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Peers",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Peer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/peers/{peerId}" : {
|
|
"get" : {
|
|
"tags" : [ "Peers" ],
|
|
"summary" : "Retrieve a Peer",
|
|
"description" : "Get information about a peer",
|
|
"operationId" : "getPeer",
|
|
"parameters" : [ {
|
|
"name" : "peerId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a peer",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Peer object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Peer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Peers" ],
|
|
"summary" : "Update a Peer",
|
|
"description" : "Update information about a peer",
|
|
"parameters" : [ {
|
|
"name" : "peerId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a peer",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "update a peer",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PeerRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Peer object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Peer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Peers" ],
|
|
"summary" : "Delete a Peer",
|
|
"description" : "Delete a peer",
|
|
"parameters" : [ {
|
|
"name" : "peerId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a peer",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/setup-keys" : {
|
|
"get" : {
|
|
"tags" : [ "Setup Keys" ],
|
|
"summary" : "List all Setup Keys",
|
|
"description" : "Returns a list of all Setup Keys",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Setup keys",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/SetupKey"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Setup Keys" ],
|
|
"summary" : "Create a Setup Key",
|
|
"description" : "Creates a Setup Key",
|
|
"requestBody" : {
|
|
"description" : "New Setup Key request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/SetupKeyRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Setup Keys Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/SetupKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/setup-keys/{keyId}" : {
|
|
"get" : {
|
|
"tags" : [ "Setup Keys" ],
|
|
"summary" : "Retrieve a Setup Key",
|
|
"description" : "Get information about a Setup Key",
|
|
"parameters" : [ {
|
|
"name" : "keyId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a setup key",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Setup Key object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/SetupKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Setup Keys" ],
|
|
"summary" : "Update a Setup Key",
|
|
"description" : "Update information about a Setup Key",
|
|
"parameters" : [ {
|
|
"name" : "keyId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a setup key",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "update to Setup Key",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/SetupKeyRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Setup Key object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/SetupKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/groups" : {
|
|
"get" : {
|
|
"tags" : [ "Groups" ],
|
|
"summary" : "List all Groups",
|
|
"description" : "Returns a list of all Groups",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Groups",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Group"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Groups" ],
|
|
"summary" : "Create a Group",
|
|
"description" : "Creates a Group",
|
|
"requestBody" : {
|
|
"description" : "New Group request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/GroupRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Group Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Group"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/groups/{groupId}" : {
|
|
"get" : {
|
|
"tags" : [ "Groups" ],
|
|
"summary" : "Retrieve a Group",
|
|
"description" : "Get information about a Group",
|
|
"parameters" : [ {
|
|
"name" : "groupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Group object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Group"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Groups" ],
|
|
"summary" : "Update a Group",
|
|
"description" : "Update/Replace a Group",
|
|
"parameters" : [ {
|
|
"name" : "groupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "Update Group request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/GroupRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Group object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Group"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Groups" ],
|
|
"summary" : "Delete a Group",
|
|
"description" : "Delete a Group",
|
|
"parameters" : [ {
|
|
"name" : "groupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/rules" : {
|
|
"get" : {
|
|
"tags" : [ "Rules" ],
|
|
"summary" : "List all Rules",
|
|
"description" : "Returns a list of all Rules",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Rules",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Rule"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Rules" ],
|
|
"summary" : "Create a Rule",
|
|
"description" : "Creates a Rule",
|
|
"requestBody" : {
|
|
"description" : "New Rule request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/RuleRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Rule Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Rule"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/rules/{ruleId}" : {
|
|
"get" : {
|
|
"tags" : [ "Rules" ],
|
|
"summary" : "Retrieve a Rule",
|
|
"description" : "Get information about a Rules",
|
|
"parameters" : [ {
|
|
"name" : "ruleId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a rule",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Rule object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Rule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Rules" ],
|
|
"summary" : "Update a Rule",
|
|
"description" : "Update/Replace a Rule",
|
|
"parameters" : [ {
|
|
"name" : "ruleId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a rule",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "Update Rule request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/RuleRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Rule object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Rule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Rules" ],
|
|
"summary" : "Delete a Rule",
|
|
"description" : "Delete a Rule",
|
|
"parameters" : [ {
|
|
"name" : "ruleId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a rule",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/policies" : {
|
|
"get" : {
|
|
"tags" : [ "Policies" ],
|
|
"summary" : "List all Policies",
|
|
"description" : "Returns a list of all Policies",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Policies",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Policy"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Policies" ],
|
|
"summary" : "Create a Policy",
|
|
"description" : "Creates a Policy",
|
|
"requestBody" : {
|
|
"description" : "New Policy request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PolicyMinimum"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Policy Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Policy"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/policies/{policyId}" : {
|
|
"get" : {
|
|
"tags" : [ "Policies" ],
|
|
"summary" : "Retrieve a Policy",
|
|
"description" : "Get information about a Policies",
|
|
"parameters" : [ {
|
|
"name" : "policyId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a policy",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Policy object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Policy"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Policies" ],
|
|
"summary" : "Update a Policy",
|
|
"description" : "Update/Replace a Policy",
|
|
"parameters" : [ {
|
|
"name" : "policyId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a policy",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "Update Policy request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/PolicyMinimum"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Policy object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Policy"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Policies" ],
|
|
"summary" : "Delete a Policy",
|
|
"description" : "Delete a Policy",
|
|
"parameters" : [ {
|
|
"name" : "policyId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a policy",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/routes" : {
|
|
"get" : {
|
|
"tags" : [ "Routes" ],
|
|
"summary" : "List all Routes",
|
|
"description" : "Returns a list of all routes",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Routes",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Route"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "Routes" ],
|
|
"summary" : "Create a Route",
|
|
"description" : "Creates a Route",
|
|
"requestBody" : {
|
|
"description" : "New Routes request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/RouteRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Route Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Route"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/routes/{routeId}" : {
|
|
"get" : {
|
|
"tags" : [ "Routes" ],
|
|
"summary" : "Retrieve a Route",
|
|
"description" : "Get information about a Routes",
|
|
"parameters" : [ {
|
|
"name" : "routeId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a route",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Route object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Route"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "Routes" ],
|
|
"summary" : "Update a Route",
|
|
"description" : "Update/Replace a Route",
|
|
"parameters" : [ {
|
|
"name" : "routeId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a route",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "Update Route request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/RouteRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Route object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/Route"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "Routes" ],
|
|
"summary" : "Delete a Route",
|
|
"description" : "Delete a Route",
|
|
"parameters" : [ {
|
|
"name" : "routeId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a route",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/dns/nameservers" : {
|
|
"get" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "List all Nameserver Groups",
|
|
"description" : "Returns a list of all Nameserver Groups",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Nameserver Groups",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/NameserverGroup"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"post" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Create a Nameserver Group",
|
|
"description" : "Creates a Nameserver Group",
|
|
"requestBody" : {
|
|
"description" : "New Nameserver Groups request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/NameserverGroupRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Nameserver Groups Object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/NameserverGroup"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/dns/nameservers/{nsgroupId}" : {
|
|
"get" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Retrieve a Nameserver Group",
|
|
"description" : "Get information about a Nameserver Groups",
|
|
"parameters" : [ {
|
|
"name" : "nsgroupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a Nameserver Group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Nameserver Group object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/NameserverGroup"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Update a Nameserver Group",
|
|
"description" : "Update/Replace a Nameserver Group",
|
|
"parameters" : [ {
|
|
"name" : "nsgroupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a Nameserver Group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"requestBody" : {
|
|
"description" : "Update Nameserver Group request",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/NameserverGroupRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A Nameserver Group object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/NameserverGroup"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"delete" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Delete a Nameserver Group",
|
|
"description" : "Delete a Nameserver Group",
|
|
"parameters" : [ {
|
|
"name" : "nsgroupId",
|
|
"in" : "path",
|
|
"description" : "The unique identifier of a Nameserver Group",
|
|
"required" : true,
|
|
"style" : "simple",
|
|
"explode" : false,
|
|
"schema" : {
|
|
"type" : "string"
|
|
}
|
|
} ],
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "Delete status code",
|
|
"content" : { }
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/dns/settings" : {
|
|
"get" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Retrieve DNS Settings",
|
|
"description" : "Returns a DNS settings object",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Object of DNS Setting",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/DNSSettings"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
},
|
|
"put" : {
|
|
"tags" : [ "DNS" ],
|
|
"summary" : "Update DNS Settings",
|
|
"description" : "Updates a DNS settings object",
|
|
"requestBody" : {
|
|
"description" : "A DNS settings object",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/DNSSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Object of DNS Setting",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"$ref" : "#/components/schemas/DNSSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
},
|
|
"/api/events" : {
|
|
"get" : {
|
|
"tags" : [ "Events" ],
|
|
"summary" : "List all Events",
|
|
"description" : "Returns a list of all events",
|
|
"responses" : {
|
|
"200" : {
|
|
"description" : "A JSON Array of Events",
|
|
"content" : {
|
|
"application/json" : {
|
|
"schema" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Event"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"401" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
},
|
|
"403" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"500" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"security" : [ {
|
|
"BearerAuth" : [ ]
|
|
}, {
|
|
"TokenAuth" : [ ]
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"components" : {
|
|
"schemas" : {
|
|
"Account" : {
|
|
"required" : [ "id", "settings" ],
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Account ID"
|
|
},
|
|
"settings" : {
|
|
"$ref" : "#/components/schemas/AccountSettings"
|
|
}
|
|
}
|
|
},
|
|
"AccountSettings" : {
|
|
"required" : [ "peer_login_expiration", "peer_login_expiration_enabled" ],
|
|
"properties" : {
|
|
"peer_login_expiration_enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login)."
|
|
},
|
|
"peer_login_expiration" : {
|
|
"type" : "integer",
|
|
"description" : "Period of time after which peer login expires (seconds)."
|
|
}
|
|
}
|
|
},
|
|
"User" : {
|
|
"required" : [ "auto_groups", "email", "id", "name", "role", "status" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "User ID"
|
|
},
|
|
"email" : {
|
|
"type" : "string",
|
|
"description" : "User's email address"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "User's name from idp provider"
|
|
},
|
|
"role" : {
|
|
"type" : "string",
|
|
"description" : "User's NetBird account role"
|
|
},
|
|
"status" : {
|
|
"type" : "string",
|
|
"description" : "User's status",
|
|
"enum" : [ "active", "invited", "disabled" ]
|
|
},
|
|
"auto_groups" : {
|
|
"type" : "array",
|
|
"description" : "Groups to auto-assign to peers registered by this user",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"is_current" : {
|
|
"type" : "boolean",
|
|
"description" : "Is true if authenticated user is the same as this user",
|
|
"readOnly" : true
|
|
},
|
|
"is_service_user" : {
|
|
"type" : "boolean",
|
|
"description" : "Is true if this user is a service user",
|
|
"readOnly" : true
|
|
}
|
|
}
|
|
},
|
|
"UserRequest" : {
|
|
"required" : [ "auto_groups", "role" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"role" : {
|
|
"type" : "string",
|
|
"description" : "User's NetBird account role"
|
|
},
|
|
"auto_groups" : {
|
|
"type" : "array",
|
|
"description" : "Groups to auto-assign to peers registered by this user",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"UserCreateRequest" : {
|
|
"required" : [ "auto_groups", "is_service_user", "role" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"email" : {
|
|
"type" : "string",
|
|
"description" : "User's Email to send invite to"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "User's full name"
|
|
},
|
|
"role" : {
|
|
"type" : "string",
|
|
"description" : "User's NetBird account role"
|
|
},
|
|
"auto_groups" : {
|
|
"type" : "array",
|
|
"description" : "Groups to auto-assign to peers registered by this user",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"is_service_user" : {
|
|
"type" : "boolean",
|
|
"description" : "Is true if this user is a service user"
|
|
}
|
|
}
|
|
},
|
|
"PeerMinimum" : {
|
|
"required" : [ "id", "name" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Peer ID"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Peer's hostname"
|
|
}
|
|
}
|
|
},
|
|
"PeerRequest" : {
|
|
"required" : [ "login_expiration_enabled", "name", "ssh_enabled" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string"
|
|
},
|
|
"ssh_enabled" : {
|
|
"type" : "boolean"
|
|
},
|
|
"login_expiration_enabled" : {
|
|
"type" : "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Peer" : {
|
|
"allOf" : [ {
|
|
"$ref" : "#/components/schemas/PeerMinimum"
|
|
}, {
|
|
"required" : [ "connected", "dns_label", "groups", "hostname", "ip", "last_login", "last_seen", "login_expiration_enabled", "login_expired", "os", "ssh_enabled", "version" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"ip" : {
|
|
"type" : "string",
|
|
"description" : "Peer's IP address"
|
|
},
|
|
"connected" : {
|
|
"type" : "boolean",
|
|
"description" : "Peer to Management connection status"
|
|
},
|
|
"last_seen" : {
|
|
"type" : "string",
|
|
"description" : "Last time peer connected to Netbird's management service",
|
|
"format" : "date-time"
|
|
},
|
|
"os" : {
|
|
"type" : "string",
|
|
"description" : "Peer's operating system and version"
|
|
},
|
|
"version" : {
|
|
"type" : "string",
|
|
"description" : "Peer's daemon or cli version"
|
|
},
|
|
"groups" : {
|
|
"type" : "array",
|
|
"description" : "Groups that the peer belongs to",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}
|
|
},
|
|
"ssh_enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Indicates whether SSH server is enabled on this peer"
|
|
},
|
|
"user_id" : {
|
|
"type" : "string",
|
|
"description" : "User ID of the user that enrolled this peer"
|
|
},
|
|
"hostname" : {
|
|
"type" : "string",
|
|
"description" : "Hostname of the machine"
|
|
},
|
|
"ui_version" : {
|
|
"type" : "string",
|
|
"description" : "Peer's desktop UI version"
|
|
},
|
|
"dns_label" : {
|
|
"type" : "string",
|
|
"description" : "Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud"
|
|
},
|
|
"login_expiration_enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Indicates whether peer login expiration has been enabled or not"
|
|
},
|
|
"login_expired" : {
|
|
"type" : "boolean",
|
|
"description" : "Indicates whether peer's login expired or not"
|
|
},
|
|
"last_login" : {
|
|
"type" : "string",
|
|
"description" : "Last time this peer performed log in (authentication). E.g., user authenticated.",
|
|
"format" : "date-time"
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"SetupKey" : {
|
|
"required" : [ "auto_groups", "expires", "id", "key", "last_used", "name", "revoked", "state", "type", "updated_at", "usage_limit", "used_times", "valid" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Setup Key ID"
|
|
},
|
|
"key" : {
|
|
"type" : "string",
|
|
"description" : "Setup Key value"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Setup key name identifier"
|
|
},
|
|
"expires" : {
|
|
"type" : "string",
|
|
"description" : "Setup Key expiration date",
|
|
"format" : "date-time"
|
|
},
|
|
"type" : {
|
|
"type" : "string",
|
|
"description" : "Setup key type, one-off for single time usage and reusable"
|
|
},
|
|
"valid" : {
|
|
"type" : "boolean",
|
|
"description" : "Setup key validity status"
|
|
},
|
|
"revoked" : {
|
|
"type" : "boolean",
|
|
"description" : "Setup key revocation status"
|
|
},
|
|
"used_times" : {
|
|
"type" : "integer",
|
|
"description" : "Usage count of setup key"
|
|
},
|
|
"last_used" : {
|
|
"type" : "string",
|
|
"description" : "Setup key last usage date",
|
|
"format" : "date-time"
|
|
},
|
|
"state" : {
|
|
"type" : "string",
|
|
"description" : "Setup key status, \"valid\", \"overused\",\"expired\" or \"revoked\""
|
|
},
|
|
"auto_groups" : {
|
|
"type" : "array",
|
|
"description" : "Setup key groups to auto-assign to peers registered with this key",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"updated_at" : {
|
|
"type" : "string",
|
|
"description" : "Setup key last update date",
|
|
"format" : "date-time"
|
|
},
|
|
"usage_limit" : {
|
|
"type" : "integer",
|
|
"description" : "A number of times this key can be used. The value of 0 indicates the unlimited usage."
|
|
}
|
|
}
|
|
},
|
|
"SetupKeyRequest" : {
|
|
"required" : [ "auto_groups", "expires_in", "name", "revoked", "type", "usage_limit" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Setup Key name"
|
|
},
|
|
"type" : {
|
|
"type" : "string",
|
|
"description" : "Setup key type, one-off for single time usage and reusable"
|
|
},
|
|
"expires_in" : {
|
|
"type" : "integer",
|
|
"description" : "Expiration time in seconds"
|
|
},
|
|
"revoked" : {
|
|
"type" : "boolean",
|
|
"description" : "Setup key revocation status"
|
|
},
|
|
"auto_groups" : {
|
|
"type" : "array",
|
|
"description" : "Setup key groups to auto-assign to peers registered with this key",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"usage_limit" : {
|
|
"type" : "integer",
|
|
"description" : "A number of times this key can be used. The value of 0 indicates the unlimited usage."
|
|
}
|
|
}
|
|
},
|
|
"PersonalAccessToken" : {
|
|
"required" : [ "created_at", "created_by", "expiration_date", "id", "name" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "ID of a token"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Name of the token"
|
|
},
|
|
"expiration_date" : {
|
|
"type" : "string",
|
|
"description" : "Date the token expires",
|
|
"format" : "date-time"
|
|
},
|
|
"created_by" : {
|
|
"type" : "string",
|
|
"description" : "User ID of the user who created the token"
|
|
},
|
|
"created_at" : {
|
|
"type" : "string",
|
|
"description" : "Date the token was created",
|
|
"format" : "date-time"
|
|
},
|
|
"last_used" : {
|
|
"type" : "string",
|
|
"description" : "Date the token was last used",
|
|
"format" : "date-time"
|
|
}
|
|
}
|
|
},
|
|
"PersonalAccessTokenGenerated" : {
|
|
"required" : [ "personal_access_token", "plain_token" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"plain_token" : {
|
|
"type" : "string",
|
|
"description" : "Plain text representation of the generated token"
|
|
},
|
|
"personal_access_token" : {
|
|
"$ref" : "#/components/schemas/PersonalAccessToken"
|
|
}
|
|
}
|
|
},
|
|
"PersonalAccessTokenRequest" : {
|
|
"required" : [ "expires_in", "name" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Name of the token"
|
|
},
|
|
"expires_in" : {
|
|
"maximum" : 365,
|
|
"minimum" : 1,
|
|
"type" : "integer",
|
|
"description" : "Expiration in days"
|
|
}
|
|
}
|
|
},
|
|
"GroupMinimum" : {
|
|
"required" : [ "id", "name", "peers_count" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Group ID"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Group Name identifier"
|
|
},
|
|
"peers_count" : {
|
|
"type" : "integer",
|
|
"description" : "Count of peers associated to the group"
|
|
}
|
|
}
|
|
},
|
|
"GroupRequest" : {
|
|
"required" : [ "name" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Group name identifier"
|
|
},
|
|
"peers" : {
|
|
"type" : "array",
|
|
"description" : "List of peers ids",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Group" : {
|
|
"allOf" : [ {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}, {
|
|
"required" : [ "peers" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"peers" : {
|
|
"type" : "array",
|
|
"description" : "List of peers object",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/PeerMinimum"
|
|
}
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"RuleMinimum" : {
|
|
"required" : [ "description", "disabled", "flow", "name" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Rule name identifier"
|
|
},
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Rule friendly description"
|
|
},
|
|
"disabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Rules status"
|
|
},
|
|
"flow" : {
|
|
"type" : "string",
|
|
"description" : "Rule flow, currently, only \"bidirect\" for bi-directional traffic is accepted"
|
|
}
|
|
}
|
|
},
|
|
"RuleRequest" : {
|
|
"allOf" : [ {
|
|
"$ref" : "#/components/schemas/RuleMinimum"
|
|
}, {
|
|
"type" : "object",
|
|
"properties" : {
|
|
"sources" : {
|
|
"type" : "array",
|
|
"description" : "List of source groups",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"destinations" : {
|
|
"type" : "array",
|
|
"description" : "List of destination groups",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"Rule" : {
|
|
"allOf" : [ {
|
|
"required" : [ "id" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Rule ID"
|
|
}
|
|
}
|
|
}, {
|
|
"$ref" : "#/components/schemas/RuleMinimum"
|
|
}, {
|
|
"required" : [ "destinations", "sources" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"sources" : {
|
|
"type" : "array",
|
|
"description" : "Rule source groups",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}
|
|
},
|
|
"destinations" : {
|
|
"type" : "array",
|
|
"description" : "Rule destination groups",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"PolicyRule" : {
|
|
"required" : [ "action", "destinations", "enabled", "name", "sources" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Rule ID"
|
|
},
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Rule name identifier"
|
|
},
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Rule friendly description"
|
|
},
|
|
"enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Rules status"
|
|
},
|
|
"sources" : {
|
|
"type" : "array",
|
|
"description" : "policy source groups",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}
|
|
},
|
|
"destinations" : {
|
|
"type" : "array",
|
|
"description" : "policy destination groups",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/GroupMinimum"
|
|
}
|
|
},
|
|
"action" : {
|
|
"type" : "string",
|
|
"description" : "policy accept or drops packets",
|
|
"enum" : [ "accept", "drop" ]
|
|
}
|
|
}
|
|
},
|
|
"PolicyMinimum" : {
|
|
"required" : [ "description", "enabled", "name", "query", "rules" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"type" : "string",
|
|
"description" : "Policy name identifier"
|
|
},
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Policy friendly description"
|
|
},
|
|
"enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Policy status"
|
|
},
|
|
"query" : {
|
|
"type" : "string",
|
|
"description" : "Policy Rego query"
|
|
},
|
|
"rules" : {
|
|
"type" : "array",
|
|
"description" : "Policy rule object for policy UI editor",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/PolicyRule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Policy" : {
|
|
"allOf" : [ {
|
|
"$ref" : "#/components/schemas/PolicyMinimum"
|
|
}, {
|
|
"required" : [ "id" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Policy ID"
|
|
}
|
|
}
|
|
} ]
|
|
},
|
|
"RouteRequest" : {
|
|
"required" : [ "description", "enabled", "groups", "id", "masquerade", "metric", "network", "network_id", "peer" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Route description"
|
|
},
|
|
"network_id" : {
|
|
"maxLength" : 40,
|
|
"minLength" : 1,
|
|
"type" : "string",
|
|
"description" : "Route network identifier, to group HA routes"
|
|
},
|
|
"enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Route status"
|
|
},
|
|
"peer" : {
|
|
"type" : "string",
|
|
"description" : "Peer Identifier associated with route"
|
|
},
|
|
"network" : {
|
|
"type" : "string",
|
|
"description" : "Network range in CIDR format"
|
|
},
|
|
"metric" : {
|
|
"maximum" : 9999,
|
|
"minimum" : 1,
|
|
"type" : "integer",
|
|
"description" : "Route metric number. Lowest number has higher priority"
|
|
},
|
|
"masquerade" : {
|
|
"type" : "boolean",
|
|
"description" : "Indicate if peer should masquerade traffic to this route's prefix"
|
|
},
|
|
"groups" : {
|
|
"type" : "array",
|
|
"description" : "Route group tag groups",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Route" : {
|
|
"allOf" : [ {
|
|
"required" : [ "id", "network_type" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Route Id"
|
|
},
|
|
"network_type" : {
|
|
"type" : "string",
|
|
"description" : "Network type indicating if it is IPv4 or IPv6"
|
|
}
|
|
}
|
|
}, {
|
|
"$ref" : "#/components/schemas/RouteRequest"
|
|
} ]
|
|
},
|
|
"Nameserver" : {
|
|
"required" : [ "ip", "ns_type", "port" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"ip" : {
|
|
"type" : "string",
|
|
"description" : "Nameserver IP"
|
|
},
|
|
"ns_type" : {
|
|
"type" : "string",
|
|
"description" : "Nameserver Type",
|
|
"enum" : [ "udp" ]
|
|
},
|
|
"port" : {
|
|
"type" : "integer",
|
|
"description" : "Nameserver Port"
|
|
}
|
|
}
|
|
},
|
|
"NameserverGroupRequest" : {
|
|
"required" : [ "description", "domains", "enabled", "groups", "name", "nameservers", "primary" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"name" : {
|
|
"maxLength" : 40,
|
|
"minLength" : 1,
|
|
"type" : "string",
|
|
"description" : "Nameserver group name"
|
|
},
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Nameserver group description"
|
|
},
|
|
"nameservers" : {
|
|
"maxLength" : 2,
|
|
"minLength" : 1,
|
|
"type" : "array",
|
|
"description" : "Nameserver group",
|
|
"items" : {
|
|
"$ref" : "#/components/schemas/Nameserver"
|
|
}
|
|
},
|
|
"enabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Nameserver group status"
|
|
},
|
|
"groups" : {
|
|
"type" : "array",
|
|
"description" : "Nameserver group tag groups",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
},
|
|
"primary" : {
|
|
"type" : "boolean",
|
|
"description" : "Nameserver group primary status"
|
|
},
|
|
"domains" : {
|
|
"type" : "array",
|
|
"description" : "Nameserver group domain list",
|
|
"items" : {
|
|
"maxLength" : 255,
|
|
"minLength" : 1,
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"NameserverGroup" : {
|
|
"allOf" : [ {
|
|
"required" : [ "id" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Nameserver group ID"
|
|
}
|
|
}
|
|
}, {
|
|
"$ref" : "#/components/schemas/NameserverGroupRequest"
|
|
} ]
|
|
},
|
|
"DNSSettings" : {
|
|
"required" : [ "disabled_management_groups" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"disabled_management_groups" : {
|
|
"type" : "array",
|
|
"description" : "Groups whose DNS management is disabled",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Event" : {
|
|
"required" : [ "activity", "activity_code", "id", "initiator_id", "meta", "target_id", "timestamp" ],
|
|
"type" : "object",
|
|
"properties" : {
|
|
"id" : {
|
|
"type" : "string",
|
|
"description" : "Event unique identifier"
|
|
},
|
|
"timestamp" : {
|
|
"type" : "string",
|
|
"description" : "The date and time when the event occurred",
|
|
"format" : "date-time"
|
|
},
|
|
"activity" : {
|
|
"type" : "string",
|
|
"description" : "The activity that occurred during the event"
|
|
},
|
|
"activity_code" : {
|
|
"type" : "string",
|
|
"description" : "The string code of the activity that occurred during the event",
|
|
"enum" : [ "user.peer.delete", "user.join", "user.invite", "user.peer.add", "user.group.add", "user.group.delete", "user.role.update", "setupkey.peer.add", "setupkey.add", "setupkey.update", "setupkey.revoke", "setupkey.overuse", "setupkey.group.delete", "setupkey.group.add", "rule.add", "rule.delete", "rule.update", "policy.add", "policy.delete", "policy.update", "group.add", "group.update", "dns.setting.disabled.management.group.add", "dns.setting.disabled.management.group.delete", "account.create", "account.setting.peer.login.expiration.update", "account.setting.peer.login.expiration.disable", "account.setting.peer.login.expiration.enable", "route.add", "route.delete", "route.update", "nameserver.group.add", "nameserver.group.delete", "nameserver.group.update", "peer.ssh.disable", "peer.ssh.enable", "peer.rename", "peer.login.expiration.disable", "peer.login.expiration.enable", "service.user.create", "personal.access.token.create", "service.user.delete", "personal.access.token.delete" ]
|
|
},
|
|
"initiator_id" : {
|
|
"type" : "string",
|
|
"description" : "The ID of the initiator of the event. E.g., an ID of a user that triggered the event."
|
|
},
|
|
"target_id" : {
|
|
"type" : "string",
|
|
"description" : "The ID of the target of the event. E.g., an ID of the peer that a user removed."
|
|
},
|
|
"meta" : {
|
|
"type" : "object",
|
|
"additionalProperties" : {
|
|
"type" : "string"
|
|
},
|
|
"description" : "The metadata of the event"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses" : {
|
|
"not_found" : {
|
|
"description" : "Resource not found",
|
|
"content" : { }
|
|
},
|
|
"validation_failed_simple" : {
|
|
"description" : "Validation failed",
|
|
"content" : { }
|
|
},
|
|
"bad_request" : {
|
|
"description" : "Bad Request",
|
|
"content" : { }
|
|
},
|
|
"internal_error" : {
|
|
"description" : "Internal Server Error",
|
|
"content" : { }
|
|
},
|
|
"validation_failed" : {
|
|
"description" : "Validation failed",
|
|
"content" : { }
|
|
},
|
|
"forbidden" : {
|
|
"description" : "Forbidden",
|
|
"content" : { }
|
|
},
|
|
"requires_authentication" : {
|
|
"description" : "Requires authentication",
|
|
"content" : { }
|
|
}
|
|
},
|
|
"securitySchemes" : {
|
|
"BearerAuth" : {
|
|
"type" : "http",
|
|
"scheme" : "bearer",
|
|
"bearerFormat" : "JWT"
|
|
},
|
|
"TokenAuth" : {
|
|
"type" : "apiKey",
|
|
"description" : "Enter the token with the `Token` prefix, e.g. \"Token nbp_F3f0d.....\".",
|
|
"name" : "Authorization",
|
|
"in" : "header"
|
|
}
|
|
}
|
|
}
|
|
} |