Grant Field Permissions
1 min
POST
https://api.nue.io/cpq/field-permissions
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/json*/*
Body Parameters
- bodyGrantFieldPermissionsRequestrequired
- permissionSetIdsstring[]Description
- permissionSetNamesstring[]Description
- fieldsFieldPermissionTarget[]requiredDescription
- objectApiNamestringrequiredDescription
- fieldApiNamestringrequiredDescription
- readablebooleanDescriptionDefaulttrue
- editablebooleanDescriptionDefaulttrue
Responses
200
- GrantFieldPermissionsResponse
- successbooleanDescription
- grantedinteger<int32>DescriptionFormatint32
- failedinteger<int32>DescriptionFormatint32
- resultsFieldPermissionResult[]Description
- permissionSetIdstringDescription
- permissionSetNamestringDescription
- objectApiNamestringDescription
- fieldApiNamestringDescription
- readablebooleanDescription
- editablebooleanDescription
- createdbooleanDescription
- updatedbooleanDescription
- unchangedbooleanDescription
- errorstringDescription
- errorsstring[]Description
- warningsstring[]Description
- syncedToNuebooleanDescription
400
404
501
curl
curl --request POST \
--url https://api.nue.io/cpq/field-permissions \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"fields": [
{
"objectApiName": "",
"fieldApiName": ""
}
],
"readable": true,
"editable": true
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"fields": [
{
"objectApiName": "",
"fieldApiName": ""
}
],
"readable": true,
"editable": true
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/cpq/field-permissions", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.nue.io/cpq/field-permissions")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"fields": [
{
"objectApiName": "",
"fieldApiName": ""
}
],
"readable": true,
"editable": true
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/cpq/field-permissions"
payload = json.dumps({
"fields": [
{
"objectApiName": "",
"fieldApiName": ""
}
],
"readable": True,
"editable": True
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The request was carried out; check success and results for what was actually granted
{
"success": false,
"granted": "",
"failed": "",
"results": [
{
"permissionSetId": "",
"permissionSetName": "",
"objectApiName": "",
"fieldApiName": "",
"readable": false,
"editable": false,
"created": false,
"updated": false,
"unchanged": false,
"error": ""
}
],
"errors": [
""
],
"warnings": [
""
],
"syncedToNue": false
}400
// No permission set was supplied, a name matched more than one permission set, or the request was otherwise incomplete
404
// Not Found
501
// The tenant is not Salesforce-integrated