Learn AIM Mastering the URL - aliconnect/aliconnect.sdk GitHub Wiki
Mastering the URL
url object
- method:
- protocol:
- host:
- hostname:
- basePath:
- path:
- query:
- hash:
Web application URL
protocol://hostname:port/Product(1)/id/Abcdefghijklmnop?$top=10&$orderby=Name
\______________________/\_________/ \______________/ \___________________/
origin list path page Id list query options
page Id
Base64 encoded url f.e.https://alicon.aliconnect.nl/api/Product(2)
aim.request('/Product(1)?$top=10&$orderby=Name');
aim.request('/Product(2)');
current location http://alicon.localhost/
aim.request('/api/Product(1)?top=10&select=Title,Subject&search=kampen');
identical to
aim.request('http://alicon.localhost/api/Product(1)?top=10&select=Title,Subject&search=kampen');
aim.request({
protocol: 'https:',
hostname: 'aliconnect.nl'
basePath: '/api'
path: '/Product(1)',
query: '?top=10&select=Title,Subject&search=kampen'
});
$result = aim::request([
'protocol'=> 'https:',
'hostname'=> 'aliconnect.nl'
'basePath'=> '/api'
'path'=> '/Product(1)',
'query'=> '?top=10&select=Title,Subject&search=kampen'
]);
aim.request('https://aliconnect.nl/api/Product(1)?top=10&select=Title,Subject&search=kampen');
Basic request
GET https://alicon.aliconnect.nl/api/Webpage(456555) HTTP/1.1
Equavelent to
GET https://alicon.aliconnect.nl/api/Webpage(456555)?select=* HTTP/1.1
https://alicon.aliconnect.nl/api/Webpage(456555)
OData response properties
@context
:@id
: Reference to object, hyperlinkId
: Base64 encode JSON object containing schema,ID and UID
Default fields for all objects within AIM
Title
:string
Object title, first header in forms and listingsSubject
:string
Object subject/description, second header in forms and listingsSummary
:string
Object summary, third header in forms and listingsHasAttachements
:boolean
Object has attached document files or imagesMessageCount
:int
Amount of attached messagesState
:string
enum
Current stateCategories
:array
enum
CategoriesCreatedDateTime
:datetime
Created datetimeCreatedBy
:object
Account reference creator of this objectLastModifiedDateTime
:datetime
Last modified datetimeLastModifiedBy
:object
Account reference last modifier of this objectIsSelected
:boolean
Object is selected / active
Example
{
"@context": "https://alicon.aliconnect.nl/api/$metadata#/Webpage/$entity",
"@id": "https://alicon.aliconnect.nl/api/Webpage(456555)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSg0NTY1NTUp",
"Host": {
"@id": "https://alicon.aliconnect.nl/api/Company(2347321)"
},
"Source": null,
"Master": {
"0": {
"AttributeID": "2675604",
"Value": "Nieuws",
"@id": "https://alicon.aliconnect.nl/api/Website(2753246)"
},
"@id": "https://alicon.aliconnect.nl/api/Website(2753246)"
},
"Owner": null,
"User": {
"@id": "https://alicon.aliconnect.nl/api/Contact(0)"
},
"CreatedBy": {
"@id": "https://alicon.aliconnect.nl/api/Contact(265090)"
},
"LastModifiedBy": "Contact(265090)",
"Inherited": null,
"KeyID": null,
"Scope": null,
"Tag": null,
"Keyname": null,
"Name": {
"AttributeID": "325",
"Value": "Nieuws"
},
"Title": "Nieuws",
"Subject": null,
"Summary": null,
"HasChildren": true,
"HasAttachements": null,
"IsClass": false,
"IsPublic": true,
"IsSelected": null,
"State": "concept",
"Categories": null,
"MessageCount": null,
"Location": null,
"CreatedDateTime": null,
"LastModifiedDateTime": "2019-03-05T19:33:58.443000Z",
"StartDateTime": "2019-01-11T19:35:38.320000Z",
"EndDateTime": null,
"FinishDateTime": null,
"...": "..."
}
Refine search results
GET https://alicon.aliconnect.nl/api/Webpage(456555)?select=Title,Subject HTTP/1.1
Definition
components:
schemas:
Webpage:
properties:
Title:
title: Title
Subject:
type: string
format: textarea
title: Subject
BodyHTML:
type: div
title: Body
Security
Host
:object
Company reference to owner of this objectOwner
:object
Account reference owner of this objectUser
:object
Account reference user of this objectIsPublic
:boolean
Object is public and visible on internetScope
:string
Object specifiek scope definition
components:
schemas:
Webpage:
security:
write: [default_auth: ['write:web']]
read: [default_auth: ['write:web','read:web']]
Result in OAS 3.0
/Webpage:
get:
security:
- basic_auth:
- read:web
post:
security:
- basic_auth:
- read:web
- write:web
components:
schemas:
Webpage:
security: &basic_security
write: [default_auth: ['write:web']]
read: [default_auth: ['write:web','read:web']]
Product:
security: *basic_security
components:
schemas:
Webpage:
default:
security:
write: [default_auth: ['write:web']]
read: [default_auth: ['write:web','read:web']]
Import
KeyID
:bigint
Unique ID of refrenecd source table recordKeyname
:string
Unique Tag of refrenced source table record
Geo
Location
:geo
Location of object
Scheduling
StartDateTime
:datetime
Date planned startEndDateTime
:datetime
Date planned endFinishDateTime
:datetime
Date finished
Hierarchical structures
Master
:object
orarray
Master reference(s) from wich this objects is child ofName
:string
Unique Name within children of masterTag
:string
Unique Tag within children of masterHasChildren
:boolean
Object has children
GET https://alicon.aliconnect.nl/api/Webpage(2753247)/children HTTP/1.1
GET https://alicon.aliconnect.nl/api/Webpage(2753247)/children?select=Title,Subject HTTP/1.1
{
"@context": "https://alicon.aliconnect.nl/api/$metadata#/Webpage/$entity",
"@id": "https://alicon.aliconnect.nl/api/Webpage(2753247)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgyNzUzMjQ3KQ==",
"Children": [
{
"@id": "https://alicon.aliconnect.nl/api/Webpage(2790633)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgyNzkwNjMzKQ==",
"Level": 1,
"ChildIndex": null,
"Title": "Page 1",
"Subject": null
},
{
"@id": "https://alicon.aliconnect.nl/api/Webpage(392221)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgzOTIyMjEp",
"Level": 1,
"ChildIndex": null,
"Title": "Page 2",
"Subject": null
}
]
}
GET https://alicon.aliconnect.nl/api/Webpage(2753247)/children?select=Title,Subject&level=2 HTTP/1.1
Response
{
"@context": "https://alicon.aliconnect.nl/api/$metadata#/Webpage/$entity",
"@id": "https://alicon.aliconnect.nl/api/Webpage(2753247)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgyNzUzMjQ3KQ==",
"Children": [
{
"@id": "https://alicon.aliconnect.nl/api/Webpage(2790633)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgyNzkwNjMzKQ==",
"Level": 1,
"ChildIndex": null,
"Title": "Page 1",
"Subject": null
},
{
"@id": "https://alicon.aliconnect.nl/api/Webpage(392221)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgzOTIyMjEp",
"Level": 1,
"ChildIndex": null,
"Title": "Page 2",
"Subject": null,
"Children": [
{
"@id": "https://alicon.aliconnect.nl/api/Webpage(3757)",
"Id": "aHR0cHM6Ly9hbGljb24uYWxpY29ubmVjdC5ubC9hcGkvV2VicGFnZSgzNzU3KQ==",
"Level": 2,
"ChildIndex": null,
"Title": "Page 2.1",
"Subject": null
}
]
}
]
}
Object inheritance
Source
:object
orarray
Source reference(s) from wich this objects is copied/derivedIsClass
:boolean
Object is class
GET https://alicon.aliconnect.nl/api/Webpage HTTP/1.1
https://alicon.aliconnect.nl/api/Webpage
GET https://alicon.aliconnect.nl/api/Website(2753246) HTTP/1.1
https://alicon.aliconnect.nl/api/Website(12341). sadfasdfasd
asdfasdfasd
https://alicon.aliconnect.nl/api/Website(12341)/children fsadfasd
Custom tables
components:
schemas:
abis_customer:
table:
name: abisingen.customer.list
search: [KeyName,CompanyName]
header:
- [KeyName,CompanyName]
- [BusinessAddressStreet,BusinessAddressPostalCode,BusinessAddressCity]
- [BusinessPhones1,MobilePhones1]
filter: [Country,State,Township,Locality,Sublocality,PostalCodePrefix,BusinessAddressCity]