0% found this document useful (0 votes)
1 views

ping-error

The document contains two versions of a PingController for an API that serves as a proof of life method to confirm the API's functionality. Version 1.0 returns a message indicating that the CRM Adapter v1.0 is running, while Version 2.0 indicates that the CRM Adapter v2.0 is running. Both controllers are set to allow anonymous access and produce JSON responses.

Uploaded by

sam4gkm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

ping-error

The document contains two versions of a PingController for an API that serves as a proof of life method to confirm the API's functionality. Version 1.0 returns a message indicating that the CRM Adapter v1.0 is running, while Version 2.0 indicates that the CRM Adapter v2.0 is running. Both controllers are set to allow anonymous access and produce JSON responses.

Uploaded by

sam4gkm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

// ------------------------------------------------------

// Author: James Browning ([email protected])


// Created: 2020-10-28
// Updated: 2020-11-17
//UpdatedBy : Varun ([email protected])

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace UnitedLex.Integration.Adapters.Salesforce.Controllers.V1
{
/// <summary>
/// The Ping GET method is a proof of life method to show that the API is
running
/// </summary>
[AllowAnonymous]
[ApiVersion("1")]
[Route("v{version:apiVersion}/[controller]")]
[ApiController]
[Produces("application/json")]
public class PingController : ControllerBase
{

private const string pingControllerV1 = "Ping... The CRM Adapter v1.0 is up


and running.";

[HttpGet]
public static string Get()
{
return pingControllerV1;
}
}
}
namespace UnitedLex.Integration.Adapters.Salesforce.Controllers.V2
{
/// <summary>
/// The Ping GET method is a proof of life method to show that the API is
running
/// </summary>
[AllowAnonymous]
[ApiVersion("2")]
[Route("v{version:apiVersion}/[controller]")]
[ApiController]
[Produces("application/json")]
public class PingController : ControllerBase
{
private const string pingControllerV2 = "Ping... The CRM Adapter v2.0 is up
and running.";

[HttpGet]
public static string Get()
{
return pingControllerV2;
}
}
}

You might also like