1. Help Centre
  2. 📜 Technical Documentation
  3. 🪛 App. Programming Interface (API)

API CORE - Organizations

View the structure of an organization

How can I view the communities that make up an organization?

Use GET /communities

curl 'https://api.steeple.com/v1/communities' \

--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODMyXXX2MTYsInN1YiI6ImYzNjU0ODgwLTM0YzAtNGQ4Yi04OWU4LWEzNGU2MTE1YTM3NSJ9.eOpVocgU1Pzapnj3iFc6RzqWi3V63_xnXEb_AwDF-dx'

With response : 

{

    "data": [

        {

            "id": "3570x3dc-c994-4e02-83ax-89b9c52f79de",

            "name": "Commu #1"

        },

        {

            "id": "ax9360f-3ca5-4axe-9fe3-0020600be67f",

            "name": "Commu #2"

        },

        {

            "id": "bea39x22-c395-48x6-b804-b0c428346c08",

            "name": "Commu #3"

        }

    ],

    "meta": {

        "pagination": {

            "total": 3,

            "page": 1,

            "per_page": 20

        }

    }

}

Foreach community from data :

key

Description

id

Id Steeple of the community

name

Name of the  communauté

The block meta is composed of:

key

Description

pagination.total

total number of communities meeting the query criteria

pagination.page

current page of communities returned in the response

pagination.per_page

number of communities returned per page

Query Parameters Available 

key

Description

page

navigate to other communities (default, page=1)

per_page

change the number of communities returned per page (default per_page=20)

View the categories/sub-categories of an organization's communities

How can I view the categories/sub-categories?

Use GET /categories

curl 'https://api.steeple.com/v1/categories' \

--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODMyXXX2MTYsInN1YiI6ImYzNjU0ODgwLTM0YzAtNGQ4Yi04OWU4LWEzNGU2MTE1YTM3NSJ9.eOpVocgU1Pzapnj3iFc6RzqWi3V63_xnXEb_AwDF-dx'

Response : 

{

    "data": [

        {

            "title": "Communication interne",

            "groups": [

                {

                    "id": "86cf55b4-8a4b-41xx-9a0c-b1d751cd2e8a",

                    "title": "Actualités"

                },

                {

                    "id": "210f36d3-3bf9-4axx-bf22-7b01b3c5b692",

                    "title": "RH"

                },

                {

                    "id": "e8bed1ad-150a-42xx-9074-4ce7069a3bb3",

                    "title": "La vie du site"

                },

                {

                    "id": "c8d0747c-358d-49xx-ad82-4c3582542198",

                    "title": "Affichage réglementaire"

                }

            ]

        }

    ],

    "meta": {

        "pagination": {

            "total": 6,

            "page": 1,

            "per_page": 1

        }

    }

}

For each categories from block data :

key

Description

title

Name of the category

groups

List of subcategories in the category

For each subcategories from a block groups :

key

Description

id

Id Steeple of the subcategory

name

Name of the subcategory

The block meta is composed of:

key

Description

pagination.total

total number of categories meeting the query criteria

pagination.page

current page of categories returned in the response

pagination.per_page

number of categories returned per page

 

Query Parameters Available 

key

Description

community_ids[]

Filter criteria based on the organization's community identifiers (by default, absent). 


This parameter can be added together to obtain publications from several communities in the same organization.


If absent, publications from all communities combined will be returned.


See How can I view the communities that make up an organisation? to obtain the community identifiers for setting up filters.

page

navigate to other categories (default, page=1)

per_page

change the number of categories returned per page (default per_page=20)

 

Use cases

Retrieve categories/sub-categories for a specific community within the organization :

curl 'https://api.steeple.com/v1/categories?community_ids[]=bea39d22-c395-48xx-b804-b0c428346c08' \

--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODMyXXX2MTYsInN1YiI6ImYzNjU0ODgwLTM0YzAtNGQ4Yi04OWU4LWEzNGU2MTE1YTM3NSJ9.eOpVocgU1Pzapnj3iFc6RzqWi3V63_xnXEb_AwDF-dx'

View an organization's user list

How to consult an organization's user list

With GET /users

curl 'https://api.steeple.com/v1/users \

--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODMyXXX2MTYsInN1YiI6ImYzNjU0ODgwLTM0YzAtNGQ4Yi04OWU4LWEzNGU2MTE1YTM3NSJ9.eOpVocgU1Pzapnj3iFc6RzqWi3V63_xnXEb_AwDF-dx'

Response : 

{

    "data": [

        {

            "id": "d549c646-38x6-4af2-b5dd-f6cx31717a50",

            "first_name": "Onksa",

            "last_name": "Cécile"

        },

        {

            "id": "92452beb-e61x-488b-b70b-99849ebdx9fd",

            "first_name": "Leon",

            "last_name": "Dy"

        },

        {

            "id": "5bee66ae-1xb1-43f0-aa22-abbx14dd3650",

            "first_name": "Ty'Maitre",

            "last_name": "Vincent"

        }

    ],

    "meta": {

        "pagination": {

            "total": 3,

            "page": 1,

            "per_page": 20

        }

    }

}

For each user in data :

clé

Description

id

User Steeple ID

first_name

User first name

last_name

User last name

Block  meta : 

clé

Description

pagination.total

total number of elements

pagination.page

current page of elements returned in response

pagination.per_page

number of elements returned per page

Paramètres de requêtes

clé

Description

community_ids[]

Filter criteria on the organization's community identifiers (default: absent). 


Cumulative parameter to obtain users (members) from several communities within the same organization.


If absent, users from all communities combined will be returned.


See How can I view the communities that make up an organization? to obtain the community identifiers for setting up filters.

page

navigates user list (default: page=1)

per_page

modifies the number of users returned per page (default per_page=20)

 

Use cases

Retrieve users (members) from a specific community within the organization : 

curl 'https://api.steeple.com/v1/users?community_ids[]=bea39d22-c395-48xx-b804-b0c428346c08' \

--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODMyXXX2MTYsInN1YiI6ImYzNjU0ODgwLTM0YzAtNGQ4Yi04OWU4LWEzNGU2MTE1YTM3NSJ9.eOpVocgU1Pzapnj3iFc6RzqWi3V63_xnXEb_AwDF-dx'