From 230e4cf6f6f76ed6ffdca18a6bae1834d51850ba Mon Sep 17 00:00:00 2001 From: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com> Date: Sat, 17 Aug 2024 06:46:04 +0000 Subject: [PATCH] Refactor new documentation links Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com> --- README.md | 4 ++-- gointelowl/analysis.go | 8 ++++---- gointelowl/analyzer.go | 6 +++--- gointelowl/connector.go | 6 +++--- gointelowl/job.go | 20 ++++++++++---------- gointelowl/me.go | 10 +++++----- gointelowl/tag.go | 12 ++++++------ 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 02ccae7..d4bc54f 100644 --- a/README.md +++ b/README.md @@ -127,8 +127,8 @@ Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE. # Links - [Intelowl](https://github.com/intelowlproject/IntelOwl) -- [Documentation](https://intelowl.readthedocs.io/en/latest/) -- [API documentation](https://intelowl.readthedocs.io/en/latest/Redoc.html) +- [Documentation](https://intelowlproject.github.io/docs/) +- [API documentation](https://intelowlproject.github.io/docs/IntelOwl/api_docs/) - [Examples](./examples/) # FAQ diff --git a/gointelowl/analysis.go b/gointelowl/analysis.go index af266bd..c729148 100644 --- a/gointelowl/analysis.go +++ b/gointelowl/analysis.go @@ -66,7 +66,7 @@ type MultipleAnalysisResponse struct { // // Endpoint: POST /api/analyze_observable // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_observable +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_observable func (client *IntelOwlClient) CreateObservableAnalysis(ctx context.Context, params *ObservableAnalysisParams) (*AnalysisResponse, error) { requestUrl := client.options.Url + constants.ANALYZE_OBSERVABLE_URL method := "POST" @@ -95,7 +95,7 @@ func (client *IntelOwlClient) CreateObservableAnalysis(ctx context.Context, para // // Endpoint: POST /api/analyze_multiple_observables // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_multiple_observables +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_multiple_observables func (client *IntelOwlClient) CreateMultipleObservableAnalysis(ctx context.Context, params *MultipleObservableAnalysisParams) (*MultipleAnalysisResponse, error) { requestUrl := client.options.Url + constants.ANALYZE_MULTIPLE_OBSERVABLES_URL method := "POST" @@ -123,7 +123,7 @@ func (client *IntelOwlClient) CreateMultipleObservableAnalysis(ctx context.Conte // // Endpoint: POST /api/analyze_file // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_file +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_file func (client *IntelOwlClient) CreateFileAnalysis(ctx context.Context, fileAnalysisParams *FileAnalysisParams) (*AnalysisResponse, error) { requestUrl := client.options.Url + constants.ANALYZE_FILE_URL // * Making the multiform data @@ -201,7 +201,7 @@ func (client *IntelOwlClient) CreateFileAnalysis(ctx context.Context, fileAnalys // // Endpoint: POST /api/analyze_mutliple_files // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_multiple_files +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_multiple_files func (client *IntelOwlClient) CreateMultipleFileAnalysis(ctx context.Context, fileAnalysisParams *MultipleFileAnalysisParams) (*MultipleAnalysisResponse, error) { requestUrl := client.options.Url + constants.ANALYZE_MULTIPLE_FILES_URL // * Making the multiform data diff --git a/gointelowl/analyzer.go b/gointelowl/analyzer.go index 041fd25..510e05e 100644 --- a/gointelowl/analyzer.go +++ b/gointelowl/analyzer.go @@ -27,7 +27,7 @@ type AnalyzerConfig struct { // AnalyzerService handles communication with analyzer related methods of the IntelOwl API. // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyzer +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyzer type AnalyzerService struct { client *IntelOwlClient } @@ -36,7 +36,7 @@ type AnalyzerService struct { // // Endpoint: GET /api/get_analyzer_configs // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/get_analyzer_configs +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/get_analyzer_configs func (analyzerService *AnalyzerService) GetConfigs(ctx context.Context) (*[]AnalyzerConfig, error) { requestUrl := analyzerService.client.options.Url + constants.ANALYZER_CONFIG_URL contentType := "application/json" @@ -74,7 +74,7 @@ func (analyzerService *AnalyzerService) GetConfigs(ctx context.Context) (*[]Anal // // Endpoint: GET /api/analyzer/{NameOfAnalyzer}/healthcheck // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyzer/operation/analyzer_healthcheck_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyzer/operation/analyzer_healthcheck_retrieve func (analyzerService *AnalyzerService) HealthCheck(ctx context.Context, analyzerName string) (bool, error) { route := analyzerService.client.options.Url + constants.ANALYZER_HEALTHCHECK_URL requestUrl := fmt.Sprintf(route, analyzerName) diff --git a/gointelowl/connector.go b/gointelowl/connector.go index 49ba3fd..ab3845f 100644 --- a/gointelowl/connector.go +++ b/gointelowl/connector.go @@ -19,7 +19,7 @@ type ConnectorConfig struct { // ConnectorService handles communication with connector related methods of the IntelOwl API. // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/connector +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/connector type ConnectorService struct { client *IntelOwlClient } @@ -28,7 +28,7 @@ type ConnectorService struct { // // Endpoint: GET /api/get_connector_configs // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/get_connector_configs +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/get_connector_configs func (connectorService *ConnectorService) GetConfigs(ctx context.Context) (*[]ConnectorConfig, error) { requestUrl := connectorService.client.options.Url + constants.CONNECTOR_CONFIG_URL contentType := "application/json" @@ -66,7 +66,7 @@ func (connectorService *ConnectorService) GetConfigs(ctx context.Context) (*[]Co // // Endpoint: GET /api/connector/{NameOfConnector}/healthcheck // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/connector/operation/connector_healthcheck_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/connector/operation/connector_healthcheck_retrieve func (connectorService *ConnectorService) HealthCheck(ctx context.Context, connectorName string) (bool, error) { route := connectorService.client.options.Url + constants.CONNECTOR_HEALTHCHECK_URL requestUrl := fmt.Sprintf(route, connectorName) diff --git a/gointelowl/job.go b/gointelowl/job.go index 8f5c7df..3fdf259 100644 --- a/gointelowl/job.go +++ b/gointelowl/job.go @@ -72,7 +72,7 @@ type JobListResponse struct { // JobService handles communication with job related methods of IntelOwl API. // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs type JobService struct { client *IntelOwlClient } @@ -81,7 +81,7 @@ type JobService struct { // // Endpoint: GET /api/jobs // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_list +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_list func (jobService *JobService) List(ctx context.Context) (*JobListResponse, error) { requestUrl := jobService.client.options.Url + constants.BASE_JOB_URL contentType := "application/json" @@ -107,7 +107,7 @@ func (jobService *JobService) List(ctx context.Context) (*JobListResponse, error // // Endpoint: GET /api/jobs/{jobID} // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_retrieve func (jobService *JobService) Get(ctx context.Context, jobId uint64) (*Job, error) { route := jobService.client.options.Url + constants.SPECIFIC_JOB_URL requestUrl := fmt.Sprintf(route, jobId) @@ -133,7 +133,7 @@ func (jobService *JobService) Get(ctx context.Context, jobId uint64) (*Job, erro // // Endpoint: GET /api/jobs/{jobID}/download_sample // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_download_sample_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_download_sample_retrieve func (jobService *JobService) DownloadSample(ctx context.Context, jobId uint64) ([]byte, error) { route := jobService.client.options.Url + constants.DOWNLOAD_SAMPLE_JOB_URL requestUrl := fmt.Sprintf(route, jobId) @@ -154,7 +154,7 @@ func (jobService *JobService) DownloadSample(ctx context.Context, jobId uint64) // // Endpoint: DELETE /api/jobs/{jobID} // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_destroy +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_destroy func (jobService *JobService) Delete(ctx context.Context, jobId uint64) (bool, error) { route := jobService.client.options.Url + constants.SPECIFIC_JOB_URL requestUrl := fmt.Sprintf(route, jobId) @@ -178,7 +178,7 @@ func (jobService *JobService) Delete(ctx context.Context, jobId uint64) (bool, e // // Endpoint: PATCH /api/jobs/{jobID}/kill // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_kill_partial_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_kill_partial_update func (jobService *JobService) Kill(ctx context.Context, jobId uint64) (bool, error) { route := jobService.client.options.Url + constants.KILL_JOB_URL requestUrl := fmt.Sprintf(route, jobId) @@ -202,7 +202,7 @@ func (jobService *JobService) Kill(ctx context.Context, jobId uint64) (bool, err // // Endpoint: PATCH /api/jobs/{jobID}/analyzer/{nameOfAnalyzer}/kill // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_analyzer_kill_partial_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_analyzer_kill_partial_update func (jobService *JobService) KillAnalyzer(ctx context.Context, jobId uint64, analyzerName string) (bool, error) { route := jobService.client.options.Url + constants.KILL_ANALYZER_JOB_URL requestUrl := fmt.Sprintf(route, jobId, analyzerName) @@ -226,7 +226,7 @@ func (jobService *JobService) KillAnalyzer(ctx context.Context, jobId uint64, an // // Endpoint: PATCH /api/jobs/{jobID}/analyzer/{nameOfAnalyzer}/retry // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_analyzer_retry_partial_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_analyzer_retry_partial_update func (jobService *JobService) RetryAnalyzer(ctx context.Context, jobId uint64, analyzerName string) (bool, error) { route := jobService.client.options.Url + constants.RETRY_ANALYZER_JOB_URL requestUrl := fmt.Sprintf(route, jobId, analyzerName) @@ -250,7 +250,7 @@ func (jobService *JobService) RetryAnalyzer(ctx context.Context, jobId uint64, a // // Endpoint: PATCH /api/jobs/{jobID}/connector/{nameOfConnector}/kill // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_connector_kill_partial_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_connector_kill_partial_update func (jobService *JobService) KillConnector(ctx context.Context, jobId uint64, connectorName string) (bool, error) { route := jobService.client.options.Url + constants.KILL_CONNECTOR_JOB_URL requestUrl := fmt.Sprintf(route, jobId, connectorName) @@ -274,7 +274,7 @@ func (jobService *JobService) KillConnector(ctx context.Context, jobId uint64, c // // Endpoint: PATCH /api/jobs/{jobID}/connector/{nameOfConnector}/retry // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_connector_retry_partial_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_connector_retry_partial_update func (jobService *JobService) RetryConnector(ctx context.Context, jobId uint64, connectorName string) (bool, error) { route := jobService.client.options.Url + constants.RETRY_CONNECTOR_JOB_URL requestUrl := fmt.Sprintf(route, jobId, connectorName) diff --git a/gointelowl/me.go b/gointelowl/me.go index 7c78768..4529c68 100644 --- a/gointelowl/me.go +++ b/gointelowl/me.go @@ -74,7 +74,7 @@ type InvitationParams struct { // // Endpoint: GET /api/me/access // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_access_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_access_retrieve func (userService *UserService) Access(ctx context.Context) (*User, error) { requestUrl := userService.client.options.Url + constants.USER_DETAILS_URL contentType := "application/json" @@ -98,7 +98,7 @@ func (userService *UserService) Access(ctx context.Context) (*User, error) { // // Endpoint: GET /api/me/organization // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_list +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_list func (userService *UserService) Organization(ctx context.Context) (*Organization, error) { requestUrl := userService.client.options.Url + constants.ORGANIZATION_URL contentType := "application/json" @@ -123,7 +123,7 @@ func (userService *UserService) Organization(ctx context.Context) (*Organization // // Endpoint: POST /api/me/organization // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_create +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_create func (userService *UserService) CreateOrganization(ctx context.Context, organizationParams *OrganizationParams) (*Organization, error) { requestUrl := userService.client.options.Url + constants.ORGANIZATION_URL // Getting the relevant JSON data @@ -155,7 +155,7 @@ func (userService *UserService) CreateOrganization(ctx context.Context, organiza // // Endpoint: POST /api/me/organization/invite // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_invite_create +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_invite_create func (userService *UserService) InviteToOrganization(ctx context.Context, memberParams *MemberParams) (*Invite, error) { requestUrl := userService.client.options.Url + constants.INVITE_TO_ORGANIZATION_URL // Getting the relevant JSON data @@ -187,7 +187,7 @@ func (userService *UserService) InviteToOrganization(ctx context.Context, member // // Endpoint: POST /api/me/organization/remove_member // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_create +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_create func (userService *UserService) RemoveMemberFromOrganization(ctx context.Context, memberParams *MemberParams) (bool, error) { requestUrl := userService.client.options.Url + constants.REMOVE_MEMBER_FROM_ORGANIZATION_URL // Getting the relevant JSON data diff --git a/gointelowl/tag.go b/gointelowl/tag.go index 2594c26..739a888 100644 --- a/gointelowl/tag.go +++ b/gointelowl/tag.go @@ -26,7 +26,7 @@ type Tag struct { // TagService handles communication with tag related methods of IntelOwl API. // -// IntelOwl REST API tag docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags +// IntelOwl REST API tag docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags type TagService struct { client *IntelOwlClient } @@ -43,7 +43,7 @@ func checkTagID(id uint64) error { // // Endpoint: GET "/api/tags" // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_list +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_list func (tagService *TagService) List(ctx context.Context) (*[]Tag, error) { requestUrl := tagService.client.options.Url + constants.BASE_TAG_URL contentType := "application/json" @@ -69,7 +69,7 @@ func (tagService *TagService) List(ctx context.Context) (*[]Tag, error) { // // Endpoint: GET "/api/tags/{id}" // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_retrieve +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_retrieve func (tagService *TagService) Get(ctx context.Context, tagId uint64) (*Tag, error) { if err := checkTagID(tagId); err != nil { return nil, err @@ -98,7 +98,7 @@ func (tagService *TagService) Get(ctx context.Context, tagId uint64) (*Tag, erro // // Endpoint: POST "/api/tags/" // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_create +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_create func (tagService *TagService) Create(ctx context.Context, tagParams *TagParams) (*Tag, error) { requestUrl := tagService.client.options.Url + constants.BASE_TAG_URL tagJson, err := json.Marshal(tagParams) @@ -128,7 +128,7 @@ func (tagService *TagService) Create(ctx context.Context, tagParams *TagParams) // // Endpoint: PUT "/api/tags/{id}" // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_update +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_update func (tagService *TagService) Update(ctx context.Context, tagId uint64, tagParams *TagParams) (*Tag, error) { route := tagService.client.options.Url + constants.SPECIFIC_TAG_URL requestUrl := fmt.Sprintf(route, tagId) @@ -161,7 +161,7 @@ func (tagService *TagService) Update(ctx context.Context, tagId uint64, tagParam // // Endpoint: DELETE "/api/tags/{id}" // -// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_destroy +// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_destroy func (tagService *TagService) Delete(ctx context.Context, tagId uint64) (bool, error) { if err := checkTagID(tagId); err != nil { return false, err