Skip to content

Latest commit

 

History

History
763 lines (496 loc) · 22.7 KB

File metadata and controls

763 lines (496 loc) · 22.7 KB

OrganizationApi

All URIs are relative to http://localhost:8080

Method HTTP request Description
createOrganization POST /organizations Create a new organization
createOrganizationAccessControl POST /organizations/{organization_id}/security/access Add a control access to the Organization
deleteOrganization DELETE /organizations/{organization_id} Delete an organization
deleteOrganizationAccessControl DELETE /organizations/{organization_id}/security/access/{identity_id} Remove the specified access from the given Organization
getOrganization GET /organizations/{organization_id} Get the details of an Organization
getOrganizationAccessControl GET /organizations/{organization_id}/security/access/{identity_id} Get a control access for the Organization
getOrganizationPermissions GET /organizations/{organization_id}/permissions/{role} Get the Organization permissions by given role
getOrganizationSecurity GET /organizations/{organization_id}/security Get the Organization security information
listOrganizationSecurityUsers GET /organizations/{organization_id}/security/users Get the Organization security users list
listOrganizations GET /organizations List all Organizations
listPermissions GET /organizations/permissions Get all permissions per components
updateOrganization PATCH /organizations/{organization_id} Update an Organization
updateOrganizationAccessControl PATCH /organizations/{organization_id}/security/access/{identity_id} Update the specified access to User for an Organization
updateOrganizationDefaultSecurity PATCH /organizations/{organization_id}/security/default Update the Organization default security

createOrganization

Organization createOrganization(organizationCreateRequest)

Create a new organization.

Example

