Skip to content

Latest commit

 

History

History
156 lines (98 loc) · 4.01 KB

IconsAPI.md

File metadata and controls

156 lines (98 loc) · 4.01 KB

\IconsAPI

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

Method HTTP request Description
DeleteIcon Delete /icons/{objectType}/{objectId} Delete an icon
SetIcon Put /icons/{objectType}/{objectId} Update an icon

DeleteIcon

DeleteIcon(ctx, objectType, objectId).Execute()

Delete an icon

Example

package main

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

func main() {
	objectType := "application" // string | Object type
	objectId := "a291e870-48c3-4953-b656-fb5ce2a93169" // string | Object id.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.IconsAPI.DeleteIcon(context.Background(), objectType, objectId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IconsAPI.DeleteIcon``: %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.
objectType string Object type
objectId string Object id.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteIconRequest 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]

SetIcon

SetIcon200Response SetIcon(ctx, objectType, objectId).Image(image).Execute()

Update an icon

Example

package main

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

func main() {
	objectType := "application" // string | Object type
	objectId := "a291e870-48c3-4953-b656-fb5ce2a93169" // string | Object id.
	image := os.NewFile(1234, "some_file") // *os.File | file with icon. Allowed mime-types ['image/png', 'image/jpeg']

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.IconsAPI.SetIcon(context.Background(), objectType, objectId).Image(image).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IconsAPI.SetIcon``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SetIcon`: SetIcon200Response
	fmt.Fprintf(os.Stdout, "Response from `IconsAPI.SetIcon`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
objectType string Object type
objectId string Object id.

Other Parameters

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

Name Type Description Notes

image | *os.File | file with icon. Allowed mime-types ['image/png', 'image/jpeg'] |

Return type

SetIcon200Response

Authorization

userAuth, userAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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