Search the complete visible organization hierarchy.
GET
/v1/tenants/{tenantNumber}/organization-units/search
const url = 'https://api.dev.iot-sens.schlossers.at/v1/tenants/1/organization-units/search?q=example&status=active&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.dev.iot-sens.schlossers.at/v1/tenants/1/organization-units/search?q=example&status=active&limit=50' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenantNumber
required
integer format: int32
Query Parameters
Section titled “Query Parameters”q
required
string
status
string
cursor
string
Opaque continuation token; reuse the original filters and scope.
limit
integer
Responses
Section titled “Responses”Stable search page with each match’s complete visible ancestor path.
Media typeapplication/json
object
items
required
Array<object>
object
organizationUnit
required
object
organizationUnitId
required
string format: uuid
tenantId
required
string format: uuid
key
required
string
name
required
string
status
required
string
effectiveStatus
required
string
scopeRelation
required
string
hasChildren
required
Whether at least one direct child is visible to the current actor.
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
visibleAncestorPath
required
Array<object>
object
organizationUnitId
required
string format: uuid
key
required
string
name
required
string
scopeRelation
required
string
nextCursor
string
Example
{ "items": [ { "organizationUnit": { "status": "active", "effectiveStatus": "active", "scopeRelation": "accessible" }, "visibleAncestorPath": [ { "scopeRelation": "accessible" } ] } ]}default
Section titled “default”A safe platform error response.
Media typeapplication/json
object
error
required
object
Example
{ "error": { "code": "VALIDATION_FAILED", "category": "validation" }}Headers
Section titled “Headers”Cache-Control
string