Hi all,
Proposed resource structure is as below.
/exports/apis:
get:
x-scope: apim:api_export
produces:
- application/x-gzip
summary: Return apis categorized into a label.
description: |
This operation can be used to fetch APIs categorized into a certain
label.
parameters:
- name: labelId
in: query
required: true
type: string
responses:
200:
description: |
OK.
schema:
type: file
headers:
Content-Type:
description: |
The content type of the body.
type: string
404:
description: |
Not Found
Resource to be fetched does not exist.
schema:
$ref: '#/definitions/Error'
A new scope apim:export_apis will be added and the new resource will be
protected by that.
The returned file will contain necessary details to create ballerina files
for the APIs. This includes,API name, version, provider, context, API
swagger definition of each API that satisfies the label query.
Thanks,
Sachini
On Fri, May 4, 2018 at 10:42 AM, Krishan Wijesena <[email protected]> wrote:
>
>
> On Fri, May 4, 2018 at 9:57 AM, Sachini De Silva <[email protected]>
> wrote:
>
>> Hi all,
>>
>>
>> *Design Overview*
>> I am working on developing a REST API to fetch API details to APIM
>> gateway from the publisher. Fetching of APIs is based on labels, i.e as
>> mentioned in [1] a certain set of APIs can be grouped into a certain
>> gateway instance by a label. When setting up the gateway the user executes
>> following command followed by user credentials.
>>
>> setup <label>
>>
>> Then a request for APIs labeled with <label> is sent to API publisher.
>> The response to this is, API details as a compressed JSON. Then based on
>> the retrieved details b7a project structure for the gateway instance will
>> be created and deployed.
>>
>
> How we handle the permission restrictions here? for example if label X
> attached to API1, UserA do not have permission to view API1(restricted by
> roles) called setup<labelX> and he should not get that API1 with compressed
> JSON? or do we provide all the API with label X to that perticulr userA?
>
>>
>> So ideally I should be able to do this by adding a new resource to
>> publisher-api.yaml to fetch APIs by label. Then this resource call has to
>> be mapped to where the setup command is executed.
>>
>> Suggestions are highly appreciated.
>>
>> Related mail threads :
>> [1] [Architecture][APIM] Label feature for API-Manager gateway
>> [2] [Architecture][APIM][API-Manager gateway] Attaching Labels for APIs
>>
>> Thanks,
>> Sachini
>>
>> --
>>
>> *Sachini De Silva*
>> Software Engineer - WSO2
>>
>> Email : [email protected]
>> Mobile : +94714765495
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
>
> *Krishan Wijesena*
> Software Engineer | WSO2
>
> Email : [email protected]
> Mobile : +94776219923
> WSO2 Inc : http://wso2.com
> [image: http://wso2.com/signature] <http://wso2.com/signature>
>
--
*Sachini De Silva*
Software Engineer - WSO2
Email : [email protected]
Mobile : +94714765495
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture