@@ -172,6 +172,7 @@ def create_project(
172172``` python
173173create_workspace(
174174 name: str ,
175+ key: str ,
175176 organization_id: UUID ,
176177 description: str | None = None ,
177178) -> Workspace
@@ -198,6 +199,7 @@ Creates a new workspace.
198199def create_workspace (
199200 self ,
200201 name : str ,
202+ key : str ,
201203 organization_id : UUID ,
202204 description : str | None = None ,
203205) -> Workspace:
@@ -214,6 +216,7 @@ def create_workspace(
214216
215217 payload = {
216218 " name" : name,
219+ " key" : key,
217220 " description" : description,
218221 " org_id" : str (organization_id),
219222 }
@@ -237,7 +240,7 @@ Deletes a specific workspace.
237240
238241* ** ` workspace_id ` **
239242 (` str | UUID ` )
240- –The workspace identifier .
243+ –The workspace key .
241244
242245<Accordion title = " Source code in dreadnode/api/client.py" icon = " code" >
243246``` python
@@ -246,7 +249,7 @@ def delete_workspace(self, workspace_id: str | UUID) -> None:
246249 Deletes a specific workspace.
247250
248251 Args:
249- workspace_id (str | UUID): The workspace identifier .
252+ workspace_id (str | UUID): The workspace key .
250253 """
251254
252255 self .request(" DELETE" , f " /workspaces/ { workspace_id!s } " )
@@ -707,17 +710,15 @@ def get_github_access_token(self, repos: list[str]) -> GithubTokenResponse:
707710### get\_ organization
708711
709712``` python
710- get_organization(
711- organization_id: str | UUID ,
712- ) -> Organization
713+ get_organization(org_id_or_key: UUID | str ) -> Organization
713714```
714715
715716Retrieves details of a specific organization.
716717
717718** Parameters:**
718719
719- * ** ` organization_id ` **
720- (` str ` )
720+ * ** ` org_id_or_key ` **
721+ (` str | UUID ` )
721722 –The organization identifier.
722723
723724** Returns:**
@@ -727,17 +728,17 @@ Retrieves details of a specific organization.
727728
728729<Accordion title = " Source code in dreadnode/api/client.py" icon = " code" >
729730``` python
730- def get_organization (self , organization_id : str | UUID ) -> Organization:
731+ def get_organization (self , org_id_or_key : UUID | str ) -> Organization:
731732 """
732733 Retrieves details of a specific organization.
733734
734735 Args:
735- organization_id (str): The organization identifier.
736+ org_id_or_key (str | UUID ): The organization identifier.
736737
737738 Returns:
738739 Organization: The Organization object.
739740 """
740- response = self .request(" GET" , f " /organizations/ { organization_id !s } " )
741+ response = self .request(" GET" , f " /organizations/ { org_id_or_key !s } " )
741742 return Organization(** response.json())
742743```
743744
@@ -1098,16 +1099,17 @@ def get_user_data_credentials(self) -> UserDataCredentials:
10981099
10991100``` python
11001101get_workspace(
1101- workspace_id: str | UUID , org_id: UUID | None = None
1102+ workspace_id_or_key: UUID | str ,
1103+ org_id: UUID | None = None ,
11021104) -> Workspace
11031105```
11041106
11051107Retrieves details of a specific workspace.
11061108
11071109** Parameters:**
11081110
1109- * ** ` workspace_id ` **
1110- (` str ` )
1111+ * ** ` workspace_id_or_key ` **
1112+ (` str | UUID ` )
11111113 –The workspace identifier.
11121114
11131115** Returns:**
@@ -1117,20 +1119,22 @@ Retrieves details of a specific workspace.
11171119
11181120<Accordion title = " Source code in dreadnode/api/client.py" icon = " code" >
11191121``` python
1120- def get_workspace (self , workspace_id : str | UUID , org_id : UUID | None = None ) -> Workspace:
1122+ def get_workspace (
1123+ self , workspace_id_or_key : UUID | str , org_id : UUID | None = None
1124+ ) -> Workspace:
11211125 """
11221126 Retrieves details of a specific workspace.
11231127
11241128 Args:
1125- workspace_id (str): The workspace identifier.
1129+ workspace_id_or_key (str | UUID ): The workspace identifier.
11261130
11271131 Returns:
11281132 Workspace: The Workspace object.
11291133 """
11301134 params: dict[str , str ] = {}
11311135 if org_id:
11321136 params = {" org_id" : str (org_id)}
1133- response = self .request(" GET" , f " /workspaces/ { workspace_id !s } " , params = params)
1137+ response = self .request(" GET" , f " /workspaces/ { workspace_id_or_key !s } " , params = params)
11341138 return Workspace(** response.json())
11351139```
11361140
@@ -1793,6 +1797,14 @@ is_active: bool
17931797
17941798Is the organization active?
17951799
1800+ ### key
1801+
1802+ ``` python
1803+ key: str
1804+ ```
1805+
1806+ URL-friendly identifier for the organization.
1807+
17961808### max\_ members
17971809
17981810``` python
@@ -1809,14 +1821,6 @@ name: str
18091821
18101822Name of the organization.
18111823
1812- ### slug
1813-
1814- ``` python
1815- slug: str
1816- ```
1817-
1818- URL-friendly slug for the organization.
1819-
18201824### updated\_ at
18211825
18221826``` python
@@ -2321,6 +2325,14 @@ is_default: bool
23212325
23222326Is the workspace the default one?
23232327
2328+ ### key
2329+
2330+ ``` python
2331+ key: str
2332+ ```
2333+
2334+ Unique key for the workspace.
2335+
23242336### name
23252337
23262338``` python
@@ -2353,14 +2365,6 @@ project_count: int | None
23532365
23542366Number of projects in the workspace.
23552367
2356- ### slug
2357-
2358- ``` python
2359- slug: str
2360- ```
2361-
2362- URL-friendly slug for the workspace.
2363-
23642368### updated\_ at
23652369
23662370``` python
0 commit comments