Projects

Introduction

endpoints

_10
# Projects
_10
GET https://api.ittybit.com/projects
_10
POST https://api.ittybit.com/projects
_10
_10
# Project
_10
GET https://api.ittybit.com/projects/:id
_10
PATCH https://api.ittybit.com/projects/:id
_10
DELETE https://api.ittybit.com/projects/:id

Projects are the primary way to organize and manage your media in Ittybit.

You may create different projects for each of your customers, to separate media for the different departments in your organization, or to maintain different environments within your project.

Note: This is an organisation-level resource so you will have to use an API Key with admin: true permissions to access this resource.


Endpoints

List Projects

request.js
request.sh

_10
const BASE_URL = "https://api.ittybit.com";
_10
_10
const response = await fetch(`https://api.ittybit.com/projects`, {
_10
headers: {
_10
Authorization: `Bearer ${ITTYBIT_API_KEY}`,
_10
},
_10
});

Returns a list of all projects.

Endpoint

GET /projects

response.json

_30
{
_30
"meta":{
_30
"id": "req_abcdefgh1234",
_30
"method": "GET",
_30
"host": "https://api.ittybit.com",
_30
"path": "/projects",
_30
"version": "2024-08-21",
_30
"status": 200,
_30
"org_id": "org_abcdefgh1234",
_30
"type": "list",
_30
"total": 15,
_30
"limit": 12,
_30
"page": 1,
_30
"pages": 2
_30
},
_30
"data": [
_30
{
_30
"id": "prj_abcdefgh1234",
_30
"object": "project",
_30
"name": "My Project",
_30
// ... other props
_30
},
_30
// ... other projects
_30
],
_30
"links": {
_30
"self": "https://api.ittybit.com/projects",
_30
"next": "https://api.ittybit.com/projects?page=2",
_30
"prev": null,
_30
}
_30
}

Query Parameters

  • page integer

    The page number to return. Default is 1.

  • limit integer

    The number of projects to return per page. Default is 12. Maximum is 100.


Create Project

request.js
request.sh

_14
const BASE_URL = "https://api.ittybit.com";
_14
_14
const response = await fetch(`https://api.ittybit.com/projects`, {
_14
headers: {
_14
Method: "POST",
_14
Authorization: `Bearer ${ITTYBIT_API_KEY}`,
_14
"Content-Type": "application/json",
_14
body: JSON.stringify({
_14
name: "My New Project",
_14
description: "This is a new project description",
_14
alias: "newproject",
_14
}),
_14
},
_14
});

Creates a new project.

Endpoint

POST /projects

response.json

_27
{
_27
"meta":{
_27
"id": "req_abcdefgh1234",
_27
"method": "POST",
_27
"host": "https://api.ittybit.com",
_27
"path": "/projects",
_27
"version": "2024-08-21",
_27
"status": 200,
_27
"org_id": "org_abcdefgh1234",
_27
"type": "object"
_27
},
_27
"data": {
_27
"id": "prj_abcdefgh5678",
_27
"object": "project",
_27
"name": "My New Project",
_27
"description": "This is a new project description",
_27
"alias": "newproject",
_27
"domain": "newproject.ittybit.com",
_27
"status": "active",
_27
"created": "2024-03-30T15:00:00Z",
_27
"updated": "2024-03-30T15:00:00Z",
_27
},
_27
"links": {
_27
"self": "https://api.ittybit.com/projects/prj_abcdefgh5678",
_27
"parent": "https://api.ittybit.com/projects",
_27
}
_27
}

Body Parameters

  • name string

    A human-readable name for the project.

  • description string

    A human-readable description of the project.

  • alias string

    A unique identifier for the project that can be used in URLs.


View Project

request.js
request.sh

_10
const BASE_URL = "https://api.ittybit.com";
_10
_10
const response = await fetch(`https://api.ittybit.com/projects/prj_abcdefgh1234`, {
_10
headers: {
_10
Authorization: `Bearer ${ITTYBIT_API_KEY}`,
_10
},
_10
});

Returns the details for a single project.

Endpoint

GET /project/:id

response.json

_27
{
_27
"meta":{
_27
"id": "req_abcdefgh1234",
_27
"method": "GET",
_27
"host": "https://api.ittybit.com",
_27
"path": "/projects/prj_abcdefgh1234",
_27
"version": "2024-08-21",
_27
"status": 200,
_27
"org_id": "org_abcdefgh1234",
_27
"type": "object"
_27
},
_27
"data": {
_27
"id": "prj_abcdefgh1234",
_27
"object": "project",
_27
"name": "My Project",
_27
"description": "This is a project description",
_27
"alias": "myproject",
_27
"domain": "myproject.ittybit.com",
_27
"status": "active",
_27
"created": "2024-03-30T13:00:00Z",
_27
"updated": "2024-03-30T14:00:00Z",
_27
},
_27
"links": {
_27
"self": "https://api.ittybit.com/projects/prj_abcdefgh1234",
_27
"parent": "https://api.ittybit.com/projects",
_27
}
_27
}

Response Parameters

  • id string

    Unique identifier for the project.

  • name string

    A human-readable name for the project.

  • description string

    A human-readable description of the project.

  • alias string

    A unique identifier for the project that can be used in URLs.

  • domain string

    The domain for the project.

  • status string

    The status of the project. Possible values are active, paused, suspended, deleted.

  • created datetime

    The date and time the project was created. ISO 8601 format.

  • updated datetime

    The date and time the project was last updated. ISO 8601 format.


Update Project

request.js
request.sh

_13
const BASE_URL = "https://api.ittybit.com";
_13
_13
const response = await fetch(`https://api.ittybit.com/projects/prj_abcdefgh1234`, {
_13
headers: {
_13
Method: "PATCH",
_13
Authorization: `Bearer ${ITTYBIT_API_KEY}`,
_13
"Content-Type": "application/json",
_13
body: JSON.stringify({
_13
name: "My Updated Project",
_13
description: "This is an updated project description",
_13
}),
_13
},
_13
});

Updates a project's metadata.

Endpoint

PATCH /projects/:id

response.json

_27
{
_27
"meta":{
_27
"id": "req_abcdefgh1234",
_27
"method": "PATCH",
_27
"host": "https://api.ittybit.com",
_27
"path": "/projects/prj_abcdefgh1234",
_27
"version": "2024-08-21",
_27
"status": 200,
_27
"org_id": "org_abcdefgh1234",
_27
"type": "object"
_27
},
_27
"data": {
_27
"id": "prj_abcdefgh1234",
_27
"object": "project",
_27
"name": "My Updated Project",
_27
"description": "This is an updated project description",
_27
"alias": "myproject",
_27
"domain": "myproject.ittybit.com",
_27
"status": "active",
_27
"created": "2024-03-30T13:00:00Z",
_27
"updated": "2024-03-30T16:00:00Z",
_27
},
_27
"links": {
_27
"self": "https://api.ittybit.com/projects/prj_abcdefgh1234",
_27
"parent": "https://api.ittybit.com/projects",
_27
}
_27
}

Body Parameters

  • name string

    A human-readable name for the project.

  • description string

    A human-readable description of the project.


Delete Project

request.js
request.sh

_10
const BASE_URL = "https://api.ittybit.com";
_10
_10
const response = await fetch(`https://api.ittybit.com/projects/prj_abcdefgh1234`, {
_10
headers: {
_10
Method: "DELETE",
_10
Authorization: `Bearer ${ITTYBIT_API_KEY}`,
_10
},
_10
});

Deletes a project.

NOTE: This action will delete the project and all its media. To avoid accidental data loss we will retain the data and files for 30 days before permanently deleting it. If you need to restore a project within this period, please contact support.

Endpoint

DELETE /projects/:id

response.json

_22
{
_22
"meta":{
_22
"id": "req_abcdefgh1234",
_22
"method": "DELETE",
_22
"host": "https://api.ittybit.com",
_22
"path": "/projects/prj_abcdefgh1234",
_22
"version": "2024-08-21",
_22
"status": 200,
_22
"org_id": "org_abcdefgh1234",
_22
"type": "object"
_22
},
_22
"data": {
_22
"id": "prj_abcdefgh1234",
_22
"object": "project",
_22
"status": "deleted",
_22
"created": "2024-03-30T13:00:00Z",
_22
"updated": "2024-03-30T16:00:00Z",
_22
},
_22
"links": {
_22
"parent": "https://api.ittybit.com/projects",
_22
}
_22
}