Cozy Cloudery (1.0.0)

Download OpenAPI specification:Download

E-mail: contact@cozycloud.cc License: GFDL-1.3

Cozy Cloudery controls Cozy instances life cycle, like creation, deletion, premium features…

Authentication

token

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

instances

A Cozy instance is the personnal space for a user where they can save their files and documents.

onboard

Start onboarding process for an instance creation. This is not an API endpoint, but an URL where the user can go in order to create their Cozy. It will redirect to an HTML page where the user can type/confirm their email address.

path Parameters
partner
required
string
Example: cozy
query Parameters
offer
string
Example: offer=cozy_default
slug
string ^[a-z][a-z0-9]{0,29}$
Example: slug=somecozy

Default slug to propose to user for creation

email
string <email>
Example: email=user@example.org

Default email to propose to user for creation

back
string <uri>
Example: back=https://example.org/cozy

URL to go back for the first onboarding stage

source
string
redirect
string

URL to go to after the creation, mainly for mobile onboarding.
Will be completed with fqdn and registerToken in query parameters.

object

Informations used to create the account. Please note that the JSON object must be URL encoded, like: ?konnectors=%7B%22dummy%22%3A%7B%22account_type%22%3A%22dummy%22%2C%22auth%22%3A%7B%22id%22%3A%22someuserlogin%22%2C%22secret%22%3A%22pahNaPaloth0faingiichaic%22%7D%2C%22trigger%22%3Atrue%2C%22exec%22%3Atrue%7D%7D. If several accounts must be created for the same konnector, it is possible to use an array of objects for them. It is possible to create aggregator accounts, like: ?konnectors=%7B%22aggregator%22%3A%7B%22id%22%3A%22dummy-aggregator%22%2C%22auth%22%3A%7B%22id%22%3A%22someuserlogin%22%2C%22secret%22%3A%22pahNaPaloth0faingiichaic%22%7D%2C%22trigger%22%3Afalse%2C%22exec%22%3Afalse%7D%7D.

object

Responses

createInstanceV1

Create an instance

Authorizations:
Request Body schema: application/json
offer
required
string
slug
required
string
domain
required
string
aliases
Array of strings
email
required
string <email>
public_name
string
locale
string
oidc
string

OIDC sub to associate with the created Cozy for future OAuth authentication

object
redirect
string

URL to go to after the creation, mainly for mobile onboarding.
Will be completed with fqdn and registerToken in query parameters.

object

Responses

Request samples

Content type
application/json
{
  • "offer": "cozy_default",
  • "slug": "foo",
  • "domain": "example.org",
  • "email": "foo@example.org",
  • "aliases":
    [
    ],
  • "public_name": "foo bar",
  • "locale": "fr",
  • "tos":
    {
    },
  • "oauth":
    {
    }
}

Response samples

Content type
application/json
{
  • "_id": "f5134920-286d-49ef-8617-cc45e4d99c9a",
  • "workflow": "66f7ffd6-bad9-45ab-b49c-7fee4da89c70"
}

getInstanceV1

Fetch instance informations

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "_id": "f5134920-286d-49ef-8617-cc45e4d99c9a",
  • "fqdn": "foo.example.org",
  • "aliases":
    [
    ],
  • "stack": "ovh-prod",
  • "activation":
    {
    },
  • "state": "activated",
  • "created_at": "2022-06-30T15:16:17.852Z",
  • "updated_at": "2022-07-08T16:08:54.672Z",
  • "deleted_at": null
}

deleteInstanceV1

Delete an instance

Authorizations:
path Parameters
uuid
required
string <uuid>
query Parameters
user_request
boolean
Default: true

Flag the deletion as user requested

date
integer

UNIX timestamp for planned deletion

Responses

Response samples

Content type
application/json
{
  • "workflow": "e24770d6-20af-4f87-b4f4-2817e5868d39"
}

recreateInstanceV1

Recreate an instance

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "workflow": "b1a943ab-7112-448e-83fd-f91dd73dff79"
}

blockInstanceV1

Block/unblock an instance

Authorizations:
path Parameters
uuid
required
string <uuid>
Request Body schema: application/json
blocked
boolean
Default: true

Responses

Request samples

Content type
application/json
{
  • "blocked": true
}

resendActivationEmailV1

Resend activation email for an instance

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

searchInstancesV2

Search for instances

Authorizations:
query Parameters
skip
integer >= 0
Default: 0

Skip n items (pagination)

limit
integer [ 0 .. 1000 ]
Default: 1000

Limit result to only the first n items (pagination)

only
Array of strings

Output only the given fields

exclude
Array of strings

Exclude the given fields from the output

object
Example: fqdn=foo.example.org

Filter instances on the given attributes values
You can filter on timestamp field (xxx_at) presence with a boolean filter (xxx: true|false)

Responses

Response samples

Content type
application/json
{
  • "count": 247,
  • "limit": 10,
  • "skip": 30,
  • "items":
    [
    ]
}

workflows

Workflows are used for asynchronous operations that can take some time to finish. They are composed of several steps, called jobs.

getWorkflowV1

Returns single workflow details.

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "name": "CreateInstanceWorkflow-985589a3-071e-4bd1-94f4-9748a39d9a8d",
  • "started_at": "2022-06-30T15:16:45.962Z",
  • "finished_at": "2022-06-30T15:17:56.545Z",
  • "status": "succeeded",
  • "jobs":
    [
    ],
  • "errors": [ ]
}

restartWorkflowV1

Restart the given workflow

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

listWorkflowsV2

Fetch workflows associated to an instance

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

public

Endpoints that can be called from a mobile app (with a public token)

createInstancePublic

Create an instance

Authorizations:
Request Body schema: application/json
offer
string
slug
string
domain
string
aliases
Array of strings
email
string <email>
public_name
string
locale
string
oidc
string

OIDC sub to associate with the created Cozy for future OAuth authentication

object
redirect
string

URL to go to after the creation, mainly for mobile onboarding.
Will be completed with fqdn and registerToken in query parameters.

object

Responses

Request samples

Content type
application/json
{
  • "offer": "cozy_default",
  • "slug": "foo",
  • "domain": "example.org",
  • "email": "foo@example.org",
  • "aliases":
    [
    ],
  • "public_name": "foo bar",
  • "locale": "fr",
  • "tos":
    {
    },
  • "oauth":
    {
    }
}

Response samples

Content type
application/json
{
  • "instance": "f5134920-286d-49ef-8617-cc45e4d99c9a",
  • "workflow": "66f7ffd6-bad9-45ab-b49c-7fee4da89c70"
}

sendReminderPublic

Send a reminder email if instance matching the given email

Authorizations:
query Parameters
email
required
string <email>
Example: email=foo@example.org

Responses

createDriveTokenPublic

Create a token with permissions for the files (drive)

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "token": "eyJH....x7kg"
}

getWorkflowPublic

Returns single workflow status

Authorizations:
path Parameters
uuid
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "status": "finished"
}

features

Feature flags

modifyFeatureFlagsV1

Modify feature flags for an instance

Authorizations:
path Parameters
uuid
required
string <uuid>
query Parameters
features
string
Example: features={"blockTransfer": true}

Features to set. If you give a null value, the flag will be removed. Field value must be a valid JSON string, properly URL encoded if needed.

Responses

Response samples

Content type
application/json
{
  • "blockTransfer": true
}

getFeatureFlagsV1

Get the feature flags for an instance

Authorizations:
query Parameters
sets
string
Example: sets=plan1,plan2

List of the feature sets of an instance (comma separated).

Responses

Response samples

Content type
application/json
{
  • "flags":
    {
    }
}

searchInstancesByFeatureFlagsV1

Search for instances having the given feature flags

Authorizations:
query Parameters
skip
integer >= 0
Default: 0

Skip n items (pagination)

limit
integer [ 0 .. 1000 ]
Default: 1000

Limit result to only the first n items (pagination)

features
string
Example: features={"blockTransfer": true}

Features to select. Field value must be a valid JSON string, properly URL encoded if needed.

Responses

Response samples

Content type
application/json
{
  • "count": 247,
  • "limit": 10,
  • "skip": 30,
  • "items":
    [
    ]
}

receiveAppStoreNotificationV2

Receive an App Store notification

Authorizations:
path Parameters
partner
required
string
Request Body schema: application/json
0
any

Responses

Request samples

Content type
application/json
{
  • "0": null
}