GET /my/routines

GET /my/routines

Returns the routines belonging to the logged in user

Query parameters

  • page integer

    requested page number

    Minimum value is 1. Default value is 1.

  • page_size integer

    requested page size

    Minimum value is 1, maximum value is 100. Default value is 12.

Responses

  • 200

    successful operation

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes array[object]
      • id integer
      • user_id integer
      • title string
      • routine_type string
      • status string
      • created_at string(DateTime)
      • updated_at string(DateTime)
      • routine_step_ids array[integer]
      • routine_step_order array[integer]
      • favorite_count integer
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 403

    Authorization forbidden

  • 500

    Server Error

GET /my/routines
curl \
 -X GET https://api.cosmily.com/api/v1/my/routines \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": 1,
      "user_id": 1,
      "routine_type": "AM",
      "routine_step_ids": [
        1,
        2
      ],
      "routine_step_order": [
        1,
        2
      ],
      "title": "Daily Routine",
      "status": "published",
      "created_at": "2021-10-04T13:24:22.000Z",
      "updated_at": "2021-11-13T20:23:18.000Z"
    }
  ]
}
Response examples (200)
{
  "data": [
    {
      "id": 1,
      "title": "Daily Routine",
      "status": "published",
      "user_id": 1,
      "created_at": "2021-10-04T13:24:22.000Z",
      "updated_at": "2021-11-13T20:23:18.000Z",
      "routine_type": "AM",
      "routine_step_ids": [
        1,
        2
      ],
      "routine_step_order": [
        1,
        2
      ]
    }
  ]
}