import {
    OrganizationApi,
    Configuration,
    OrganizationCreateRequest
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationCreateRequest: OrganizationCreateRequest; //

const { status, data } = await apiInstance.createOrganization(
    organizationCreateRequest
);

Parameters

Name Type Description Notes
organizationCreateRequest OrganizationCreateRequest

Return type

Organization

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
201 The Organization details -
400 Bad request -

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

createOrganizationAccessControl

OrganizationAccessControl createOrganizationAccessControl(organizationAccessControl)

Grant access to an organization for a user or group.

Example

import {
    OrganizationApi,
    Configuration,
    OrganizationAccessControl
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let organizationAccessControl: OrganizationAccessControl; //The new Organization security access to add.

const { status, data } = await apiInstance.createOrganizationAccessControl(
    organizationId,
    organizationAccessControl
);

Parameters

Name Type Description Notes
organizationAccessControl OrganizationAccessControl The new Organization security access to add.
organizationId [string] The Organization identifier defaults to undefined

Return type

OrganizationAccessControl

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
201 The Organization access -
404 The Organization specified is unknown or you don't have access to it -

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

deleteOrganization

deleteOrganization()

Permanently delete an organization. This operation cannot be undone.

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)

const { status, data } = await apiInstance.deleteOrganization(
    organizationId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined

Return type

void (empty response body)

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Request succeeded -
404 The Organization specified is unknown or you don't have access to it -

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

deleteOrganizationAccessControl

deleteOrganizationAccessControl()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let identityId: string; //The User identifier (default to undefined)

const { status, data } = await apiInstance.deleteOrganizationAccessControl(
    organizationId,
    identityId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined
identityId [string] The User identifier defaults to undefined

Return type

void (empty response body)

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Request succeeded -
404 The Organization or the user specified is unknown or you don't have access to them -

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

getOrganization

Organization getOrganization()

Retrieve detailed information about an organization.

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)

const { status, data } = await apiInstance.getOrganization(
    organizationId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined

Return type

Organization

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization details -
404 The Organization specified is unknown or you don't have access to it -

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

getOrganizationAccessControl

OrganizationAccessControl getOrganizationAccessControl()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let identityId: string; //The User identifier (default to undefined)

const { status, data } = await apiInstance.getOrganizationAccessControl(
    organizationId,
    identityId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined
identityId [string] The User identifier defaults to undefined

Return type

OrganizationAccessControl

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization access -
404 The Organization or user specified is unknown or you don't have access to it -

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

getOrganizationPermissions

Array getOrganizationPermissions()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let role: string; //The Role (default to undefined)

const { status, data } = await apiInstance.getOrganizationPermissions(
    organizationId,
    role
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined
role [string] The Role defaults to undefined

Return type

Array

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization security permission list -

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

getOrganizationSecurity

OrganizationSecurity getOrganizationSecurity()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)

const { status, data } = await apiInstance.getOrganizationSecurity(
    organizationId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined

Return type

OrganizationSecurity

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization security -
404 The Organization specified is unknown or you don't have access to it -

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

listOrganizationSecurityUsers

Array listOrganizationSecurityUsers()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)

const { status, data } = await apiInstance.listOrganizationSecurityUsers(
    organizationId
);

Parameters

Name Type Description Notes
organizationId [string] The Organization identifier defaults to undefined

Return type

Array

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization security users list -
404 The Organization specified is unknown or you don't have access to it -

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

listOrganizations

Array listOrganizations()

Retrieve a paginated list of all organizations the authenticated user has permission to view. Use 'page' and 'size' query parameters for pagination.

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let page: number; //Page number to query (first page is at index 0) (optional) (default to undefined)
let size: number; //Amount of result by page (optional) (default to undefined)

const { status, data } = await apiInstance.listOrganizations(
    page,
    size
);

Parameters

Name Type Description Notes
page [number] Page number to query (first page is at index 0) (optional) defaults to undefined
size [number] Amount of result by page (optional) defaults to undefined

Return type

Array

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The list of Organizations -

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

listPermissions

Array listPermissions()

Example

import {
    OrganizationApi,
    Configuration
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

const { status, data } = await apiInstance.listPermissions();

Parameters

This endpoint does not have any parameters.

Return type

Array

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The security permission list -

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

updateOrganization

Organization updateOrganization(organizationUpdateRequest)

Example

import {
    OrganizationApi,
    Configuration,
    OrganizationUpdateRequest
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let organizationUpdateRequest: OrganizationUpdateRequest; //The new Organization details. This endpoint can\'t be used to update security

const { status, data } = await apiInstance.updateOrganization(
    organizationId,
    organizationUpdateRequest
);

Parameters

Name Type Description Notes
organizationUpdateRequest OrganizationUpdateRequest The new Organization details. This endpoint can't be used to update security
organizationId [string] The Organization identifier defaults to undefined

Return type

Organization

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The organization details -
400 Bad request -
404 The Organization specified is unknown or you don't have access to it -

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

updateOrganizationAccessControl

OrganizationAccessControl updateOrganizationAccessControl(organizationRole)

Example

import {
    OrganizationApi,
    Configuration,
    OrganizationRole
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let identityId: string; //The User identifier (default to undefined)
let organizationRole: OrganizationRole; //The new Organization Access Control

const { status, data } = await apiInstance.updateOrganizationAccessControl(
    organizationId,
    identityId,
    organizationRole
);

Parameters

Name Type Description Notes
organizationRole OrganizationRole The new Organization Access Control
organizationId [string] The Organization identifier defaults to undefined
identityId [string] The User identifier defaults to undefined

Return type

OrganizationAccessControl

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
200 The Organization access -
404 The Organization specified is unknown or you don't have access to it -

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

updateOrganizationDefaultSecurity

OrganizationSecurity updateOrganizationDefaultSecurity(organizationRole)

Example

import {
    OrganizationApi,
    Configuration,
    OrganizationRole
} from '@cosmotech/api-ts';

const configuration = new Configuration();
const apiInstance = new OrganizationApi(configuration);

let organizationId: string; //The Organization identifier (default to undefined)
let organizationRole: OrganizationRole; //This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization.

const { status, data } = await apiInstance.updateOrganizationDefaultSecurity(
    organizationId,
    organizationRole
);

Parameters

Name Type Description Notes
organizationRole OrganizationRole This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization.
organizationId [string] The Organization identifier defaults to undefined

Return type

OrganizationSecurity

Authorization

oAuth2AuthCode

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

HTTP response details

Status code Description Response headers
201 The Organization default visibility -
404 The Organization specified is unknown or you don't have access to it -

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