简体   繁体   中英

"POST is not allowed" error on IBM Graph in BlueMix

I'm trying to create the schema on IBM Graph Data Store but I'm receiving "POST is not allowed" error. See code below:

ricarez@oc3038028384 ~]$ 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"}

Any idea on how to solve that?

You're missing a /g/ in your URL. It should be https://.../g/schema

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM