# Orgs Meta

## Get aggregated org metadata

> Retrieves a unified view of all Salesforce organizations from multiple sources: registered orgs, scratch org pools, and sandbox pools. Orgs appearing in multiple sources are deduplicated and merged into a single entry.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"OrgMetaDto":{"type":"object","properties":{"name":{"type":"string","description":"Common identifier - instanceName for sandboxes, username for production/scratch orgs"},"username":{"type":"string","description":"Salesforce username (email format)"},"sources":{"type":"array","description":"Array of source types where this org appears","items":{"type":"string","enum":["registered","scratch_org_pool","sandbox_pool"]}},"instanceUrl":{"type":"string","description":"Salesforce instance URL"},"orgId":{"type":"string","description":"Salesforce organization ID (18 character)"},"loginUrl":{"type":"string","description":"Login URL for authentication"},"organizationType":{"type":"string","description":"Organization type (only for registered orgs)","enum":["production","sandbox","scratch","Developer Edition"]},"isDevHub":{"type":"boolean","description":"Whether this org is a DevHub (only for registered orgs)"},"isDefault":{"type":"boolean","description":"Whether this is the default org (only for registered orgs)"},"metadata":{"type":"object","description":"Custom metadata attached to the registered org"},"environment":{"description":"Environment information if this registered org is linked to an environment","allOf":[{"$ref":"#/components/schemas/EnvironmentInfoDto"}]},"poolInfo":{"description":"Pool information if this org comes from a pool","allOf":[{"$ref":"#/components/schemas/PoolInfoDto"}]}},"required":["name","sources"]},"EnvironmentInfoDto":{"type":"object","properties":{"id":{"type":"string","description":"Environment ID"},"name":{"type":"string","description":"Environment name"},"repositoryIdentifier":{"type":"string","description":"Repository identifier (owner/repo format)"},"category":{"type":"string","description":"Environment category","enum":["dev","test","snapshot","release"]},"branch":{"type":"string","description":"Branch associated with this environment"},"isActive":{"type":"boolean","description":"Whether the environment is active"}},"required":["id","name","repositoryIdentifier","category","isActive"]},"PoolInfoDto":{"type":"object","properties":{"poolTag":{"type":"string","description":"Pool tag identifier"},"repositoryIdentifier":{"type":"string","description":"Repository identifier (owner/repo format)"},"status":{"type":"string","description":"Instance status in the pool","enum":["available","assigned","expired","creating","deleting","error"]},"assignedToUserEmail":{"type":"string","description":"Email of the user this instance is assigned to"},"devHubUsername":{"type":"string","description":"DevHub username used to create this instance"},"expiresAt":{"type":"string","description":"Expiration timestamp in ISO 8601 format"}},"required":["poolTag","repositoryIdentifier","status","devHubUsername"]}}},"paths":{"/sfp/api/orgs/meta":{"get":{"operationId":"OrgsMetaController_getOrgsMeta","summary":"Get aggregated org metadata","description":"Retrieves a unified view of all Salesforce organizations from multiple sources: registered orgs, scratch org pools, and sandbox pools. Orgs appearing in multiple sources are deduplicated and merged into a single entry.","parameters":[{"name":"sources","required":false,"in":"query","description":"Filter by source types","schema":{"type":"array","items":{"type":"string","enum":["registered","scratch_org_pool","sandbox_pool"]}}},{"name":"poolTag","required":false,"in":"query","description":"Filter pool orgs by pool tag","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter pool orgs by status","schema":{"type":"string"}},{"name":"repositoryIdentifier","required":false,"in":"query","description":"Filter by repository identifier (owner/repo format)","schema":{"type":"string"}},{"name":"includeEnvironments","required":false,"in":"query","description":"Include environment details for registered orgs","schema":{"default":true,"type":"boolean"}},{"name":"devHubOnly","required":false,"in":"query","description":"Filter registered orgs to DevHubs only","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Aggregated org metadata retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgMetaDto"}}}}},"401":{"description":"Unauthorized - invalid or missing authentication token"},"403":{"description":"Forbidden - Requires role: member, owner, application"}},"tags":["Orgs Meta"]}}}}
```
