Skip to content

Commit f363d9b

Browse files
API calls
1 parent 14f4068 commit f363d9b

1 file changed

Lines changed: 55 additions & 1 deletion

File tree

modules/ROOT/pages/manage-client-apps-connected-apps-concept.adoc

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,65 @@ The Connected App can manage the client application it created, and can perform
3434
* Request a tier change
3535
* Reset a client applications secret
3636

37-
You cannot add a Connect App as an owner of a client application. Connected Apps can only manage the client applications they create.
37+
You cannot add a Connected App as an owner of a client application. Connected Apps can only manage the client applications they create.
38+
39+
== Creating a Client Application with the API Manager API
40+
41+
After creating your Connected App, you can make requests to the API Manager API to create and manage client applications.
42+
43+
To create a client application with the API Manager API:
44+
45+
. Collect the following information to obtain your Authorization Token:
46+
47+
* `<connected-app-client-id>`: *Id* of your connected app
48+
* `<connected-app-client-secret>`: *Secret* of your connected app
49+
50+
. Execute the following request to obtain your Authorization Token after replacing the placeholders with the following:
51+
+
52+
[source,ssh]
53+
----
54+
curl --location --request POST 'https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token' \
55+
--header 'Content-Type: application/json' \
56+
--data-raw '{
57+
"grant_type": "client_credentials",
58+
"client_id": "<connected-app-client-id>",
59+
"client_secret": "<connected-app-client-secret>"
60+
}'
61+
----
62+
63+
. Collect the following information to create your client application:
64+
65+
* `<your-org-id>`: *Organization ID* for the organization where you want to create the connected app
66+
* `<instance-id>`: API instance ID of the API instance you are creating a client application for
67+
* Client Application parameters:
68+
** `name`: Name of the application
69+
** `description`: Description of the application
70+
** `url`: URL of the application
71+
** `redirectURI`: An array of redirect Uris
72+
** `grantTypes`: An array of Grant Types, for example: `"password"`, `"implicit"`, `"client_credentials"`, `"authorization_code"`, and `"refresh_token"`
73+
** `apiEndpoints`: To automatically register the redirect URIs. Supported values are “true” or “false”.
74+
75+
. Execute the following request to create your client application after replacing the placeholders with the following:
76+
+
77+
[source,ssh]
78+
----
79+
curl --X POST 'https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/<your-org-id>/applications?apiVersionId=<instance-id>' \
80+
--header 'Authorization: bearer <anypoint_token>' \
81+
--header 'Content-Type: application/json' \
82+
--data '{
83+
"redirectUri": ["http://example.com/"],
84+
"apiEndpoints": false,
85+
"name": "Sample Client Apps Name",
86+
"description": "Create this App for Sample Client Apps via API 1",
87+
"url": "https://www.example.com/app-test1"
88+
} '
89+
----
90+
3891

3992

4093
== See Also
4194

95+
* https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/api-manager-api/[API Manager API Documentation^]
4296
* xref:exchange::to-request-access.adoc[Request Access to API Instances from Exchange]
4397
* xref:remove-client-app-latest-task.adoc[Remove API Instance Contracts]
4498
* xref:access-client-app-id-task.adoc[Obtain Client ID and Client Secret Credentials of a Client Application]

0 commit comments

Comments
 (0)