Need PAPI end point to assign apis to organization
search cancel

Need PAPI end point to assign apis to organization

book

Article ID: 210012

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

Which PAPI endpoint can be used to assign an API to an organization? We tried the API Organization PUT method but it doesn't seem to be working.

Environment

API Portal: 4.5

Resolution

(1) List all API access tenant then Portal API

https://<TenantHostName>:9443/tenant5/api-management/1.0/apis

MyAPI-7 (private)

        {

            "uuid": "b883887e-3e27-4ea7-ba99-2ea716f942f5",

            "name": "MyAPI-7",

            "description": "",

            "type": "BASIC",

            "portalStatus": "ENABLED",

            "accessStatus": "PRIVATE",

            "specFilename": null,

            "version": "1.0",

            "apiEulaUuid": "d23c15f9-7dc9-4e4b-ba7b-3308d0d0a094",

            "createTs": 1614702161403,

            "modifyTs": 1614702201786,

            "ssgServiceType": "REST",

            "applicationUsage": 0,

            "tags": []

        },

(2) Paste the uuid of the API in the apuuild box to list organizations, then click submit (empty)

Request URL

 https://<TenantHostName>:9443/tenant5/api-management/1.0/apis/b883887e-3e27-4ea7-ba99-2ea716f942f5/organizations

Response Code

200 OK

Response Header

content-type: application/json;charset=utf-8

Response Body

[]



(3) List ALL Organization to find one to add

https://<TenantHostName>:9443/tenant5/tenant-admin/1.0/organizations

        {

            "uuid": "c4fa9657-5392-4cb3-87cb-7482a3c2c25e",

            "name": "Jedmere",

            "description": "Jedmere-A Voonair Partner",

            "status": "ENABLED",

            "accountPlanUuid": "f4fe2260-245d-43b7-a812-f8f53d31d2d4"

    },

(4) Use PUT to add the organization:

Body on the PUT contains the Uuid of organization

["c4fa9657-5392-4cb3-87cb-7482a3c2c25e"]

Successful:

Request URL

 https://<TenantHostName>:9443/tenant5/api-management/1.0/apis/b883887e-3e27-4ea7-ba99-2ea716f942f5/organizations

Response Code

204 No Content

 

(5) Check API for new Organization

Request URL

 https://<TenantHostName>:9443/tenant5/api-management/1.0/apis/b883887e-3e27-4ea7-ba99-2ea716f942f5/organizations

Response Code

200 OK

Response Header

content-type: application/json;charset=utf-8

Response Body

[

    "c4fa9657-5392-4cb3-87cb-7482a3c2c25e"

]