Project attributes
field | type | description |
---|---|---|
id | string | unique ID |
name | string | name of the project |
default | boolean | is this the default project? |
created_at | date | creation date of the project |
updated_at | date | last time the project has been updated |
owner | object | information about the owner of the project |
flags | object | list of flags associated to the project |
Example object:
{
"id": "pr-82a3cac5-9b25-473e-b33d-6272b87e636f",
"name": "example-project",
"default": false,
"created_at": "2014-09-10T10:17:52.690+02:00",
"updated_at": "2014-09-10T10:17:52.690+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
},
"flags": {
"beta_user": true
}
}
POST https://$SCALINGO_API_URL/v1/projects
project.name
: Name of the projectproject.default
: (Optional) Set to true to make this the default projectExample
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER_TOKEN" \
-X POST https://$SCALINGO_API_URL/v1/projects -d \
'{
"project": {
"name": "example-project",
"default": true
}
}'
Returns 201 Created
{
"project": {
"id": "pr-82a3cac5-9b25-473e-b33d-6272b87e636f",
"name": "example-project",
"default": true,
"created_at": "2014-09-10T10:17:52.690+02:00",
"updated_at": "2014-09-10T10:17:52.690+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
},
"flags": {
"beta_user": true
}
}
}
GET https://$SCALINGO_API_URL/v1/projects
List all your projects.
Example
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER_TOKEN" \
-X GET https://$SCALINGO_API_URL/v1/projects
Returns 200 OK
{
"projects": [
{
"id": "pr-82a3cac5-9b25-473e-b33d-6272b87e636f",
"name": "example-project",
"default": true,
"created_at": "2014-09-10T10:17:52.690+02:00",
"updated_at": "2014-09-10T10:17:52.690+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
},
"flags": {
"beta_user": true
}
}, {
"id": "pr-91b4dbd6-2c36-584f-c44d-7383c98f747g",
"name": "another-project",
"default": false,
"created_at": "2014-09-11T10:17:52.690+02:00",
"updated_at": "2014-09-11T10:17:52.690+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
}
}
]
}
GET https://$SCALINGO_API_URL/v1/projects/[:project_id]
Display a precise project
Example request
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER_TOKEN" \
-X GET https://$SCALINGO_API_URL/v1/projects/pr-82a3cac5-9b25-473e-b33d-6272b87e636f
Returns 200 OK
{
"project": {
"id": "pr-82a3cac5-9b25-473e-b33d-6272b87e636f",
"name": "example-project",
"default": false,
"created_at": "2014-09-10T10:17:52.690+02:00",
"updated_at": "2014-09-10T10:17:52.690+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
},
"flags": {
"beta_user": true
}
}
}
PATCH https://$SCALINGO_API_URL/v1/projects/[:project_id]
project.name
: (Optional) New name of the projectproject.default
: (Optional) Set to true to make this the default projectExample request
curl -H "Accept: application/json" -H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER_TOKEN" \
-X PATCH https://$SCALINGO_API_URL/v1/projects/pr-82a3cac5-9b25-473e-b33d-6272b87e636f -d \
'{
"project": {
"name": "updated-project-name",
"default": true
}
}'
Returns 200 OK
{
"project": {
"id": "pr-82a3cac5-9b25-473e-b33d-6272b87e636f",
"name": "updated-project-name",
"default": true,
"created_at": "2014-09-10T10:17:52.690+02:00",
"updated_at": "2014-09-10T11:25:30.123+02:00",
"owner": {
"id": "54100245736f7563d5000000",
"username": "john",
"email": "user@example.com",
"flags": {
"beta_user": true
}
},
"flags": {
"beta_user": true
}
}
}