api

package
v0.0.0-...-2cb83ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveScanHandler

func ActiveScanHandler(c *fiber.Ctx) error

ActiveScanHandler godoc @Summary Submit items for active scanning @Description Receives a list of items and schedules them for active scanning. Either the workspace ID or task ID must be provided. @Tags Scan @Accept json @Produce json @Param input body PassiveScanInput true "List of items" @Success 200 {object} ActionResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/scan/active [post]

func CreatePlaygroundCollection

func CreatePlaygroundCollection(c *fiber.Ctx) error

CreatePlaygroundCollection godoc @Summary Create a new playground collection @Description Create a new playground collection @Tags Playground @Accept json @Produce json @Param input body CreatePlaygroundCollectionInput true "Create Playground Collection Input" @Success 201 {object} db.PlaygroundCollection @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/collections [post]

func CreatePlaygroundSession

func CreatePlaygroundSession(c *fiber.Ctx) error

CreatePlaygroundSession godoc @Summary Create a new playground session @Description Create a new playground session @Tags Playground @Accept json @Produce json @Param input body CreatePlaygroundSessionInput true "Create Playground Session Input" @Success 201 {object} db.PlaygroundSession @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/sessions [post]

func CreateStoredBrowserActions

func CreateStoredBrowserActions(c *fiber.Ctx) error

CreateStoredBrowserActions handles the API request for creating a new StoredBrowserActions @Summary Create a new StoredBrowserActions @Description Creates a new StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param input body BrowserActionsInput true "Browser actions input object to create" @Success 201 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions [post]

func CreateWorkspace

func CreateWorkspace(c *fiber.Ctx) error

CreateWorkspace godoc @Summary Create a new workspace @Description Saves a new workspace to the database @Tags Workspaces @Accept json @Produce json @Param workspace body WorkspaceCreateInput true "Workspace to create" @Success 201 {object} db.Workspace @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces [post]

func DeleteStoredBrowserActions

func DeleteStoredBrowserActions(c *fiber.Ctx) error

DeleteStoredBrowserActions handles the API request for deleting a StoredBrowserActions @Summary Delete a StoredBrowserActions @Description Deletes an existing StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Success 204 "No Content" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [delete]

func DeleteWorkspace

func DeleteWorkspace(c *fiber.Ctx) error

DeleteWorkspace godoc @Summary Delete a workspace @Description Deletes a workspace and all associated data @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Success 200 {object} map[string]interface{} "message": "Workspace successfully deleted" @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [delete]

func FindHistory

func FindHistory(c *fiber.Ctx) error

FindHistory gets history with pagination and filtering options @Summary Get history @Description Get history with optional pagination and filtering by status codes, HTTP methods, and sources @Deprecated @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param status query string false "Comma-separated list of status codes to filter by" @Param methods query string false "Comma-separated list of HTTP methods to filter by" @Param sources query string false "Comma-separated list of sources to filter by" @Param ids query string false "Comma-separated list of history IDs to filter by" @Param workspace query integer true "Workspace ID to filter by" @Param playground_session query integer false "Playground session ID to filter by" @Param task query integer false "Task ID" @Param sort_by query string false "Field to sort by" Enums(id,created_at,updated_at,status_code,request_body_size,url,response_body_size,parameters_count,method) default("id") @Param sort_order query string false "Sort order" Enums(asc, desc) default("desc") @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history [get]

func FindHistoryPost

func FindHistoryPost(c *fiber.Ctx) error

FindHistoryPost handles POST requests for fetching history with pagination and filtering options @Summary Get history (POST) @Description Get history with optional pagination and filtering using POST request @Tags History @Accept json @Produce json @Param filters body db.HistoryFilter true "History filter options" @Success 200 {object} map[string]interface{} @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history [post]

func FindInteractions

func FindInteractions(c *fiber.Ctx) error

FindInteractions gets interactions with pagination and filtering options @Summary Get interactions @Description Get interactions with optional pagination and protocols filter @Tags Interactions @Produce json @Param workspace query int true "Workspace ID" @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param protocols query string false "Comma-separated list of protocols to filter by" @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/interactions [get]

func FindIssues

func FindIssues(c *fiber.Ctx) error

FindIssues godoc @Summary List all issues @Description Retrieves all issues with a count @Tags Issues @Accept json @Produce json @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param taskjob query int false "Task Job ID" @Param codes query string false "Comma-separated list of issue codes to filter by" @Success 200 {array} db.Issue @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues [get]

func FindIssuesGrouped

func FindIssuesGrouped(c *fiber.Ctx) error

FindIssuesGrouped godoc @Summary List all issues grouped @Description Retrieves all issues grouped @Tags Issues @Accept json @Produce json @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param taskjob query int false "Task Job ID" @Success 200 {array} db.GroupedIssue @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/grouped [get]

func FindTaskJobs

func FindTaskJobs(c *fiber.Ctx) error

@Summary Search Task Jobs @Description Allows to filter and search task jobs @Tags Tasks @Accept json @Produce json @Param task query int true "Task ID" @Param page_size query int false "Number of items per page" default(50) @Param page query int false "Page number" default(1) @Param status query string false "Comma-separated list of statuses to filter" @Param title query string false "Comma-separated list of titles to filter" @Param status_codes query string false "Comma-separated list of status codes to filter" @Param methods query string false "Comma-separated list of methods to filter" @Param sort_by query string false "Field to sort by" Enums(id, history_method, history_url, history_status, history_parameters_count, title, status, started_at, completed_at, created_at, updated_at) @Param sort_order query string false "Sort order" Enums(asc, desc) @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tasks/jobs [get]

func FindTasks

func FindTasks(c *fiber.Ctx) error

FindTasks godoc @Summary List tasks with pagination and filtering @Description Retrieves tasks based on pagination and status filters @Tags Tasks @Accept json @Produce json @Param query query string false "Query string to search for" @Param page_size query int false "Number of items per page" default(50) @Param page query int false "Page number" default(1) @Param workspace query int true "Workspace ID" @Param status query string false "Comma-separated list of statuses to filter" @Param playground_session query integer false "Playground session ID to filter by" @Success 200 {array} db.Task @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tasks [get]

func FindWebSocketConnectionByID

func FindWebSocketConnectionByID(c *fiber.Ctx) error

@Summary Get WebSocket connection details @Description Get details of a specific WebSocket connection by its ID, including its associated messages @Tags History @Produce json @Param id path int true "WebSocket connection ID" @Success 200 {object} db.WebSocketConnection @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/connections/{id} [get]

func FindWebSocketConnections

func FindWebSocketConnections(c *fiber.Ctx) error

@Summary Get WebSocket connections @Description Get WebSocket connections with optional pagination @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param sources query string false "Comma-separated list of sources to filter by" @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/connections [get]

func FindWebSocketMessages

func FindWebSocketMessages(c *fiber.Ctx) error

@Summary Get WebSocket messages @Description Get WebSocket messages with optional pagination and filtering by connection id @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param connection_id query string false "Filter messages by WebSocket connection ID" @Success 200 {array} db.WebSocketMessage @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/messages [get]

func FindWorkspaces

func FindWorkspaces(c *fiber.Ctx) error

FindWorkspaces godoc @Summary List all workspaces @Description Retrieves all workspaces with a count @Tags Workspaces @Accept json @Produce json @Param query query string false "Search query" @Param page_size query integer false "Size of each page" default(20) @Param page query integer false "Page number" default(1) @Success 200 {array} db.Workspace @Failure 422 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces [get]

func FullScanHandler

func FullScanHandler(c *fiber.Ctx) error

FullScanHandler godoc @Summary Submit URLs for full scanning @Description Receives a list of URLs and other parameters and schedules them for a full scan @Tags Scan @Accept json @Produce json @Param input body scan_options.FullScanOptions true "Configuration for full scan" @Success 200 {object} ActionResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/scan/full [post]

func FuzzRequest

func FuzzRequest(c *fiber.Ctx) error

FuzzRequest godoc @Summary Schedules a new task to fuzz the provided request @Description Schedules a new task to fuzz the provided request with the provided insertion points, payloads, etc and returns the task ID to filter the results @Tags Playground @Accept json @Produce json @Param input body PlaygroundFuzzInput true "Set the fuzzing request configuration" @Success 200 {string} PlaygroundFuzzResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/fuzz [post]

func GetChildren

func GetChildren(c *fiber.Ctx) error

@Summary Get children history @Description Get all the other history items that have the same depth or more than the provided history ID and that start with the same URL @Tags History @Accept json @Produce json @Param id path int true "History ID" @Success 200 {array} HistorySummary @Failure 400,404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/{id}/children [get]

func GetInteractionDetail

func GetInteractionDetail(c *fiber.Ctx) error

GetInteractionDetail fetches the details of a specific OOB Interaction by its ID. @Summary Get interaction detail @Description Fetch the detail of an OOB Interaction by its ID @Tags Interactions @Produce json @Param id path int true "Interaction ID" @Success 200 {object} db.OOBInteraction @Failure 404 {object} ErrorResponse "Interaction not found" @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/interactions/{id} [get]

func GetIssueDetail

func GetIssueDetail(c *fiber.Ctx) error

GetIssueDetail godoc @Summary Get details of an issue @Description Retrieves details of a specific issue by its ID @Tags Issues @Accept json @Produce json @Param id path int true "Issue ID" @Success 200 {object} db.Issue @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/{id} [get]

func GetPlaygroundCollection

func GetPlaygroundCollection(c *fiber.Ctx) error

GetPlaygroundCollection retrieves a PlaygroundCollection by its ID. @Summary Get Playground Collection by ID @Description Get a playground collection by its ID @Tags Playground @Accept json @Produce json @Param id path int true "Playground Collection ID" @Success 200 {object} db.PlaygroundCollection @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/collections/{id} [get]

func GetPlaygroundSession

func GetPlaygroundSession(c *fiber.Ctx) error

GetPlaygroundSession retrieves a PlaygroundSession by its ID. @Summary Get Playground Session by ID @Description Get a playground session by its ID @Tags Playground @Accept json @Produce json @Param id path int true "Playground Session ID" @Success 200 {object} db.PlaygroundSession @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/sessions/{id} [get]

func GetRootNodes

func GetRootNodes(c *fiber.Ctx) error

@Summary Gets all root history nodes @Description Get all the root history items @Tags History @Accept json @Produce json @Param workspace query integer true "Workspace ID to filter by" @Success 200 {array} RootNode @Failure 400,404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/root-nodes [get]

func GetSitemap

func GetSitemap(c *fiber.Ctx) error

GetSitemap godoc @Summary Retrieve sitemap based on filters @Description Retrieves sitemap based on workspace and task ID @Tags Sitemap @Accept json @Produce json @Param workspace query int false "Workspace ID filter" @Param task query int false "Task ID filter" @Success 200 {array} db.SitemapNode @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/sitemap [get]

func GetStoredBrowserActions

func GetStoredBrowserActions(c *fiber.Ctx) error

GetStoredBrowserActions handles the API request for retrieving a StoredBrowserActions by ID @Summary Get a StoredBrowserActions by ID @Description Retrieves a StoredBrowserActions record by its ID @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Success 200 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [get]

func GetWorkspaceDetail

func GetWorkspaceDetail(c *fiber.Ctx) error

GetWorkspaceDetail godoc @Summary Get a single workspace @Description Retrieves a workspace by ID @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Success 200 {object} db.Workspace @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [get]

func IsValidFilterHTTPMethod

func IsValidFilterHTTPMethod(method string) bool

func JWTProtected

func JWTProtected() func(*fiber.Ctx) error

JWTProtected func for specify routes group with JWT authentication. See: https://github.com/gofiber/contrib/jwt

func JwtListHandler

func JwtListHandler(c *fiber.Ctx) error

JwtListHandler handles the API request for listing JWTs with filtering and sorting @Summary List JWTs with filtering and sorting @Description Retrieves a list of JWTs with optional filtering and sorting options @Tags JWT @Accept json @Produce json @Param input body db.JwtFilters true "Filtering and sorting options" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tokens/jwts [post]

func ListAvailableWordlists

func ListAvailableWordlists(c *fiber.Ctx) error

ListAvailableWordlists godoc @Summary List available wordlists @Description List all wordlists available for use in the playground @Tags Playground @Accept json @Produce json @Success 200 {array} manual.Wordlist @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/wordlists [get]

func ListPlaygroundCollections

func ListPlaygroundCollections(c *fiber.Ctx) error

ListPlaygroundCollections godoc @Summary List playground collections @Description List playground collections @Tags Playground @Accept json @Produce json @Param query query string false "Search by name or description" @Param workspace query uint true "Filter by workspace id" @Param sort_by query string false "Sort by field (id, name, description, workspace_id)" @Param sort_order query string false "Sort order (asc, desc)" @Param page query int false "Page number for pagination" @Param page_size query int false "Page size for pagination" @Success 200 {array} db.PlaygroundCollection @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/collections [get]

func ListPlaygroundSessions

func ListPlaygroundSessions(c *fiber.Ctx) error

ListPlaygroundSessions godoc @Summary List Playground Sessions @Description List Playground Sessions @Tags Playground @Accept json @Produce json @Param type query string false "Filter by session type (manual, fuzz)" @Param original_request_id query uint false "Filter by original request ID" @Param collection query uint false "Filter by collection ID" @Param workspace query uint true "Filter by workspace ID" @Param query query string false "Search by name" @Param page query int false "Page number for pagination" @Param page_size query int false "Page size for pagination" @Param sort_by query string false "Sort by field (id, name, type, original_request_id, collection, workspace)" @Param sort_order query string false "Sort order (asc, desc)" @Success 200 {array} db.PlaygroundSession @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/sessions [get]

func ListStoredBrowserActions

func ListStoredBrowserActions(c *fiber.Ctx) error

ListStoredBrowserActions handles the API request for listing StoredBrowserActions with filtering and sorting @Summary List StoredBrowserActions with filtering and sorting @Description Retrieves a list of StoredBrowserActions with optional filtering and sorting options @Tags Browser Actions @Accept json @Produce json @Param page query int false "Page number" default(1) @Param page_size query int false "Page size" default(50) @Param query query string false "Search query for title" @Param scope query string false "Scope filter (global or workspace)" @Param workspace_id query int false "Workspace ID filter" @Success 200 {object} map[string]interface{} "Returns 'data' (array of StoredBrowserActions) and 'count' (total number of records)" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions [get]

func PassiveScanHandler

func PassiveScanHandler(c *fiber.Ctx) error

PassiveScanHandler godoc @Summary Submit items for passive scanning @Description Receives a list of items and schedules them for passive scanning @Tags Scan @Accept json @Produce json @Param input body PassiveScanInput true "List of items" @Success 200 {object} ActionResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/scan/passive [post]

func RenewTokens

func RenewTokens(c *fiber.Ctx) error

RenewTokens method for renew access and refresh tokens. @Description Renew access and refresh tokens. @Summary renew access and refresh tokens @Tags Auth @Accept json @Produce json @Param refresh_token body Renew true "Refresh token" @Success 200 {object} RenewTokensResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/auth/token/renew [post]

func ReplayRequest

func ReplayRequest(c *fiber.Ctx) error

ReplayRequest godoc @Summary Sends a request to a target @Description Sends a request to a target and returns the response @Tags Playground @Accept json @Produce json @Param input body PlaygroundReplayInput true "Set the request configuration" @Success 200 {object} manual.ReplayResult @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/replay [post]

func ReportHandler

func ReportHandler(c *fiber.Ctx) error

ReportHandler godoc @Summary Generate a report @Description Generates a report for a given workspace @Tags Reports @Accept json @Produce json @Param report body ReportRequest true "Report request" @Success 200 {object} string @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/report [post]

func SetFalsePositive

func SetFalsePositive(c *fiber.Ctx) error

SetFalsePositive godoc @Summary Set an issue as a false positive @Description Updates the FalsePositive attribute of a specific issue @Tags Issues @Accept json @Produce json @Param id path int true "Issue ID" @Param value body bool true "Boolean value for FalsePositive" @Success 200 {object} IssueUpdateResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/{id}/set-false-positive [post]

func StartAPI

func StartAPI()

@title Sukyan API @version 0.1 @description The Sukyan API documentation. @securityDefinitions.apikey ApiKeyAuth @in header @name Authorization

func SystemStats

func SystemStats(c *fiber.Ctx) error

SystemStats retrieves overall system statistics.

@Summary Retrieves system statistics such as the current database size. @Tags Stats @Accept json @Produce json @Success 200 {object} db.SystemStats "Successfully retrieved system stats" @Failure 500 {object} ErrorResponse "Internal server error" @Security ApiKeyAuth @Router /api/v1/stats/system [get]

func UpdateStoredBrowserActions

func UpdateStoredBrowserActions(c *fiber.Ctx) error

UpdateStoredBrowserActions handles the API request for updating a StoredBrowserActions @Summary Update a StoredBrowserActions @Description Updates an existing StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Param input body BrowserActionsInput true "BrowserActionsInput object to update" @Success 200 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [put]

func UpdateWorkspace

func UpdateWorkspace(c *fiber.Ctx) error

UpdateWorkspace godoc @Summary Update a workspace @Description Updates a workspace by ID @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Param workspace body WorkspaceUpdateInput true "Workspace object" @Success 200 {object} db.Workspace @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [put]

func UserSignIn

func UserSignIn(c *fiber.Ctx) error

UserSignIn method to auth user and return access and refresh tokens. @Description Auth user and return access and refresh token. @Summary auth user and return access and refresh token @Tags Auth @Accept json @Produce json @Param signIn body SignIn true "SignIn payload" @Success 200 {object} SignInResponse @Router /api/v1/auth/user/sign/in [post]

func UserSignOut

func UserSignOut(c *fiber.Ctx) error

UserSignOut method to de-authorize user and delete refresh token. @Description De-authorize user and delete refresh token. @Summary de-authorize user and delete refresh token @Tags Auth @Accept json @Produce json @Success 204 {string} status "ok" @Security ApiKeyAuth @Router /api/v1/auth/user/sign/out [post]

func WorkspaceStats

func WorkspaceStats(c *fiber.Ctx) error

WorkspaceStats retrieves statistics for a given workspace.

@Summary Retrieves workspace statistics including counts of issues, history entries, JWTs, websocket connections, tasks, etc @Tags Stats @Accept json @Produce json @Param workspace_id path int true "Workspace ID" @Success 200 {object} db.WorkspaceStats "Successfully retrieved stats" @Failure 400 {object} ErrorResponse "Invalid workspace ID" @Failure 500 {object} ErrorResponse "Internal server error" @Security ApiKeyAuth @Router /api/v1/stats/workspace [get]

Types

type ActionResponse

type ActionResponse struct {
	Message string `json:"message"`
}

type ActiveScanInput

type ActiveScanInput struct {
	Items       []uint `json:"items" validate:"required,dive,min=0"`
	WorkspaceID uint   `json:"workspace" validate:"omitempty,min=0"`
	TaskID      uint   `json:"task" validate:"omitempty,min=0"`
}

type BrowserActionsInput

type BrowserActionsInput struct {
	actions.BrowserActions
	Scope       db.BrowserActionScope `json:"scope" validate:"required,oneof=global workspace"`
	WorkspaceID *uint                 `json:"workspace_id,omitempty" validate:"omitempty"`
}

type BrowserReplayActionsInput

type BrowserReplayActionsInput struct {
	PreRequestActionID  *uint `json:"pre_request_action_id" validate:"omitempty"`
	PostRequestActionID *uint `json:"post_request_action_id" validate:"omitempty"`
}

type CreatePlaygroundCollectionInput

type CreatePlaygroundCollectionInput struct {
	Name        string `json:"name" validate:"required"`
	Description string `json:"description"`
	WorkspaceID uint   `json:"workspace_id" validate:"required,min=0"`
}

CreatePlaygroundCollectionInput represents the input for creating a Playground Collection.

type CreatePlaygroundSessionInput

type CreatePlaygroundSessionInput struct {
	Name              string                   `json:"name" validate:"required"`
	Type              db.PlaygroundSessionType `json:"type"`
	OriginalRequestID uint                     `json:"original_request_id" validate:"omitempty,min=0"`
	CollectionID      uint                     `json:"collection_id" validate:"required,min=0"`
}

CreatePlaygroundSessionInput represents the input for creating a Playground Session.

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

type HistorySummary

type HistorySummary struct {
	ID              uint   `json:"id"`
	Depth           int    `json:"depth"`
	URL             string `json:"url"`
	StatusCode      int    `json:"status_code"`
	Method          string `json:"method"`
	ParametersCount int    `json:"parameters_count"`
}

type IssueUpdateResponse

type IssueUpdateResponse struct {
	Message string   `json:"message"`
	Issue   db.Issue `json:"issue"`
}

type PassiveScanInput

type PassiveScanInput struct {
	Items []uint `json:"items" validate:"required,dive,min=0"`
}

type PlaygroundFuzzInput

type PlaygroundFuzzInput struct {
	URL             string                        `json:"url" validate:"required" example:"https://example.com/"`
	RawRequest      string                        `json:"raw_request" validate:"required" example:"GET / HTTP/1.1\r\nHost: example.com\r\n\r\n"`
	InsertionPoints []manual.FuzzerInsertionPoint `json:"insertion_points" validate:"required"`
	SessionID       uint                          `json:"session_id" validate:"required"`
	Options         manual.RequestOptions         `json:"options"`
}

type PlaygroundFuzzResponse

type PlaygroundFuzzResponse struct {
	Message       string `json:"message"`
	TaskID        uint   `json:"task_id"`
	RequestsCount int    `json:"requests_count"`
}

type PlaygroundReplayInput

type PlaygroundReplayInput struct {
	Mode           string                    `json:"mode" validate:"required,oneof=raw browser"`
	Request        manual.Request            `json:"request" validate:"required"`
	Options        manual.RequestOptions     `json:"options"`
	BrowserActions BrowserReplayActionsInput `json:"browser_actions" validate:"omitempty"`
	SessionID      uint                      `json:"session_id" validate:"required"`
}

type Renew

type Renew struct {
	RefreshToken string `json:"refresh_token"`
}

type RenewTokensResponse

type RenewTokensResponse struct {
	Error  bool        `json:"error"`
	Msg    string      `json:"msg"`
	Tokens auth.Tokens `json:"tokens"`
}

type ReportRequest

type ReportRequest struct {
	WorkspaceID   uint                `json:"workspace_id" validate:"required"`
	Title         string              `json:"title" validate:"required"`
	Format        report.ReportFormat `json:"format" validate:"required,oneof=html json"`
	MinConfidence int                 `json:"min_confidence" validate:"omitempty"`
}

ReportRequest represents the structure of the JSON payload for generating a report.

type RootNode

type RootNode struct {
	ID    uint   `json:"id"`
	Depth int    `json:"depth"`
	URL   string `json:"url"`
}

type SignIn

type SignIn struct {
	Email    string `json:"email" validate:"required,email,lte=255"`
	Password string `json:"password" validate:"required,lte=255"`
}

SignIn struct to describe login user.

type SignInResponse

type SignInResponse struct {
	Error  bool         `json:"error"`
	Msg    *string      `json:"msg"`
	Tokens SignInTokens `json:"tokens"`
}

SignInResponse represents the response from the UserSignIn endpoint.

type SignInTokens

type SignInTokens struct {
	Access  string `json:"access"`
	Refresh string `json:"refresh"`
}

type WorkspaceCreateInput

type WorkspaceCreateInput struct {
	Code        string `json:"code"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

WorkspaceCreateInput defines the acceptable input for creating a workspace

type WorkspaceUpdateInput

type WorkspaceUpdateInput struct {
	Code        string `json:"code"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

WorkspaceUpdateInput defines the acceptable input for updating a workspace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL