Approve an Approval Item
POSThttps://sailpoint.api.identitynow.com/beta/work-items/:id/approve/:approvalItemId
This API has been deprecated, please refer to Approve an Approval Item for latest API.
This API approves an Approval Item. Either an admin, or the owning/current user must make this request.
Request
Path Parameters
The ID of the work item
The ID of the approval item.
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
A work items details object.
- application/json
- Schema
- Example (auto)
Schema
ID of the work item
2c9180835d2e5168015d32f890ca1581
ID of the requester
2c9180835d2e5168015d32f890ca1581
The displayname of the requester
John Smith
The ID of the owner
2c9180835d2e5168015d32f890ca1581
The name of the owner
Jason Smith
2017-07-11T18:45:37.098Z
2018-06-25T20:22:28.104Z
The description of the work item
Create account on source 'AD'
The state of a work item
Possible values: [Finished
, Rejected
, Returned
, Expired
, Pending
, Canceled
, null
]
Pending
The type of the work item
Possible values: [Unknown
, Generic
, Certification
, Remediation
, Delegation
, Approval
, ViolationReview
, Form
, PolicyViolation
, Challenge
, ImpactAnalysis
, Signoff
, Event
, ManualAction
, Test
]
Generic
remediationItems object[]nullable
approvalItems object[]nullable
The work item name
Account Create
2018-10-19T13:49:37.385Z
The number of items in the work item
19
["The work item ID that was specified was not found."]
form objectnullable
{
"id": "2c9180835d2e5168015d32f890ca1581",
"requesterId": "2c9180835d2e5168015d32f890ca1581",
"requesterDisplayName": "John Smith",
"ownerId": "2c9180835d2e5168015d32f890ca1581",
"ownerName": "Jason Smith",
"created": "2017-07-11T18:45:37.098Z",
"modified": "2018-06-25T20:22:28.104Z",
"description": "Create account on source 'AD'",
"state": "Pending",
"type": "Generic",
"remediationItems": [
{
"id": "2c9180835d2e5168015d32f890ca1581",
"targetId": "2c9180835d2e5168015d32f890ca1581",
"targetName": "john.smith",
"targetDisplayName": "emailAddress",
"applicationName": "Active Directory",
"attributeName": "phoneNumber",
"attributeOperation": "update",
"attributeValue": "512-555-1212",
"nativeIdentity": "jason.smith2"
}
],
"approvalItems": [
{
"id": "2c9180835d2e5168015d32f890ca1581",
"account": "john.smith",
"application": "Active Directory",
"name": "emailAddress",
"operation": "update",
"value": "a@b.com",
"state": "Pending"
}
],
"name": "Account Create",
"completed": "2018-10-19T13:49:37.385Z",
"numItems": 19,
"errors": [
"The work item ID that was specified was not found."
],
"form": {
"id": "2c9180835d2e5168015d32f890ca1581",
"name": "AccountSelection Form",
"title": "Account Selection for John.Doe",
"subtitle": "Please select from the following",
"targetUser": "Jane.Doe",
"sections": [
{
"name": "Field1",
"label": "Section 1",
"formItems": []
}
]
}
}
Client Error - Returned if the request body is invalid.
- application/json
- Schema
- Example (auto)
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
JWT validation failed: JWT is expired
{
"error": "JWT validation failed: JWT is expired"
}
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
- application/json
- Schema
- Example (auto)
- 403
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 403 response object
{
"detailCode": "403 Forbidden",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server understood the request but refuses to authorize it."
}
]
}
Not Found - returned if the request URL refers to a resource or object that does not exist
- application/json
- Schema
- Example (auto)
- 404
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 404 response object
{
"detailCode": "404 Not found",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server did not find a current representation for the target resource."
}
]
}
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
Rate Limit Exceeded
{
"message": " Rate Limit Exceeded "
}
Internal Server Error - Returned if there is an unexpected error.
- application/json
- Schema
- Example (auto)
- 500
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 500 response object
{
"detailCode": "500.0 Internal Fault",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "An internal fault occurred."
}
]
}
Authorization: oauth2
- goSailPoint SDK
- powershellSailPoint SDK
- pythonSailPoint SDK
- csharp
- curl
- dart
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- r
- ruby
- rust
- shell
- swift
- SDK
- NATIVE
package main
import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
approvalItemId := `1211bcaa32112bcef6122adb21cef1ac` // string | The ID of the approval item. # string | The ID of the approval item.
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkItemsAPI.ApproveApprovalItem(context.Background(), id, approvalItemId).Execute()
//resp, r, err := apiClient.Beta.WorkItemsAPI.ApproveApprovalItem(context.Background(), id, approvalItemId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.ApproveApprovalItem``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApproveApprovalItem`: WorkItems
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.ApproveApprovalItem`: %v\n", resp)
}