Models

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.

Get an object model definition

get/services/core/model

List all the fields and relationships for an object, service, or other resource. Example requests:

  • Short definition of all resources in the current version: /services/core/model
  • Full model of a specified resource: /services/core/model?name=company-config/department
  • Full model or a resource in a specific API version: /services/core/model?name=projects/task&version=v1
  • Full model for all resources of a specified type in a version: /services/core/model?version=v1&schema=true&type=workflow
SecurityOAuth2
Request
query Parameters
name
string

Resource name, in the form <application-name>/<resource name>. Note that some services have 3-part names, such as company-config/document-sequence/get-next-sequence. For custom objects use platform-apps/nsp::<object-name>.

Example: name=accounts-payable/vendor
type
string

A resource type to get a list of all resources of that type.

  • object
  • service
  • workflow
  • A specific resource type, such as ownedObject. The resource type is one of the fields returned in the resource model.
  • A comma-separated list of resource types. object and service cannot be included in the list.
Example: type=object
version
string

The API version for which you want a list of resources or a resource model. Use with the name parameter to ger a resource model as defined in a specific version of the API. Use version=all to get a list of versions. The default is the version used in the URL path of the model request.

Example: version=v1
schema
string

Set to true to return the full model of the resource. Set to false to return the short definition. The default is true when requesting a single resource and false when requesting a list of resources.

Example: schema=true
tags
string
Deprecated

Use true (default) to return the resource schema formatted as-is. Use false to return the schema without the wrapping objects for groups, refs, and lists.

Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "fields": {
      • "id": {
        },
      • "key": {
        },
      • "name": {
        },
      • "reportTitle": {
        },
      • "status": {
        }
      },
    • "groups": {
      • "audit": {
        }
      },
    • "httpMethods": "OPTIONS,GET,POST,DELETE,PATCH",
    • "refs": {
      • "parent": {
        },
      • "supervisor": {
        }
      },
    • "lists": [ ],
    • "idempotenceSupported": true
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}