Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API design] Enroll Android #26285

Open
wants to merge 9 commits into
base: docs-v4.66.0
Choose a base branch
from
Open

Conversation

marko-lisica
Copy link
Member

Related to:

Old PR that's closed (against docs-v4.65.0)

@marko-lisica marko-lisica marked this pull request as ready for review February 12, 2025 11:32
@marko-lisica marko-lisica added the ~api-or-yaml-design Used for pull requests (PRs) with proposed API and YAML changes label Feb 12, 2025
@marko-lisica marko-lisica mentioned this pull request Feb 12, 2025
52 tasks

#### Example

`GET /api/v1/fleet/android_enterprise/5/connect?enterpriseToken=FEKXFy427_jz9Nfhq19SGDOKR2nZ4ZqhSAuYqOQw1B1G2OdBkQ5IDfSkLiO0rUqL8ptAXoa5_cZdh5GBRdyLj29m5A8DcZ1dptSp6YMNY6MQv0UiqcQqRC8D`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unauthorized endpoint for Fleet. We should have additional security. How about something like:

GET /api/v1/fleet/android_enterprise/connect/ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad?enterpriseToken=FEKXFy427_jz9Nfhq19SGDOKR2nZ4ZqhSAuYqOQw1B1G2OdBkQ5IDfSkLiO0rUqL8ptAXoa5_cZdh5GBRdyLj29m5A8DcZ1dptSp6YMNY6MQv0UiqcQqRC8D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@getvictor Could you add suggested changes with what you think we need for this endpoint. It would be great to add a description of what this string (ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad ) means.


> **Experimental feature.** This feature is undergoing rapid improvement, which may result in breaking changes to the API or configuration surface. It is not recommended for use in automated workflows.

`GET /api/v1/fleet/android_enterprise`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this endpoint? I already added mdm.android_enabled_and_configured to config, which serves as an indicator that an Android enterprise exists for frontend.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have similar endpoint for APNS. I guess we could add info to the config, but I think we should be consistent with Apple and have the endpoint to get Android Enterprise info. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just for debug/API, and not frontend? If so, this endpoint could be added at a later story whenever frontend actually uses it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for this page: link to Figma

| Name | Type | In | Description |
| ---- | ------ | ---- | ------------------------------------ |
| token | string | path | **Required.** The signup token associated with Android Enterprise in Fleet. |
| enterpriseToken | string | query | **Required.** The enterprise token that's returned from Google API. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to match Google's API exactly? If not we should follow our usual conventions and not use camelcase

Suggested change
| enterpriseToken | string | query | **Required.** The enterprise token that's returned from Google API. |
| enterprise_token | string | query | **Required.** The enterprise token that's returned from Google API. |

### Get Android Enterprise

> **Experimental feature.** This feature is undergoing rapid improvement, which may result in breaking changes to the API or configuration surface. It is not recommended for use in automated workflows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marko-lisica needs description for the endpoint


```json
{
"android_enterprise_id": "LC0445szuv"
Copy link
Member

@getvictor getvictor Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend adding a "Last status update" timestamp. This will be the timestamp of the last PubSub message received by Fleet server. This would be a good indicator whether the connection is healthy.

Note: there would be no timestamp until the 1st device enrolls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~api-or-yaml-design Used for pull requests (PRs) with proposed API and YAML changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants