Ricardo Rezende
Ricardo Rezende

Reputation: 21

"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?

Upvotes: 2

Views: 256

Answers (1)

John Kennard
John Kennard

Reputation: 21

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

Upvotes: 2

Related Questions