2016-03-18 68 views
2

我试图在IBM Graph Data Store上创建模式,但我收到“POST is not allowed”错误。见下面的代码:BlueMix中的IBM Graph上出现“POST is not allowed”错误

[email protected] ~]$ curl "https://ibmgraph-alpha.ng.bluemix.net/ 
4f92b002-1e10-4f49-93f7-b9835b8daf91/schema" \ 
     -X POST \ 
     -u "$username:$password" \ 
     -d '{"propertyKeys": [{"name": "DBVid", "dataType": "Float", "cardinality": 
          "SINGLE"}, 
          {"name": "Oid", "dataType": "Integer", "cardinality": 
          "SINGLE"}, 
          {"name": "Name", "dataType": "String", "cardinality": 
          "SINGLE"}], 
      "vertexLabels": [{"name": "Person"}, 
          {"name": "City"}, 
          {"name": "is_part_of"}], 
      "edgeLabels": [{"name": "origin", "multiplicity": "MULTI"}, 
          {"name": "plays_at", "multiplicity": "MULTI"}], 
      "vertexIndexes": [{"name": "vByDBVid", "propertyKeys": ["DBVid"], 
           "composite": true, "unique": false}, 
          {"name": "vByOid", "propertyKeys": ["Oid"], 
           "composite": true, "unique": false}, 
          {"name": "vByName", "propertyKeys": ["Name"], 
           "composite": true, "unique": false}], 
      "edgeIndexes": [{"name": "vByDBVid", "propertyKeys": ["DBVid"], 
          "composite": true, "unique": false}, 
          {"name": "vByOid", "propertyKeys": ["Oid"], 
          "composite": true, "unique": false}, 
          {"name": "vByName", "propertyKeys": ["Name"], 
          "composite": true, "unique": false}]}' \ 
     -H 'Content-Type: application/json' 
{"code":"MethodNotAllowedError","message":"POST is not allowed"} 

任何想法如何解决?

回答

2

您错过了网址中的/g/。它应该是https://.../g/schema

+0

非常感谢。 这是问题所在。 –

相关问题