SmaCH
SmaCH API

Organization management (super-admin)


Get an organization by alias

GET
https://api.smach.science
/organizations/{alias}

Get an organization by alias › path Parameters

alias
​string · required

Get an organization by alias › Responses

Unknown alias

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members


Update an organization

PUT
https://api.smach.science
/organizations/{alias}

Updates the name, state and description; the alias is immutable

Update an organization › path Parameters

alias
​string · required

Update an organization › Request Body

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members

Update an organization › Responses

Unknown alias

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members


Delete an organization

DELETE
https://api.smach.science
/organizations/{alias}

Deletes the organization and the memberships; the accounts of its members stay. Refused while it still has members, unless force is true.

Delete an organization › path Parameters

alias
​string · required

Delete an organization › query Parameters

force
​boolean

Delete even if the organization still has members

Default: false

Delete an organization › Responses

Organization deleted

No data returned

List organizations

GET
https://api.smach.science
/organizations

Follow the Link header to page through the collection rather than building page URLs. The search parameter matches the organization name and its domains, never the alias: to reach one organization by alias, use GET /organizations/{alias}.

List organizations › query Parameters

page
​integer · int32 · min: 0

0-indexed page number

Default: 0
size
​integer · int32 · min: 1 · max: 200

Page size

Default: 50
search
​string

Free-text search. The fields it matches are documented per endpoint.

sort
​string

Sort field, prefixed with '-' for descending (e.g. -createdAt). Only present on endpoints whose backing store supports sorting.

List organizations › Responses

200

A page of results

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members


Create an organization

POST
https://api.smach.science
/organizations

Creates the organization and its administrators/viewers role groups

Create an organization › Request Body

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members

Create an organization › Responses

Organization created

A platform organization (backed by a Keycloak Organization)
name
​string · minLength: 1 · required

Display name

id
​string · readOnly

Keycloak identifier, server-assigned

alias
​string · pattern: [a-z0-9][a-z0-9-]*

Immutable technical alias

enabled
​boolean

Whether the organization is active

description
​string

Optional description

locale
​string · pattern: [a-z]{2,3}(-[A-Z]{2}…

Default language of its members

members
​integer · int32 · readOnly

Number of members


Count organizations matching the filters

GET
https://api.smach.science
/organizations/count

Answers a business question; paging is driven by the list endpoint's Link header. search has the same meaning as on the list endpoint: name and domains, never the alias.

Count organizations matching the filters › query Parameters

search
​string

Count organizations matching the filters › Responses

200

OK

Number of resources matching the filters
count
​integer · int64