cURL
curl --request PATCH \
--url https://us.infisical.com/api/v2/identity-project-additional-privilege/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"permissions": [
{
"subject": "secrets",
"inverted": true,
"conditions": {
"environment": "<string>",
"secretPath": "<string>",
"secretName": "<string>",
"secretTags": {
"$in": [
"<string>"
],
"$all": [
"<string>"
]
},
"eventType": "<string>"
}
}
],
"type": {
"isTemporary": false
}
}
'import requests
url = "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}"
payload = {
"slug": "<string>",
"permissions": [
{
"subject": "secrets",
"inverted": True,
"conditions": {
"environment": "<string>",
"secretPath": "<string>",
"secretName": "<string>",
"secretTags": {
"$in": ["<string>"],
"$all": ["<string>"]
},
"eventType": "<string>"
}
}
],
"type": { "isTemporary": False }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
permissions: [
{
subject: 'secrets',
inverted: true,
conditions: {
environment: '<string>',
secretPath: '<string>',
secretName: '<string>',
secretTags: {$in: ['<string>'], $all: ['<string>']},
eventType: '<string>'
}
}
],
type: {isTemporary: false}
})
};
fetch('https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slug' => '<string>',
'permissions' => [
[
'subject' => 'secrets',
'inverted' => true,
'conditions' => [
'environment' => '<string>',
'secretPath' => '<string>',
'secretName' => '<string>',
'secretTags' => [
'$in' => [
'<string>'
],
'$all' => [
'<string>'
]
],
'eventType' => '<string>'
]
]
],
'type' => [
'isTemporary' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}"
payload := strings.NewReader("{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"privilege": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"permissions": [
{
"action": "<string>",
"subject": "<string>",
"conditions": "<unknown>",
"inverted": true
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isTemporary": false,
"temporaryMode": "<string>",
"temporaryRange": "<string>",
"temporaryAccessStartTime": "2023-11-07T05:31:56Z",
"temporaryAccessEndTime": "2023-11-07T05:31:56Z"
}
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}V2
Update
Update a specific identity privilege.
PATCH
/
api
/
v2
/
identity-project-additional-privilege
/
{id}
cURL
curl --request PATCH \
--url https://us.infisical.com/api/v2/identity-project-additional-privilege/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"permissions": [
{
"subject": "secrets",
"inverted": true,
"conditions": {
"environment": "<string>",
"secretPath": "<string>",
"secretName": "<string>",
"secretTags": {
"$in": [
"<string>"
],
"$all": [
"<string>"
]
},
"eventType": "<string>"
}
}
],
"type": {
"isTemporary": false
}
}
'import requests
url = "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}"
payload = {
"slug": "<string>",
"permissions": [
{
"subject": "secrets",
"inverted": True,
"conditions": {
"environment": "<string>",
"secretPath": "<string>",
"secretName": "<string>",
"secretTags": {
"$in": ["<string>"],
"$all": ["<string>"]
},
"eventType": "<string>"
}
}
],
"type": { "isTemporary": False }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
permissions: [
{
subject: 'secrets',
inverted: true,
conditions: {
environment: '<string>',
secretPath: '<string>',
secretName: '<string>',
secretTags: {$in: ['<string>'], $all: ['<string>']},
eventType: '<string>'
}
}
],
type: {isTemporary: false}
})
};
fetch('https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slug' => '<string>',
'permissions' => [
[
'subject' => 'secrets',
'inverted' => true,
'conditions' => [
'environment' => '<string>',
'secretPath' => '<string>',
'secretName' => '<string>',
'secretTags' => [
'$in' => [
'<string>'
],
'$all' => [
'<string>'
]
],
'eventType' => '<string>'
]
]
],
'type' => [
'isTemporary' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}"
payload := strings.NewReader("{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.infisical.com/api/v2/identity-project-additional-privilege/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slug\": \"<string>\",\n \"permissions\": [\n {\n \"subject\": \"secrets\",\n \"inverted\": true,\n \"conditions\": {\n \"environment\": \"<string>\",\n \"secretPath\": \"<string>\",\n \"secretName\": \"<string>\",\n \"secretTags\": {\n \"$in\": [\n \"<string>\"\n ],\n \"$all\": [\n \"<string>\"\n ]\n },\n \"eventType\": \"<string>\"\n }\n }\n ],\n \"type\": {\n \"isTemporary\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"privilege": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"permissions": [
{
"action": "<string>",
"subject": "<string>",
"conditions": "<unknown>",
"inverted": true
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isTemporary": false,
"temporaryMode": "<string>",
"temporaryRange": "<string>",
"temporaryAccessStartTime": "2023-11-07T05:31:56Z",
"temporaryAccessEndTime": "2023-11-07T05:31:56Z"
}
}{
"reqId": "<string>",
"statusCode": 400,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 401,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 403,
"message": "<string>",
"error": "<string>",
"details": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 404,
"message": "<string>",
"error": "<string>"
}{
"reqId": "<string>",
"statusCode": 422,
"error": "<string>",
"message": "<unknown>"
}{
"reqId": "<string>",
"statusCode": 500,
"message": "<string>",
"error": "<string>"
}Authorizations
An access token in Infisical
Path Parameters
The ID of the identity privilege.
Body
application/json
The slug of the privilege to update.
Required string length:
1 - 60The permission for the privilege.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
- Option 42
- Option 43
- Option 44
- Option 45
- Option 46
- Option 47
- Option 48
- Option 49
- Option 50
- Option 51
- Option 52
- Option 53
- Option 54
- Option 55
- Option 56
- Option 57
- Option 58
- Option 59
Show child attributes
Show child attributes
- Option 1
- Option 2
Show child attributes
Show child attributes
Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I