API Reference > Miscellaneous APIs > Custom fields
  

Custom fields

Custom fields are additional properties for Data Marketplace objects that are defined by your Administrator in Metadata Command Center.
A stakeholder of a data collection can use custom attributes to specify additional information about a data collection when the standard properties of the collection are insufficient. Additionally, Data Users that order the data collection can use the newly added property to provide more information when they place an order.
For more information about custom fields, see the Create custom fields for objects topic in the Set Up Data Marketplace help.

Retrieve custom fields

Use REST APIs to retrieve the custom field details for a data collection or an order.

Endpoint and method

The following table describes the connection properties for the API:
Property
Description
Endpoint
/api/v1/integration/model/customAttributes
Method
GET
Note: Before you call this API, consider the following:
For more information, see How to call a Data Marketplace API.

Request

The following table describes the parameters that you enter in the request query:
Parameter
Description
Additional Information
classType
Required. Specify the type of object for which you want to retrieve the custom field details.
Enter one of the following values:
  • - To retrieve the custom field details of a data collection, enter com.infa.cdmp.marketplace.DataCollection.
  • - To retrieve the custom field details of an order, enter com.infa.cdmp.marketplace.Order.
offset
Optional. Enter the starting index for the paginated results.
Default value is 0.
limit
Optional. Enter the maximum number of results.
Default value is 50.
Maximum value is 100.

Example request

The following example shows how you can use an API to retrieve the custom field details for a data collection:
https://{{CDMP_URL}}/api/v1/integration/model/customAttributes?classType=com.infa.cdmp.marketplace.DataCollection&offset=0&limit=50

Response

When you pass the API query parameters in the REST client, the client displays a response for the parameter values that you have entered.
The following example shows the response of an API call to retrieve the custom field details for a data collection:


{
"processingTime": 170,
"offset": 0,
"limit": 50,
"totalCount": 9,
"classType": "com.infa.cdmp.marketplace.DataCollection",
"items": [
{
"customAttributeId": "com.infa.odin.models.custom.ca_7821688086685433570",
"name": "GDPR Compliance Required",
"status": "PUBLISHED",
"mandatory": true,
"searchable": false,
"defaultValues": ["false"],
"datatype":
{
"type": "BOOLEAN",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_3184028726397751640",
"name": "Date of Issue",
"status": "PUBLISHED",
"mandatory": false,
"searchable": false,
"defaultValues": ["2023-09-05"],
"datatype":
{
"type": "DATE",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_6928840635020975219",
"name": "Consumption Rate",
"status": "PUBLISHED",
"mandatory": true,
"searchable": true,
"defaultValues": ["45.6"],
"datatype":
{
"type": "DECIMAL",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_7907323524500803261",
"name": "Requirement",
"status": "PUBLISHED",
"mandatory": true,
"searchable": false,
"defaultValues": ["Secure Data Transfer"],
"datatype":
{
"type": "RICH_TEXT",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_1535512762047882544",
"name": "User Count",
"status": "PUBLISHED",
"mandatory": true,
"searchable": false,
"defaultValues": ["10"],
"datatype":
{
"type": "INTEGER",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_8610145587620226269",
"name": "Network Stack",
"status": "PUBLISHED",
"mandatory": false,
"searchable": false,
"defaultValues": ["Reticulum"],
"datatype":
{
"type": "DROPDOWN_SINGLE_SELECT",
"properties": {"multivalued": "false"},
"dropDownOptions": [
{
"value": "Reticulum",
"label": "Reticulum"
},
{
"value": "libp2p",
"label": "libp2p"
}
]
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_5588843841075376340",
"name": "Network Protocol",
"status": "PUBLISHED",
"mandatory": true,
"searchable": false,
"defaultValues": ["LXMF"],
"datatype":
{
"type": "PLAIN_TEXT",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_1007408542741800522",
"name": "Is Critical",
"status": "PUBLISHED",
"mandatory": true,
"searchable": true,
"defaultValues": ["false"],
"datatype":
{
"type": "BOOLEAN",
"properties": null,
"dropDownOptions": null
}
},
{
"customAttributeId": "com.infa.odin.models.custom.ca_3068304325528979652",
"name": "Cloud Platform",
"status": "PUBLISHED",
"mandatory": false,
"searchable": true,
"defaultValues": ["Apache CloduStack"],
"datatype":
{
"type": "DROPDOWN_MULTI_SELECT",
"properties": {"multivalued": "true"},
"dropDownOptions": [
{
"value": "Apache CloduStack",
"label": "Apache CloduStack"
},
{
"value": "Microsoft Azure",
"label": "Microsoft Azure"
},
{
"value": "Google Cloud Platform",
"label": "Google Cloud Platform"
},
{
"value": "Amazon Web Services",
"label": "Amazon Web Services"
}
]
}
}
]
}
The following table describes the parameters of each custom field that is retrieved:
Parameter
Description
offset
Starting index for the paginated results.
limit
Maximum number of results.
totalCount
Number of custom fields retrieved.
classType
Type of object for which the custom field details were retrieved.
This parameter can have one of the following values:
  • - If the parameter value is com.infa.cdmp.marketplace.DataCollection, the object is a data collection.
  • - If the parameter value is com.infa.cdmp.marketplace.Order, the object is an order.
items > customAttributeId
System generated unique identifier of the custom field in Metadata Command Center.
items > name
Name of the custom field as configured in Metadata Command Center.
items > status
Status of the custom field as configured in Metadata Command Center.
This parameter returns only the custom fields that are in PUBLISHED state. The PUBLISHED state indicates that the custom fields are displayed in Data Marketplace.
items > mandatory
This parameter determines whether or not the custom field is mandatory.
This parameter can have one of the following values:
  • - true. A user must enter a value in this field.
  • - false. A user doesn't require to enter a value in this field.
items > searchable
This parameter determines whether or not you can use the custom field to search for a data collection.
This parameter can have one of the following values:
  • - true. You can use the custom field to search for a data collection.
  • - false. You can't use the custom field to search for a data collection.
items > defaultValues
Default value of the custom field as configured in Metadata Command Center.
items > datatype > type
Type of the custom field as configured in Metadata Command Center.
items > datatype > properties
Subtype of the custom field as configured in Metadata Command Center.
The value of the properties parameter depends on the value configured for the type parameter.
items > datatype > dropDownOptions
The values that are acceptable inputs to the custom field, as configured in Metadata Command Center.
Note: This parameter is displayed in the response body only if the custom field is of type DROPDOWN_SINGLE_SELECT.