icon picker
API

Projects

devapi - application development’s environment
endpoint types
odata - standard tables/views that allow all METHODS
custom - processes/logic
structure
reflect database structure in sql
image.png
devopsapi - engineering’s api environment
pyapi
microservices
splits out service/process
we currently have 2-3 in orbit used to sync between Snipe-IT, BAM, and CW
Jacob may have a couple

Creating Endpoints/APIs

API Documentation

This is the base url used to aquire your records. Attach the desired endpoint to the end in order to obtain your desired data.


Your API key is a randomized string which is unique to your company and is used as our form of authentication. This is a custom header that will need to be added and is required for all calls in the CCR Rest API. This key will be given to you once, so it is important that you do not lose it
To ensure your data is not compromised, it is important to keep your API key secure. Here are some best practices:
Do not share your key with anyone else
Do not embed your key directly in your code as it can lead to exposing it to the public.

Using API Key:

Table 1
1
C# - Http Client Example
Curl Example
1
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.ccr.net/Channel_List");
request.Headers.Add("apikey", "YOUR_API_KEY");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
curl -H "apikey: YOUR_API_KEY"
There are no rows in this table


Examples
1
Call
Example
Response
1
Top Syntax
curl -X GET https://api.ccr.net/Channel_List?$top=1 -H “apikey: YOUR_API_KEY”
[
{
"CCR_Channel_InstanceID": 0,
"CCR_Channel_RecID": 0,
"ClientReferenceName": "string",
"ClientReferenceID": 0,
"ChannelNumber": "string",
"ChannelName": "string",
"DefinitionName": "string",
"CallSign": "string",
"StreamIP": "string",
"Source": "string",
"DateStart": "2023-04-06T16:22:33.788Z"
}
]
2
Filter
curl -X GET https://api.ccr.net/Channel_List?$filter=ClientReferenceID eq YOUR_UNIQUE_ID -H “apikey: YOUR_API_KEY”
[
{
"CCR_Channel_InstanceID": 0,
"CCR_Channel_RecID": 0,
"ClientReferenceName": "string",
"ClientReferenceID": YOUR_UNIQUE_ID,
"ChannelNumber": "string",
"ChannelName": "string",
"DefinitionName": "string",
"CallSign": "string",
"StreamIP": "string",
"Source": "string",
"DateStart": "2023-04-06T16:22:33.788Z"
}
]
3
Select
curl -X GET \ 'https://api.ccr.net/Channel_List?$select=ChannelName' \ -H 'apikey: YOUR_API_KEY' \
{ "ChannelName": "string" }, { "ChannelName": "string" }, { "ChannelName": "string" }, { "ChannelName": "string" },
4
Contains
curl -X GET \ 'https://api.ccr.net/Channel_List?$filter=contains(ChannelName, 'HBO')' \ -H 'apikey: YOUR_API_KEY' \
[
{
"CCR_Channel_InstanceID": 0,
"CCR_Channel_RecID": 0,
"ClientReferenceName": "string",
"ClientReferenceID": [YOUR_UNIQUE_ID],
"ChannelNumber": "string",
"ChannelName": "string",
"DefinitionName": "string",
"CallSign": "string",
"StreamIP": "string",
"Source": "string",
"DateStart": "2023-04-06T16:22:33.788Z"
}
]
There are no rows in this table

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.