Skip to content

Latest commit

 

History

History
375 lines (243 loc) · 12.7 KB

AuthenticationPoliciesApi.md

File metadata and controls

375 lines (243 loc) · 12.7 KB

\AuthenticationPoliciesApi

All URIs are relative to https://console.jumpcloud.com/api/v2

Method HTTP request Description
AuthnpoliciesDelete Delete /authn/policies/{id} Delete Authentication Policy
AuthnpoliciesGet Get /authn/policies/{id} Get an authentication policy
AuthnpoliciesList Get /authn/policies List Authentication Policies
AuthnpoliciesPatch Patch /authn/policies/{id} Patch Authentication Policy
AuthnpoliciesPost Post /authn/policies Create an Authentication Policy

AuthnpoliciesDelete

AuthnPolicy AuthnpoliciesDelete(ctx, id).XOrgId(xOrgId).Execute()

Delete Authentication Policy

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    id := "id_example" // string | Unique identifier of the authentication policy
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationPoliciesApi.AuthnpoliciesDelete(context.Background(), id).XOrgId(xOrgId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationPoliciesApi.AuthnpoliciesDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthnpoliciesDelete`: AuthnPolicy
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationPoliciesApi.AuthnpoliciesDelete`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Unique identifier of the authentication policy

Other Parameters

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

Name Type Description Notes

xOrgId | string | Organization identifier that can be obtained from console settings. |

Return type

AuthnPolicy

Authorization

x-api-key

HTTP request headers

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

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

AuthnpoliciesGet

AuthnPolicy AuthnpoliciesGet(ctx, id).XOrgId(xOrgId).Execute()

Get an authentication policy

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    id := "id_example" // string | Unique identifier of the authentication policy
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationPoliciesApi.AuthnpoliciesGet(context.Background(), id).XOrgId(xOrgId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationPoliciesApi.AuthnpoliciesGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthnpoliciesGet`: AuthnPolicy
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationPoliciesApi.AuthnpoliciesGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Unique identifier of the authentication policy

Other Parameters

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

Name Type Description Notes

xOrgId | string | Organization identifier that can be obtained from console settings. |

Return type

AuthnPolicy

Authorization

x-api-key

HTTP request headers

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

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

AuthnpoliciesList

[]AuthnPolicy AuthnpoliciesList(ctx).XOrgId(xOrgId).XTotalCount(xTotalCount).Limit(limit).Skip(skip).Filter(filter).Sort(sort).Execute()

List Authentication Policies

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)
    xTotalCount := int32(56) // int32 |  (optional)
    limit := int32(56) // int32 | The number of records to return at once. Limited to 100. (optional) (default to 10)
    skip := int32(56) // int32 | The offset into the records to return. (optional) (default to 0)
    filter := []string{"Inner_example"} // []string | A filter to apply to the query.  **Filter structure**: `<field>:<operator>:<value>`.  **field** = Populate with a valid field from an endpoint response.  **operator** =  Supported operators are: eq, ne, gt, ge, lt, le, between, search, in. _Note: v1 operators differ from v2 operators._  **value** = Populate with the value you want to search for. Is case sensitive. Supports wild cards.  **EX:** `GET /api/v2/groups?filter=name:eq:Test+Group` (optional) (default to [])
    sort := []string{"Inner_example"} // []string | The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending.  (optional) (default to [])

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationPoliciesApi.AuthnpoliciesList(context.Background()).XOrgId(xOrgId).XTotalCount(xTotalCount).Limit(limit).Skip(skip).Filter(filter).Sort(sort).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationPoliciesApi.AuthnpoliciesList``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthnpoliciesList`: []AuthnPolicy
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationPoliciesApi.AuthnpoliciesList`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xOrgId string Organization identifier that can be obtained from console settings.
xTotalCount int32
limit int32 The number of records to return at once. Limited to 100. [default to 10]
skip int32 The offset into the records to return. [default to 0]
filter []string A filter to apply to the query. Filter structure: `<field>:<operator>:<value>`. field = Populate with a valid field from an endpoint response. operator = Supported operators are: eq, ne, gt, ge, lt, le, between, search, in. Note: v1 operators differ from v2 operators. value = Populate with the value you want to search for. Is case sensitive. Supports wild cards. EX: `GET /api/v2/groups?filter=name:eq:Test+Group` [default to []]
sort []string The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. [default to []]

Return type

[]AuthnPolicy

Authorization

x-api-key

HTTP request headers

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

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

AuthnpoliciesPatch

AuthnPolicy AuthnpoliciesPatch(ctx, id).XOrgId(xOrgId).Body(body).Execute()

Patch Authentication Policy

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    id := "id_example" // string | Unique identifier of the authentication policy
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)
    body := *openapiclient.NewAuthnPolicy() // AuthnPolicy |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationPoliciesApi.AuthnpoliciesPatch(context.Background(), id).XOrgId(xOrgId).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationPoliciesApi.AuthnpoliciesPatch``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthnpoliciesPatch`: AuthnPolicy
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationPoliciesApi.AuthnpoliciesPatch`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Unique identifier of the authentication policy

Other Parameters

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

Name Type Description Notes

xOrgId | string | Organization identifier that can be obtained from console settings. | body | AuthnPolicy | |

Return type

AuthnPolicy

Authorization

x-api-key

HTTP request headers

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

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

AuthnpoliciesPost

AuthnPolicy AuthnpoliciesPost(ctx).XOrgId(xOrgId).Body(body).Execute()

Create an Authentication Policy

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/conductorone/baton-jumpcloud/pkg/jcapi2"
)

func main() {
    xOrgId := "xOrgId_example" // string | Organization identifier that can be obtained from console settings. (optional)
    body := *openapiclient.NewAuthnPolicy() // AuthnPolicy |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationPoliciesApi.AuthnpoliciesPost(context.Background()).XOrgId(xOrgId).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationPoliciesApi.AuthnpoliciesPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthnpoliciesPost`: AuthnPolicy
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationPoliciesApi.AuthnpoliciesPost`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xOrgId string Organization identifier that can be obtained from console settings.
body AuthnPolicy

Return type

AuthnPolicy

Authorization

x-api-key

HTTP request headers

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

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