Update Non-Employee Record
PUThttps://sailpoint.api.identitynow.com/v3/non-employee-records/:id
This request will update a non-employee record. There are two contextual uses for this endpoint:
- The user has the role context of
idn:nesr:update
, in which case they update all available fields. - The user is owner of the source, in this case they can only update the end date.
Request
Path Parameters
Non-employee record id (UUID)
- application/json
Bodyrequired
Non-employee record creation request body. Attributes are restricted by user type. Owner of source can update end date. Organization admins can update all available fields.
Requested identity account name.
william.smith
Non-Employee's first name.
William
Non-Employee's last name.
Smith
Non-Employee's email.
william.smith@example.com
Non-Employee's phone.
5125555555
The account ID of a valid identity to serve as this non-employee's manager.
jane.doe
Non-Employee's source id.
2c91808568c529c60168cca6f90c1313
data object
Non-Employee employment start date.
2020-03-24T00:00:00-05:00
Non-Employee employment end date.
2021-03-25T00:00:00-05:00
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
An updated non-employee record.
- application/json
- Schema
- Example (auto)
Schema
Non-Employee record id.
ef38f94347e94562b5bb8424a56397d8
Requested identity account name.
Abby.Smith
Non-Employee's first name.
William
Non-Employee's last name.
Smith
Non-Employee's email.
william.smith@example.com
Non-Employee's phone.
5125555555
The account ID of a valid identity to serve as this non-employee's manager.
jane.doe
Non-Employee's source id.
2c91808568c529c60168cca6f90c1313
data object
Non-Employee employment start date.
2019-08-23T18:52:59.162Z
Non-Employee employment end date.
2020-08-23T18:52:59.162Z
When the request was last modified.
2019-08-23T18:52:59.162Z
When the request was created.
2019-08-23T18:40:35.772Z
{
"id": "ef38f94347e94562b5bb8424a56397d8",
"accountName": "Abby.Smith",
"firstName": "William",
"lastName": "Smith",
"email": "william.smith@example.com",
"phone": "5125555555",
"manager": "jane.doe",
"sourceId": "2c91808568c529c60168cca6f90c1313",
"data": {
"description": "Auditing"
},
"startDate": "2019-08-23T18:52:59.162Z",
"endDate": "2020-08-23T18:52:59.162Z",
"modified": "2019-08-23T18:52:59.162Z",
"created": "2019-08-23T18:40:35.772Z"
}
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
type: Personal Access Token
- go
- powershellSailPoint SDK
- pythonSailPoint SDK
- csharp
- curl
- dart
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- r
- ruby
- rust
- shell
- swift
- NATIVE
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sailpoint.api.identitynow.com/v3/non-employee-records/:id"
method := "PUT"
payload := strings.NewReader(`{
"accountName": "william.smith",
"firstName": "William",
"lastName": "Smith",
"email": "william.smith@example.com",
"phone": "5125555555",
"manager": "jane.doe",
"sourceId": "2c91808568c529c60168cca6f90c1313",
"data": {
"description": "Auditing"
},
"startDate": "2020-03-24T00:00:00-05:00",
"endDate": "2021-03-25T00:00:00-05:00"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}