Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
267 lines (183 loc) · 9.81 KB

File metadata and controls

267 lines (183 loc) · 9.81 KB

esp_sdk.SubOrganizationsApi

All URIs are relative to https://api.evident.io

Method HTTP request Description
create POST /api/v2/sub_organizations.json_api Create a(n) Sub Organization
delete DELETE /api/v2/sub_organizations/{id}.json_api Delete a(n) Sub Organization
list PUT /api/v2/sub_organizations.json_api Get a list of Sub Organizations
show GET /api/v2/sub_organizations/{id}.json_api Show a single Sub Organization
update PATCH /api/v2/sub_organizations/{id}.json_api Update a(n) Sub Organization

create

SubOrganization create(name, organization_id, include=include)

Create a(n) Sub Organization

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.SubOrganizationsApi()
name = 'name_example' # str | Name of the sub organization
organization_id = 56 # int | The ID of the organization this sub organization should belong to
include = 'include_example' # str | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information. (optional)

try: 
    # Create a(n) Sub Organization
    api_response = api_instance.create(name, organization_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubOrganizationsApi->create: %s\n" % e)

Parameters

Name Type Description Notes
name str Name of the sub organization
organization_id int The ID of the organization this sub organization should belong to
include str Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]

Return type

SubOrganization

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

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

delete

Meta delete(id)

Delete a(n) Sub Organization

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.SubOrganizationsApi()
id = 56 # int | Sub Organization ID

try: 
    # Delete a(n) Sub Organization
    api_response = api_instance.delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubOrganizationsApi->delete: %s\n" % e)

Parameters

Name Type Description Notes
id int Sub Organization ID

Return type

Meta

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

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

list

PaginatedCollection list(include=include, filter=filter, page=page)

Get a list of Sub Organizations

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.SubOrganizationsApi()
include = 'include_example' # str | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information. (optional)
filter = {'key': 'filter_example'} # dict(str, str) | Filter Params for Searching.  Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name]  Sortable Attributes: [name, updated_at, created_at, id] Searchable Association: [organization] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. (optional)
page = '{:number=>1,+:size=>20}' # str | Page Number and Page Size.  Number is the page number of the collection to return, size is the number of items to return per page. (optional) (default to {:number=>1,+:size=>20})

try: 
    # Get a list of Sub Organizations
    api_response = api_instance.list(include=include, filter=filter, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubOrganizationsApi->list: %s\n" % e)

Parameters

Name Type Description Notes
include str Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]
filter dict(str, str) Filter Params for Searching. Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name] Sortable Attributes: [name, updated_at, created_at, id] Searchable Association: [organization] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. [optional]
page str Page Number and Page Size. Number is the page number of the collection to return, size is the number of items to return per page. [optional] [default to {:number=>1,+:size=>20}]

Return type

PaginatedCollection

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

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

show

SubOrganization show(id, include=include)

Show a single Sub Organization

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.SubOrganizationsApi()
id = 56 # int | Sub Organization ID
include = 'include_example' # str | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information. (optional)

try: 
    # Show a single Sub Organization
    api_response = api_instance.show(id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubOrganizationsApi->show: %s\n" % e)

Parameters

Name Type Description Notes
id int Sub Organization ID
include str Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]

Return type

SubOrganization

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

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

update

SubOrganization update(id, include=include, name=name)

Update a(n) Sub Organization

Example

from __future__ import print_statement
import time
import esp_sdk
from esp_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = esp_sdk.SubOrganizationsApi()
id = 56 # int | Sub Organization ID
include = 'include_example' # str | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information. (optional)
name = 'name_example' # str | Name of the sub organization (optional)

try: 
    # Update a(n) Sub Organization
    api_response = api_instance.update(id, include=include, name=name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SubOrganizationsApi->update: %s\n" % e)

Parameters

Name Type Description Notes
id int Sub Organization ID
include str Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]
name str Name of the sub organization [optional]

Return type

SubOrganization

Authorization

See https://github.com/EvidentSecurity/esp-sdk-python#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

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