# Org Explorer

## GET /sfp/api/orgs/explorer/components

> Get stored component source data. Pass refresh=true to trigger async re-fetch.

```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"}}},"paths":{"/sfp/api/orgs/explorer/components":{"get":{"operationId":"OrgExplorerController_getComponent","summary":"Get stored component source data. Pass refresh=true to trigger async re-fetch.","parameters":[{"name":"repositoryIdentifier","required":true,"in":"query","description":"Repository identifier (e.g., owner/repo)","schema":{"type":"string"}},{"name":"orgUsername","required":true,"in":"query","description":"Salesforce org username","schema":{"type":"string"}},{"name":"metadataType","required":true,"in":"query","description":"Metadata type (e.g., ApexClass, CustomObject)","schema":{"type":"string"}},{"name":"memberName","required":true,"in":"query","description":"Member name","schema":{"type":"string"}},{"name":"refresh","required":false,"in":"query","description":"If true, triggers an async refresh and returns pending status","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Stored component data, not_found, or pending status"},"403":{"description":"Forbidden - Requires role: member, owner, application"}},"tags":["Org Explorer"]}}}}
```

## GET /sfp/api/orgs/explorer/components/list

> List stored components for an org

```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"}}},"paths":{"/sfp/api/orgs/explorer/components/list":{"get":{"operationId":"OrgExplorerController_listComponents","summary":"List stored components for an org","parameters":[{"name":"orgUsername","required":true,"in":"query","description":"Salesforce org username","schema":{"type":"string"}},{"name":"metadataType","required":false,"in":"query","description":"Filter by metadata type","schema":{"type":"string"}}],"responses":{"200":{"description":"List of stored components with summary info"},"403":{"description":"Forbidden - Requires role: member, owner, application"}},"tags":["Org Explorer"]}}}}
```

## GET /sfp/api/orgs/explorer/metadata

> Get org metadata sync summary

```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"}}},"paths":{"/sfp/api/orgs/explorer/metadata":{"get":{"operationId":"OrgExplorerController_getOrgMetadata","summary":"Get org metadata sync summary","parameters":[{"name":"repositoryIdentifier","required":true,"in":"query","description":"Repository identifier (e.g., owner/repo)","schema":{"type":"string"}},{"name":"orgUsername","required":true,"in":"query","description":"Salesforce org username","schema":{"type":"string"}}],"responses":{"200":{"description":"Metadata sync summary or not_synced status"},"403":{"description":"Forbidden - Requires role: member, owner, application"}},"tags":["Org Explorer"]}}}}
```

## POST /sfp/api/orgs/explorer/metadata/refresh

> Trigger full org metadata sync (describe, list, retrieve all)

```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":{"RefreshOrgMetadataDto":{"type":"object","properties":{"repositoryIdentifier":{"type":"string","description":"Repository identifier (e.g., owner/repo)"},"orgUsername":{"type":"string","description":"Salesforce org username"},"typeFilter":{"description":"Optional list of metadata types to limit the sync","type":"array","items":{"type":"string"}}},"required":["repositoryIdentifier","orgUsername"]}}},"paths":{"/sfp/api/orgs/explorer/metadata/refresh":{"post":{"operationId":"OrgExplorerController_refreshOrgMetadata","summary":"Trigger full org metadata sync (describe, list, retrieve all)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshOrgMetadataDto"}}}},"responses":{"200":{"description":"Metadata sync triggered"},"403":{"description":"Forbidden - Requires role: member, owner, application"}},"tags":["Org Explorer"]}}}}
```


---

# 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/org-explorer.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.
