Skip to content

Latest commit

 

History

History
129 lines (93 loc) · 3.58 KB

Organization.md

File metadata and controls

129 lines (93 loc) · 3.58 KB

Organization

Method HTTP request Release Stage
get GET /v2/admin/organizations/{organizationRid} Public Beta
replace PUT /v2/admin/organizations/{organizationRid} Public Beta

get

Get the Organization with the specified rid.

Parameters

Name Type Description Notes
organization_rid OrganizationRid organizationRid
preview Optional[PreviewMode] preview [optional]

Return type

Organization

Example

from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
    auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# OrganizationRid | organizationRid
organization_rid = None
# Optional[PreviewMode] | preview
preview = None


try:
    api_response = foundry_client.admin.Organization.get(
        organization_rid,
        preview=preview,
    )
    print("The get response:\n")
    pprint(api_response)
except foundry.PalantirRPCException as e:
    print("HTTP error when calling Organization.get: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 Organization application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace

Replace the Organization with the specified rid.

Parameters

Name Type Description Notes
organization_rid OrganizationRid organizationRid
name OrganizationName
description Optional[str] [optional]
host Optional[HostName] The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. [optional]
preview Optional[PreviewMode] preview [optional]

Return type

Organization

Example

from foundry.v2 import FoundryClient
import foundry
from pprint import pprint

foundry_client = FoundryClient(
    auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)

# OrganizationRid | organizationRid
organization_rid = None
# OrganizationName |
name = "Example Organization"
# Optional[str] |
description = None
# Optional[HostName] | The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.
host = "example.palantirfoundry.com"
# Optional[PreviewMode] | preview
preview = None


try:
    api_response = foundry_client.admin.Organization.replace(
        organization_rid,
        name=name,
        description=description,
        host=host,
        preview=preview,
    )
    print("The replace response:\n")
    pprint(api_response)
except foundry.PalantirRPCException as e:
    print("HTTP error when calling Organization.replace: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 Organization The replaced Organization application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]