Skip to content

Latest commit

 

History

History
359 lines (227 loc) · 11.5 KB

PasswordPoliciesAPI.md

File metadata and controls

359 lines (227 loc) · 11.5 KB

\PasswordPoliciesAPI

All URIs are relative to https://sailpoint.api.identitynow.com/beta

Method HTTP request Description
CreatePasswordPolicy Post /password-policies Create Password Policy
DeletePasswordPolicy Delete /password-policies/{id} Delete Password Policy by ID
GetPasswordPolicyById Get /password-policies/{id} Get Password Policy by ID
ListPasswordPolicies Get /password-policies List Password Policies
SetPasswordPolicy Put /password-policies/{id} Update Password Policy by ID

CreatePasswordPolicy

PasswordPolicyV3Dto CreatePasswordPolicy(ctx).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()

Create Password Policy

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
	passwordPolicyV3Dto := *openapiclient.NewPasswordPolicyV3Dto() // PasswordPolicyV3Dto | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
passwordPolicyV3Dto PasswordPolicyV3Dto

Return type

PasswordPolicyV3Dto

Authorization

userAuth, userAuth

HTTP request headers

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

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

DeletePasswordPolicy

DeletePasswordPolicy(ctx, id).Execute()

Delete Password Policy by ID

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
	id := "ff808081838d9e9d01838da6a03e0002" // string | The ID of password policy to delete.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.PasswordPoliciesAPI.DeletePasswordPolicy(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.DeletePasswordPolicy``: %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 The ID of password policy to delete.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

userAuth, userAuth

HTTP request headers

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

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

GetPasswordPolicyById

PasswordPolicyV3Dto GetPasswordPolicyById(ctx, id).Execute()

Get Password Policy by ID

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
	id := "ff808081838d9e9d01838da6a03e0005" // string | The ID of password policy to retrieve.

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of password policy to retrieve.

Other Parameters

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

Name Type Description Notes

Return type

PasswordPolicyV3Dto

Authorization

userAuth, userAuth

HTTP request headers

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

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

ListPasswordPolicies

[]PasswordPolicyV3Dto ListPasswordPolicies(ctx).Limit(limit).Offset(offset).Count(count).Execute()

List Password Policies

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
	limit := int32(250) // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
	offset := int32(0) // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
	count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored.  Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used.  See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PasswordPoliciesAPI.ListPasswordPolicies(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.ListPasswordPolicies``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListPasswordPolicies`: []PasswordPolicyV3Dto
	fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.ListPasswordPolicies`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit int32 Max number of results to return. See V3 API Standard Collection Parameters for more information. [default to 250]
offset int32 Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. [default to 0]
count bool If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information. [default to false]

Return type

[]PasswordPolicyV3Dto

Authorization

userAuth, userAuth

HTTP request headers

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

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

SetPasswordPolicy

PasswordPolicyV3Dto SetPasswordPolicy(ctx, id).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()

Update Password Policy by ID

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
	id := "ff808081838d9e9d01838da6a03e0007" // string | The ID of password policy to update.
	passwordPolicyV3Dto := *openapiclient.NewPasswordPolicyV3Dto() // PasswordPolicyV3Dto | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of password policy to update.

Other Parameters

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

Name Type Description Notes

passwordPolicyV3Dto | PasswordPolicyV3Dto | |

Return type

PasswordPolicyV3Dto

Authorization

userAuth, userAuth

HTTP request headers

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

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