Skip to content
Sam edited this page Mar 26, 2018 · 308 revisions

:octocat: This describes the resources that make up the Gibolt API. :octocat:

All API access from the https://giboltapi.kozea.fr. All data is sent and received as JSON.



Repositories

Repositories - List repositories

get

List all repositories from Organization :

/api/repos

Response

{
  "primary_keys": ["repo_name"],
  "occurences": 105,
  "objects": [
    {
      "repo_id": 33362563,
      "repo_name": "gibolt",
      "description": "Git for Usain Bolt",
      "permissions": {
        "admin": false,
        "pull": false,
        "push": false
      }
    }
  ]
}

Repositories - Get a single repository

get

Get a single repository from Organization :

/api/repos/:repo_name

Response

{
  "primary_keys": ["repo_name"],
  "occurences": 1,
  "objects": [
    {
      "repo_id": 33362563,
      "repo_name": "gibolt",
      "description": "Git for Usain Bolt",
      "permissions": {
        "admin": false,
        "pull": false,
        "push": false
      }
    }
  ]
}


Milestones

Milestones - List milestones

get

List all milestones from a repository :

/api/repos/:repo_name/milestones

Parameters

Name Type Description
state string Indicates the state of the milestones to return. Can be either open, closed, or all. Default: open
sort string What to sort results by. Can be either created, updated, comments. Default: created

Response

{
  "primary_keys": ["milestone_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "closed_at": null,
      "closed_issues": 6,
      "description": "",
      "due_on": "2017-08-31T07:00:00Z",
      "html_url": "https://github.com/Kozea/gibolt/milestone/8",
      "repo_name": "Gibolt",
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "open_issues": 7,
      "state": "open",
      "updated_at": "2017-05-22T10:02:57Z"
    }
  ]
}

Milestones - Get a single milestone

get

Get a single milestone from Organization :

/api/repos/:repo_name/milestones/:milestone_number

Response

{
  "primary_keys": ["milestone_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "closed_at": null,
      "closed_issues": 6,
      "description": "",
      "due_on": "2017-08-31T07:00:00Z",
      "html_url": "https://github.com/Kozea/gibolt/milestone/8",
      "repo_name": "Gibolt",
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "open_issues": 7,
      "state": "open",
      "updated_at": "2017-05-22T10:02:57Z"
    }
  ]
}

Milestones - Update a single milestone

put

Update a single milestone from Organization :

/api/repos/:repo_name/milestones/:milestone_number

Inputs

Name Type Description
milestone_title string The title of the milestone.
state string The state of the milestone. Either open or closed. Default: open
description string A description of the milestone.
due_on string The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

Example

{
  "milestone_id": 2238860,
  "milestone_title":
    "Une version permettant de gérer certains concepts de l'holacratie est en production",
  "description": "",
  "state": "open",
  "due_on": "2017-04-30T07:00:00Z"
}

Response

{
  "primary_keys": ["milestone_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "closed_at": null,
      "closed_issues": 6,
      "description": "",
      "due_on": "2017-08-31T07:00:00Z",
      "html_url": "https://github.com/Kozea/gibolt/milestone/8",
      "repo_name": "Gibolt",
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "open_issues": 7,
      "state": "open",
      "updated_at": "2017-05-22T10:02:57Z"
    }
  ]
}

Milestones - Create a single milestone

post

Create a single milestone for Kozea :

/api/repos/:repo_name/milestones

Parameters

Name Type Description
milestone_title string The title of the milestone.
state string The state of the milestone. Either open or closed. Default: open
description string A description of the milestone.
due_on string The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

Example

{
  "milestone_title":
    "Une version permettant de gérer certains concepts de l'holacratie est en production",
  "description": "",
  "state": "open",
  "due_on": "2017-04-30T07:00:00Z"
}

Response

{
  "primary_keys": ["milestone_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "closed_at": null,
      "closed_issues": 6,
      "description": "",
      "due_on": "2017-08-31T07:00:00Z",
      "html_url": "https://github.com/Kozea/gibolt/milestone/8",
      "repo_name": "Gibolt",
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "open_issues": 7,
      "state": "open",
      "updated_at": "2017-05-22T10:02:57Z"
    }
  ]
}


Tickets

Tickets - List tickets

get

List all tickets for the authenticated user from Organization :

/api/tickets

Parameters

Name Type Description
filter string Indicates which sorts of issues to return. Can be one of:
  • assigned: Issues assigned to you
  • created: Issues created by you
  • all: All issues the authenticated user can see, regardless of participation or creation
Default: assigned
state string Indicates the state of the issues to return. Can be either open, closed, or all. Default: open
creator string The user that created the issue
mentioned string A user that's mentioned in the issue
labels string A list of comma separated label names. Example: Urgent, Dévops
sort string What to sort results by. Can be either created, updated, comments. Default: created
since string Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
repo string A list of comma separated repo names. Example: gibolt, hydra

Response

{
  "primary_keys": ["ticket_number", "repo_name"],
  "occurences": 3,
  "objects": [
    {
      "assignees": [
        {
          "user_id": 25310926,
          "user_name": "MaellePnt",
          "avatar_url": "http...."
        },
        {
          "user_id": 27198899,
          "user_name": "Romlie",
          "avatar_url": "http...."
        }
      ],
      "body": "",
      "closed_at": null,
      "comments": [],
      "comments_expanded": false,
      "expanded": false,
      "html_url": "https://github.com/Kozea/gibolt/issues/52",
      "labels": [
        {
          "label_color": "6e6186",
          "label_id": 514462139,
          "label_name": "Dévops"
        },
        {
          "label_color": "e73c7d",
          "label_id": 514462112,
          "label_name": "Urgent"
        }
      ],
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "milestone_state": "open",
      "nb_comments": 1,
      "pull_request": null,
      "repo_name": "gibolt",
      "state": "open",
      "selected": false,
      "ticket_id": 229043027,
      "ticket_number": 52,
      "ticket_title": "Le modèle de la base de données est réalisé",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "user_name": "Romlie",
        "user_id": 952243
      }
    }
  ]
}

