Skip to main content
GET
/
projects
/
{projectIdOrName}
/
providers
/
{provider}
/
objects
/
{objectName}
/
metadata
Get object metadata via connection
curl --request GET \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/providers/{provider}/objects/{objectName}/metadata \
  --header 'X-Api-Key: <api-key>'
{
  "name": "contact",
  "displayName": "Contact",
  "fields": {
    "firstname": {
      "fieldName": "firstname",
      "displayName": "First Name",
      "valueType": "string",
      "providerType": "string",
      "readOnly": false,
      "isCustom": false,
      "isRequired": true
    },
    "email": {
      "fieldName": "email",
      "displayName": "Email",
      "valueType": "string",
      "providerType": "string",
      "readOnly": false,
      "isCustom": false,
      "isRequired": false
    },
    "lifecyclestage": {
      "fieldName": "lifecyclestage",
      "displayName": "Lifecycle Stage",
      "valueType": "singleSelect",
      "providerType": "enumeration",
      "readOnly": false,
      "isCustom": false,
      "isRequired": false,
      "values": [
        {
          "value": "lead",
          "displayValue": "Lead"
        },
        {
          "value": "customer",
          "displayValue": "Customer"
        }
      ]
    }
  }
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

provider
string
required

The provider name (e.g. salesforce, hubspot).

objectName
string
required

The native provider object name to retrieve metadata for.

Query Parameters

groupRef
string
required

The ID of the user group whose connection should be used to fetch the metadata.

excludeReadOnly
boolean

Excludes fields where ReadOnly is true from the response.

Response

The retrieved object metadata.

name
string
required

The provider name of the object

Example:

"contact"

fields
object
required

Map of field metadata keyed by field name

displayName
string

Human-readable name of the object

Example:

"Contact"

mappedObjectName
string

The mapped name of the object as defined in your integration config, if a mapping was applied. Only present when using the installation-scoped metadata endpoint.

Example:

"people"