It's all about the answers!

Ask a question

Record Type for creation not specified correctly.


David Khetaguri (1114) | asked Jan 15 '16, 6:37 a.m.
edited Jan 15 '16, 6:43 a.m. by Ralph Schoon (63.3k33646)
I want to create pre-filled record using OSLC-Core-Version 2.0, Content-Type application/json, basic authentiation.

I send the following POST request to our host:

Request:
POST OUR_HOST_NAME/cqweb/oslc/repo/OUR_REPO/db/OUR_DB/record 

Body:
{
   "dc:type": {
      "rdf:resource":"OUR_HOST_NAME/cqweb/oslc/repo/OUR_REPO/db/OUR_DB/record-type/16777221",
      "name":"Defect"
   }
}

Response:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://open-services.net/ns/core#" xmlns:cq="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/">

    <Error>

        <message>CRRCM9981E: Record Type for creation not specified correctly.</message>

        <statusCode>400</statusCode>

    </Error>

</rdf:RDF>

Is there any data missing in JSON body that I send?
Where do I find what must be included to the body?
Is "name":"Defect" correct or should it be another value?

One answer



permanent link
Donald Nong (14.5k614) | answered Jan 17 '16, 7:06 p.m.
You'd better check the API specification.
https://jazz.net/wiki/bin/view/Main/CqOslcV2#POST

Make sure that you include all the mandatory fields in the POST operation, otherwise it will fail.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.