Skip to content

surveyDetails

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference


/rest/assetmgmt/survey/surveyDetails/{job-ref}

GET
Get details of surveys associated to the specified Job Ref.

available response representations:
  • 200 - application/json



{    "siteSurveys":[        { "id":"345",          "surveyName", //survey table          "surveyID":"3",          "status":"1",          "siteId":"32123",          "table_num_columns":"3",    //survey table          "jobRef:"J09XNK",          "performedOn":"23/09/2011",
          "siteLocations":[           //separate section for this as site locations relate to site, used for lookup              { "id":"5433",                "name":"kitchen"              },              { "id":"5433",                "name":"kitchen"              }          ],  
          "attributeGroups":[     //combination of SiteTypeAttributeGroups and WorkTypeAttributeGroups, one per page              { "id":"1",            // unique id generated just for the download
                "name":"rob-test",                "type":"W",      //workttype attribute group or sitetype attribute group                "sequence":"1",                "attributes":[                    { "id":"4334",   //sitesurveyattribute id                                           "mandatory":"Y",   //sta or wta,                      "sequence":"1",  //sta or wta                      "defaultValue":"01/01/2009",    //sta or wta, field to get this from depends on type                      "type":"1",    //att, normal or lookup                      "dataType":"1",   //att, char, integer, decimal etc. _LookupDataType                      "name":"Number of Keys Received",    //att                      "minValue":"",     //att, min value, field to get this from depends on type                      "maxValue":"",     //att, max value, field to get this from depends on type                      "lookupValues":[     //from attributelookup table, only populated if type is Lookup                          { "id":"343",    //attlook                            "sequence":"1",    //attlook                            "value":"1"      //attlook                          },                          { "id":"656",                            "sequence":"2",                            "value":"2"                          }                       ],                      "value":"1"   //ssatt, from appropriate value field (lookup_value if it's a lookup), needs to consider show_values flag on SiteSurvey                    }                    ]              }          ],                    "siteSurveyAssets" : [            { "id":"4534",              //siteSurveyAsset              "ref":"ABC-123",          //siteSurveyAsset              "libraryAssetID":"12",    //asset, need to downloade these separately for adding assets, use to derive model, asset type              "siteLocationID":"21",    //ssa,  need to downloade these separately for adding assets (these are per site though!!)              "conditionID":"3",       //ssa, downloaded separately              "status":"2",            //sitesurveyasset              "attributeGroups":[        //one screen per group
                {   "id":"1",            //assetyTypeAttrGroup id
                    "name":"group7",   //assettypeattgroup                    "sequence":"1",    //assettypeattgroup                    "attributes":[                    { "id":"4234",    //sitesurveyassetattributeid                                          "mandatory":"Y",   //ata,                      "sequence":"1",  //ata, dictates order question appears on screen                      "defaultValue":"01/01/2009",    //ata, field to get this from depends on type                      "type":"1",    //att, normal or lookup                      "dataType":"1",   //att, char, integer, decimal etc. _LookupDataType                      "name":"Valve Type",    //att                      "minValue":"",     //att, min value, field to get this from depends on type                      "maxValue":"",     //att, max value, field to get this from depends on type                      "lookupValues":[     //from attributelookup table, only populated if type is Lookup                        { "id":"343",    //attlook                          "sequence":"1",    //attlook, dictates order value occurs in lookup                          "value":"1"      //attlook                        },                        { "id":"656",                          "sequence":"2",                          "value":"2"                        }                      ],                      "value":"1"   //ssassetatt, from appropriate value field (lookup_value if it's a lookup), this would also be dependant on show_values flag on SiteSurvey                    }                 ]               },             ]                      }       ],
    result:'success',    result_msg:''}

See the Asset Management API matrix for the full list of endpoints in this category.