Skip to content

Latest commit

 

History

History
217 lines (137 loc) · 6.35 KB

ApprovalsAPI.md

File metadata and controls

217 lines (137 loc) · 6.35 KB

\ApprovalsAPI

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

Method HTTP request Description
GetApproval Get /approvals/{id} Get an approval
GetApprovals Get /approvals Get Approvals
PatchApproval Patch /approvals/{id} Change an approval

GetApproval

Approval GetApproval(ctx, id).Execute()

Get an approval

Example

package main

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

func main() {
    id := "38453251-6be2-5f8f-df93-5ce19e295837" // string | ID of the approval that is to be returned

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID of the approval that is to be returned

Other Parameters

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

Name Type Description Notes

Return type

Approval

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

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

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

GetApprovals

[]Approval GetApprovals(ctx).Mine(mine).RequesterId(requesterId).Filters(filters).Execute()

Get Approvals

Example

package main

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

func main() {
    mine := true // bool | Returns the list of approvals for the current caller (optional)
    requesterId := "17e633e7d57e481569df76323169deb6a" // string | Returns the list of approvals for a given requester ID (optional)
    filters := "filters=status eq PENDING" // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)  Filtering is supported for the following fields and operators:  **status**: *eq*  **referenceType**: *eq* (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ApprovalsAPI.GetApprovals(context.Background()).Mine(mine).RequesterId(requesterId).Filters(filters).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ApprovalsAPI.GetApprovals``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetApprovals`: []Approval
    fmt.Fprintf(os.Stdout, "Response from `ApprovalsAPI.GetApprovals`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
mine bool Returns the list of approvals for the current caller
requesterId string Returns the list of approvals for a given requester ID
filters string Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: status: eq referenceType: eq

Return type

[]Approval

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

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

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

PatchApproval

Approval PatchApproval(ctx).ApprovalDto(approvalDto).Execute()

Change an approval

Example

package main

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

func main() {
    approvalDto := *openapiclient.NewApprovalDto() // ApprovalDto | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
approvalDto ApprovalDto

Return type

Approval

Authorization

UserContextAuth, UserContextAuth

HTTP request headers

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

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