How can a user find out which projects a custom field is visible on using WSAPI in Rally?
The schema endpoint in WS API is the optimization for discovering type definitions and attribute definitions. In order to determine which projects a custom field is visible in, you will need to query the project schema for each project to know if the attribute definition for the custom field in question exists in the response.
See the webservices documentation under Schema for a complete description.
Below is an example Schema request for Project OID <PROJECT_OID>. The response that shows a custom field named Custom Multi for the Defect type.
GET - https://rally1.rallydev.com/slm/schema/v2.0/project/<PROJECT_OID>
In the response output:
{
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/attributedefinition/<OBJECT_OID>",
"_refObjectName": "customMulti",
"_refObjectUUID": “<OBJECT_UUID>”,
"AllowedValueType": {
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/<OBJECT_OID>",
"_refObjectName": "AllowedAttributeValue",
"_refObjectUUID": "<OBJECT_UUID>"
},
"AllowedQueryOperators": {
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/attributedefinition/<OBJECT_OID>/AllowedQueryOperators",
"_type": "AllowedQueryOperator"
},
"AllowedValues": {
"_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/attributedefinition/<OBJECT_OID>/AllowedValues",
"_type": "AllowedAttributeValue"
},
"AttributeType": "COLLECTION",
...
"Name": "Custom Multi",.
...
"SchemaType": "Defectc_CustomMultiType",
By looking at the Name and Schema Type attributes, this custom field is available in Project <PROJECT_OID> for the Defect type.