The ActiveSync API provides access to directly register, list, edit and delete ActiveSync clients; usually phones.
There is just a single endpoint for addressing ActiveSync clients:
| API | Endpoint | Supported Operations |
|---|---|---|
| Clients | http://api.obexcode.com/v2/services/activesync/ | GET, POST, PUT, DELETE |
Accessing the details of ActiveSync clients requires authentication. And even then, only those clients belonging to the authenticated user will be available.
The ActiveSync Client API is used for viewing and manipulating registered ActiveSync clients (phones).
Request:
GET /v2/services/activesync/ HTTP/1.1 Host: api.obexcode.com Content-Type: application/atom+xml Accept: application/atom+xml
Response:
HTTP/1.1 200 OK Content-Type: application/atom+xml Content-Length: 1266 <feed xmlns="http://www.w3.org/2005/Atom"> <author> <name>ObexCode AS</name> </author> <id>http://api.obexcode.com/v2/services/activesync/</id> <link href="http://api.obexcode.com/v2/services/activesync/" rel="self" /> <title>ActiveSync Clients</title> <updated>2009-04-28T13:32:59Z</updated> <entry> <author> <name>admin</name> <email>support@obexcode.com</email> </author> <content src="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" type="text/html" /> <id>http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965</id> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="self" /> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="edit" /> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="alternate" type="text/html" /> <published>2009-09-09T09:09:09Z</published> <title>6f6d6777-7466-6262-716b-746878627965</title> <updated>2009-09-21T14:01:31Z</updated> <client xmlns="http://schemas.obexcode.com/syncserver/2009"> <uuid>6f6d6777-7466-6262-716b-746878627965</uuid> <user_id>1</user_id> <username>fire</username> <last_sync>2009-09-10T10:03:59Z</last_sync> </client> </entry> </feed>
Request:
GET /v2/services/activesync/6f6d6777-7466-6262-716b-746878627965 HTTP/1.1 Host: api.obexcode.com Content-Type: application/atom+xml Accept: application/atom+xml
Response:
HTTP/1.1 200 OK Content-Type: application/atom+xml Content-Length: 973 <entry xmlns="http://www.w3.org/2005/Atom"> <author> <name>admin</name> <email>support@obexcode.com</email> </author> <content src="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" type="text/html" /> <id>http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965</id> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="self" /> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="edit" /> <link href="http://api.obexcode.com/v2/services/activesync/6f6d6777-7466-6262-716b-746878627965" rel="alternate" type="text/html" /> <published>2009-09-09T09:09:09Z</published> <title>6f6d6777-7466-6262-716b-746878627965</title> <updated>2009-09-21T14:01:31Z</updated> <client xmlns="http://schemas.obexcode.com/syncserver/2009"> <uuid>6f6d6777-7466-6262-716b-746878627965</uuid> <user_id>1</user_id> <username>fire</username> <last_sync>2009-09-10T10:03:59Z</last_sync> </client> </entry>
Request:
POST /v2/services/activesync/ HTTP/1.1 Host: api.obexcode.com Content-Type: application/atom+xml Accept: application/atom+xml <entry xmlns="http://www.w3.org/2005/Atom" xmlns:oc="http://schemas.obexcode.com/syncserver/2009"> <oc:client> <oc:username>foo</oc:username> <oc:password>bar</oc:password> <oc:phone_number>+4711111111</oc:phone_number> <oc:model_uuid>11111111-2222-3333-4444-555555555555</oc:model_uuid> </oc:client> </entry>
Response:
HTTP/1.1 201 Created Content-Type: application/atom+xml <entry xmlns="http://www.w3.org/2005/Atom"> <author> <name>admin</name> <email>support@obexcode.com</email> </author> <content src="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" type="text/html" /> <id>http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795</id> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="self" /> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="edit" /> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="alternate" type="text/html" /> <published>2009-09-22T08:08:00Z</published> <title>998f68f4-9ed7-11de-a050-002215064795</title> <updated>2009-09-22T08:08:00Z</updated> <client xmlns="http://schemas.obexcode.com/syncserver/2009"> <uuid>998f68f4-9ed7-11de-a050-002215064795</uuid> <user_id>1</user_id> <username>foo</username> <phone_number>+4711111111</oc:phone_number> <model_uuid>11111111-2222-3333-4444-555555555555</oc:model_uuid> <last_sync /> </client> </entry>
At the current time, the only property of clients available to be modified is the password:
Request:
PUT /v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795 HTTP/1.1 Host: api.obexcode.com Content-Type: application/atom+xml Accept: application/atom+xml <entry xmlns="http://www.w3.org/2005/Atom" xmlns:oc="http://schemas.obexcode.com/syncserver/2009"> <oc:client> <oc:old_pass>bar</oc:old_pass> <oc:password>baz</oc:password> </oc:client> </entry>
Response:
HTTP/1.1 200 OK Content-Type: application/atom+xml <entry xmlns="http://www.w3.org/2005/Atom"> <author> <name>admin</name> <email>support@obexcode.com</email> </author> <content src="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" type="text/html" /> <id>http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795</id> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="self" /> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="edit" /> <link href="http://api.obexcode.com/v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795" rel="alternate" type="text/html" /> <published>2009-09-22T08:08:00Z</published> <title>998f68f4-9ed7-11de-a050-002215064795</title> <updated>2009-09-23T07:47:40Z</updated> <client xmlns="http://schemas.obexcode.com/syncserver/2009"> <uuid>998f68f4-9ed7-11de-a050-002215064795</uuid> <user_id>1</user_id> <username>foo</username> <last_sync /> </client> </entry>
Request:
DELETE /v2/services/activesync/998f68f4-9ed7-11de-a050-002215064795 HTTP/1.1 Host: api.obexcode.com Content-Type: application/atom+xml Accept: application/atom+xml
Response:
HTTP/1.1 200 OK