Api: How to use it with curl?
Created by: Athius
Hello everybody,
I am a new user of those kind of api so I think it's a dumb question...:
How to use the Gitlab API with curl command?
I try this:
curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET --header "PRIVATE-TOKEN: MYTOKEN" "http://MYSERVER/api/v3/projects"
And I obtain the list of all the projects (that's ok).
But when I try to get just one project with the id I always have a 404 message. Here my command:
curl -i -H "Accept: application/json" -H "Content-type: application/json" -X GET --header "PRIVATE-TOKEN: MYTOKEN" --data '{id:1}' "http://MYSERVER/api/v3/projects/:id"
Did I do some mistake in my command?
Thanks,
Romain