# 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.9.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"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/orgs-meta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
