Skip to content

Commit f8ee42d

Browse files
authored
feat: add External User Deletion API (#550)
1 parent 24b86a7 commit f8ee42d

File tree

3 files changed

+157
-8
lines changed

3 files changed

+157
-8
lines changed

openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "http://www.apache.org/licenses/LICENSE-2.0"
1515
},
1616
"version": "2024.0",
17-
"x-box-commit-hash": "04730436d5"
17+
"x-box-commit-hash": "e231c9d1b8"
1818
},
1919
"servers": [
2020
{

openapi/openapi-v2025.0.json

Lines changed: 155 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "http://www.apache.org/licenses/LICENSE-2.0"
1515
},
1616
"version": "2025.0",
17-
"x-box-commit-hash": "04730436d5"
17+
"x-box-commit-hash": "e231c9d1b8"
1818
},
1919
"servers": [
2020
{
@@ -2479,6 +2479,64 @@
24792479
"Archives"
24802480
]
24812481
}
2482+
},
2483+
"/external_users/submit_delete_job": {
2484+
"post": {
2485+
"operationId": "post_external_users_submit_delete_job_v2025.0",
2486+
"summary": "Submit job to delete external users",
2487+
"description": "Delete external users from current user enterprise. This will remove each\nexternal user from all invited collaborations within the current enterprise.",
2488+
"parameters": [
2489+
{
2490+
"$ref": "#/components/parameters/BoxVersionHeader"
2491+
}
2492+
],
2493+
"requestBody": {
2494+
"required": true,
2495+
"content": {
2496+
"application/json": {
2497+
"schema": {
2498+
"$ref": "#/components/schemas/ExternalUsersSubmitDeleteJobRequest"
2499+
}
2500+
}
2501+
}
2502+
},
2503+
"responses": {
2504+
"207": {
2505+
"description": "Multi-status response containing the result for each external user deletion request.",
2506+
"content": {
2507+
"application/json": {
2508+
"schema": {
2509+
"$ref": "#/components/schemas/ExternalUsersSubmitDeleteJobResponse"
2510+
}
2511+
}
2512+
}
2513+
},
2514+
"404": {
2515+
"description": "Returns an error if the listed external users are not found, or the authenticated\nuser does not have the right permissions to delete external users.",
2516+
"content": {
2517+
"application/json": {
2518+
"schema": {
2519+
"$ref": "#/components/schemas/ClientError"
2520+
}
2521+
}
2522+
}
2523+
},
2524+
"default": {
2525+
"description": "An unexpected client error.",
2526+
"content": {
2527+
"application/json": {
2528+
"schema": {
2529+
"$ref": "#/components/schemas/ClientError"
2530+
}
2531+
}
2532+
}
2533+
}
2534+
},
2535+
"x-box-tag": "external_users",
2536+
"tags": [
2537+
"External Users"
2538+
]
2539+
}
24822540
}
24832541
},
24842542
"components": {
@@ -3356,6 +3414,68 @@
33563414
},
33573415
"title": "Enterprise reference"
33583416
},
3417+
"ExternalUserDeletionResult": {
3418+
"description": "Result of a single external user deletion request.",
3419+
"type": "object",
3420+
"properties": {
3421+
"user_id": {
3422+
"description": "The ID of the external user.",
3423+
"type": "string",
3424+
"example": "12345"
3425+
},
3426+
"status": {
3427+
"description": "HTTP status code for a specific user's deletion request.",
3428+
"type": "integer",
3429+
"example": 202
3430+
},
3431+
"detail": {
3432+
"description": "Deletion request status details.",
3433+
"type": "string",
3434+
"example": "Successfully submitted for deletion"
3435+
}
3436+
},
3437+
"required": [
3438+
"user_id",
3439+
"status"
3440+
],
3441+
"title": "External User Deletion Result"
3442+
},
3443+
"ExternalUsersSubmitDeleteJobRequest": {
3444+
"description": "Request to submit a job to delete external users from the current enterprise.",
3445+
"type": "object",
3446+
"properties": {
3447+
"external_users": {
3448+
"description": "List of external users to delete.",
3449+
"type": "array",
3450+
"items": {
3451+
"$ref": "#/components/schemas/UserReference"
3452+
}
3453+
}
3454+
},
3455+
"required": [
3456+
"external_users"
3457+
],
3458+
"title": "External Users Submit Delete Job Request"
3459+
},
3460+
"ExternalUsersSubmitDeleteJobResponse": {
3461+
"description": "Multi-status response containing the result for each external user deletion request.",
3462+
"type": "object",
3463+
"properties": {
3464+
"entries": {
3465+
"description": "Array of results of each external user deletion request.",
3466+
"type": "array",
3467+
"items": {
3468+
"$ref": "#/components/schemas/ExternalUserDeletionResult"
3469+
}
3470+
}
3471+
},
3472+
"required": [
3473+
"entries"
3474+
],
3475+
"title": "External Users Submit Delete Job Response",
3476+
"x-box-resource-id": "external_users_submit_delete_job_response_v2025.0",
3477+
"x-box-tag": "external_users"
3478+
},
33593479
"FileReference": {
33603480
"description": "File reference.",
33613481
"type": "object",
@@ -4436,7 +4556,7 @@
44364556
]
44374557
},
44384558
"ip_addresses": {
4439-
"description": "List of ips and cidrs.",
4559+
"description": "List of ip addresses and CIDRs.",
44404560
"type": "array",
44414561
"items": {
44424562
"type": "string"
@@ -4636,8 +4756,32 @@
46364756
],
46374757
"title": "User (Mini)"
46384758
},
4759+
"UserReference": {
4760+
"description": "User reference.",
4761+
"type": "object",
4762+
"properties": {
4763+
"type": {
4764+
"description": "The value is always `user`.",
4765+
"type": "string",
4766+
"example": "user",
4767+
"enum": [
4768+
"user"
4769+
]
4770+
},
4771+
"id": {
4772+
"description": "The unique identifier for the user.",
4773+
"type": "string",
4774+
"example": "12345"
4775+
}
4776+
},
4777+
"required": [
4778+
"type",
4779+
"id"
4780+
],
4781+
"title": "User reference"
4782+
},
46394783
"WeblinkReference": {
4640-
"description": "Weblink reference.",
4784+
"description": "Web link reference.",
46414785
"type": "object",
46424786
"properties": {
46434787
"type": {
@@ -4650,7 +4794,7 @@
46504794
"nullable": false
46514795
},
46524796
"id": {
4653-
"description": "ID of the weblink.",
4797+
"description": "ID of the web link.",
46544798
"type": "string",
46554799
"example": "42037322",
46564800
"nullable": false
@@ -4660,7 +4804,7 @@
46604804
"type",
46614805
"id"
46624806
],
4663-
"title": "Weblink reference"
4807+
"title": "Web link reference"
46644808
}
46654809
},
46664810
"securitySchemes": {
@@ -4707,6 +4851,11 @@
47074851
"description": "Doc Gen templates are used as input to generate documents.",
47084852
"x-box-tag": "docgen_template"
47094853
},
4854+
{
4855+
"name": "External Users",
4856+
"description": "External users are collaborators from outside of your enterprise.",
4857+
"x-box-tag": "external_users"
4858+
},
47104859
{
47114860
"name": "Hubs",
47124861
"description": "A set of endpoints used to manage Hubs.",
@@ -4724,7 +4873,7 @@
47244873
},
47254874
{
47264875
"name": "Shield lists",
4727-
"description": "Shield List allow an administrator to create a list \nwhich will be shared between different\nShield Smart Access and Threat Prection rules.",
4876+
"description": "Shield List allow an administrator to create a list\nwhich will be shared between different\nShield Smart Access and Threat Detection rules.",
47284877
"x-box-tag": "shield_lists"
47294878
}
47304879
],

openapi/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "http://www.apache.org/licenses/LICENSE-2.0"
1515
},
1616
"version": "2024.0",
17-
"x-box-commit-hash": "04730436d5"
17+
"x-box-commit-hash": "e231c9d1b8"
1818
},
1919
"servers": [
2020
{

0 commit comments

Comments
 (0)