Official Content

The Mini App Center offers an API that provides endpoints for retrieving and modifying data from the Organization. This article contains an overview of these endpoints.

Check the generic variables required to use the API.

Endpoints

Below is a summary of the available endpoints for this API:

Method Path Description
GET /organizations Gets a list of Organizations.
GET /organizations/{id} Gets Organization details.
POST /organizations Creates an Organization.
PUT /organizations/{id} Updates an Organization.
DELETE /organizations/{id} Deletes an Organization.
POST /organizations/{id}/member/invite Invites a member of the Organization.
POST /organizations/{id}/member/resendinvite Resends the invitation to the member.
POST /organizations/{id}/member/delete Deletes the invitation to the member.
PUT /organizations/{id}/member/suspend Suspends a member of the Organization.
PUT /organizations/{id}/member/reactivate Reactivates a member of the Organization.
POST /organizations/{id}/superapp/permission Adds permission on the Super App in the Organization.
POST /organizations/{id}/superapp/permission/delete Deletes permission on the Super App in the Organization.
 
Note: This endpoint requires a Mini App Center API token related to the Provisioning Administrator User scope. Read more at: How to create API Key as a Provisioning Administrator User.

GET /organizations

This endpoint is used to retrieve a list of Organizations.

Response

{
    "data": [
        {
            "id": "GUID",
            "name": "string"
        },
        ...
    ]
}

If an error has occurred, it will return HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X GET "$BASE_URL/v1/organizations" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

Pay close attention to the returned ID element that is needed for other related APIs.

GET /organizations/{id}

This endpoint allows you to retrieve details about a specific Organization identified by its unique id.

Parameters

Name Type Description
id GUID Organization ID (required)

Response

{
    "data": {
        "id": "GUID",
        "name": "string",
        "can_create_miniapps": "boolean",
        "can_create_superapps": "boolean"
    }
}

If an error has occurred, it will return HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X GET "$BASE_URL/v1/organizations/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /organizations

This endpoint is used to create a new Organization.

Request Body

{
    "name": "string",
    "can_create_miniapps": "boolean",
    "can_create_superapps": "boolean"
}

Response

If the creation is successful, it will return HTTP response Status "201 Created" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/organizations" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "name": "Testing"
            "can_create_miniapps": true,
            "can_create_superapps": false
        }'

PUT /organizations/{id}

This endpoint updates details about a specific Organization identified by its unique id.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "name": "string",
    "can_create_miniapps": "boolean",
    "can_create_superapps": "boolean"
}

Response

If the update is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/organizations/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "name": "Testing"
            "can_create_miniapps": true,
            "can_create_superapps": true
        }'

DELETE /organizations/{id}

This endpoint deletes a specific Organization identified by its unique id.

Parameters

Name Type Description
id GUID Organization ID (required)

Response

If the creation is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X DELETE "$BASE_URL/v1/organizations/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /organizations/{id}/member/invite

This endpoint is used to invite a member of the Organization.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "email": "string",
    "role": "string"    /* "OrgAdm":Organization Administrator, "SuperAppAdm":Super App Administrator, "MiniAppReview":Mini App Review, "MiniAppDev":Mini App Developer*
}

Response

If the invitation is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/organizations/{id}/member/invite" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "email": "member1@organization.com"
            "role": "OrgAdm"
        }'

POST /organizations/{id}/member/resendinvite

This endpoint is used to resend the invitation to the member.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "email": "string"
}

Response

If the invitation is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/organizations/{id}/member/resendinvite" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "email": "member1@organization.com"
        }'

POST /organizations/{id}/member/delete

This endpoint is used to delete the invitation to the member.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "email": "string"
}

Response

If the deletion is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/organizations/{id}/member/delete" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "email": "member1@organization.com"
        }'

PUT /organizations/{id}/member/suspend

This endpoint suspends a member of the Organization.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "email": "string"
}

Response

If the suspension is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/organizations/{id}/member/suspend" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "email": "member1@organization.com"
        }'

PUT /organizations/{id}/member/reactivate

This endpoint reactivates a member of the Organization.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "email": "string"
}

Response

If the reactivation is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/organizations/{id}/reactivate" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "email": "member1@organization.com"
        }'

POST /organizations/{id}/superapp/permission

This endpoint adds permission to the Super App in the Organization.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "superapp_id": "string"
}

Response

If the permission is successfully added, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/organizations/{id}/superapp/permission" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "superapp_id": "com.genexus.verdantbank"
        }'

POST /organizations/{id}/superapp/permission/delete

Deletes permission on the Super App in the Organization.

Parameters

Name Type Description
id GUID Organization ID (required)

Request Body

{
    "superapp_id": "string"
}

Response

If the permission is successfully deleted, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/organizations/{id}/superapp/permission/delete" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "superapp_id": "com.genexus.verdantbank"
        }'
 
Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant