GET groups/:group id/parent groups

From Social ID Developers
Jump to: navigation, search

Contents

Description

Searches for Group Parents of a Group.

Resource URL

  GET https://api.socialidnow.com/v1/marketing/groups/:group_id/parent_groups

Parameters

URL Parameters

parent_group_id optional group parent id.
page optional page number (each page contains page_size results). Default: 1.
page_size optional maximum amount of results to be returned. Default: 8.

Authentication

This API requires Account authentication. See Authentication.

Response

Response Status

ok (200) The request was successful.
unauthorized (401) The authentication is wrong. See Authentication.
forbidden (403) The account does not have access to this group.
internal_server_error (500) An unknown error happened.

Response Body

A successful search returns the following fields:

total total amount of group parents found.
offset amount of discarded group parents (page start).
count amount of group parents returned in this page.
results array with group parents details:
created_at date when the group parent was added to the group.
parent_group_id group parent identifier
parent_group group parent details. See response from GET groups/:group_id

Examples

Without search parameters

Request

curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups/10/parent_groups' \
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 200 Ok
Status: 200
Response Body
{
  "total": 3,
  "offset": 0,
  "count": 3,
  "results": [
    {
      "created_at": "2023-08-10T17:48:00Z",
      "parent_group_id": 1,
      "parent_group: {
        "id": 1,
        "name": "Group A",
        "category": "Category X",
        "description": "My Group A description",
        "child_group_ids": [10,20,30],
        "parent_group_ids": [30,40,50],
        "manager_group_ids": [60,70,80],
        "managed_group_ids": [90,100,110],
        "created_at": "2023-08-10T17:48:00Z",
        "updated_at": "2023-08-10T17:48:00Z"
      }
    },
    {
      "created_at": "2023-08-10T17:49:00Z",
      "parent_group_id": 2,
      "parent_group: {
        "id": 2,
        "name": "Group B",
        "category": "Category Y",
        "description": "My Group B description",
        "child_group_ids": [10,20,30],
        "parent_group_ids": [30,40,50],
        "manager_group_ids": [60,70,80],
        "managed_group_ids": [90,100,110],
        "created_at": "2023-08-10T17:49:00Z",
        "updated_at": "2023-08-10T17:49:00Z"
      }
    },
    {
      "created_at": "2023-08-10T17:50:00Z",
      "parent_group_id": 3,
      "parent_group: {
        "id": 3,
        "name": "Group C",
        "category": "Category Z",
        "description": "My Group C description",
        "child_group_ids": [10,20,30],
        "parent_group_ids": [30,40,50],
        "manager_group_ids": [60,70,80],
        "managed_group_ids": [90,100,110],
        "created_at": "2023-08-10T17:50:00Z",
        "updated_at": "2023-08-10T17:50:00Z"
      }
    }
  ]
}

With search parameters

Request

curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups/10/parent_groups?page_size=1&page=2' \
  --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers
HTTP/1.1 200 Ok
Status: 200
Response Body
{
  "total": 3,
  "offset": 1,
  "count": 1,
  "results": [
    {
      "created_at": "2023-08-10T17:49:00Z",
      "parent_group_id": 2,
      "parent_group: {
        "id": 2,
        "name": "Group B",
        "category": "Category Y",
        "description": "My Group B description",
        "child_group_ids": [10,20,30],
        "parent_group_ids": [30,40,50],
        "manager_group_ids": [60,70,80],
        "managed_group_ids": [90,100,110],
        "created_at": "2023-08-10T17:49:00Z",
        "updated_at": "2023-08-10T17:49:00Z"
      }
    }
  ]
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox