Use the model service to find details about a resource, such as an object's queryable fields and their data types, valid values (for enums) and relationships to other objects. You can use any of those within the select and/or filter elements of a query. The model service works with all resource types including standard objects, custom objects, services, and workflows.
List all the fields and relationships for an object, service, or other resource. Example requests:
/services/core/model
/services/core/model?name=company-config/department
/services/core/model?name=projects/task&version=v1
/services/core/model?version=v1&schema=true&type=workflow
name | string Resource name, in the form Example: name=accounts-payable/vendor |
type | string A resource type to get a list of all resources of that type.
Example: type=object |
version | string The API version for which you want a list of resources or a resource model. Use with the Example: version=v1 |
schema | string Set to Example: schema=true |
tags | string Deprecated Use |
OK
Bad Request
{- "ia::result": {
- "fields": {
- "id": {
- "mutable": false,
- "nullable": false,
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false
}, - "key": {
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}, - "name": {
- "nullable": false,
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "mutable": true
}, - "reportTitle": {
- "nullable": true,
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "mutable": true
}, - "status": {
- "enum": [
- "active",
- "activeNonPosting",
- "inactive"
], - "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "nullable": false,
- "mutable": true
}
}, - "groups": {
- "audit": {
- "fields": {
- "createdBy": {
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}, - "createdDateTime": {
- "format": "date-time",
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}, - "modifiedBy": {
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}, - "modifiedDateTime": {
- "format": "date-time",
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}
}
}
}, - "httpMethods": "OPTIONS,GET,POST,DELETE,PATCH",
- "refs": {
- "parent": {
- "apiObject": "company-config/department",
- "fields": {
- "id": {
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": true
}, - "key": {
- "nullable": true,
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "mutable": true
}, - "name": {
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}
}
}, - "supervisor": {
- "apiObject": "company-config/employee",
- "fields": {
- "id": {
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": true
}, - "key": {
- "nullable": true,
- "type": "string",
- "readOnly": false,
- "writeOnly": false,
- "required": false,
- "mutable": true
}, - "name": {
- "readOnly": true,
- "type": "string",
- "writeOnly": false,
- "required": false,
- "nullable": true,
- "mutable": false
}
}
}
}, - "lists": [ ],
- "idempotenceSupported": true
}, - "ia::meta": {
- "totalCount": 1,
- "totalSuccess": 1,
- "totalError": 0
}
}