Entities
Entities define which Dynamics 365 entities are exposed through the API and what operations are available for each entity.
Entity Configuration
When you add an entity to a module, you configure which operations (actions) are available:
| Operation | HTTP Method | Description |
|---|---|---|
| Create | POST | Create new records |
| Update | PUT/PATCH | Modify existing records |
| Read | GET | Retrieve single record by ID |
| Delete | DELETE | Remove records |
| Upload | POST | Upload files/attachments |
| Download | GET | Download files/attachments |
| Process Actions | POST | Execute custom actions |
| Local Option Sets | GET | Retrieve entity-specific option sets |
Entity Actions
Each entity can have multiple actions configured. Actions define:
- Endpoint Name: The URL path for the action
- Documentation: Title and description for API documentation
- Inputs: Parameters accepted by the action
- Data Fetcher: Pre-fetch queries for dependent data
- Access Control: Authorization and pre-conditions
- Entity Properties: Field mappings for create/update
Entity Structure in API Studio
Entity: Account
├── Definition
│ └── Endpoint: accounts
├── Actions:
│ ├── Create Action
│ │ ├── Definition
│ │ ├── Documentation
│ │ ├── Inputs
│ │ ├── Data Fetcher
│ │ ├── Access Control
│ │ └── Entity Properties
│ ├── Update Action
│ │ └── (similar structure)
│ ├── Read Action
│ │ └── (similar structure)
│ ├── Delete Action
│ │ └── (similar structure)
│ ├── Upload Actions
│ │ └── (for file uploads)
│ ├── Download Actions
│ │ └── (for file downloads)
│ └── Process Actions
│ └── (entity-bound custom actions)
└── Local Option Sets
└── (entity-specific picklists)
Generated API Endpoints
For an entity named "Account" in the "Sales" module, FlowOn generates these endpoints:
| Operation | Endpoint | Description |
|---|---|---|
| Create | POST /api/sales/accounts | Create new account |
| Update | PUT /api/sales/accounts/{id} | Update account |
| Read | GET /api/sales/accounts/{id} | Get account by ID |
| Delete | DELETE /api/sales/accounts/{id} | Delete account |
| Upload | POST /api/sales/accounts/{id}/upload | Upload attachment |
| Download | GET /api/sales/accounts/{id}/download | Download attachment |
| Process | POST /api/sales/accounts/{id}/actions/{action} | Execute action |
| Option Sets | GET /api/sales/accounts/optionsets/{name} | Get option set |
Local Option Sets
Local Option Sets expose entity-specific (local) option sets through dedicated endpoints.
Entity: Account
Local Option Sets:
├── accountcategorycode
│ └── Endpoint: /api/sales/accounts/optionsets/category
│
├── accountclassificationcode
│ └── Endpoint: /api/sales/accounts/optionsets/classification
│
└── customertypecode
└── Endpoint: /api/sales/accounts/optionsets/customer-type
Access Control:
└── Authorization Policy:
└── Type: Demand Authenticated User
API Request:
GET /api/sales/accounts/optionsets/category?lcid=1033
API Response (200 OK):
[
{
"name": "Preferred Customer",
"value": 1
},
{
"name": "Standard",
"value": 2
}
]
Local option sets support the same lcid parameter as global option sets for localization.