archastro.platform.v1.resources.orgs
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 54f92609d1b5 4 5from __future__ import annotations 6 7from pydantic import BaseModel, Field 8 9from ...runtime.http_client import HttpClient, SyncHttpClient 10 11 12class OrgListResponseDataItem(BaseModel): 13 domain: str = Field( 14 ..., description='Primary domain associated with the organization, e.g. `"acme.com"`.' 15 ) 16 id: str = Field(..., description="Organization ID (`org_...`).") 17 name: str = Field(..., description="Display name of the organization.") 18 19 20class OrgListResponse(BaseModel): 21 """ 22 Successful response 23 """ 24 25 data: list[OrgListResponseDataItem] = Field( 26 ..., description="Array of organization objects for the current page." 27 ) 28 has_next: bool | None = Field( 29 default=None, description="`true` when a subsequent page exists; `false` on the last page." 30 ) 31 has_prev: bool | None = Field( 32 default=None, description="`true` when a previous page exists; `false` on the first page." 33 ) 34 page: int | None = Field(default=None, description="The current page number returned.") 35 page_size: int | None = Field( 36 default=None, description="The number of results per page used for this response." 37 ) 38 total_entries: int | None = Field( 39 default=None, 40 description="Total number of organizations matching the query across all pages.", 41 ) 42 total_pages: int | None = Field( 43 default=None, description="Total number of pages for the current query and page size." 44 ) 45 46 47class AsyncOrgResource: 48 def __init__(self, http: HttpClient): 49 self._http = http 50 51 async def list( 52 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 53 ) -> OrgListResponse: 54 """ 55 Search organizations 56 Returns a paginated list of organizations within the authenticated app scope, 57 optionally filtered by a free-text search term matched against name, slug, and 58 domain (case-insensitive). Results are ordered by relevance when a search term 59 is provided, and by creation time descending otherwise. 60 The response includes only public-facing organization fields: ID, name, domain, 61 and logo. Use the developer-scoped org endpoints to access full organization 62 records. 63 Pagination is offset-based. Pass `page` and `page_size` to navigate through 64 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 65 exist. 66 67 Args: 68 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 69 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 70 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 71 72 Returns: 73 Successful response 74 """ 75 query: dict[str, object] = {} 76 if search is not None: 77 query["search"] = search 78 if page is not None: 79 query["page"] = page 80 if page_size is not None: 81 query["page_size"] = page_size 82 return await self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse) 83 84 85class OrgResource: 86 def __init__(self, http: SyncHttpClient): 87 self._http = http 88 89 def list( 90 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 91 ) -> OrgListResponse: 92 """ 93 Search organizations 94 Returns a paginated list of organizations within the authenticated app scope, 95 optionally filtered by a free-text search term matched against name, slug, and 96 domain (case-insensitive). Results are ordered by relevance when a search term 97 is provided, and by creation time descending otherwise. 98 The response includes only public-facing organization fields: ID, name, domain, 99 and logo. Use the developer-scoped org endpoints to access full organization 100 records. 101 Pagination is offset-based. Pass `page` and `page_size` to navigate through 102 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 103 exist. 104 105 Args: 106 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 107 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 108 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 109 110 Returns: 111 Successful response 112 """ 113 query: dict[str, object] = {} 114 if search is not None: 115 query["search"] = search 116 if page is not None: 117 query["page"] = page 118 if page_size is not None: 119 query["page_size"] = page_size 120 return self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse)
13class OrgListResponseDataItem(BaseModel): 14 domain: str = Field( 15 ..., description='Primary domain associated with the organization, e.g. `"acme.com"`.' 16 ) 17 id: str = Field(..., description="Organization ID (`org_...`).") 18 name: str = Field(..., description="Display name of the organization.")
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
21class OrgListResponse(BaseModel): 22 """ 23 Successful response 24 """ 25 26 data: list[OrgListResponseDataItem] = Field( 27 ..., description="Array of organization objects for the current page." 28 ) 29 has_next: bool | None = Field( 30 default=None, description="`true` when a subsequent page exists; `false` on the last page." 31 ) 32 has_prev: bool | None = Field( 33 default=None, description="`true` when a previous page exists; `false` on the first page." 34 ) 35 page: int | None = Field(default=None, description="The current page number returned.") 36 page_size: int | None = Field( 37 default=None, description="The number of results per page used for this response." 38 ) 39 total_entries: int | None = Field( 40 default=None, 41 description="Total number of organizations matching the query across all pages.", 42 ) 43 total_pages: int | None = Field( 44 default=None, description="Total number of pages for the current query and page size." 45 )
Successful response
48class AsyncOrgResource: 49 def __init__(self, http: HttpClient): 50 self._http = http 51 52 async def list( 53 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 54 ) -> OrgListResponse: 55 """ 56 Search organizations 57 Returns a paginated list of organizations within the authenticated app scope, 58 optionally filtered by a free-text search term matched against name, slug, and 59 domain (case-insensitive). Results are ordered by relevance when a search term 60 is provided, and by creation time descending otherwise. 61 The response includes only public-facing organization fields: ID, name, domain, 62 and logo. Use the developer-scoped org endpoints to access full organization 63 records. 64 Pagination is offset-based. Pass `page` and `page_size` to navigate through 65 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 66 exist. 67 68 Args: 69 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 70 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 71 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 72 73 Returns: 74 Successful response 75 """ 76 query: dict[str, object] = {} 77 if search is not None: 78 query["search"] = search 79 if page is not None: 80 query["page"] = page 81 if page_size is not None: 82 query["page_size"] = page_size 83 return await self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse)
52 async def list( 53 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 54 ) -> OrgListResponse: 55 """ 56 Search organizations 57 Returns a paginated list of organizations within the authenticated app scope, 58 optionally filtered by a free-text search term matched against name, slug, and 59 domain (case-insensitive). Results are ordered by relevance when a search term 60 is provided, and by creation time descending otherwise. 61 The response includes only public-facing organization fields: ID, name, domain, 62 and logo. Use the developer-scoped org endpoints to access full organization 63 records. 64 Pagination is offset-based. Pass `page` and `page_size` to navigate through 65 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 66 exist. 67 68 Args: 69 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 70 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 71 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 72 73 Returns: 74 Successful response 75 """ 76 query: dict[str, object] = {} 77 if search is not None: 78 query["search"] = search 79 if page is not None: 80 query["page"] = page 81 if page_size is not None: 82 query["page_size"] = page_size 83 return await self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse)
Search organizations
Returns a paginated list of organizations within the authenticated app scope,
optionally filtered by a free-text search term matched against name, slug, and
domain (case-insensitive). Results are ordered by relevance when a search term
is provided, and by creation time descending otherwise.
The response includes only public-facing organization fields: ID, name, domain,
and logo. Use the developer-scoped org endpoints to access full organization
records.
Pagination is offset-based. Pass page and page_size to navigate through
results. The has_next and has_prev fields indicate whether adjacent pages
exist.
Arguments:
- search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app.
- page: Page number to retrieve, starting at
1. Defaults to1when omitted. - page_size: Number of organizations to return per page. Defaults to
25; maximum is100.
Returns:
Successful response
86class OrgResource: 87 def __init__(self, http: SyncHttpClient): 88 self._http = http 89 90 def list( 91 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 92 ) -> OrgListResponse: 93 """ 94 Search organizations 95 Returns a paginated list of organizations within the authenticated app scope, 96 optionally filtered by a free-text search term matched against name, slug, and 97 domain (case-insensitive). Results are ordered by relevance when a search term 98 is provided, and by creation time descending otherwise. 99 The response includes only public-facing organization fields: ID, name, domain, 100 and logo. Use the developer-scoped org endpoints to access full organization 101 records. 102 Pagination is offset-based. Pass `page` and `page_size` to navigate through 103 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 104 exist. 105 106 Args: 107 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 108 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 109 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 110 111 Returns: 112 Successful response 113 """ 114 query: dict[str, object] = {} 115 if search is not None: 116 query["search"] = search 117 if page is not None: 118 query["page"] = page 119 if page_size is not None: 120 query["page_size"] = page_size 121 return self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse)
90 def list( 91 self, *, search: str | None = None, page: int | None = None, page_size: int | None = None 92 ) -> OrgListResponse: 93 """ 94 Search organizations 95 Returns a paginated list of organizations within the authenticated app scope, 96 optionally filtered by a free-text search term matched against name, slug, and 97 domain (case-insensitive). Results are ordered by relevance when a search term 98 is provided, and by creation time descending otherwise. 99 The response includes only public-facing organization fields: ID, name, domain, 100 and logo. Use the developer-scoped org endpoints to access full organization 101 records. 102 Pagination is offset-based. Pass `page` and `page_size` to navigate through 103 results. The `has_next` and `has_prev` fields indicate whether adjacent pages 104 exist. 105 106 Args: 107 search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app. 108 page: Page number to retrieve, starting at `1`. Defaults to `1` when omitted. 109 page_size: Number of organizations to return per page. Defaults to `25`; maximum is `100`. 110 111 Returns: 112 Successful response 113 """ 114 query: dict[str, object] = {} 115 if search is not None: 116 query["search"] = search 117 if page is not None: 118 query["page"] = page 119 if page_size is not None: 120 query["page_size"] = page_size 121 return self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse)
Search organizations
Returns a paginated list of organizations within the authenticated app scope,
optionally filtered by a free-text search term matched against name, slug, and
domain (case-insensitive). Results are ordered by relevance when a search term
is provided, and by creation time descending otherwise.
The response includes only public-facing organization fields: ID, name, domain,
and logo. Use the developer-scoped org endpoints to access full organization
records.
Pagination is offset-based. Pass page and page_size to navigate through
results. The has_next and has_prev fields indicate whether adjacent pages
exist.
Arguments:
- search: Free-text search term matched against organization name, slug, and domain (case-insensitive). Omit to return all organizations in the app.
- page: Page number to retrieve, starting at
1. Defaults to1when omitted. - page_size: Number of organizations to return per page. Defaults to
25; maximum is100.
Returns:
Successful response