Change
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch \
--header 'Content-Type: application/json' \
--data '
{
"userIds": [
"<string>"
],
"changes": {
"seats": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"teams": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"tags": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"workspaceAccess": {
"createProjects": true
},
"projects": {
"remove": {
"projectIds": [
"<string>"
],
"byMember": [
{
"userId": "<string>",
"projectIds": [
"<string>"
]
}
]
}
}
}
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch"
payload = {
"userIds": ["<string>"],
"changes": {
"seats": {
"add": ["<string>"],
"remove": ["<string>"]
},
"teams": {
"add": ["<string>"],
"remove": ["<string>"]
},
"tags": {
"add": ["<string>"],
"remove": ["<string>"]
},
"workspaceAccess": { "createProjects": True },
"projects": { "remove": {
"projectIds": ["<string>"],
"byMember": [
{
"userId": "<string>",
"projectIds": ["<string>"]
}
]
} }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
userIds: ['<string>'],
changes: {
seats: {add: ['<string>'], remove: ['<string>']},
teams: {add: ['<string>'], remove: ['<string>']},
tags: {add: ['<string>'], remove: ['<string>']},
workspaceAccess: {createProjects: true},
projects: {
remove: {
projectIds: ['<string>'],
byMember: [{userId: '<string>', projectIds: ['<string>']}]
}
}
}
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userIds' => [
'<string>'
],
'changes' => [
'seats' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'teams' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'tags' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'workspaceAccess' => [
'createProjects' => true
],
'projects' => [
'remove' => [
'projectIds' => [
'<string>'
],
'byMember' => [
[
'userId' => '<string>',
'projectIds' => [
'<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch"
payload := strings.NewReader("{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch")
.header("Content-Type", "application/json")
.body("{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"dryRun": true,
"results": [
{
"userId": "<string>",
"status": "applied",
"changes": [
{
"kind": "seat_add",
"status": "applied",
"targetId": "<string>",
"code": "<string>",
"details": {}
}
],
"code": "<string>"
}
],
"counts": {
"applied": 123,
"skipped": 123,
"failed": 123
},
"seatDelta": [
{
"licenseId": "<string>",
"packageKey": "<string>",
"packageName": "<string>",
"seatsAdded": 123,
"seatsRemoved": 123,
"seatsInUse": 123,
"seatsInUseAfter": 123,
"purchasedSeats": 123,
"seatPriceUsd": "<string>",
"interval": "month"
}
],
"approvalRequests": [
{
"licenseId": "<string>",
"userId": "<string>"
}
],
"capBreaches": [
{
"licenseId": "<string>",
"code": "LICENSE_SEAT_CAP_REACHED"
}
],
"publicationFailed": true
}Member Batch
Change
POST
/
v1
/
workspaces
/
{workspaceId}
/
members
/
batch
Change
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch \
--header 'Content-Type: application/json' \
--data '
{
"userIds": [
"<string>"
],
"changes": {
"seats": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"teams": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"tags": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"workspaceAccess": {
"createProjects": true
},
"projects": {
"remove": {
"projectIds": [
"<string>"
],
"byMember": [
{
"userId": "<string>",
"projectIds": [
"<string>"
]
}
]
}
}
}
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch"
payload = {
"userIds": ["<string>"],
"changes": {
"seats": {
"add": ["<string>"],
"remove": ["<string>"]
},
"teams": {
"add": ["<string>"],
"remove": ["<string>"]
},
"tags": {
"add": ["<string>"],
"remove": ["<string>"]
},
"workspaceAccess": { "createProjects": True },
"projects": { "remove": {
"projectIds": ["<string>"],
"byMember": [
{
"userId": "<string>",
"projectIds": ["<string>"]
}
]
} }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
userIds: ['<string>'],
changes: {
seats: {add: ['<string>'], remove: ['<string>']},
teams: {add: ['<string>'], remove: ['<string>']},
tags: {add: ['<string>'], remove: ['<string>']},
workspaceAccess: {createProjects: true},
projects: {
remove: {
projectIds: ['<string>'],
byMember: [{userId: '<string>', projectIds: ['<string>']}]
}
}
}
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userIds' => [
'<string>'
],
'changes' => [
'seats' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'teams' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'tags' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'workspaceAccess' => [
'createProjects' => true
],
'projects' => [
'remove' => [
'projectIds' => [
'<string>'
],
'byMember' => [
[
'userId' => '<string>',
'projectIds' => [
'<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch"
payload := strings.NewReader("{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch")
.header("Content-Type", "application/json")
.body("{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/members/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"userIds\": [\n \"<string>\"\n ],\n \"changes\": {\n \"seats\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"teams\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"tags\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"workspaceAccess\": {\n \"createProjects\": true\n },\n \"projects\": {\n \"remove\": {\n \"projectIds\": [\n \"<string>\"\n ],\n \"byMember\": [\n {\n \"userId\": \"<string>\",\n \"projectIds\": [\n \"<string>\"\n ]\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"dryRun": true,
"results": [
{
"userId": "<string>",
"status": "applied",
"changes": [
{
"kind": "seat_add",
"status": "applied",
"targetId": "<string>",
"code": "<string>",
"details": {}
}
],
"code": "<string>"
}
],
"counts": {
"applied": 123,
"skipped": 123,
"failed": 123
},
"seatDelta": [
{
"licenseId": "<string>",
"packageKey": "<string>",
"packageName": "<string>",
"seatsAdded": 123,
"seatsRemoved": 123,
"seatsInUse": 123,
"seatsInUseAfter": 123,
"purchasedSeats": 123,
"seatPriceUsd": "<string>",
"interval": "month"
}
],
"approvalRequests": [
{
"licenseId": "<string>",
"userId": "<string>"
}
],
"capBreaches": [
{
"licenseId": "<string>",
"code": "LICENSE_SEAT_CAP_REACHED"
}
],
"publicationFailed": true
}Body
application/json
Response
200 - application/json
⌘I