Skip to content

Latest commit

 

History

History
executable file
·
261 lines (182 loc) · 7.7 KB

File metadata and controls

executable file
·
261 lines (182 loc) · 7.7 KB

swagger_client.OrganizationApi

All URIs are relative to http://cor.esipfed.org/ont/api/v0

Method HTTP request Description
add_org POST /org Registers an organization
delete_org DELETE /org/{orgName} Unregisters an organization
org_get GET /org Gets information about registered organizations
org_org_name_get GET /org/{orgName} Gets basic information of a particular organization
update_org PUT /org/{orgName} Updates information about a registered organization

add_org

OrgNew add_org(body=body)

Registers an organization

Only admins can perform this operation.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration))
body = swagger_client.PostOrg() # PostOrg | Organization object that needs to be registered (optional)

try:
    # Registers an organization
    api_response = api_instance.add_org(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationApi->add_org: %s\n" % e)

Parameters

Name Type Description Notes
body PostOrg Organization object that needs to be registered [optional]

Return type

OrgNew

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

delete_org

delete_org(org_name)

Unregisters an organization

Only users with administrative privilege can perform this operation.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration))
org_name = 'org_name_example' # str | Identifier of the organization

try:
    # Unregisters an organization
    api_instance.delete_org(org_name)
except ApiException as e:
    print("Exception when calling OrganizationApi->delete_org: %s\n" % e)

Parameters

Name Type Description Notes
org_name str Identifier of the organization

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

org_get

list[Org] org_get()

Gets information about registered organizations

Gets basic information of all registered organizations. This will include additional information depending on privileges of requesting user.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrganizationApi()

try:
    # Gets information about registered organizations
    api_response = api_instance.org_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationApi->org_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[Org]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

org_org_name_get

Org org_org_name_get(org_name)

Gets basic information of a particular organization

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrganizationApi()
org_name = 'org_name_example' # str | The code (short name) of the organization.

try:
    # Gets basic information of a particular organization
    api_response = api_instance.org_org_name_get(org_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationApi->org_org_name_get: %s\n" % e)

Parameters

Name Type Description Notes
org_name str The code (short name) of the organization.

Return type

Org

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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

update_org

OrgUpdated update_org(org_name, body=body)

Updates information about a registered organization

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.OrganizationApi(swagger_client.ApiClient(configuration))
org_name = 'org_name_example' # str | The code (short name) of the organization to be updated.
body = swagger_client.PutOrg() # PutOrg | Object with information for the organization to be updated. (optional)

try:
    # Updates information about a registered organization
    api_response = api_instance.update_org(org_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationApi->update_org: %s\n" % e)

Parameters

Name Type Description Notes
org_name str The code (short name) of the organization to be updated.
body PutOrg Object with information for the organization to be updated. [optional]

Return type

OrgUpdated

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

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