Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-1452

error 400 Invalid Fields using API to add identifier with custom type

    XMLWordPrintable

Details

    Description

      Colorado State University is in the process of implementing COmanage, and I am attempting to import all of our users using the API. Using the Postman Chrome plugin and an ASP.NET C# console application, all API calls have been working, including HTTP GET, POST, PUT and DELETE for 13 different API, except one: https://spaces.internet2.edu/display/COmanage/Identifier+API

      Using the COmanage user interface, in the Colorado State University collaboration, a custom type was added to Attribute Identifier (CO Person) with Name colostateedupersoncsuid and Display Name colostateEduPersonCsuId, and two identifiers with this type were added to a test person record. This identifier was edited using both the UI and both methods of calling the API. But when trying to add another identifier of this type using the API, I always get an error: 400 Invalid Fields.

      This is an existing identifier using GET identifiers.json:
      {
      "ResponseType": "Identifiers",
      "Version": "1.0",
      "Identifiers": [
      {
      "Version": "1.0",
      "Id": "12",
      "Identifier": "999999999",
      "Type": "colostateedupersoncsuid",
      "Login": true,
      "Status": "Active",
      "Person":

      { "Type": "CO", "Id": "13" }

      ,
      "Created": "2017-04-10 16:52:34",
      "Modified": "2017-04-10 17:10:21",
      "Revision": "1",
      "Deleted": false,
      "ActorIdentifier": "CSUAPIUser"
      },
      ...

      This is the request body for POST identifiers.json:
      {
      "ResponseType": "Identifiers",
      "Version": "1.0",
      "Identifiers": [
      {
      "Version": "1.0",
      "Identifier": "777777777",
      "Type": "colostateedupersoncsuid",
      "Login": true,
      "Status": "Active",
      "Person":

      { "Type": "CO", "Id": "13" }

      }
      ]
      }

      This is the response body:
      {
      "ResponseType": "ErrorResponse",
      "Version": "1.0",
      "Id": "New",
      "InvalidFields":

      { "type": [ "content" ] }

      }

      I tried adding a shorter custom type (csuid), but when trying to add an identifier of that type using the API, I got the same error.

      When I view the source of our COmanage Registry, I see 1.0.5 which I assume is our version.

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            greg.vogl@at.internet2.edu Greg Vogl (colostate.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: