Skip to content

Instantly share code, notes, and snippets.

@geoffroycochard
Last active June 28, 2017 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoffroycochard/bc12c5ed908058eda5626ecb57cb14a6 to your computer and use it in GitHub Desktop.
Save geoffroycochard/bc12c5ed908058eda5626ecb57cb14a6 to your computer and use it in GitHub Desktop.
Artifica API : PUT

Bash

#!/bin/bash
# Using httpie: https://github.com/jakubroztocil/httpie
# test PUT dans category 881145
http --verbose --form PUT https://ice.artifica.fr/api/json/map/element key=XXXXXXXXXXXXXX parent=881145 title=point1 table=marker

Request

PUT /api/json/map/element HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 76
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: ice.artifica.fr
User-Agent: HTTPie/0.9.2

key=XXXXXXXXXXXXXX&parent=881145&title=point1&table=marker

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-store, no-cache, must-revalidate
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json
Date: Wed, 28 Jun 2017 14:04:13 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
P3P: CP="CAO PSA OUR"
Pragma: no-cache
Server: nginx
Set-Cookie: PHPSESSID=f6p2l1kshhsoss2cdil6p30vo5; path=/
Transfer-Encoding: chunked
Vary: Accept-Encoding

{
    "results": {
        "id": "838549", 
        "tree": {
            "id": "881269", 
            "parent": 881145
        }
    }
}

ICE backoffice

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment