Skip to content

Latest commit

 

History

History
570 lines (379 loc) · 22 KB

AgentApi.md

File metadata and controls

570 lines (379 loc) · 22 KB

\AgentApi

All URIs are relative to http://keyfactor.example.com

Method HTTP request Description
AgentApprove Post /Agents/Approve Approve a list of agents
AgentDisapprove Post /Agents/Disapprove Disapprove a list of agents
AgentFetchLogs Post /Agents/{id}/FetchLogs Schedules a job on the agent to retrieve log files
AgentGetAgentDetail Get /Agents/{id} Returns details for a single agent, specified by ID
AgentGetAgents Get /Agents Returns all agents according to the provided filter and output parameters
AgentReset0 Post /Agents/Reset Reset a list of agents
AgentReset1 Post /Agents/{id}/Reset Reset an agent to a new state
AgentSetAuthCertificateReenrollment Post /Agents/SetAuthCertificateReenrollment Update the AuthCertificateReenrollment value for an agent to request or require (or unset the request) the agent to enroll for a new client authentication certificate on its next registration.

AgentApprove

AgentApprove(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Approve a list of agents

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    agentIds := []string{"Property_example"} // []string | List of Agent Ids to Approve
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentApprove(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentApprove``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAgentApproveRequest struct via the builder pattern

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
agentIds []string List of Agent Ids to Approve
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentDisapprove

AgentDisapprove(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Disapprove a list of agents

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    agentIds := []string{"Property_example"} // []string | List of Agent Ids to Disapprove
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentDisapprove(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentDisapprove``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAgentDisapproveRequest struct via the builder pattern

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
agentIds []string List of Agent Ids to Disapprove
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentFetchLogs

AgentFetchLogs(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Schedules a job on the agent to retrieve log files

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Guid Id of the agent to schedule the job for.
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentFetchLogs(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentFetchLogs``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Guid Id of the agent to schedule the job for.

Other Parameters

Other parameters are passed through a pointer to a apiAgentFetchLogsRequest struct via the builder pattern

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentGetAgentDetail

KeyfactorApiModelsOrchestratorsAgentResponse AgentGetAgentDetail(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Returns details for a single agent, specified by ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Agent Id to Search
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentGetAgentDetail(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentGetAgentDetail``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AgentGetAgentDetail`: KeyfactorApiModelsOrchestratorsAgentResponse
    fmt.Fprintf(os.Stdout, "Response from `AgentApi.AgentGetAgentDetail`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Agent Id to Search

Other Parameters

Other parameters are passed through a pointer to a apiAgentGetAgentDetailRequest struct via the builder pattern

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

KeyfactorApiModelsOrchestratorsAgentResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentGetAgents

[]KeyfactorApiModelsOrchestratorsAgentResponse AgentGetAgents(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).PqQueryString(pqQueryString).PqPageReturned(pqPageReturned).PqReturnLimit(pqReturnLimit).PqSortField(pqSortField).PqSortAscending(pqSortAscending).Execute()

Returns all agents according to the provided filter and output parameters

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")
    pqQueryString := "pqQueryString_example" // string | Contents of the query (ex: field1 -eq value1 AND field2 -gt value2) (optional)
    pqPageReturned := int32(56) // int32 | The current page within the result set to be returned (optional)
    pqReturnLimit := int32(56) // int32 | Maximum number of records to be returned in a single call (optional)
    pqSortField := "pqSortField_example" // string | Field by which the results should be sorted (view results via Management Portal for sortable columns) (optional)
    pqSortAscending := int32(56) // int32 | Field sort direction [0=ascending, 1=descending] (optional)

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentGetAgents(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).PqQueryString(pqQueryString).PqPageReturned(pqPageReturned).PqReturnLimit(pqReturnLimit).PqSortField(pqSortField).PqSortAscending(pqSortAscending).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentGetAgents``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AgentGetAgents`: []KeyfactorApiModelsOrchestratorsAgentResponse
    fmt.Fprintf(os.Stdout, "Response from `AgentApi.AgentGetAgents`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAgentGetAgentsRequest struct via the builder pattern

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]
pqQueryString string Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)
pqPageReturned int32 The current page within the result set to be returned
pqReturnLimit int32 Maximum number of records to be returned in a single call
pqSortField string Field by which the results should be sorted (view results via Management Portal for sortable columns)
pqSortAscending int32 Field sort direction [0=ascending, 1=descending]

Return type

[]KeyfactorApiModelsOrchestratorsAgentResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentReset0

AgentReset0(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Reset a list of agents

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    agentIds := []string{"Property_example"} // []string | List of Agent Ids to Reset
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentReset0(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AgentIds(agentIds).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentReset0``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAgentReset0Request struct via the builder pattern

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
agentIds []string List of Agent Ids to Reset
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentReset1

AgentReset1(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Reset an agent to a new state

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Guid Id of Agent to reset
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentReset1(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentReset1``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Guid Id of Agent to reset

Other Parameters

Other parameters are passed through a pointer to a apiAgentReset1Request struct via the builder pattern

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AgentSetAuthCertificateReenrollment

KeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentResponse AgentSetAuthCertificateReenrollment(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AuthCertReenrollmentRequest(authCertReenrollmentRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Update the AuthCertificateReenrollment value for an agent to request or require (or unset the request) the agent to enroll for a new client authentication certificate on its next registration.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    authCertReenrollmentRequest := *openapiclient.NewKeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentRequest("Status_example") // KeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentRequest | Object containing orchestrator ids and the new status those orchestrators should have
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AgentApi.AgentSetAuthCertificateReenrollment(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).AuthCertReenrollmentRequest(authCertReenrollmentRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AgentApi.AgentSetAuthCertificateReenrollment``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AgentSetAuthCertificateReenrollment`: KeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentResponse
    fmt.Fprintf(os.Stdout, "Response from `AgentApi.AgentSetAuthCertificateReenrollment`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAgentSetAuthCertificateReenrollmentRequest struct via the builder pattern

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
authCertReenrollmentRequest KeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentRequest Object containing orchestrator ids and the new status those orchestrators should have
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

KeyfactorApiModelsOrchestratorsUpdateOrchestratorAuthCertificateReenrollmentResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]