Tickets - Get a single ticket

get

Get a single ticket for a repository from Organization :

/api/repos/:repo_name/tickets/:ticket_number

Response

{
  "primary_keys": ["ticket_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "assignees": [
        {
          "user_id": 25310926,
          "user_name": "MaellePnt",
          "avatar_url": "http...."
        },
        {
          "user_id": 27198899,
          "user_name": "Romlie",
          "avatar_url": "http...."
        }
      ],
      "body": "",
      "closed_at": null,
      "comments": [],
      "comments_expanded": false,
      "expanded": false,
      "html_url": "https://github.com/Kozea/gibolt/issues/52",
      "labels": [
        {
          "label_color": "6e6186",
          "label_id": 514462139,
          "label_name": "Dévops"
        },
        {
          "label_color": "e73c7d",
          "label_id": 514462112,
          "label_name": "Urgent"
        }
      ],
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "nb_comments": 1,
      "pull_request": null,
      "repo_name": "gibolt",
      "state": "open",
      "selected": false,
      "ticket_id": 229043027,
      "ticket_number": 52,
      "ticket_title": "Le modèle de la base de données est réalisé",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "user_name": "Romlie",
        "user_id": 952243
      }
    }
  ]
}

Tickets - Update a single ticket

put

Update a single ticket from Organization :

/api/repos/:repo_name/tickets/:ticket_number

Inputs

Name Type Description
ticket_title string The title of the issue.
body string The contents of the issue..
state string State of the issue. Either open or closed.
milestone_number integer The number of the milestone to associate this issue with.
labels array of strings Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. .
assignees array of strings Names for Users to assign to this issue. Pass one or more user names to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue.

Example

{
  "ticket_title": "L'API est codée",
  "body": "",
  "milestone_number": 5,
  "assignees": ["Romlie", "MaellePnt"],
  "state": "open",
  "labels": ["Dévops", "Urgent"]
}

Response

{
  "primary_keys": ["ticket_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "assignees": [
        {
          "user_id": 25310926,
          "user_name": "MaellePnt",
          "avatar_url": "http...."
        },
        {
          "user_id": 27198899,
          "user_name": "Romlie",
          "avatar_url": "http...."
        }
      ],
      "body": "",
      "closed_at": null,
      "comments": [],
      "comments_expanded": false,
      "expanded": false,
      "html_url": "https://github.com/Kozea/gibolt/issues/52",
      "labels": [
        {
          "label_color": "6e6186",
          "label_id": 514462139,
          "label_name": "Dévops"
        },
        {
          "label_color": "e73c7d",
          "label_id": 514462112,
          "label_name": "Urgent"
        }
      ],
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "nb_comments": 1,
      "pull_request": null,
      "repo_name": "gibolt",
      "state": "open",
      "selected": false,
      "ticket_id": 229043027,
      "ticket_number": 52,
      "ticket_title": "Le modèle de la base de données est réalisé",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "user_name": "Romlie",
        "user_id": 952243
      }
    }
  ]
}

Tickets - Create a single ticket

post

Create a single ticket for Kozea :

/api/repos/:repo_name/tickets

Parameters

Name Type Description
ticket_title string Required. The title of the issue.
body string The contents of the issue..
state string State of the issue. Either open or closed.
milestone_number integer The number of the milestone to associate this issue with.
labels array of strings Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. .
assignees array of strings Names for Users to assign to this issue. Pass one or more user names to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue.

Example

{
  "ticket_title": "L'API est codée",
  "body": "",
  "milestone_number": 5,
  "assignees": ["Romlie"],
  "state": "open",
  "labels": ["Dévops", "Urgent"]
}

Response

{
  "primary_keys": ["ticket_number", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "assignees": [
        {
          "user_id": 25310926,
          "user_name": "MaellePnt",
          "avatar_url": "http...."
        },
        {
          "user_id": 27198899,
          "user_name": "Romlie",
          "avatar_url": "http...."
        }
      ],
      "body": "",
      "closed_at": null,
      "comments": [],
      "comments_expanded": false,
      "expanded": false,
      "html_url": "https://github.com/Kozea/gibolt/issues/52",
      "labels": [
        {
          "label_color": "6e6186",
          "label_id": 514462139,
          "label_name": "Dévops"
        },
        {
          "label_color": "e73c7d",
          "label_id": 514462112,
          "label_name": "Urgent"
        }
      ],
      "milestone_id": 2238860,
      "milestone_number": 5,
      "milestone_title":
        "Une version permettant de gérer certains concepts de l'holacratie est en production",
      "nb_comments": 1,
      "pull_request": null,
      "repo_name": "gibolt",
      "state": "open",
      "selected": false,
      "ticket_id": 229043027,
      "ticket_number": 52,
      "ticket_title": "Le modèle de la base de données est réalisé",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "user_name": "Romlie",
        "user_id": 952243
      }
    }
  ]
}


Comments

Comments - List ticket's comments

get

List all comments from a ticket :

/api/repos/:repo_name/tickets/:ticket_number/comments

Response

{
  "primary_keys": ["comment_id", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "body":
        "\r\n![database_diagram](https://cloud.githubusercontent.com/assets/25310926/26201267/70d1637c-3bd2-11e7-9edc-417241e3f572.png)\r\n\r\n\r\n",
      "comment_id": 302079284,
      "created_at": "2017-05-17T12:47:58Z",
      "repo_name": "Gibolt",
      "ticket_number": "52",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
        "user_id": 25310926,
        "user_name": "MaellePnt"
      }
    }
  ]
}

Comments - Get a single ticket's comments

get

Get a single comments from a repository :

/api/repos/:repo_name/tickets/comments/:comment_id

Response

{
  "primary_keys": ["comment_id", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "body":
        "\r\n![database_diagram](https://cloud.githubusercontent.com/assets/25310926/26201267/70d1637c-3bd2-11e7-9edc-417241e3f572.png)\r\n\r\n\r\n",
      "comment_id": 302079284,
      "created_at": "2017-05-17T12:47:58Z",
      "repo_name": "Gibolt",
      "ticket_number": "52",
      "updated_at": "2017-05-18T12:04:28Z",
      "user": {
        "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
        "user_id": 25310926,
        "user_name": "MaellePnt"
      }
    }
  ]
}

Comments - Update a single comment

put

Update a single comment for a ticket from Organization :

/api/repos/:repo_name/tickets/comments/:comment_id

Parameters

Name Type Description
body string Required The body of the comment.

Example

{
  "body": "comment"
}

Response

{
  "primary_keys": ["comment_id", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "body": "comment",
      "comment_id": 302079284,
      "created_at": "2017-05-17T12:47:58Z",
      "repo_name": "Gibolt",
      "ticket_number": "52",
      "updtated_at": "2017-05-18T12:04:28Z",
      "user": {
        "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
        "user_id": 25310926,
        "user_name": "MaellePnt"
      }
    }
  ]
}

Comments - Create a single comment

post

Create a comment for a ticket from Organization :

/api/repos/:repo_name/tickets/:ticket_number/comments

Inputs

Name Type Description
body string Required The body of the comment.

Example

{
  "body": "comment"
}

Response

{
  "primary_keys": ["comment_id", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "body": "comment",
      "comment_id": 302079284,
      "created_at": "2017-05-17T12:47:58Z",
      "repo_name": "Gibolt",
      "ticket_number": "52",
      "updtated_at": "2017-05-18T12:04:28Z",
      "user": {
        "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
        "user_id": 25310926,
        "user_name": "MaellePnt"
      }
    }
  ]
}

Comments - Delete a single comment

delete

Delete a single comment from Organization :

/api/repos/:repo_name/tickets/comments/:comment_id

Response

{
  "primary_keys": ["comment_id", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "body": "comment",
      "comment_id": 302079284,
      "created_at": "2017-05-17T12:47:58Z",
      "repo_name": "Gibolt",
      "ticket_number": "52",
      "updtated_at": "2017-05-18T12:04:28Z",
      "user": {
        "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
        "user_id": 25310926
      }
    }
  ]
}


Labels

Labels - List milestone labels

get

List all labels from a milestone :

/api/repos/:repo_name/milestones/:milestone_number/labels

Response

{
  "primary_keys": ["label_name", "repo_name"],
  "occurences": 5,
  "objects": [
    {
      "repo_name": "Gibolt",
      "color": "f1c40f",
      "label_id": 514462113,
      "label_name": "Bientôt"
    }
  ]
}

Labels - List repository labels

get

List all labels from a repository :

/api/repos/:repo_name/labels

Response

{
  "primary_keys": ["label_name", "repo_name"],
  "occurences": 5,
  "objects": [
    {
      "repo_name": "Gibolt",
      "color": "f1c40f",
      "label_id": 514462113,
      "label_name": "Bientôt"
    }
  ]
}

Labels - Get a single label

get

Get a single label from a repository :

/api/repos/:repo_name/labels/:label_name

Response

{
  "primary_keys": ["label_name", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "repo_name": "Gibolt",
      "color": "f1c40f",
      "label_id": 514462113,
      "label_name": "Bientôt"
    }
  ]
}

Labels - Update a single label

put

Update a single label from Organization :

/api/repos/:repo_name/labels/:label_name

Inputs

Name Type Description
label_name string The name of the label.
state string A 6 character hex code, without the leading #, identifying the color.

Example

{
  "label_name": "Bientôt",
  "color": "f1c40f"
}

Response

{
  "primary_keys": ["label_name", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "repo_name": "Gibolt",
      "color": "f1c40f",
      "label_id": 514462113,
      "label_name": "Bientôt"
    }
  ]
}

Labels - Create a single label

post

Create a label from Organization :

/api/repos/:repo_name/labels

Parameters

Name Type Description
label_name string Required. The name of the label.
color string Required. A 6 character hex code, without the leading #, identifying the color.

Example

{
  "label_name": "Bientôt",
  "color": "f1c40f"
}

Response

{
  "primary_keys": ["label_name", "repo_name"],
  "occurences": 1,
  "objects": [
    {
      "repo_name": "Gibolt",
      "color": "f1c40f",
      "label_id": 514462113,
      "label_name": "Bientôt"
    }
  ]
}

Labels - Delete a single label

delete

Delete a single label from Organization :

/api/repos/:repo_name/labels/:label_name

Response (204)

{
  "status": "success",
  "message": "Label Test deleted for repo gibolt."
}


Users

User - Get authenticated user

get

Get the authenticated user :

/api/user

Response

{
  "login": "octocat",
  "id": 1,
  "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  "gravatar_id": "",
  "url": "https://api.github.com/users/octocat",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url":
    "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "site_admin": false,
  "name": "monalisa octocat",
  "company": "GitHub",
  "blog": "https://github.com/blog",
  "location": "San Francisco",
  "email": "octocat@github.com",
  "hireable": false,
  "bio": "There once was...",
  "public_repos": 2,
  "public_gists": 1,
  "followers": 20,
  "following": 0,
  "created_at": "2008-01-14T04:33:35Z",
  "updated_at": "2008-01-14T04:33:35Z",
  "total_private_repos": 100,
  "owned_private_repos": 100,
  "private_gists": 81,
  "disk_usage": 10000,
  "collaborators": 8,
  "two_factor_authentication": true,
  "plan": {
    "name": "Medium",
    "space": 400,
    "private_repos": 20,
    "collaborators": 0
  }
}

Users - List users

get

List all users from Organization :

/api/users

Response

{
  "primary_keys": ["user_name"],
  "occurences": 56,
  "objects": [
    {
      "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
      "user_id": 25310926,
      "user_name": "Romlie"
    }
  ]
}

Users - Get a single user

get

Get a single user from Organization :

/api/users/:user_name

Response

{
  "primary_keys": ["user_name"],
  "occurences": 1,
  "objects": [
    {
      "avatar_url": "https://avatars2.githubusercontent.com/u/25310926?v=3",
      "user_id": 25310926,
      "user_name": "Romlie"
    }
  ]
}


Holacracy related routes

Circles

Circles - List circles

get

List all circles from Organization :

/api/circles
/api/circles?parent_circle_id=1

Parameters (not mandatory)

Name Type Description
parent_circle_id integer Id of parent circle

Response

{
  "primary_keys": ["circle_id"],
  "occurences": 2,
  "objects": [
    {
      "circle_id": 1,
      "parent_circle_id": null,
      "label_id": 9,
      "circle_name": "1er Cercle",
      "circle_purpose": "",
      "circle_domain": "Kozea",
      "circle_accountabilities": "A définir\n",
      "is_active": true,
      "circle_parent": [],
      "circle_children": [
        {
          "circle_id": 2,
          "parent_circle_id": 1,
          "label_id": 10,
          "circle_name": "Dévops",
          "circle_purpose":
            "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
          "circle_domain":
            "Support informatique interne  Entretien et gestion de parc informatique  Extraction de données  Réalisation de produits  Expertise, excellence et innovation technique  Ingénierie informatique.",
          "circle_accountabilities": "\n",
          "is_active": true,
          "roles": [
            {
              "role_id": 10,
              "circle_id": 2,
              "role_name": "Administration système ",
              "role_purpose":
                "Maintenir les serveurs dans un état fonctionnel suffisant en dehors des heures ouvrées",
              "role_domain": "Serveurs.",
              "role_accountabilities":
                "Assurer la mise en production des services.\nAssurer la sécurité des services.\nAssurer la continuité des services.\nAssurer la disponibilité des services.\nAssurer la performance des services.\n",
              "is_active": true,
              "role_type": "assigned",
              "duration": null,
              "role_focuses": [
                {
                  "role_focus_id": 9,
                  "role_id": 10,
                  "focus_name": "Jour",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 9,
                      "role_focus_id": 9,
                      "user_id": 3,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": [
                    {
                      "item_id": 3,
                      "role_focus_id": 9,
                      "item_type": "checklist",
                      "content":
                        "Mettre à jour les serveurs toutes les semaines"
                    }
                  ]
                },
                {
                  "role_focus_id": 10,
                  "role_id": 10,
                  "focus_name": "Astreinte",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 10,
                      "role_focus_id": 10,
                      "user_id": 2,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": []
                }
              ]
            },
            {
              "role_id": 17,
              "circle_id": 2,
              "role_name": "Premier lien",
              "role_purpose":
                "Le Premier Lien porte la Raison d’Être de l’ensemble du Cercle.",
              "role_domain": "Affectation des Rôles du Cercle.",
              "role_accountabilities":
                "- Structurer la Gouvernance du Cercle pour manifester sa Raison d’Être et mettre en œuvre ses Redevabilités.\n- Affecter des Associés aux Rôles du Cercle ; suivre l’adéquation entre les Rôles et les Associés qui y sont affectés ; offrir du feedback pour améliorer cette adéquation ; et réaffecter les Rôles à d’autres Associés au besoin pour obtenir une meilleure adéquation.\n- Répartir les ressources disponibles du Cercle sur les différents Projets et/ou Rôles.\n- Établir des priorités et des Stratégies pour le Cercle.\n- Définir des indicateurs pour le Cercle.\n- Éliminer au sein du Cercle les contraintes sur la mise en œuvre de la Raison d’Être et des Redevabilités du Super-Cercle\nLe Premier Lien porte également tous les Domaines et Redevabilités du Cercle qui ne sont pas délégués au sein du Cercle.\n",
              "is_active": true,
              "role_type": "leadlink",
              "duration": null,
              "role_focuses": [
                {
                  "role_focus_id": 17,
                  "role_id": 17,
                  "focus_name": "",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 17,
                      "role_focus_id": 17,
                      "user_id": 2,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": []
                }
              ]
            }
          ]
        }
      ],
      "roles": [
        {
          "role_id": 84,
          "circle_id": 1,
          "role_name": "Premier lien",
          "role_purpose":
            "Le Premier Lien porte la Raison d’Être de l’ensemble du Cercle.",
          "role_domain": "Affectation des Rôles du Cercle.",
          "role_accountabilities":
            "- Structurer la Gouvernance du Cercle pour manifester sa Raison d’Être et mettre en œuvre ses Redevabilités.\n- Affecter des Associés aux Rôles du Cercle ; suivre l’adéquation entre les Rôles et les Associés qui y sont affectés ; offrir du feedback pour améliorer cette adéquation ; et réaffecter les Rôles à d’autres Associés au besoin pour obtenir une meilleure adéquation.\n- Répartir les ressources disponibles du Cercle sur les différents Projets et/ou Rôles.\n- Établir des priorités et des Stratégies pour le Cercle.\n- Définir des indicateurs pour le Cercle.\n- Éliminer au sein du Cercle les contraintes sur la mise en œuvre de la Raison d’Être et des Redevabilités du Super-Cercle\nLe Premier Lien porte également tous les Domaines et Redevabilités du Cercle qui ne sont pas délégués au sein du Cercle.",
          "is_active": true,
          "role_type": null,
          "duration": null,
          "role_focuses": [
            {
              "role_focus_id": 84,
              "role_id": 84,
              "focus_name": "",
              "role_focus_users": [
                {
                  "role_focus_user_id": 84,
                  "role_focus_id": 84,
                  "user_id": 1,
                  "start_date": null,
                  "end_date": null
                }
              ],
              "items": [
                {
                  "item_id": 22,
                  "role_focus_id": 84,
                  "item_type": "checklist",
                  "content": "Assignation des rôles vacants"
                }
              ]
            }
          ]
        }
      ],
      "circle_milestones": [
        {
          "circle_id": 1,
          "milestone_number": 64,
          "repo_name": "kozea",
          "is_active": true
        }
      ],
      "label": [
        {
          "label_id": 9,
          "label_type": "circle",
          "text": "1er cercle",
          "color": "#1a1b31"
        }
      ]
    },
    {
      "circle_id": 2,
      "parent_circle_id": 1,
      "label_id": 10,
      "circle_name": "Dévops",
      "circle_purpose":
        "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
      "circle_domain":
        "Support informatique interne  Entretien et gestion de parc informatique  Extraction de données  Réalisation de produits  Expertise, excellence et innovation technique  Ingénierie informatique.",
      "circle_accountabilities": "\n",
      "is_active": true,
      "circle_parent": [
        {
          "circle_id": 1,
          "parent_circle_id": null,
          "label_id": 9,
          "circle_name": "1er Cercle",
          "circle_purpose": "",
          "circle_domain": "Kozea",
          "circle_accountabilities": "A définir\n",
          "is_active": true
        }
      ],
      "circle_children": [],
      "roles": [
        {
          "role_id": 10,
          "circle_id": 2,
          "role_name": "Administration système ",
          "role_purpose":
            "Maintenir les serveurs dans un état fonctionnel suffisant en dehors des heures ouvrées",
          "role_domain": "Serveurs.",
          "role_accountabilities":
            "Assurer la mise en production des services.\nAssurer la sécurité des services.\nAssurer la continuité des services.\nAssurer la disponibilité des services.\nAssurer la performance des services.\n",
          "is_active": true,
          "role_type": "assigned",
          "duration": null,
          "role_focuses": [
            {
              "role_focus_id": 9,
              "role_id": 10,
              "focus_name": "Jour",
              "role_focus_users": [
                {
                  "role_focus_user_id": 9,
                  "role_focus_id": 9,
                  "user_id": 3,
                  "start_date": null,
                  "end_date": null
                }
              ],
              "items": [
                {
                  "item_id": 3,
                  "role_focus_id": 9,
                  "item_type": "checklist",
                  "content": "Mettre à jour les serveurs toutes les semaines"
                }
              ]
            },
            {
              "role_focus_id": 10,
              "role_id": 10,
              "focus_name": "Astreinte",
              "role_focus_users": [
                {
                  "role_focus_user_id": 10,
                  "role_focus_id": 10,
                  "user_id": 2,
                  "start_date": null,
                  "end_date": null
                }
              ],
              "items": []
            }
          ]
        },
        {
          "role_id": 17,
          "circle_id": 2,
          "role_name": "Premier lien",
          "role_purpose":
            "Le Premier Lien porte la Raison d’Être de l’ensemble du Cercle.",
          "role_domain": "Affectation des Rôles du Cercle.",
          "role_accountabilities":
            "- Structurer la Gouvernance du Cercle pour manifester sa Raison d’Être et mettre en œuvre ses Redevabilités.\n- Affecter des Associés aux Rôles du Cercle ; suivre l’adéquation entre les Rôles et les Associés qui y sont affectés ; offrir du feedback pour améliorer cette adéquation ; et réaffecter les Rôles à d’autres Associés au besoin pour obtenir une meilleure adéquation.\n- Répartir les ressources disponibles du Cercle sur les différents Projets et/ou Rôles.\n- Établir des priorités et des Stratégies pour le Cercle.\n- Définir des indicateurs pour le Cercle.\n- Éliminer au sein du Cercle les contraintes sur la mise en œuvre de la Raison d’Être et des Redevabilités du Super-Cercle\nLe Premier Lien porte également tous les Domaines et Redevabilités du Cercle qui ne sont pas délégués au sein du Cercle.\n",
          "is_active": true,
          "role_type": "leadlink",
          "duration": null,
          "role_focuses": [
            {
              "role_focus_id": 17,
              "role_id": 17,
              "focus_name": "",
              "role_focus_users": [
                {
                  "role_focus_user_id": 17,
                  "role_focus_id": 17,
                  "user_id": 2,
                  "start_date": null,
                  "end_date": null
                }
              ],
              "items": []
            }
          ]
        }
      ],
      "circle_milestones": [
        {
          "circle_id": 2,
          "milestone_number": 11,
          "repo_name": "gibolt",
          "is_active": true
        }
      ],
      "label": [
        {
          "label_id": 10,
          "label_type": "circle",
          "text": "Dévops",
          "color": "#6e6186"
        }
      ]
    }
  ]
}

Circles - Get a single circle

get

Get a single circle from Organization :

/circles/:circle_id

Response

{
  "primary_keys": ["circle_id"],
  "occurences": 1,
  "objects": [
    {
      "circle_id": 1,
      "parent_circle_id": null,
      "label_id": 9,
      "circle_name": "1er Cercle",
      "circle_purpose": "",
      "circle_domain": "Kozea",
      "circle_accountabilities": "A définir\n",
      "is_active": true,
      "circle_parent": [],
      "circle_children": [
        {
          "circle_id": 2,
          "parent_circle_id": 1,
          "label_id": 10,
          "circle_name": "Dévops",
          "circle_purpose":
            "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
          "circle_domain":
            "Support informatique interne  Entretien et gestion de parc informatique  Extraction de données  Réalisation de produits  Expertise, excellence et innovation technique  Ingénierie informatique.",
          "circle_accountabilities": "\n",
          "is_active": true,
          "roles": [
            {
              "role_id": 10,
              "circle_id": 2,
              "role_name": "Administration système ",
              "role_purpose":
                "Maintenir les serveurs dans un état fonctionnel suffisant en dehors des heures ouvrées",
              "role_domain": "Serveurs.",
              "role_accountabilities":
                "Assurer la mise en production des services.\nAssurer la sécurité des services.\nAssurer la continuité des services.\nAssurer la disponibilité des services.\nAssurer la performance des services.\n",
              "is_active": true,
              "role_type": "assigned",
              "duration": null,
              "role_focuses": [
                {
                  "role_focus_id": 9,
                  "role_id": 10,
                  "focus_name": "Jour",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 9,
                      "role_focus_id": 9,
                      "user_id": 3,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": [
                    {
                      "item_id": 3,
                      "role_focus_id": 9,
                      "item_type": "checklist",
                      "content":
                        "Mettre à jour les serveurs toutes les semaines"
                    }
                  ]
                },
                {
                  "role_focus_id": 10,
                  "role_id": 10,
                  "focus_name": "Astreinte",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 10,
                      "role_focus_id": 10,
                      "user_id": 2,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": []
                }
              ]
            },
            {
              "role_id": 17,
              "circle_id": 2,
              "role_name": "Premier lien",
              "role_purpose":
                "Le Premier Lien porte la Raison d’Être de l’ensemble du Cercle.",
              "role_domain": "Affectation des Rôles du Cercle.",
              "role_accountabilities":
                "- Structurer la Gouvernance du Cercle pour manifester sa Raison d’Être et mettre en œuvre ses Redevabilités.\n- Affecter des Associés aux Rôles du Cercle ; suivre l’adéquation entre les Rôles et les Associés qui y sont affectés ; offrir du feedback pour améliorer cette adéquation ; et réaffecter les Rôles à d’autres Associés au besoin pour obtenir une meilleure adéquation.\n- Répartir les ressources disponibles du Cercle sur les différents Projets et/ou Rôles.\n- Établir des priorités et des Stratégies pour le Cercle.\n- Définir des indicateurs pour le Cercle.\n- Éliminer au sein du Cercle les contraintes sur la mise en œuvre de la Raison d’Être et des Redevabilités du Super-Cercle\nLe Premier Lien porte également tous les Domaines et Redevabilités du Cercle qui ne sont pas délégués au sein du Cercle.\n",
              "is_active": true,
              "role_type": "leadlink",
              "duration": null,
              "role_focuses": [
                {
                  "role_focus_id": 17,
                  "role_id": 17,
                  "focus_name": "",
                  "role_focus_users": [
                    {
                      "role_focus_user_id": 17,
                      "role_focus_id": 17,
                      "user_id": 2,
                      "start_date": null,
                      "end_date": null
                    }
                  ],
                  "items": []
                }
              ]
            }
          ]
        }
      ],
      "roles": [
        {
          "role_id": 84,
          "circle_id": 1,
          "role_name": "Premier lien",
          "role_purpose":
            "Le Premier Lien porte la Raison d’Être de l’ensemble du Cercle.",
          "role_domain": "Affectation des Rôles du Cercle.",
          "role_accountabilities":
            "- Structurer la Gouvernance du Cercle pour manifester sa Raison d’Être et mettre en œuvre ses Redevabilités.\n- Affecter des Associés aux Rôles du Cercle ; suivre l’adéquation entre les Rôles et les Associés qui y sont affectés ; offrir du feedback pour améliorer cette adéquation ; et réaffecter les Rôles à d’autres Associés au besoin pour obtenir une meilleure adéquation.\n- Répartir les ressources disponibles du Cercle sur les différents Projets et/ou Rôles.\n- Établir des priorités et des Stratégies pour le Cercle.\n- Définir des indicateurs pour le Cercle.\n- Éliminer au sein du Cercle les contraintes sur la mise en œuvre de la Raison d’Être et des Redevabilités du Super-Cercle\nLe Premier Lien porte également tous les Domaines et Redevabilités du Cercle qui ne sont pas délégués au sein du Cercle.",
          "is_active": true,
          "role_type": null,
          "duration": null,
          "role_focuses": [
            {
              "role_focus_id": 84,
              "role_id": 84,
              "focus_name": "",
              "role_focus_users": [
                {
                  "role_focus_user_id": 84,
                  "role_focus_id": 84,
                  "user_id": 1,
                  "start_date": null,
                  "end_date": null
                }
              ],
              "items": [
                {
                  "item_id": 22,
                  "role_focus_id": 84,
                  "item_type": "checklist",
                  "content": "Assignation des rôles vacants"
                }
              ]
            }
          ]
        }
      ],
      "circle_milestones": [
        {
          "circle_id": 1,
          "milestone_number": 64,
          "repo_name": "kozea",
          "is_active": true
        }
      ],
      "label": [
        {
          "label_id": 9,
          "label_type": "circle",
          "text": "1er cercle",
          "color": "#1a1b31"
        }
      ]
    }
  ]
}

Circles - Update a single circle

put

Update a single circle from Organization :

/circles/:circle_id

Inputs

Name Type Description
circle_name string Name of the circle.
circle_purpose string Purpose of the circle.
circle_domain string Domain of the circle.
circle_accountabilities string Accountability of the circle.
parent_circle_id integer Id of parent circle

Example

{
  "circle_name": "DevOp's",
  "circle_purpose":
    "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
  "circle_domain": "Support informatique interne.",
  "circle_accountabilities": "Fournir : Assistance à l’outil informatique."
}

Response

{
  "primary_keys": ["circle_id"],
  "objects": [
    {
      "circle_id": 1,
      "circle_name": "DevOp's",
      "circle_purpose":
        "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
      "circle_domain": "Support informatique interne.",
      "circle_accountabilities": "Fournir : Assistance à l’outil informatique.",
      "is_active": true,
      "circle_parent": [],
      "circle_children": [],
      "roles": [],
      "circle_milestones": [],
      "label": [
        {
          "label_id": 9,
          "label_type": "circle",
          "text": "1er cercle",
          "color": "#1a1b31"
        }
      ]
    }
  ],
  "occurences": 1
}

Circles - Create a single circle

post

Create a single circle for Kozea :

/api/circles

Parameters

Name Type Description
circle_name string Name of the circle.
circle_purpose string Purpose of the circle.
circle_domain string Domain of the circle.
circle_accountabilities string Accountability of the circle.
parent_circle_id integer Id of parent circle

Example

{
  "circle_name": "DevOp's",
  "circle_purpose":
    "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
  "circle_domain": "Support informatique interne",
  "circle_accountabilities": "Fournir : Assistance à l’outil informatique."
}

Response

{
  "primary_keys": ["circle_id"],
  "objects": [
    {
      "circle_id": 5,
      "parent_circle_id": null,
      "label_id": 14,
      "circle_name": "DevOp's",
      "circle_purpose":
        "Apporter les solutions techniques aux problèmes qu’on peut nous proposer.",
      "circle_domain": "Support informatique interne",
      "circle_accountabilities": "Fournir : Assistance à l’outil informatique.",
      "is_active": true,
      "circle_parent": [],
      "circle_children": [],
      "roles": [],
      "circle_milestones": [],
      "label": [
        {
          "label_id": 14,
          "label_type": "circle",
          "text": "Test",
          "color": "#ff0000"
        }
      ]
    }
  ],
  "occurences": 1
}

Circles - Delete a single circle

delete

Delete a single circle from Organization :

/api/circles/:circle_id

Response

{
  "primary_keys": ["circle_id"],
  "objects": [
    {
      "circle_id": 2,
      "parent_circle_id": 1,
      "circle_name": "Dévops",
      "circle_purpose": "Dévops",
      "circle_domain": "Dévops",
      "circle_accountabilities": "Dévops\n",
      "is_active": true,
      "roles": [
        {
          "role_id": 2,
          "user_id": 3,
          "role_name": "Premier lien"
        }
      ],
      "circle_milestones": [
        {
          "circle_id": 2,
          "milestone_number": 1,
          "repo_name": "musical-robot"
        },
        {
          "circle_id": 2,
          "milestone_number": 3,
          "repo_name": "musical-robot"
        }
      ]
    }
  ],
  "occurences": 1
}


Milestones-circles

Milestones-circles - Update circles associated to a milestone

post

Add and/or remove circles - milestones associations for Organization :

/api/milestone_circles/:milestone_number

Parameters

Name Type Description
circle_id integer Circle id
milestone_number integer Milestone number
repo_name string Respository name

If an existing assocation in database is not in the payload, it will be deleted.

Example

[
  {
    "circle_id": 1,
    "milestone_number": 13,
    "repo_name": "musical-robot"
  }
]

Response

  • code 200
{
  "status": "success",
  "message": "Milestone_circle update successful."
}
  • code 400
{
  "status": "error",
  "message": "Error during Milestone_circle table update."
}


Roles

Roles - List roles

get

List all roles from Organization :

/api/roles /api/roles?circle_id=1

Parameters (not mandatory)

Name Type Description
circle_id integer Id of circle

Response

{
  "primary_keys": ["role_id"],
  "occurences": 4,
  "objects": [
    {
      "role_id": 1,
      "user_id": 1057114,
      "circle_id": 1,
      "role_name": "Développeur",
      "role_purpose": "purpose",
      "role_domain": "domain",
      "role_accountabilities": "accoutabilitruc"
    }
  ]
}

Roles - Get a single role

get

Get a single role from Organization :

/api/roles/:role_id

Response

{
  "primary_keys": ["role_id"],
  "objects": [
    {
      "role_id": 1,
      "user_id": 1057114,
      "circle_id": 1,
      "role_name": "Développeur",
      "role_purpose": "purpose",
      "role_domain": "domain",
      "role_accountabilities": "accoutabilitruc"
    }
  ],
  "occurences": 1
}

Roles - Update a single role

put

Update a single role from Organization :

/api/roles/:role_id

Inputs

Name Type Description
role_name string Name of the role.
circle_id int Id of circle.
user_id int Id of the user.
role_purpose string Purpose of the role.
role_domain string Domain of the role.
role_accountabilities string Accountability of the role.

Example

{
  "role_name": "dev",
  "user_id": "25310926",
  "role_purpose": "purpose",
  "role_domain": "domain",
  "role_accountabilities": "accountabilities"
}

Response

{
  "primary_keys": ["role_id"],
  "objects": [
    {
      "role_id": 1,
      "user_id": 25310926,
      "circle_id": 1,
      "role_name": "dev",
      "role_purpose": "purpose",
      "role_domain": "domain",
      "role_accountabilities": "accountabilities"
    }
  ],
  "occurences": 1
}

Roles - Create a single role

post

Create a single role for Kozea :

/api/roles

Parameters

Name Type Description
role_name string Name of the role.
circle_id int Id of circle.
user_id int Id of the user.
role_purpose string Purpose of the role.
role_domain string Domain of the role.
role_accountabilities string Accountability of the role.

Example

{
  "role_name": "dev2",
  "user_id": "25310926",
  "circle_id": 1,
  "role_purpose": "purpose",
  "role_domain": "domain",
  "role_accountabilities": "accountabilities"
}

Response

{
  "primary_keys": ["role_id"],
  "objects": [
    {
      "role_id": 5,
      "user_id": 25310926,
      "circle_id": 1,
      "role_name": "dev2",
      "role_purpose": "purpose",
      "role_domain": "domain",
      "role_accountabilities": "accountabilities",
      "role_checklist": "checklist"
    }
  ],
  "occurences": 1
}

Roles - Delete a single role

delete

Delete a single role from Organization :

/api/roles/:role_id

Response

{
  "primary_keys": ["role_id"],
  "objects": [
    {
      "role_id": 1,
      "user_id": 25310926,
      "circle_id": 1,
      "role_name": "dev",
      "role_purpose": "purpose",
      "role_domain": "domain",
      "role_accountabilities": "accountabilities",
      "role_checklist": "checklist"
    }
  ],
  "occurences": 1
}


Reports

Reports - List reports

get

List all reports from Organization :

/api/reports
/api/reports?circle_id=1&report_type"Triage"

Parameters (not mandatory)

Name Type Description
circle_id int Id associate to circle.
report_type string Indicates the type of the meeting. Can be either Gouvernance or Triage.

Response

{
  "primary_keys": ["report_id"],
  "occurences": 1,
  "objects": [
    {
      "report_id": 1,
      "circle_id": 2,
      "report_type": "Gouvernance",
      "created_at": "2018-01-19T10:01:21.530235",
      "author_id": 3525167,
      "content": "\n\n### Ordre du jour:\nblah blah\n\n\n  ",
      "modified_at": null,
      "modified_by": null,
      "circle": [
        {
          "circle_id": 2,
          "circle_name": "Dévops"
        }
      ]
    }
  ]
}

Reports - Get a single report

get

Get a single report from Organization :

/api/reports/:report_id

Response

{
  "primary_keys": ["report_id"],
  "occurences": 1,
  "objects": [
    {
      "report_id": 1,
      "circle_id": 2,
      "report_type": "Gouvernance",
      "created_at": "2018-01-19T10:01:21.530235",
      "author_id": 3525167,
      "content": "\n\n### Ordre du jour:\nblah blah\n\n\n  ",
      "modified_at": null,
      "modified_by": null,
      "circle": [
        {
          "circle_id": 2,
          "circle_name": "Dévops"
        }
      ]
    }
  ]
}

Reports - Create a single report

post

Create a single report for Kozea :

/api/reports

Inputs

Name Type Description
circle_id int Id associate to circle.
report_type string Indicates the type of the meeting. Can be either Gouvernance or Triage.
author_id int Id of authenticated user
content string Meeting content

Example

{
  "type": "triage",
  "circle_id": "1",
  "author_id": 3525167,
  "content": "blah blah"
}

Response

{
  "primary_keys": ["report_id"],
  "occurences": 1,
  "objects": [
    {
      "report_id": 1,
      "circle_id": 2,
      "report_type": "Gouvernance",
      "created_at": "2018-01-19T10:01:21.530235",
      "author_id": 3525167,
      "content": "blah blah",
      "modified_at": null,
      "modified_by": null,
      "circle": [
        {
          "circle_id": 2,
          "circle_name": "Dévops"
        }
      ]
    }
  ]
}

Reports - Patch a single report

[Patch]

Patch a single report from Organization :

/api/report/:role_id

Inputs

One or several inputs can be sent

Name Type Description
circle_id int Id associate to circle.
report_type string Indicates the type of the meeting. Can be either Gouvernance or Triage.
author_id int Id of authenticated user
content string Meeting content
modified_by int Id of authenticated user

Example

{
  "modified_by": "25310926",
  "content": "NEW CONTENT"
}

Response

{
  "primary_keys": ["report_id"],
  "occurences": 1,
  "objects": [
    {
      "report_id": 1,
      "circle_id": 2,
      "report_type": "Gouvernance",
      "created_at": "2018-01-19T10:01:21.530235",
      "author_id": 3525167,
      "content": "NEW CONTENT",
      "modified_at": "2018-01-19T10:32:13.123541",
      "modified_by": 3525167,
      "circle": [
        {
          "circle_id": 2,
          "circle_name": "Dévops"
        }
      ]
    }
  ]
}

Reports - Delete a single report

delete

Delete a single report from Organization :

/api/reports/:report_id

Response

{
  "primary_keys": ["report_id"],
  "objects": [
    {
      "report_id": 1,
      "circle_id": 1,
      "report_type": "Triage",
      "created_at": "2000-01-01T01:01:01",
      "author_id": 3525167,
      "content": "blah blah",
      "modified_at": "2018-01-19T10:32:13.123541",
      "modified_by": 3525167,
      "circle": [
        {
          "circle_id": 2,
          "circle_name": "Dévops"
        }
      ]
    }
  ],
  "occurences": 1
}


Items

Items - List items

get

List all items from Organization :

/api/items
/api/items?role_id=1

Parameters (not mandatory)

Name Type Description
role_id int Role id

Response

{
  "primary_keys": ["item_id"],
  "occurences": 4,
  "objects": [
    {
      "item_id": 1,
      "role_id": 1,
      "item_type": "checklist",
      "content": "Action 1"
    },
    {
      "item_id": 2,
      "role_id": 1,
      "item_type": "indicator",
      "content": "Indicateur 1"
    },
    {
      "item_id": 3,
      "role_id": 2,
      "item_type": "checklist",
      "content": "Action 2"
    },
    {
      "item_id": 4,
      "role_id": 2,
      "item_type": "indicator",
      "content": "Indicateur 2"
    }
  ]
}

Items - Get a single item

get

Get a single item from Organization :

/api/items/:item_id

Response

{
  "primary_keys": ["item_id"],
  "objects": [
    {
      "item_id": 1,
      "role_id": 1,
      "item_type": "checklist",
      "content": "Action 1"
    }
  ],
  "occurences": 1
}

Items - Update a single item

put

Update a single item for a Role :

/api/item/:item_id

Inputs

Name Type Description
role_id int Role id
item_type string Indicates the type of the item. Can be either checklist or indicator.
content string Item content

Example

{
  "role_id": 1,
  "item_type": "checklist",
  "content": "Action 10"
}

Response

{
  "primary_keys": ["item_id"],
  "objects": [
    {
      "item_id": 1,
      "role_id": 1,
      "item_type": "checklist",
      "content": "Action 10"
    }
  ],
  "occurences": 1
}

Item - Create a single item

post

Create a single item for a Role :

/api/items

Inputs

Name Type Description
role_id int Role id
item_type string Indicates the type of the item. Can be either checklist or indicator.
content string Item content

Example

{
  "role_id": 2,
  "item_type": "checklist",
  "content": "Action 100"
}

Response

{
  "primary_keys": ["item_id"],
  "objects": [
    {
      "item_id": 10,
      "role_id": 2,
      "item_type": "checklist",
      "content": "Action 100"
    }
  ],
  "occurences": 1
}

Item - Delete a single item

delete

Delete a single itrm from Organization :

/api/item/:item_id

Response

{
  "primary_keys": ["item_id"],
  "objects": [
    {
      "item_id": 10,
      "role_id": 2,
      "item_type": "checklist",
      "content": "Action 100"
    }
  ],
  "occurences": 1
}


Clone this wiki locally