All URIs are relative to https://sailpoint.api.identitynow.com/v3
Method | HTTP request | Description |
---|---|---|
CreatePersonalAccessToken | Post /personal-access-tokens | Create Personal Access Token |
DeletePersonalAccessToken | Delete /personal-access-tokens/{id} | Delete Personal Access Token |
ListPersonalAccessTokens | Get /personal-access-tokens | List Personal Access Tokens |
CreatePersonalAccessTokenResponse CreatePersonalAccessToken(ctx).CreatePersonalAccessTokenRequest(createPersonalAccessTokenRequest).Execute()
Create Personal Access Token
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createPersonalAccessTokenRequest := *openapiclient.NewCreatePersonalAccessTokenRequest("NodeJS Integration") // CreatePersonalAccessTokenRequest | Name and scope of personal access token.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PersonalAccessTokensApi.CreatePersonalAccessToken(context.Background()).CreatePersonalAccessTokenRequest(createPersonalAccessTokenRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensApi.CreatePersonalAccessToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePersonalAccessToken`: CreatePersonalAccessTokenResponse
fmt.Fprintf(os.Stdout, "Response from `PersonalAccessTokensApi.CreatePersonalAccessToken`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreatePersonalAccessTokenRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createPersonalAccessTokenRequest | CreatePersonalAccessTokenRequest | Name and scope of personal access token. |
CreatePersonalAccessTokenResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeletePersonalAccessToken(ctx, id).Execute()
Delete Personal Access Token
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "ef38f94347e94562b5bb8424a56397d8" // string | The personal access token id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PersonalAccessTokensApi.DeletePersonalAccessToken(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensApi.DeletePersonalAccessToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The personal access token id |
Other parameters are passed through a pointer to a apiDeletePersonalAccessTokenRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetPersonalAccessTokenResponse ListPersonalAccessTokens(ctx).OwnerId(ownerId).Execute()
List Personal Access Tokens
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ownerId := "2c9180867b50d088017b554662fb281e" // string | The identity ID of the owner whose personal access tokens should be listed. </br> If \"me\", the caller should have the following right: 'idn:my-personal-access-tokens:read'</br> </br> If an actual owner ID or if the <code>owner-id</code> parameter is omitted in the request, </br> the caller should have the following right: 'idn:all-personal-access-tokens:read'. </br> </br> If the caller has the following right, then managed personal access tokens associated with <code>owner-id</code> </br> will be retrieved: 'idn:managed-personal-access-tokens:read' (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PersonalAccessTokensApi.ListPersonalAccessTokens(context.Background()).OwnerId(ownerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensApi.ListPersonalAccessTokens``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPersonalAccessTokens`: []GetPersonalAccessTokenResponse
fmt.Fprintf(os.Stdout, "Response from `PersonalAccessTokensApi.ListPersonalAccessTokens`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListPersonalAccessTokensRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
ownerId | string | The identity ID of the owner whose personal access tokens should be listed. </br> If "me", the caller should have the following right: 'idn:my-personal-access-tokens:read'</br> </br> If an actual owner ID or if the <code>owner-id</code> parameter is omitted in the request, </br> the caller should have the following right: 'idn:all-personal-access-tokens:read'. </br> </br> If the caller has the following right, then managed personal access tokens associated with <code>owner-id</code> </br> will be retrieved: 'idn:managed-personal-access-tokens:read' |
[]GetPersonalAccessTokenResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]